code block on chat

This commit is contained in:
Arjun 2026-04-03 15:25:48 +05:30
parent bc929b6c1b
commit 4fb153f5dc
7 changed files with 59 additions and 4 deletions

View file

@ -81,6 +81,13 @@ export const RunErrorEvent = BaseRunEvent.extend({
error: z.string(),
});
export const ToolOutputStreamEvent = BaseRunEvent.extend({
type: z.literal("tool-output-stream"),
toolCallId: z.string(),
toolName: z.string(),
output: z.string(),
});
export const RunStoppedEvent = BaseRunEvent.extend({
type: z.literal("run-stopped"),
reason: z.enum(["user-requested", "force-stopped"]).optional(),
@ -95,6 +102,7 @@ export const RunEvent = z.union([
MessageEvent,
ToolInvocationEvent,
ToolResultEvent,
ToolOutputStreamEvent,
AskHumanRequestEvent,
AskHumanResponseEvent,
ToolPermissionRequestEvent,