fix: 实时上报 Codex 工具事件
This commit is contained in:
@@ -134,6 +134,20 @@ for await (const line of rl) {
|
||||
respond(message.id, { turn });
|
||||
continue;
|
||||
}
|
||||
if (mode === "slow-tool-events") {
|
||||
turnCounter += 1;
|
||||
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
|
||||
notify("turn/started", { turn });
|
||||
notify("item/started", { item: { id: "tool_selftest", type: "commandExecution", command: "sleep 0.05 && echo live" } });
|
||||
notify("item/commandExecution/outputDelta", { itemId: "tool_selftest", delta: "live output\n" });
|
||||
setTimeout(() => {
|
||||
notify("item/completed", { item: { id: "tool_selftest", type: "commandExecution", command: "sleep 0.05 && echo live", status: "completed" } });
|
||||
notify("item/agentMessage/delta", { itemId: "msg_selftest", delta: "done" });
|
||||
notify("turn/completed", { turn });
|
||||
respond(message.id, { turn });
|
||||
}, 50);
|
||||
continue;
|
||||
}
|
||||
turnCounter += 1;
|
||||
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
|
||||
notify("turn/started", { turn });
|
||||
|
||||
Reference in New Issue
Block a user