fix(codex): improve web rendering for Codex events (#544)

* test(codex): add web event rendering harness

* fix(codex): surface plan updates in web

* fix(codex): render MCP tool calls in web

* fix(codex): improve terminal and context display

* fix(codex): format token usage events

* fix(codex): show status context in web

* fix(codex): preserve tool result errors
This commit is contained in:
CoColate
2026-04-29 17:22:45 +08:00
committed by GitHub
parent a612be50d6
commit e76738aa5a
27 changed files with 1138 additions and 15 deletions
+24
View File
@@ -410,6 +410,8 @@ class CodexRemoteLauncher extends RemoteLauncherBase {
delete output.type;
delete output.call_id;
delete output.callId;
output.stdout = output.output;
delete output.output;
session.sendAgentMessage({
type: 'tool-call-result',
@@ -425,6 +427,28 @@ class CodexRemoteLauncher extends RemoteLauncherBase {
id: randomUUID()
});
}
if (msgType === 'plan_update') {
session.sendAgentMessage({
type: 'tool-call',
name: 'update_plan',
callId: 'codex-plan-state',
input: {
plan: Array.isArray(msg.plan) ? msg.plan : [],
source: 'codex'
},
id: randomUUID()
});
session.sendAgentMessage({
type: 'tool-call-result',
callId: 'codex-plan-state',
output: {
plan: Array.isArray(msg.plan) ? msg.plan : [],
source: 'codex',
status: 'updated'
},
id: randomUUID()
});
}
if (msgType === 'patch_apply_begin') {
const callId = asString(msg.call_id ?? msg.callId);
if (callId) {