diff --git a/packages/api/src/interfaces/chat-turn.ts b/packages/api/src/interfaces/chat-turn.ts index a2e8f2d..cd973b9 100644 --- a/packages/api/src/interfaces/chat-turn.ts +++ b/packages/api/src/interfaces/chat-turn.ts @@ -15,6 +15,7 @@ import { GadgetId } from "../lib/gadget-id.ts"; export enum ChatTurnStatus { Processing = "processing", Finished = "finished", + Aborted = "aborted", Error = "error", } @@ -24,24 +25,27 @@ export interface IChatTurnPrompts { } export interface IChatTurnBlockThinking { - mode: 'thinking'; + mode: "thinking"; createdAt: Date; content: string; } export interface IChatTurnBlockResponding { - mode: 'responding'; + mode: "responding"; createdAt: Date; content: string; } export interface IChatTurnBlockTool { - mode: 'tool'; + mode: "tool"; createdAt: Date; content: IChatToolCall; } -export type IChatTurnBlock = IChatTurnBlockThinking | IChatTurnBlockResponding | IChatTurnBlockTool; +export type IChatTurnBlock = + | IChatTurnBlockThinking + | IChatTurnBlockResponding + | IChatTurnBlockTool; export interface IChatTurnStats { toolCallCount: number; // total number of tool functions called this turn