Refine codex app controls and message navigation
This commit is contained in:
@@ -161,6 +161,69 @@ function completeTurn(thread, turnId, text, status = 'completed') {
|
||||
});
|
||||
}
|
||||
|
||||
if (/subagent|collab/i.test(text)) {
|
||||
send({
|
||||
method: 'item/started',
|
||||
params: {
|
||||
threadId: thread.id,
|
||||
turnId,
|
||||
startedAtMs: Date.now(),
|
||||
item: {
|
||||
id: 'tool-collab',
|
||||
type: 'collabAgentToolCall',
|
||||
tool: 'spawn_agent',
|
||||
prompt: '整理前端改动并回报状态',
|
||||
receiverThreadIds: ['child-thread-a', 'child-thread-b'],
|
||||
agentsStates: {
|
||||
'child-thread-a': {
|
||||
name: '实现代理',
|
||||
role: 'frontend',
|
||||
status: 'in_progress',
|
||||
summary: '正在补充结构化渲染与样式',
|
||||
},
|
||||
'child-thread-b': {
|
||||
name: '验证代理',
|
||||
role: 'qa',
|
||||
status: 'completed',
|
||||
summary: '已完成基础事件链检查',
|
||||
},
|
||||
},
|
||||
status: 'inProgress',
|
||||
},
|
||||
},
|
||||
});
|
||||
send({
|
||||
method: 'item/completed',
|
||||
params: {
|
||||
threadId: thread.id,
|
||||
turnId,
|
||||
completedAtMs: Date.now(),
|
||||
item: {
|
||||
id: 'tool-collab',
|
||||
type: 'collabAgentToolCall',
|
||||
tool: 'spawn_agent',
|
||||
prompt: '整理前端改动并回报状态',
|
||||
receiverThreadIds: ['child-thread-a', 'child-thread-b'],
|
||||
agentsStates: {
|
||||
'child-thread-a': {
|
||||
name: '实现代理',
|
||||
role: 'frontend',
|
||||
status: 'completed',
|
||||
summary: '结构化渲染已完成',
|
||||
},
|
||||
'child-thread-b': {
|
||||
name: '验证代理',
|
||||
role: 'qa',
|
||||
status: 'completed',
|
||||
summary: '事件链与持久化检查通过',
|
||||
},
|
||||
},
|
||||
status: 'completed',
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
send({
|
||||
method: 'thread/tokenUsage/updated',
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user