mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 06:41:37 +00:00
fix: route agent CLI via gateway
This commit is contained in:
@@ -598,12 +598,14 @@ export async function agentCommand(
|
||||
2,
|
||||
),
|
||||
);
|
||||
if (!deliver) return;
|
||||
if (!deliver) {
|
||||
return { payloads: normalizedPayloads, meta: result.meta };
|
||||
}
|
||||
}
|
||||
|
||||
if (payloads.length === 0) {
|
||||
runtime.log("No reply from agent.");
|
||||
return;
|
||||
return { payloads: [], meta: result.meta };
|
||||
}
|
||||
|
||||
const deliveryTextLimit =
|
||||
@@ -787,4 +789,11 @@ export async function agentCommand(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const normalizedPayloads = payloads.map((p) => ({
|
||||
text: p.text ?? "",
|
||||
mediaUrl: p.mediaUrl ?? null,
|
||||
mediaUrls: p.mediaUrls ?? (p.mediaUrl ? [p.mediaUrl] : undefined),
|
||||
}));
|
||||
return { payloads: normalizedPayloads, meta: result.meta };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user