import { S as SessionMessage } from './message-BHWbxBtT.js'; /** Broad category of a tool invocation, used for display grouping. */ type ToolCategory = "command" | "write" | "read" | "search" | "edit" | "task" | "web" | "todo" | "other"; interface RunStats { toolCount: number; messageCount: number; thinkingDurationMs: number; textPartCount: number; toolCategories: Set; } interface FinalTextPart { messageId: string; partIndex: number; text: string; } /** * A Run is a consecutive group of assistant messages that form one * logical "turn" of the agent. Runs are collapsible in the UI and * show a summary header when collapsed. */ interface Run { id: string; messages: SessionMessage[]; isComplete: boolean; isStreaming: boolean; stats: RunStats; summaryText: string | null; finalTextPart: FinalTextPart | null; } interface MessageRun { type: "run"; run: Run; } interface MessageUser { type: "user"; message: SessionMessage; } type GroupedMessage = MessageRun | MessageUser; export type { FinalTextPart as F, GroupedMessage as G, MessageRun as M, Run as R, ToolCategory as T, MessageUser as a, RunStats as b };