fix: 等待 codex terminal 后续消息 (#234)

This commit is contained in:
Lyon
2026-06-23 17:15:50 +08:00
committed by GitHub
parent 0d9c2dad43
commit b15c860b35
2 changed files with 26 additions and 4 deletions
+5 -3
View File
@@ -226,12 +226,14 @@ for await (const line of rl) {
if (mode === "multi-agent-message-terminal-before-final") {
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
respond(message.id, { turn });
notify("turn/started", { turn });
notify("item/agentMessage/delta", { itemId: "msg_late_progress", delta: "Progress before delayed final. " });
notify("turn/completed", { turn });
notify("item/completed", { item: { id: "msg_late_progress", type: "agentMessage", text: "Progress before delayed final." } });
notify("item/completed", { item: { id: "msg_late_final", type: "agentMessage", text: "Delayed final answer." } });
respond(message.id, { turn });
setTimeout(() => {
notify("item/completed", { item: { id: "msg_late_progress", type: "agentMessage", text: "Progress before delayed final." } });
notify("item/completed", { item: { id: "msg_late_final", type: "agentMessage", text: "Delayed final answer." } });
}, 20).unref?.();
continue;
}
if (mode === "web-search-progress") {