Stabilize ccweb codex app runtime

This commit is contained in:
shiyue
2026-06-16 09:09:23 +08:00
parent 0f4a1c27fe
commit 2e119fd7e3
6 changed files with 1361 additions and 124 deletions

View File

@@ -162,6 +162,49 @@ function completeTurn(thread, turnId, text, status = 'completed') {
});
}
if (/huge output/i.test(text)) {
const hugeOutput = `huge-output-start\n${'0123456789abcdef'.repeat(30000)}\nhuge-output-end\n`;
send({
method: 'item/started',
params: {
threadId: thread.id,
turnId,
startedAtMs: Date.now(),
item: {
id: 'huge-tool',
type: 'commandExecution',
command: '/bin/bash -lc huge-output',
status: 'inProgress',
},
},
});
send({
method: 'item/commandExecution/outputDelta',
params: {
threadId: thread.id,
turnId,
itemId: 'huge-tool',
delta: hugeOutput,
},
});
send({
method: 'item/completed',
params: {
threadId: thread.id,
turnId,
completedAtMs: Date.now(),
item: {
id: 'huge-tool',
type: 'commandExecution',
command: '/bin/bash -lc huge-output',
aggregatedOutput: hugeOutput,
exitCode: 0,
status: 'completed',
},
},
});
}
if (/subagent|collab/i.test(text)) {
send({
method: 'item/started',