fix: 只用最终 agentMessage 生成 reply

This commit is contained in:
Codex
2026-06-01 23:56:49 +08:00
parent 8577e2fbdf
commit bae2e97139
4 changed files with 58 additions and 5 deletions
+12
View File
@@ -116,6 +116,18 @@ for await (const line of rl) {
respond(message.id, { turn });
continue;
}
if (mode === "multi-agent-message-final") {
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
notify("turn/started", { turn });
notify("item/agentMessage/delta", { itemId: "msg_progress", delta: "I am checking the workspace. " });
notify("item/completed", { item: { id: "msg_progress", type: "agentMessage", text: "I am checking the workspace." } });
notify("item/agentMessage/delta", { itemId: "msg_final", delta: "Final answer only." });
notify("item/completed", { item: { id: "msg_final", type: "agentMessage", text: "Final answer only." } });
notify("turn/completed", { turn });
respond(message.id, { turn });
continue;
}
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
notify("turn/started", { turn });