mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-24 16:32:29 +00:00
Outbound: parse shared interactive params
This commit is contained in:
@@ -422,3 +422,20 @@ export function parseComponentsParam(params: Record<string, unknown>): void {
|
||||
throw new Error("--components must be valid JSON");
|
||||
}
|
||||
}
|
||||
|
||||
export function parseInteractiveParam(params: Record<string, unknown>): void {
|
||||
const raw = params.interactive;
|
||||
if (typeof raw !== "string") {
|
||||
return;
|
||||
}
|
||||
const trimmed = raw.trim();
|
||||
if (!trimmed) {
|
||||
delete params.interactive;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
params.interactive = JSON.parse(trimmed) as unknown;
|
||||
} catch {
|
||||
throw new Error("--interactive must be valid JSON");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user