mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-07 06:52:28 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user