@ash-cloud/ash-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,303 @@
1
+ /**
2
+ * @ash-cloud/ash-ui - Types
3
+ *
4
+ * Normalized types for structured tool call display in agentic UIs.
5
+ * These types provide a unified representation for displaying tool calls
6
+ * with their arguments and results together.
7
+ */
8
+ /**
9
+ * Status of a tool call execution
10
+ */
11
+ type ToolStatus = 'pending' | 'success' | 'failed';
12
+ /**
13
+ * Result from a command/bash execution
14
+ */
15
+ interface CommandRunResult {
16
+ exitCode?: number;
17
+ success?: boolean;
18
+ output?: string;
19
+ }
20
+ /**
21
+ * Generic tool result that can be markdown or structured JSON
22
+ */
23
+ interface ToolResult {
24
+ type: 'markdown' | 'json';
25
+ value: unknown;
26
+ }
27
+ /**
28
+ * Bash/command execution action
29
+ */
30
+ interface CommandRunAction {
31
+ action: 'command_run';
32
+ command: string;
33
+ description?: string;
34
+ result?: CommandRunResult;
35
+ }
36
+ /**
37
+ * File read action
38
+ */
39
+ interface FileReadAction {
40
+ action: 'file_read';
41
+ path: string;
42
+ offset?: number;
43
+ limit?: number;
44
+ }
45
+ /**
46
+ * File edit action
47
+ */
48
+ interface FileEditAction {
49
+ action: 'file_edit';
50
+ path: string;
51
+ oldString?: string;
52
+ newString?: string;
53
+ replaceAll?: boolean;
54
+ }
55
+ /**
56
+ * File write action
57
+ */
58
+ interface FileWriteAction {
59
+ action: 'file_write';
60
+ path: string;
61
+ content?: string;
62
+ }
63
+ /**
64
+ * Search/grep action
65
+ */
66
+ interface SearchAction {
67
+ action: 'search';
68
+ pattern: string;
69
+ path?: string;
70
+ glob?: string;
71
+ type?: string;
72
+ }
73
+ /**
74
+ * Glob/file pattern matching action
75
+ */
76
+ interface GlobAction {
77
+ action: 'glob';
78
+ pattern: string;
79
+ path?: string;
80
+ }
81
+ /**
82
+ * Web fetch action
83
+ */
84
+ interface WebFetchAction {
85
+ action: 'web_fetch';
86
+ url: string;
87
+ prompt?: string;
88
+ }
89
+ /**
90
+ * Web search action
91
+ */
92
+ interface WebSearchAction {
93
+ action: 'web_search';
94
+ query: string;
95
+ }
96
+ /**
97
+ * MCP (Model Context Protocol) tool action
98
+ */
99
+ interface McpToolAction {
100
+ action: 'mcp_tool';
101
+ serverName: string;
102
+ toolName: string;
103
+ arguments?: unknown;
104
+ result?: ToolResult;
105
+ }
106
+ /**
107
+ * Generic/unknown tool action
108
+ */
109
+ interface GenericToolAction {
110
+ action: 'generic_tool';
111
+ toolName: string;
112
+ arguments?: unknown;
113
+ result?: ToolResult;
114
+ }
115
+ /**
116
+ * Status of a todo item
117
+ */
118
+ type TodoStatus = 'pending' | 'in_progress' | 'completed';
119
+ /**
120
+ * A single todo item from TodoWrite tool
121
+ */
122
+ interface TodoItem {
123
+ /** Task content - imperative form (e.g., "Run tests") */
124
+ content: string;
125
+ /** Current status of the todo */
126
+ status: TodoStatus;
127
+ /** Active form shown during execution (e.g., "Running tests") */
128
+ activeForm: string;
129
+ }
130
+ /**
131
+ * TodoWrite tool action - tracks task progress
132
+ */
133
+ interface TodoWriteAction {
134
+ action: 'todo_write';
135
+ /** All todos in the current list */
136
+ todos: TodoItem[];
137
+ /** Summary statistics */
138
+ stats?: {
139
+ total: number;
140
+ completed: number;
141
+ inProgress: number;
142
+ pending: number;
143
+ };
144
+ }
145
+ /**
146
+ * Discriminated union of all action types
147
+ */
148
+ type ActionType = CommandRunAction | FileReadAction | FileEditAction | FileWriteAction | SearchAction | GlobAction | WebFetchAction | WebSearchAction | McpToolAction | GenericToolAction | TodoWriteAction;
149
+ /**
150
+ * A normalized tool call that combines tool_use and tool_result data
151
+ */
152
+ interface NormalizedToolCall {
153
+ /** Unique ID from the tool_use block */
154
+ id: string;
155
+ /** Original tool name (e.g., 'Bash', 'Read', 'mcp__server__tool') */
156
+ toolName: string;
157
+ /** Parsed action type with structured arguments and result */
158
+ actionType: ActionType;
159
+ /** Current execution status */
160
+ status: ToolStatus;
161
+ /** Human-readable one-liner summary */
162
+ summary: string;
163
+ /** When the tool call started */
164
+ startedAt?: string;
165
+ /** When the tool call completed */
166
+ completedAt?: string;
167
+ /** Whether this tool call resulted in an error */
168
+ isError?: boolean;
169
+ }
170
+ /**
171
+ * User message entry
172
+ */
173
+ interface UserMessageEntry {
174
+ type: 'user_message';
175
+ }
176
+ /**
177
+ * Assistant message entry
178
+ */
179
+ interface AssistantMessageEntry {
180
+ type: 'assistant_message';
181
+ }
182
+ /**
183
+ * Thinking/reasoning entry (extended thinking)
184
+ */
185
+ interface ThinkingEntry {
186
+ type: 'thinking';
187
+ }
188
+ /**
189
+ * Tool call entry with full tool call data
190
+ */
191
+ interface ToolCallEntry {
192
+ type: 'tool_call';
193
+ toolCall: NormalizedToolCall;
194
+ }
195
+ /**
196
+ * Error entry
197
+ */
198
+ interface ErrorEntry {
199
+ type: 'error';
200
+ message: string;
201
+ code?: string;
202
+ }
203
+ /**
204
+ * Discriminated union of all entry types
205
+ */
206
+ type NormalizedEntryType = UserMessageEntry | AssistantMessageEntry | ThinkingEntry | ToolCallEntry | ErrorEntry;
207
+ /**
208
+ * A normalized conversation entry for display
209
+ */
210
+ interface NormalizedEntry {
211
+ /** Unique entry ID */
212
+ id: string;
213
+ /** ISO timestamp */
214
+ timestamp?: string;
215
+ /** Entry type with type-specific data */
216
+ entryType: NormalizedEntryType;
217
+ /** Text content for display */
218
+ content: string;
219
+ }
220
+ declare function isCommandRunAction(action: ActionType): action is CommandRunAction;
221
+ declare function isFileReadAction(action: ActionType): action is FileReadAction;
222
+ declare function isFileEditAction(action: ActionType): action is FileEditAction;
223
+ declare function isFileWriteAction(action: ActionType): action is FileWriteAction;
224
+ declare function isSearchAction(action: ActionType): action is SearchAction;
225
+ declare function isGlobAction(action: ActionType): action is GlobAction;
226
+ declare function isWebFetchAction(action: ActionType): action is WebFetchAction;
227
+ declare function isWebSearchAction(action: ActionType): action is WebSearchAction;
228
+ declare function isMcpToolAction(action: ActionType): action is McpToolAction;
229
+ declare function isGenericToolAction(action: ActionType): action is GenericToolAction;
230
+ declare function isTodoWriteAction(action: ActionType): action is TodoWriteAction;
231
+ declare function isToolCallEntry(entry: NormalizedEntryType): entry is ToolCallEntry;
232
+ declare function isErrorEntry(entry: NormalizedEntryType): entry is ErrorEntry;
233
+ type LogLevel = 'info' | 'warn' | 'error' | 'debug';
234
+ type LogCategory = 'setup' | 'skills' | 'execution' | 'process' | 'startup';
235
+ interface LogEntry {
236
+ timestamp: string;
237
+ level: LogLevel;
238
+ category: LogCategory;
239
+ message: string;
240
+ data?: Record<string, unknown>;
241
+ }
242
+ interface FileAttachment {
243
+ name: string;
244
+ type: string;
245
+ size: number;
246
+ base64: string;
247
+ }
248
+ /**
249
+ * Display mode for tool calls in the chat interface
250
+ *
251
+ * - 'inline': Each tool call rendered inline as expandable cards (current behavior)
252
+ * - 'compact': Single animated status line that updates with each tool call,
253
+ * with accordion to expand and see execution details. Text streams unbroken.
254
+ */
255
+ type ToolDisplayMode = 'inline' | 'compact';
256
+ /**
257
+ * Configuration for tool display behavior
258
+ */
259
+ interface ToolDisplayConfig {
260
+ /**
261
+ * Display mode for tool calls
262
+ * @default 'inline'
263
+ */
264
+ mode: ToolDisplayMode;
265
+ /**
266
+ * For 'compact' mode: break into a new group every N tool calls
267
+ * Set to 0 or undefined to never break (all tool calls in single group)
268
+ * @default 0
269
+ */
270
+ breakEveryNToolCalls?: number;
271
+ /**
272
+ * Whether tool call groups start expanded
273
+ * @default false
274
+ */
275
+ defaultExpanded?: boolean;
276
+ /**
277
+ * Animation duration for status line transitions (ms)
278
+ * @default 300
279
+ */
280
+ animationDuration?: number;
281
+ }
282
+ /**
283
+ * Default display configuration
284
+ */
285
+ declare const DEFAULT_DISPLAY_CONFIG: ToolDisplayConfig;
286
+ /**
287
+ * A group of consecutive tool calls that are displayed together
288
+ * in compact mode. Text content before/after flows around the group.
289
+ */
290
+ interface ToolExecutionGroup {
291
+ /** Unique ID for the group */
292
+ id: string;
293
+ /** Tool calls in this group (in order) */
294
+ toolCalls: NormalizedToolCall[];
295
+ /** Index of the currently active/latest tool call for status display */
296
+ activeIndex: number;
297
+ /** Whether all tool calls in this group have completed */
298
+ isComplete: boolean;
299
+ /** Overall status of the group */
300
+ status: 'pending' | 'success' | 'partial_failure' | 'failed';
301
+ }
302
+
303
+ export { type ActionType, type AssistantMessageEntry, type CommandRunAction, type CommandRunResult, DEFAULT_DISPLAY_CONFIG, type ErrorEntry, type FileAttachment, type FileEditAction, type FileReadAction, type FileWriteAction, type GenericToolAction, type GlobAction, type LogCategory, type LogEntry, type LogLevel, type McpToolAction, type NormalizedEntry, type NormalizedEntryType, type NormalizedToolCall, type SearchAction, type ThinkingEntry, type TodoItem, type TodoStatus, type TodoWriteAction, type ToolCallEntry, type ToolDisplayConfig, type ToolDisplayMode, type ToolExecutionGroup, type ToolResult, type ToolStatus, type UserMessageEntry, type WebFetchAction, type WebSearchAction, isCommandRunAction, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isMcpToolAction, isSearchAction, isTodoWriteAction, isToolCallEntry, isWebFetchAction, isWebSearchAction };
package/dist/types.js ADDED
@@ -0,0 +1,50 @@
1
+ // src/types.ts
2
+ function isCommandRunAction(action) {
3
+ return action.action === "command_run";
4
+ }
5
+ function isFileReadAction(action) {
6
+ return action.action === "file_read";
7
+ }
8
+ function isFileEditAction(action) {
9
+ return action.action === "file_edit";
10
+ }
11
+ function isFileWriteAction(action) {
12
+ return action.action === "file_write";
13
+ }
14
+ function isSearchAction(action) {
15
+ return action.action === "search";
16
+ }
17
+ function isGlobAction(action) {
18
+ return action.action === "glob";
19
+ }
20
+ function isWebFetchAction(action) {
21
+ return action.action === "web_fetch";
22
+ }
23
+ function isWebSearchAction(action) {
24
+ return action.action === "web_search";
25
+ }
26
+ function isMcpToolAction(action) {
27
+ return action.action === "mcp_tool";
28
+ }
29
+ function isGenericToolAction(action) {
30
+ return action.action === "generic_tool";
31
+ }
32
+ function isTodoWriteAction(action) {
33
+ return action.action === "todo_write";
34
+ }
35
+ function isToolCallEntry(entry) {
36
+ return entry.type === "tool_call";
37
+ }
38
+ function isErrorEntry(entry) {
39
+ return entry.type === "error";
40
+ }
41
+ var DEFAULT_DISPLAY_CONFIG = {
42
+ mode: "inline",
43
+ breakEveryNToolCalls: 0,
44
+ defaultExpanded: false,
45
+ animationDuration: 300
46
+ };
47
+
48
+ export { DEFAULT_DISPLAY_CONFIG, isCommandRunAction, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isMcpToolAction, isSearchAction, isTodoWriteAction, isToolCallEntry, isWebFetchAction, isWebSearchAction };
49
+ //# sourceMappingURL=types.js.map
50
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types.ts"],"names":[],"mappings":";AA+SO,SAAS,mBAAmB,MAAA,EAAgD;AACjF,EAAA,OAAO,OAAO,MAAA,KAAW,aAAA;AAC3B;AAEO,SAAS,iBAAiB,MAAA,EAA8C;AAC7E,EAAA,OAAO,OAAO,MAAA,KAAW,WAAA;AAC3B;AAEO,SAAS,iBAAiB,MAAA,EAA8C;AAC7E,EAAA,OAAO,OAAO,MAAA,KAAW,WAAA;AAC3B;AAEO,SAAS,kBAAkB,MAAA,EAA+C;AAC/E,EAAA,OAAO,OAAO,MAAA,KAAW,YAAA;AAC3B;AAEO,SAAS,eAAe,MAAA,EAA4C;AACzE,EAAA,OAAO,OAAO,MAAA,KAAW,QAAA;AAC3B;AAEO,SAAS,aAAa,MAAA,EAA0C;AACrE,EAAA,OAAO,OAAO,MAAA,KAAW,MAAA;AAC3B;AAEO,SAAS,iBAAiB,MAAA,EAA8C;AAC7E,EAAA,OAAO,OAAO,MAAA,KAAW,WAAA;AAC3B;AAEO,SAAS,kBAAkB,MAAA,EAA+C;AAC/E,EAAA,OAAO,OAAO,MAAA,KAAW,YAAA;AAC3B;AAEO,SAAS,gBAAgB,MAAA,EAA6C;AAC3E,EAAA,OAAO,OAAO,MAAA,KAAW,UAAA;AAC3B;AAEO,SAAS,oBAAoB,MAAA,EAAiD;AACnF,EAAA,OAAO,OAAO,MAAA,KAAW,cAAA;AAC3B;AAEO,SAAS,kBAAkB,MAAA,EAA+C;AAC/E,EAAA,OAAO,OAAO,MAAA,KAAW,YAAA;AAC3B;AAEO,SAAS,gBAAgB,KAAA,EAAoD;AAClF,EAAA,OAAO,MAAM,IAAA,KAAS,WAAA;AACxB;AAEO,SAAS,aAAa,KAAA,EAAiD;AAC5E,EAAA,OAAO,MAAM,IAAA,KAAS,OAAA;AACxB;AA0EO,IAAM,sBAAA,GAA4C;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB,CAAA;AAAA,EACtB,eAAA,EAAiB,KAAA;AAAA,EACjB,iBAAA,EAAmB;AACrB","file":"types.js","sourcesContent":["/**\n * @ash-cloud/ash-ui - Types\n *\n * Normalized types for structured tool call display in agentic UIs.\n * These types provide a unified representation for displaying tool calls\n * with their arguments and results together.\n */\n\n// =============================================================================\n// Tool Status\n// =============================================================================\n\n/**\n * Status of a tool call execution\n */\nexport type ToolStatus = 'pending' | 'success' | 'failed';\n\n// =============================================================================\n// Action-Specific Result Types\n// =============================================================================\n\n/**\n * Result from a command/bash execution\n */\nexport interface CommandRunResult {\n exitCode?: number;\n success?: boolean;\n output?: string;\n}\n\n/**\n * Generic tool result that can be markdown or structured JSON\n */\nexport interface ToolResult {\n type: 'markdown' | 'json';\n value: unknown;\n}\n\n// =============================================================================\n// Action Types (Discriminated Union)\n// =============================================================================\n\n/**\n * Bash/command execution action\n */\nexport interface CommandRunAction {\n action: 'command_run';\n command: string;\n description?: string;\n result?: CommandRunResult;\n}\n\n/**\n * File read action\n */\nexport interface FileReadAction {\n action: 'file_read';\n path: string;\n offset?: number;\n limit?: number;\n}\n\n/**\n * File edit action\n */\nexport interface FileEditAction {\n action: 'file_edit';\n path: string;\n oldString?: string;\n newString?: string;\n replaceAll?: boolean;\n}\n\n/**\n * File write action\n */\nexport interface FileWriteAction {\n action: 'file_write';\n path: string;\n content?: string;\n}\n\n/**\n * Search/grep action\n */\nexport interface SearchAction {\n action: 'search';\n pattern: string;\n path?: string;\n glob?: string;\n type?: string;\n}\n\n/**\n * Glob/file pattern matching action\n */\nexport interface GlobAction {\n action: 'glob';\n pattern: string;\n path?: string;\n}\n\n/**\n * Web fetch action\n */\nexport interface WebFetchAction {\n action: 'web_fetch';\n url: string;\n prompt?: string;\n}\n\n/**\n * Web search action\n */\nexport interface WebSearchAction {\n action: 'web_search';\n query: string;\n}\n\n/**\n * MCP (Model Context Protocol) tool action\n */\nexport interface McpToolAction {\n action: 'mcp_tool';\n serverName: string;\n toolName: string;\n arguments?: unknown;\n result?: ToolResult;\n}\n\n/**\n * Generic/unknown tool action\n */\nexport interface GenericToolAction {\n action: 'generic_tool';\n toolName: string;\n arguments?: unknown;\n result?: ToolResult;\n}\n\n// =============================================================================\n// Todo Types\n// =============================================================================\n\n/**\n * Status of a todo item\n */\nexport type TodoStatus = 'pending' | 'in_progress' | 'completed';\n\n/**\n * A single todo item from TodoWrite tool\n */\nexport interface TodoItem {\n /** Task content - imperative form (e.g., \"Run tests\") */\n content: string;\n /** Current status of the todo */\n status: TodoStatus;\n /** Active form shown during execution (e.g., \"Running tests\") */\n activeForm: string;\n}\n\n/**\n * TodoWrite tool action - tracks task progress\n */\nexport interface TodoWriteAction {\n action: 'todo_write';\n /** All todos in the current list */\n todos: TodoItem[];\n /** Summary statistics */\n stats?: {\n total: number;\n completed: number;\n inProgress: number;\n pending: number;\n };\n}\n\n/**\n * Discriminated union of all action types\n */\nexport type ActionType =\n | CommandRunAction\n | FileReadAction\n | FileEditAction\n | FileWriteAction\n | SearchAction\n | GlobAction\n | WebFetchAction\n | WebSearchAction\n | McpToolAction\n | GenericToolAction\n | TodoWriteAction;\n\n// =============================================================================\n// Normalized Tool Call\n// =============================================================================\n\n/**\n * A normalized tool call that combines tool_use and tool_result data\n */\nexport interface NormalizedToolCall {\n /** Unique ID from the tool_use block */\n id: string;\n\n /** Original tool name (e.g., 'Bash', 'Read', 'mcp__server__tool') */\n toolName: string;\n\n /** Parsed action type with structured arguments and result */\n actionType: ActionType;\n\n /** Current execution status */\n status: ToolStatus;\n\n /** Human-readable one-liner summary */\n summary: string;\n\n /** When the tool call started */\n startedAt?: string;\n\n /** When the tool call completed */\n completedAt?: string;\n\n /** Whether this tool call resulted in an error */\n isError?: boolean;\n}\n\n// =============================================================================\n// Normalized Entry Types\n// =============================================================================\n\n/**\n * User message entry\n */\nexport interface UserMessageEntry {\n type: 'user_message';\n}\n\n/**\n * Assistant message entry\n */\nexport interface AssistantMessageEntry {\n type: 'assistant_message';\n}\n\n/**\n * Thinking/reasoning entry (extended thinking)\n */\nexport interface ThinkingEntry {\n type: 'thinking';\n}\n\n/**\n * Tool call entry with full tool call data\n */\nexport interface ToolCallEntry {\n type: 'tool_call';\n toolCall: NormalizedToolCall;\n}\n\n/**\n * Error entry\n */\nexport interface ErrorEntry {\n type: 'error';\n message: string;\n code?: string;\n}\n\n/**\n * Discriminated union of all entry types\n */\nexport type NormalizedEntryType =\n | UserMessageEntry\n | AssistantMessageEntry\n | ThinkingEntry\n | ToolCallEntry\n | ErrorEntry;\n\n// =============================================================================\n// Normalized Entry\n// =============================================================================\n\n/**\n * A normalized conversation entry for display\n */\nexport interface NormalizedEntry {\n /** Unique entry ID */\n id: string;\n\n /** ISO timestamp */\n timestamp?: string;\n\n /** Entry type with type-specific data */\n entryType: NormalizedEntryType;\n\n /** Text content for display */\n content: string;\n}\n\n// =============================================================================\n// Type Guards\n// =============================================================================\n\nexport function isCommandRunAction(action: ActionType): action is CommandRunAction {\n return action.action === 'command_run';\n}\n\nexport function isFileReadAction(action: ActionType): action is FileReadAction {\n return action.action === 'file_read';\n}\n\nexport function isFileEditAction(action: ActionType): action is FileEditAction {\n return action.action === 'file_edit';\n}\n\nexport function isFileWriteAction(action: ActionType): action is FileWriteAction {\n return action.action === 'file_write';\n}\n\nexport function isSearchAction(action: ActionType): action is SearchAction {\n return action.action === 'search';\n}\n\nexport function isGlobAction(action: ActionType): action is GlobAction {\n return action.action === 'glob';\n}\n\nexport function isWebFetchAction(action: ActionType): action is WebFetchAction {\n return action.action === 'web_fetch';\n}\n\nexport function isWebSearchAction(action: ActionType): action is WebSearchAction {\n return action.action === 'web_search';\n}\n\nexport function isMcpToolAction(action: ActionType): action is McpToolAction {\n return action.action === 'mcp_tool';\n}\n\nexport function isGenericToolAction(action: ActionType): action is GenericToolAction {\n return action.action === 'generic_tool';\n}\n\nexport function isTodoWriteAction(action: ActionType): action is TodoWriteAction {\n return action.action === 'todo_write';\n}\n\nexport function isToolCallEntry(entry: NormalizedEntryType): entry is ToolCallEntry {\n return entry.type === 'tool_call';\n}\n\nexport function isErrorEntry(entry: NormalizedEntryType): entry is ErrorEntry {\n return entry.type === 'error';\n}\n\n// =============================================================================\n// Log Types (for SandboxLogsPanel)\n// =============================================================================\n\nexport type LogLevel = 'info' | 'warn' | 'error' | 'debug';\nexport type LogCategory = 'setup' | 'skills' | 'execution' | 'process' | 'startup';\n\nexport interface LogEntry {\n timestamp: string;\n level: LogLevel;\n category: LogCategory;\n message: string;\n data?: Record<string, unknown>;\n}\n\n// =============================================================================\n// File Attachment\n// =============================================================================\n\nexport interface FileAttachment {\n name: string;\n type: string;\n size: number;\n base64: string;\n}\n\n// =============================================================================\n// Display Mode Configuration\n// =============================================================================\n\n/**\n * Display mode for tool calls in the chat interface\n *\n * - 'inline': Each tool call rendered inline as expandable cards (current behavior)\n * - 'compact': Single animated status line that updates with each tool call,\n * with accordion to expand and see execution details. Text streams unbroken.\n */\nexport type ToolDisplayMode = 'inline' | 'compact';\n\n/**\n * Configuration for tool display behavior\n */\nexport interface ToolDisplayConfig {\n /**\n * Display mode for tool calls\n * @default 'inline'\n */\n mode: ToolDisplayMode;\n\n /**\n * For 'compact' mode: break into a new group every N tool calls\n * Set to 0 or undefined to never break (all tool calls in single group)\n * @default 0\n */\n breakEveryNToolCalls?: number;\n\n /**\n * Whether tool call groups start expanded\n * @default false\n */\n defaultExpanded?: boolean;\n\n /**\n * Animation duration for status line transitions (ms)\n * @default 300\n */\n animationDuration?: number;\n}\n\n/**\n * Default display configuration\n */\nexport const DEFAULT_DISPLAY_CONFIG: ToolDisplayConfig = {\n mode: 'inline',\n breakEveryNToolCalls: 0,\n defaultExpanded: false,\n animationDuration: 300,\n};\n\n// =============================================================================\n// Tool Execution Group (for compact mode)\n// =============================================================================\n\n/**\n * A group of consecutive tool calls that are displayed together\n * in compact mode. Text content before/after flows around the group.\n */\nexport interface ToolExecutionGroup {\n /** Unique ID for the group */\n id: string;\n\n /** Tool calls in this group (in order) */\n toolCalls: NormalizedToolCall[];\n\n /** Index of the currently active/latest tool call for status display */\n activeIndex: number;\n\n /** Whether all tool calls in this group have completed */\n isComplete: boolean;\n\n /** Overall status of the group */\n status: 'pending' | 'success' | 'partial_failure' | 'failed';\n}\n"]}