fix: remove break after approval.request — let stream continue
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 37s

This commit is contained in:
WangDL 2026-05-22 19:15:54 +08:00
parent 2753063b6f
commit e6ecb2c48f

View File

@ -147,8 +147,6 @@ export class AdminAiChatService {
res.write(`data: ${JSON.stringify({ event: 'approval.request', command: (event as any).command, description: (event as any).description, choices: (event as any).choices, runId: runId })} res.write(`data: ${JSON.stringify({ event: 'approval.request', command: (event as any).command, description: (event as any).description, choices: (event as any).choices, runId: runId })}
`); `);
// Wait for approval — frontend calls /stop endpoint which we use for this
break;
} }
if (event.event === 'tool.started' || event.event === 'tool.completed') { if (event.event === 'tool.started' || event.event === 'tool.completed') {
res.write(`data: ${JSON.stringify({ event: event.event, tool: (event as any).tool, preview: (event as any).preview, duration: (event as any).duration, error: (event as any).error })} res.write(`data: ${JSON.stringify({ event: event.event, tool: (event as any).tool, preview: (event as any).preview, duration: (event as any).duration, error: (event as any).error })}