Skip to content

Commit dd1cad2

Browse files
committed
add start print mode event
1 parent f010c12 commit dd1cad2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

backend/src/websockets/websocket-action.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,15 @@ export const callMainPrompt = async (
217217
})
218218
}
219219

220+
sendAction(ws, {
221+
type: 'response-chunk',
222+
userInputId: promptId,
223+
chunk: {
224+
type: 'start',
225+
agentId: action.sessionState.mainAgentState.agentType ?? undefined,
226+
},
227+
})
228+
220229
const result = await mainPrompt(ws, action, {
221230
userId,
222231
clientSessionId,

common/src/types/print-mode.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import z from 'zod/v4'
22

33
import { toolResultOutputSchema } from './messages/content-part'
44

5+
export const printModeStartSchema = z.object({
6+
type: z.literal('start'),
7+
agentId: z.string().optional(),
8+
})
9+
export type PrintModeStart = z.infer<typeof printModeStartSchema>
10+
511
export const printModeErrorSchema = z.object({
612
type: z.literal('error'),
713
message: z.string(),
@@ -49,6 +55,7 @@ export const printModeEventSchema = z.discriminatedUnion('type', [
4955
printModeErrorSchema,
5056
printModeDownloadStatusSchema,
5157
printModeFinishSchema,
58+
printModeStartSchema,
5259
printModeTextSchema,
5360
printModeToolCallSchema,
5461
printModeToolResultSchema,

0 commit comments

Comments
 (0)