@townco/ui 0.1.79 → 0.1.82
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.
- package/dist/core/hooks/use-chat-messages.d.ts +8 -8
- package/dist/core/hooks/use-chat-session.d.ts +1 -1
- package/dist/core/hooks/use-tool-calls.d.ts +155 -7
- package/dist/core/schemas/chat.d.ts +28 -28
- package/dist/core/schemas/tool-call.d.ts +34 -34
- package/dist/gui/components/AppSidebar.d.ts +1 -1
- package/dist/gui/components/AppSidebar.js +7 -1
- package/dist/gui/components/Button.d.ts +2 -2
- package/dist/gui/components/ChatEmptyState.js +9 -1
- package/dist/gui/components/ChatInput.js +4 -2
- package/dist/gui/components/ChatInputCommandMenu.js +5 -1
- package/dist/gui/components/ChatLayout.js +13 -6
- package/dist/gui/components/ChatPanelTabContent.js +17 -2
- package/dist/gui/components/ChatSecondaryPanel.js +5 -2
- package/dist/gui/components/ChatView.d.ts +1 -1
- package/dist/gui/components/ChatView.js +38 -6
- package/dist/gui/components/ContextUsageButton.js +41 -3
- package/dist/gui/components/Conversation.js +4 -1
- package/dist/gui/components/Dialog.d.ts +8 -8
- package/dist/gui/components/Dialog.js +6 -1
- package/dist/gui/components/DropdownMenu.d.ts +4 -4
- package/dist/gui/components/DropdownMenu.js +6 -3
- package/dist/gui/components/FileSystemItem.d.ts +1 -1
- package/dist/gui/components/FileSystemItem.js +7 -3
- package/dist/gui/components/FileSystemView.d.ts +1 -1
- package/dist/gui/components/HeightTransition.d.ts +1 -1
- package/dist/gui/components/HookNotification.js +39 -3
- package/dist/gui/components/Input.d.ts +1 -1
- package/dist/gui/components/MarkdownRenderer.d.ts +1 -1
- package/dist/gui/components/Message.d.ts +2 -2
- package/dist/gui/components/MessageContent.d.ts +2 -2
- package/dist/gui/components/MessageContent.js +3 -2
- package/dist/gui/components/Reasoning.d.ts +1 -1
- package/dist/gui/components/Reasoning.js +10 -3
- package/dist/gui/components/Select.js +9 -4
- package/dist/gui/components/SessionHistory.d.ts +1 -1
- package/dist/gui/components/SessionHistory.js +10 -3
- package/dist/gui/components/SessionHistoryItem.js +10 -2
- package/dist/gui/components/Sheet.d.ts +9 -9
- package/dist/gui/components/Sheet.js +6 -1
- package/dist/gui/components/Sidebar.d.ts +5 -6
- package/dist/gui/components/Sidebar.js +12 -5
- package/dist/gui/components/SidebarToggle.d.ts +1 -1
- package/dist/gui/components/Sonner.d.ts +1 -3
- package/dist/gui/components/SourceListItem.js +7 -1
- package/dist/gui/components/SubAgentDetails.d.ts +1 -1
- package/dist/gui/components/SubAgentDetails.js +15 -3
- package/dist/gui/components/Task.js +5 -1
- package/dist/gui/components/Textarea.d.ts +1 -1
- package/dist/gui/components/ThemeProvider.d.ts +1 -1
- package/dist/gui/components/ThemeToggle.js +7 -1
- package/dist/gui/components/ThinkingBlock.d.ts +2 -2
- package/dist/gui/components/ThinkingBlock.js +9 -2
- package/dist/gui/components/TodoList.js +5 -1
- package/dist/gui/components/TodoListItem.js +4 -2
- package/dist/gui/components/TodoSubline.js +2 -1
- package/dist/gui/components/ToolCallList.d.ts +1 -1
- package/dist/gui/components/ToolCallList.js +5 -1
- package/dist/gui/components/ToolOperation.d.ts +1 -1
- package/dist/gui/components/ToolOperation.js +75 -17
- package/dist/gui/components/WorkProgress.d.ts +1 -1
- package/dist/gui/components/resizable.d.ts +34 -2
- package/dist/gui/components/resizable.js +3 -1
- package/dist/sdk/schemas/agent.d.ts +4 -4
- package/dist/sdk/schemas/message.d.ts +13 -13
- package/dist/sdk/schemas/session.d.ts +46 -46
- package/dist/sdk/transports/http.d.ts +0 -10
- package/dist/tui/components/ChatView.js +3 -1
- package/dist/tui/components/GameOfLife.js +4 -2
- package/dist/tui/components/InputBox.d.ts +1 -1
- package/dist/tui/components/InputBox.js +8 -1
- package/dist/tui/components/MessageList.js +3 -1
- package/dist/tui/components/MultiSelect.d.ts +1 -1
- package/dist/tui/components/MultiSelect.js +5 -3
- package/dist/tui/components/ReadlineInput.d.ts +1 -1
- package/dist/tui/components/ReadlineInput.js +4 -2
- package/dist/tui/components/SimpleTextInput.d.ts +1 -1
- package/dist/tui/components/SimpleTextInput.js +4 -2
- package/dist/tui/components/SingleSelect.d.ts +1 -1
- package/dist/tui/components/SingleSelect.js +5 -3
- package/dist/tui/components/StatusBar.d.ts +1 -1
- package/dist/tui/components/StatusBar.js +8 -3
- package/dist/tui/components/ToolCall.js +3 -1
- package/dist/tui/components/ToolCallList.js +5 -1
- package/package.json +7 -7
- package/dist/gui/components/InvokingGroup.d.ts +0 -9
- package/dist/gui/components/InvokingGroup.js +0 -16
- package/dist/gui/components/SubagentStream.d.ts +0 -23
- package/dist/gui/components/SubagentStream.js +0 -98
- package/dist/gui/components/ToolCall.d.ts +0 -8
- package/dist/gui/components/ToolCall.js +0 -234
- package/dist/gui/components/ToolCallGroup.d.ts +0 -8
- package/dist/gui/components/ToolCallGroup.js +0 -29
|
@@ -22,5 +22,6 @@ export function TodoSubline({ todos, className }) {
|
|
|
22
22
|
const displayText = displayItem.status === "in_progress"
|
|
23
23
|
? displayItem.activeForm || displayItem.content
|
|
24
24
|
: displayItem.content;
|
|
25
|
-
return (_jsxs("span", { className: cn("flex items-center gap-1.5", className), children: [displayItem.status === "completed" ? (_jsx(CircleCheck, { className: "size-3 text-muted-foreground shrink-0" })) : displayItem.status === "in_progress" ? (_jsx("span", { className: "size-2 rounded-full bg-foreground animate-pulse-scale shrink-0" })) : (_jsx(Circle, { className: "size-3 text-foreground shrink-0" })), _jsx("span", { className: "truncate", children: displayText })
|
|
25
|
+
return (_jsxs("span", { className: cn("flex items-center gap-1.5", className), children: [displayItem.status === "completed" ? (_jsx(CircleCheck, { className: "size-3 text-muted-foreground shrink-0" })) : displayItem.status === "in_progress" ? (_jsx("span", { className: "size-2 rounded-full bg-foreground animate-pulse-scale shrink-0" })) : (_jsx(Circle, { className: "size-3 text-foreground shrink-0" })), _jsx("span", { className: "truncate", children: displayText })
|
|
26
|
+
] }));
|
|
26
27
|
}
|
|
@@ -6,4 +6,4 @@ export interface ToolCallListProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* ToolCallList component - renders a list of tool calls, optionally grouped
|
|
8
8
|
*/
|
|
9
|
-
export declare function ToolCallList({ toolCalls, groupBy
|
|
9
|
+
export declare function ToolCallList({ toolCalls, groupBy }: ToolCallListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -15,7 +15,11 @@ export function ToolCallList({ toolCalls, groupBy = "chronological", }) {
|
|
|
15
15
|
completed: toolCalls.filter((tc) => tc.status === "completed"),
|
|
16
16
|
failed: toolCalls.filter((tc) => tc.status === "failed"),
|
|
17
17
|
};
|
|
18
|
-
return (_jsxs("div", { className: "space-y-4", children: [grouped.in_progress.length > 0 && (_jsxs("div", { children: [
|
|
18
|
+
return (_jsxs("div", { className: "space-y-4", children: [grouped.in_progress.length > 0 && (_jsxs("div", { children: [
|
|
19
|
+
_jsx("h4", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider mb-2 pl-1", children: "In Progress" }), grouped.in_progress.map((tc) => (_jsx(ToolOperation, { toolCalls: [tc], isGrouped: false }, tc.id)))] })), grouped.pending.length > 0 && (_jsxs("div", { children: [
|
|
20
|
+
_jsx("h4", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider mb-2 pl-1", children: "Pending" }), grouped.pending.map((tc) => (_jsx(ToolOperation, { toolCalls: [tc], isGrouped: false }, tc.id)))] })), grouped.completed.length > 0 && (_jsxs("div", { children: [
|
|
21
|
+
_jsx("h4", { className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider mb-2 pl-1", children: "Completed" }), grouped.completed.map((tc) => (_jsx(ToolOperation, { toolCalls: [tc], isGrouped: false }, tc.id)))] })), grouped.failed.length > 0 && (_jsxs("div", { children: [
|
|
22
|
+
_jsx("h4", { className: "text-[10px] font-bold text-zinc-400 uppercase tracking-wider mb-2 pl-1", children: "Failed" }), grouped.failed.map((tc) => (_jsx(ToolOperation, { toolCalls: [tc], isGrouped: false }, tc.id)))] }))] }));
|
|
19
23
|
}
|
|
20
24
|
// Default: chronological order
|
|
21
25
|
return (_jsx("div", { className: "space-y-2", children: toolCalls.map((tc) => (_jsx(ToolOperation, { toolCalls: [tc], isGrouped: false }, tc.id))) }));
|
|
@@ -11,4 +11,4 @@ export interface ToolOperationProps {
|
|
|
11
11
|
* ToolOperation component - unified display for tool calls
|
|
12
12
|
* Handles both individual and grouped tool calls with smooth transitions
|
|
13
13
|
*/
|
|
14
|
-
export declare function ToolOperation({ toolCalls, isGrouped, autoMinimize, hookNotifications
|
|
14
|
+
export declare function ToolOperation({ toolCalls, isGrouped, autoMinimize, hookNotifications }: ToolOperationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -34,7 +34,19 @@ function CompactionDetails({ compactionAction, originalTokens, finalTokens, orig
|
|
|
34
34
|
const reductionPercent = originalTokens && finalTokens
|
|
35
35
|
? Math.round((1 - finalTokens / originalTokens) * 100)
|
|
36
36
|
: undefined;
|
|
37
|
-
return (_jsxs("div", { className: "p-3 border-b border-border", children: [
|
|
37
|
+
return (_jsxs("div", { className: "p-3 border-b border-border", children: [
|
|
38
|
+
_jsxs("div", { className: "flex items-center gap-2 mb-2", children: [compactionAction === "compacted" ? (_jsx(FoldVertical, { className: "w-3.5 h-3.5 text-text-secondary" })) : (_jsx(ScissorsLineDashed, { className: "w-3.5 h-3.5 text-destructive" })), _jsxs("span", { className: "text-[10px] font-bold text-text-secondary uppercase tracking-wider font-sans", children: ["Response", " ", compactionAction === "compacted" ? "Compacted" : "Truncated"] })
|
|
39
|
+
] }), _jsxs("div", { className: "grid grid-cols-4 gap-3 mb-3", children: [originalTokens !== undefined && (_jsxs("div", { children: [
|
|
40
|
+
_jsx("div", { className: "text-[9px] text-text-secondary uppercase tracking-wide font-sans mb-0.5", children: "Original" }), _jsxs("div", { className: "text-[12px] font-medium text-foreground font-sans", children: [originalTokens.toLocaleString(), " tokens"] })
|
|
41
|
+
] })), finalTokens !== undefined && (_jsxs("div", { children: [
|
|
42
|
+
_jsx("div", { className: "text-[9px] text-text-secondary uppercase tracking-wide font-sans mb-0.5", children: "Compacted" }), _jsxs("div", { className: "text-[12px] font-medium text-foreground font-sans", children: [finalTokens.toLocaleString(), " tokens"] })
|
|
43
|
+
] })), tokensSaved !== undefined && (_jsxs("div", { children: [
|
|
44
|
+
_jsx("div", { className: "text-[9px] text-text-secondary uppercase tracking-wide font-sans mb-0.5", children: "Saved" }), _jsxs("div", { className: "text-[12px] font-medium text-foreground font-sans", children: [tokensSaved.toLocaleString(), " tokens"] })
|
|
45
|
+
] })), reductionPercent !== undefined && (_jsxs("div", { children: [
|
|
46
|
+
_jsx("div", { className: "text-[9px] text-text-secondary uppercase tracking-wide font-sans mb-0.5", children: "Reduction" }), _jsxs("div", { className: "text-[12px] font-medium text-foreground font-sans", children: [reductionPercent, "%"] })
|
|
47
|
+
] }))] }), originalContentPath && (_jsxs("div", { className: "text-[10px] text-text-secondary font-sans", children: [
|
|
48
|
+
_jsx("span", { className: "font-medium", children: "Original saved to:" }), " ", _jsx("code", { className: "bg-muted px-1 py-0.5 rounded text-[9px]", children: originalContentPath })
|
|
49
|
+
] }))] }));
|
|
38
50
|
}
|
|
39
51
|
/**
|
|
40
52
|
* ToolOperation component - unified display for tool calls
|
|
@@ -171,14 +183,24 @@ export function ToolOperation({ toolCalls, isGrouped = false, autoMinimize = tru
|
|
|
171
183
|
}
|
|
172
184
|
// If it's a grouped preliminary (selecting) state
|
|
173
185
|
if (isSelecting && isGrouped) {
|
|
174
|
-
return (_jsxs("div", { className: "flex flex-col my-4 rounded-md px-1 -mx-1 w-fit", children: [
|
|
186
|
+
return (_jsxs("div", { className: "flex flex-col my-4 rounded-md px-1 -mx-1 w-fit", children: [
|
|
187
|
+
_jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
188
|
+
_jsx("div", { className: "text-text-secondary/70", children: _jsx(ListVideo, { className: "h-3 w-3" }) }), _jsx("span", { className: "text-paragraph-sm text-text-secondary/70", children: "Selecting tools" }), _jsx("span", { className: "text-[10px] bg-muted px-1.5 py-0.5 rounded text-text-secondary/70", children: toolCalls.length })
|
|
189
|
+
] }), _jsx("span", { className: "text-paragraph-sm text-text-secondary/70 pl-4.5", children: displayText })
|
|
190
|
+
] }));
|
|
175
191
|
}
|
|
176
192
|
// Full display (for single tool call or expanded group, includes minimized state)
|
|
177
|
-
return (_jsxs("div", { className: "flex flex-col my-4", children: [
|
|
193
|
+
return (_jsxs("div", { className: "flex flex-col my-4", children: [
|
|
194
|
+
_jsxs("button", { type: "button", className: "flex flex-col items-start gap-0.5 cursor-pointer bg-transparent border-none p-0 text-left group w-fit rounded-md px-1 -mx-1", onClick: handleHeaderClick, "aria-expanded": isTodoWrite ? undefined : isExpanded, children: [
|
|
195
|
+
_jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
196
|
+
_jsx("div", { className: "text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: _jsx(IconComponent, { className: "h-3 w-3" }) }), _jsxs("span", { className: "text-paragraph-sm text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: [isGrouped && _jsx("span", { className: "mr-1", children: "Parallel operation" }), !isGrouped && displayText] }), isGrouped && (_jsx("span", { className: "text-[10px] bg-muted px-1.5 py-0.5 rounded text-text-secondary/70", children: toolCalls.length })), isFailed && (_jsx("span", { title: isGrouped
|
|
178
197
|
? `${toolCalls.filter((tc) => tc.status === "failed").length} of ${toolCalls.length} operations failed`
|
|
179
|
-
: singleToolCall?.error || "Operation failed", children: _jsx(AlertCircle, { className: "h-3 w-3 text-destructive" }) })), isGrouped && groupHasCompaction && (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [
|
|
198
|
+
: singleToolCall?.error || "Operation failed", children: _jsx(AlertCircle, { className: "h-3 w-3 text-destructive" }) })), isGrouped && groupHasCompaction && (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [
|
|
199
|
+
_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: groupHasTruncation ? (_jsx(ScissorsLineDashed, { className: "h-3 w-3 text-destructive" })) : (_jsx(FoldVertical, { className: "h-3 w-3 text-text-secondary/70" })) }) }), _jsx(TooltipContent, { children: groupHasTruncation
|
|
180
200
|
? "Some responses were truncated"
|
|
181
|
-
: "Some responses were compacted" })
|
|
201
|
+
: "Some responses were compacted" })
|
|
202
|
+
] }) })), !isGrouped && hasCompaction && (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [
|
|
203
|
+
_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: isTruncation ? (_jsx(ScissorsLineDashed, { className: "h-3 w-3 text-destructive" })) : (_jsx(FoldVertical, { className: "h-3 w-3 text-text-secondary/70" })) }) }), _jsx(TooltipContent, { children: (() => {
|
|
182
204
|
const meta = singleToolCall?._meta;
|
|
183
205
|
const percentage = meta?.originalTokens && meta?.finalTokens
|
|
184
206
|
? Math.round((1 - meta.finalTokens / meta.originalTokens) * 100)
|
|
@@ -191,7 +213,8 @@ export function ToolOperation({ toolCalls, isGrouped = false, autoMinimize = tru
|
|
|
191
213
|
return percentage
|
|
192
214
|
? `Response compacted (${percentage}% reduction)`
|
|
193
215
|
: "Response was compacted";
|
|
194
|
-
})() })
|
|
216
|
+
})() })
|
|
217
|
+
] }) })), isTodoWrite ? (_jsx(ChevronRight, { className: "h-3 w-3 text-text-secondary/70 group-hover:text-text-secondary transition-colors" })) : (_jsx("div", { className: `h-3 w-3 text-text-secondary/70 group-hover:text-text-secondary transition-all duration-200 ${isExpanded ? "rotate-180" : ""}`, children: _jsx(ChevronDown, { className: "h-3 w-3" }) }))] }), !isGrouped &&
|
|
195
218
|
singleToolCall &&
|
|
196
219
|
(isTodoWrite && singleToolCall.rawInput?.todos ? (_jsx(TodoSubline, { todos: singleToolCall.rawInput.todos, className: "text-paragraph-sm text-text-secondary/70 pl-4.5" })) : singleToolCall.subline ? (_jsx("span", { className: "text-paragraph-sm text-text-secondary/70 pl-4.5", children: singleToolCall.subline })) : null), !isGrouped && toolHookNotification && (_jsx("span", { className: "text-paragraph-sm text-text-secondary/70 pl-4.5", children: toolHookNotification.status === "triggered"
|
|
197
220
|
? "Compacting response..."
|
|
@@ -250,7 +273,10 @@ function GroupedToolCallItem({ toolCall, hookNotification, }) {
|
|
|
250
273
|
const isFailed = toolCall.status === "failed";
|
|
251
274
|
if (isSubagentCall) {
|
|
252
275
|
// Render subagent with clickable header and SubAgentDetails component
|
|
253
|
-
return (_jsxs("div", { className: "flex flex-col ml-5", children: [
|
|
276
|
+
return (_jsxs("div", { className: "flex flex-col ml-5", children: [
|
|
277
|
+
_jsxs("button", { type: "button", className: "flex items-center gap-1.5 cursor-pointer bg-transparent border-none p-0 text-left group w-fit", onClick: () => setIsExpanded(!isExpanded), "aria-expanded": isExpanded, children: [
|
|
278
|
+
_jsx("div", { className: "text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: _jsx(CircleDot, { className: "h-3 w-3" }) }), _jsx("span", { className: "text-paragraph-sm text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: toolCall.rawInput?.agentName || "Subagent" }), isFailed && (_jsx("span", { title: toolCall.error || "Operation failed", children: _jsx(AlertCircle, { className: "h-3 w-3 text-destructive" }) })), hasCompaction && (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [
|
|
279
|
+
_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: isTruncation ? (_jsx(ScissorsLineDashed, { className: "h-3 w-3 text-destructive" })) : (_jsx(FoldVertical, { className: "h-3 w-3 text-text-secondary/70" })) }) }), _jsx(TooltipContent, { children: (() => {
|
|
254
280
|
const meta = toolCall._meta;
|
|
255
281
|
const percentage = meta?.originalTokens && meta?.finalTokens
|
|
256
282
|
? Math.round((1 - meta.finalTokens / meta.originalTokens) * 100)
|
|
@@ -263,10 +289,16 @@ function GroupedToolCallItem({ toolCall, hookNotification, }) {
|
|
|
263
289
|
return percentage
|
|
264
290
|
? `Response compacted (${percentage}% reduction)`
|
|
265
291
|
: "Response was compacted";
|
|
266
|
-
})() })
|
|
292
|
+
})() })
|
|
293
|
+
] }) })), _jsx(ChevronDown, { className: `h-3 w-3 text-text-secondary/70 group-hover:text-text-secondary transition-colors transition-transform duration-200 ${isExpanded ? "rotate-180" : ""}` })
|
|
294
|
+
] }), _jsx("div", { className: "pl-4.5", children: _jsx(SubAgentDetails, { port: toolCall.subagentPort, sessionId: toolCall.subagentSessionId, parentStatus: toolCall.status, agentName: toolCall.rawInput?.agentName, query: toolCall.rawInput?.query, isExpanded: isExpanded, onExpandChange: setIsExpanded, storedMessages: toolCall.subagentMessages, isReplay: isReplaySubagent }) })
|
|
295
|
+
] }));
|
|
267
296
|
}
|
|
268
297
|
// Regular tool call - collapsible with clickable header
|
|
269
|
-
return (_jsxs("div", { className: "flex flex-col ml-5", children: [
|
|
298
|
+
return (_jsxs("div", { className: "flex flex-col ml-5", children: [
|
|
299
|
+
_jsxs("button", { type: "button", className: "flex items-center gap-1.5 cursor-pointer bg-transparent border-none p-0 text-left group w-fit", onClick: () => setIsExpanded(!isExpanded), "aria-expanded": isExpanded, children: [
|
|
300
|
+
_jsx("span", { className: "text-paragraph-sm text-text-secondary/70 group-hover:text-text-secondary transition-colors", children: toolCall.prettyName || toolCall.title }), isFailed && (_jsx("span", { title: toolCall.error || "Operation failed", children: _jsx(AlertCircle, { className: "h-3 w-3 text-destructive" }) })), hasCompaction && (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [
|
|
301
|
+
_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: isTruncation ? (_jsx(ScissorsLineDashed, { className: "h-3 w-3 text-destructive" })) : (_jsx(FoldVertical, { className: "h-3 w-3 text-text-secondary/70" })) }) }), _jsx(TooltipContent, { children: (() => {
|
|
270
302
|
const meta = toolCall._meta;
|
|
271
303
|
const percentage = meta?.originalTokens && meta?.finalTokens
|
|
272
304
|
? Math.round((1 - meta.finalTokens / meta.originalTokens) * 100)
|
|
@@ -279,7 +311,9 @@ function GroupedToolCallItem({ toolCall, hookNotification, }) {
|
|
|
279
311
|
return percentage
|
|
280
312
|
? `Response compacted (${percentage}% reduction)`
|
|
281
313
|
: "Response was compacted";
|
|
282
|
-
})() })
|
|
314
|
+
})() })
|
|
315
|
+
] }) })), _jsx(ChevronDown, { className: `h-3 w-3 text-text-secondary/70 group-hover:text-text-secondary transition-colors transition-transform duration-200 ${isExpanded ? "rotate-180" : ""}` })
|
|
316
|
+
] }), isExpanded && (_jsx("div", { className: "mt-1", children: _jsx(ToolOperationDetails, { toolCall: toolCall, ...(hookNotification ? { hookNotification } : {}) }) }))] }));
|
|
283
317
|
}
|
|
284
318
|
/**
|
|
285
319
|
* Component to display detailed tool call information
|
|
@@ -321,8 +355,13 @@ function ToolOperationDetails({ toolCall, hookNotification, }) {
|
|
|
321
355
|
"--w-rjv-type-nan-color": resolvedTheme === "dark" ? "#ef4444" : "#dc2626",
|
|
322
356
|
"--w-rjv-type-undefined-color": resolvedTheme === "dark" ? "#ef4444" : "#dc2626",
|
|
323
357
|
};
|
|
324
|
-
return (_jsxs("div", { className: "text-sm border border-border rounded-lg bg-card overflow-hidden w-full", children: [toolCall.locations && toolCall.locations.length > 0 && (_jsxs("div", { className: "p-3 border-b border-border", children: [
|
|
325
|
-
|
|
358
|
+
return (_jsxs("div", { className: "text-sm border border-border rounded-lg bg-card overflow-hidden w-full", children: [toolCall.locations && toolCall.locations.length > 0 && (_jsxs("div", { className: "p-3 border-b border-border", children: [
|
|
359
|
+
_jsx("div", { className: "text-[10px] font-bold text-text-secondary uppercase tracking-wider mb-1.5 font-sans", children: "Files" }), _jsx("ul", { className: "space-y-1", children: toolCall.locations.map((loc) => (_jsxs("li", { className: "font-mono text-[11px] text-foreground bg-muted px-1.5 py-0.5 rounded w-fit", children: [loc.path, loc.line !== null && loc.line !== undefined && `:${loc.line}`] }, `${loc.path}:${loc.line ?? ""}`))) })
|
|
360
|
+
] })), toolCall.rawInput && Object.keys(toolCall.rawInput).length > 0 && (_jsxs("div", { className: "p-3 border-b border-border", children: [
|
|
361
|
+
_jsx("div", { className: "text-[10px] font-bold text-text-secondary uppercase tracking-wider mb-1.5 font-sans", children: "Input" }), _jsx("div", { className: "text-[11px] font-mono text-foreground", children: _jsx(JsonView, { value: toolCall.rawInput, collapsed: false, displayDataTypes: false, displayObjectSize: false, enableClipboard: true, shortenTextAfterLength: 80, style: jsonStyle }) })
|
|
362
|
+
] })), toolCall._meta?.compactionAction && (_jsx(CompactionDetails, { compactionAction: toolCall._meta.compactionAction, originalTokens: toolCall._meta.originalTokens, finalTokens: toolCall._meta.finalTokens, originalContentPath: toolCall._meta.originalContentPath })), ((toolCall.content && toolCall.content.length > 0) ||
|
|
363
|
+
toolCall.error) && (_jsxs("div", { className: "p-3 border-b border-border last:border-0", children: [
|
|
364
|
+
_jsx("div", { className: "text-[10px] font-bold text-text-secondary uppercase tracking-wider mb-1.5 font-sans", children: "Output" }), _jsxs("div", { className: "space-y-2 text-[11px] text-foreground", children: [toolCall.content?.map((block, idx) => {
|
|
326
365
|
// Generate a stable key based on content
|
|
327
366
|
const getBlockKey = () => {
|
|
328
367
|
if (block.type === "diff" && "path" in block) {
|
|
@@ -390,16 +429,35 @@ function ToolOperationDetails({ toolCall, hookNotification, }) {
|
|
|
390
429
|
"path" in block &&
|
|
391
430
|
"oldText" in block &&
|
|
392
431
|
"newText" in block) {
|
|
393
|
-
return (_jsxs("div", { className: "border border-border rounded bg-card", children: [
|
|
432
|
+
return (_jsxs("div", { className: "border border-border rounded bg-card", children: [
|
|
433
|
+
_jsxs("div", { className: "bg-muted px-2 py-1 text-[10px] font-mono text-text-secondary border-b border-border", children: [block.path, "line" in block &&
|
|
394
434
|
block.line !== null &&
|
|
395
435
|
block.line !== undefined &&
|
|
396
|
-
`:${block.line}`] }), _jsxs("div", { className: "p-2 font-mono text-[11px]", children: [
|
|
436
|
+
`:${block.line}`] }), _jsxs("div", { className: "p-2 font-mono text-[11px]", children: [
|
|
437
|
+
_jsxs("div", { className: "text-red-500 dark:text-red-400", children: ["- ", block.oldText] }), _jsxs("div", { className: "text-green-500 dark:text-green-400", children: ["+ ", block.newText] })
|
|
438
|
+
] })
|
|
439
|
+
] }, getBlockKey()));
|
|
397
440
|
}
|
|
398
441
|
return null;
|
|
399
|
-
}), toolCall.error && (_jsxs("div", { className: "text-destructive font-mono text-[11px] mt-2", children: ["Error: ", toolCall.error] }))] })
|
|
442
|
+
}), toolCall.error && (_jsxs("div", { className: "text-destructive font-mono text-[11px] mt-2", children: ["Error: ", toolCall.error] }))] })
|
|
443
|
+
] })), toolCall._meta?.truncationWarning && (_jsxs("div", { className: "mx-3 mt-3 mb-0 flex items-center gap-2 rounded-md bg-yellow-50 dark:bg-yellow-950/20 px-3 py-2 text-[11px] text-yellow-800 dark:text-yellow-200 border border-yellow-200 dark:border-yellow-900", children: [
|
|
444
|
+
_jsx("span", { className: "text-yellow-600 dark:text-yellow-500", children: "\u26A0\uFE0F" }), _jsx("span", { children: toolCall._meta.truncationWarning })
|
|
445
|
+
] })), hookNotification &&
|
|
400
446
|
hookNotification.status === "completed" &&
|
|
401
|
-
hookNotification.metadata?.action !== "no_action_needed" && (_jsxs("div", { className: "p-3 border-b border-border last:border-0", children: [
|
|
447
|
+
hookNotification.metadata?.action !== "no_action_needed" && (_jsxs("div", { className: "p-3 border-b border-border last:border-0", children: [
|
|
448
|
+
_jsx("div", { className: "text-[10px] font-bold text-text-secondary uppercase tracking-wider mb-1.5 font-sans", children: "Response Compaction" }), _jsxs("div", { className: "space-y-1 text-[11px]", children: [hookNotification.metadata?.originalTokens !== undefined && (_jsxs("div", { className: "flex gap-2", children: [
|
|
449
|
+
_jsx("span", { className: "text-text-secondary", children: "Original:" }), _jsxs("span", { className: "text-foreground", children: [hookNotification.metadata.originalTokens.toLocaleString(), " ", "tokens"] })
|
|
450
|
+
] })), hookNotification.metadata?.finalTokens !== undefined && (_jsxs("div", { className: "flex gap-2", children: [
|
|
451
|
+
_jsx("span", { className: "text-text-secondary", children: "Compacted:" }), _jsxs("span", { className: "text-foreground", children: [hookNotification.metadata.finalTokens.toLocaleString(), " ", "tokens"] })
|
|
452
|
+
] })), hookNotification.metadata?.tokensSaved !== undefined && (_jsxs("div", { className: "flex gap-2", children: [
|
|
453
|
+
_jsx("span", { className: "text-text-secondary", children: "Saved:" }), _jsxs("span", { className: "text-green-500 font-medium", children: [hookNotification.metadata.tokensSaved.toLocaleString(), " ", "tokens", hookNotification.metadata?.originalTokens && (_jsxs("span", { className: "text-text-secondary font-normal ml-1", children: ["(", ((hookNotification.metadata.tokensSaved /
|
|
402
454
|
hookNotification.metadata
|
|
403
455
|
.originalTokens) *
|
|
404
|
-
100).toFixed(0), "% reduced)"] }))] })
|
|
456
|
+
100).toFixed(0), "% reduced)"] }))] })
|
|
457
|
+
] }))] })
|
|
458
|
+
] })), (toolCall.tokenUsage || toolCall.startedAt) && (_jsxs("div", { className: "p-2 bg-muted/50 border-b border-border last:border-0 flex flex-wrap gap-4 text-[10px] text-text-secondary font-sans", children: [toolCall.tokenUsage && (_jsxs("div", { className: "flex gap-3", children: [toolCall.tokenUsage.inputTokens !== undefined && (_jsxs("div", { children: [
|
|
459
|
+
_jsx("span", { className: "uppercase tracking-wide font-semibold mr-1", children: "Input:" }), toolCall.tokenUsage.inputTokens.toLocaleString()] })), toolCall.tokenUsage.outputTokens !== undefined && (_jsxs("div", { children: [
|
|
460
|
+
_jsx("span", { className: "uppercase tracking-wide font-semibold mr-1", children: "Output:" }), toolCall.tokenUsage.outputTokens.toLocaleString()] })), toolCall.tokenUsage.totalTokens !== undefined && (_jsxs("div", { children: [
|
|
461
|
+
_jsx("span", { className: "uppercase tracking-wide font-semibold mr-1", children: "Total:" }), toolCall.tokenUsage.totalTokens.toLocaleString()] }))] })), toolCall.startedAt && (_jsxs("div", { className: "flex gap-3 ml-auto", children: [
|
|
462
|
+
_jsxs("span", { children: ["Started: ", new Date(toolCall.startedAt).toLocaleTimeString()] }), toolCall.completedAt && (_jsxs("span", { children: ["Completed:", " ", new Date(toolCall.completedAt).toLocaleTimeString(), " (", Math.round((toolCall.completedAt - toolCall.startedAt) / 1000), "s)"] }))] }))] }))] }));
|
|
405
463
|
}
|
|
@@ -17,4 +17,4 @@ export interface WorkProgressProps {
|
|
|
17
17
|
* WorkProgress component - coordinates display of thinking and tool execution
|
|
18
18
|
* Provides a unified view of the agent's work from thinking through execution
|
|
19
19
|
*/
|
|
20
|
-
export declare function WorkProgress({ thinking, isThinkingStreaming, toolCalls, thinkingDisplayStyle, autoCollapseThinking, className
|
|
20
|
+
export declare function WorkProgress({ thinking, isThinkingStreaming, toolCalls, thinkingDisplayStyle, autoCollapseThinking, className }: WorkProgressProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,39 @@
|
|
|
1
1
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
2
|
declare const ResizablePanelGroup: React.FC<React.ComponentProps<typeof ResizablePrimitive.PanelGroup>>;
|
|
3
|
-
declare const ResizablePanel: ({ className, ...props }:
|
|
4
|
-
|
|
3
|
+
declare const ResizablePanel: ({ className, ...props }: Omit<import("react").HTMLAttributes<HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBRElement | HTMLBaseElement | HTMLBodyElement | HTMLButtonElement | HTMLCanvasElement | HTMLDListElement | HTMLDataElement | HTMLDataListElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHRElement | HTMLHeadElement | HTMLHeadingElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLIElement | HTMLLabelElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLModElement | HTMLOListElement | HTMLObjectElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLQuoteElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableCaptionElement | HTMLTableCellElement | HTMLTableColElement | HTMLTableElement | HTMLTableRowElement | HTMLTableSectionElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement>, "id" | "onResize"> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
collapsedSize?: number | undefined;
|
|
6
|
+
collapsible?: boolean | undefined;
|
|
7
|
+
defaultSize?: number | undefined;
|
|
8
|
+
id?: string;
|
|
9
|
+
maxSize?: number | undefined;
|
|
10
|
+
minSize?: number | undefined;
|
|
11
|
+
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
12
|
+
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
13
|
+
onResize?: ResizablePrimitive.PanelOnResize;
|
|
14
|
+
order?: number;
|
|
15
|
+
style?: object;
|
|
16
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
children?: import("react").ReactNode;
|
|
19
|
+
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelHandle>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: Omit<import("react").HTMLAttributes<keyof HTMLElementTagNameMap>, "id" | "onBlur" | "onClick" | "onFocus" | "onPointerDown" | "onPointerUp"> & {
|
|
21
|
+
className?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
hitAreaMargins?: ResizablePrimitive.PointerHitAreaMargins;
|
|
24
|
+
id?: string | null;
|
|
25
|
+
onBlur?: () => void;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
onDragging?: ResizablePrimitive.PanelResizeHandleOnDragging;
|
|
28
|
+
onFocus?: () => void;
|
|
29
|
+
onPointerDown?: () => void;
|
|
30
|
+
onPointerUp?: () => void;
|
|
31
|
+
style?: import("react").CSSProperties;
|
|
32
|
+
tabIndex?: number;
|
|
33
|
+
tagName?: keyof HTMLElementTagNameMap;
|
|
34
|
+
} & {
|
|
35
|
+
children?: import("react").ReactNode;
|
|
36
|
+
} & {
|
|
5
37
|
withHandle?: boolean;
|
|
6
38
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
39
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -3,5 +3,7 @@ import * as ResizablePrimitive from "react-resizable-panels";
|
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
const ResizablePanelGroup = ({ className, ...props }) => (_jsx(ResizablePrimitive.PanelGroup, { className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className), ...props }));
|
|
5
5
|
const ResizablePanel = ({ className, ...props }) => (_jsx(ResizablePrimitive.Panel, { className: cn(className), ...props }));
|
|
6
|
-
const ResizableHandle = ({ withHandle, className, ...props }) => (_jsx(ResizablePrimitive.PanelResizeHandle, { className: cn("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-2.5 w-2.5", children: [
|
|
6
|
+
const ResizableHandle = ({ withHandle, className, ...props }) => (_jsx(ResizablePrimitive.PanelResizeHandle, { className: cn("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-2.5 w-2.5", children: [
|
|
7
|
+
_jsx("title", { children: "Resize Handle" }), _jsx("circle", { cx: "9", cy: "12", r: "1" }), _jsx("circle", { cx: "9", cy: "5", r: "1" }), _jsx("circle", { cx: "9", cy: "19", r: "1" }), _jsx("circle", { cx: "15", cy: "12", r: "1" }), _jsx("circle", { cx: "15", cy: "5", r: "1" }), _jsx("circle", { cx: "15", cy: "19", r: "1" })
|
|
8
|
+
] }) })) }));
|
|
7
9
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -44,10 +44,10 @@ export type AgentInfo = z.infer<typeof AgentInfo>;
|
|
|
44
44
|
* Agent status schema
|
|
45
45
|
*/
|
|
46
46
|
export declare const AgentStatus: z.ZodEnum<{
|
|
47
|
-
initializing: "initializing";
|
|
48
|
-
ready: "ready";
|
|
49
47
|
busy: "busy";
|
|
50
48
|
error: "error";
|
|
49
|
+
initializing: "initializing";
|
|
50
|
+
ready: "ready";
|
|
51
51
|
terminated: "terminated";
|
|
52
52
|
}>;
|
|
53
53
|
export type AgentStatus = z.infer<typeof AgentStatus>;
|
|
@@ -56,10 +56,10 @@ export type AgentStatus = z.infer<typeof AgentStatus>;
|
|
|
56
56
|
*/
|
|
57
57
|
export declare const AgentState: z.ZodObject<{
|
|
58
58
|
status: z.ZodEnum<{
|
|
59
|
-
initializing: "initializing";
|
|
60
|
-
ready: "ready";
|
|
61
59
|
busy: "busy";
|
|
62
60
|
error: "error";
|
|
61
|
+
initializing: "initializing";
|
|
62
|
+
ready: "ready";
|
|
63
63
|
terminated: "terminated";
|
|
64
64
|
}>;
|
|
65
65
|
info: z.ZodOptional<z.ZodObject<{
|
|
@@ -3,19 +3,19 @@ import { z } from "zod";
|
|
|
3
3
|
* Message role types
|
|
4
4
|
*/
|
|
5
5
|
export declare const MessageRole: z.ZodEnum<{
|
|
6
|
-
user: "user";
|
|
7
6
|
assistant: "assistant";
|
|
8
7
|
system: "system";
|
|
9
8
|
tool: "tool";
|
|
9
|
+
user: "user";
|
|
10
10
|
}>;
|
|
11
11
|
export type MessageRole = z.infer<typeof MessageRole>;
|
|
12
12
|
/**
|
|
13
13
|
* Content type for messages
|
|
14
14
|
*/
|
|
15
15
|
export declare const ContentType: z.ZodEnum<{
|
|
16
|
-
text: "text";
|
|
17
|
-
image: "image";
|
|
18
16
|
file: "file";
|
|
17
|
+
image: "image";
|
|
18
|
+
text: "text";
|
|
19
19
|
tool_call: "tool_call";
|
|
20
20
|
tool_result: "tool_result";
|
|
21
21
|
}>;
|
|
@@ -25,9 +25,9 @@ export type ContentType = z.infer<typeof ContentType>;
|
|
|
25
25
|
*/
|
|
26
26
|
export declare const BaseContent: z.ZodObject<{
|
|
27
27
|
type: z.ZodEnum<{
|
|
28
|
-
text: "text";
|
|
29
|
-
image: "image";
|
|
30
28
|
file: "file";
|
|
29
|
+
image: "image";
|
|
30
|
+
text: "text";
|
|
31
31
|
tool_call: "tool_call";
|
|
32
32
|
tool_result: "tool_result";
|
|
33
33
|
}>;
|
|
@@ -49,9 +49,9 @@ export declare const ImageContent: z.ZodObject<{
|
|
|
49
49
|
source: z.ZodOptional<z.ZodObject<{
|
|
50
50
|
type: z.ZodLiteral<"base64">;
|
|
51
51
|
media_type: z.ZodEnum<{
|
|
52
|
+
"image/gif": "image/gif";
|
|
52
53
|
"image/jpeg": "image/jpeg";
|
|
53
54
|
"image/png": "image/png";
|
|
54
|
-
"image/gif": "image/gif";
|
|
55
55
|
"image/webp": "image/webp";
|
|
56
56
|
}>;
|
|
57
57
|
data: z.ZodString;
|
|
@@ -102,9 +102,9 @@ export declare const Content: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
102
102
|
source: z.ZodOptional<z.ZodObject<{
|
|
103
103
|
type: z.ZodLiteral<"base64">;
|
|
104
104
|
media_type: z.ZodEnum<{
|
|
105
|
+
"image/gif": "image/gif";
|
|
105
106
|
"image/jpeg": "image/jpeg";
|
|
106
107
|
"image/png": "image/png";
|
|
107
|
-
"image/gif": "image/gif";
|
|
108
108
|
"image/webp": "image/webp";
|
|
109
109
|
}>;
|
|
110
110
|
data: z.ZodString;
|
|
@@ -134,10 +134,10 @@ export type Content = z.infer<typeof Content>;
|
|
|
134
134
|
export declare const Message: z.ZodObject<{
|
|
135
135
|
id: z.ZodString;
|
|
136
136
|
role: z.ZodEnum<{
|
|
137
|
-
user: "user";
|
|
138
137
|
assistant: "assistant";
|
|
139
138
|
system: "system";
|
|
140
139
|
tool: "tool";
|
|
140
|
+
user: "user";
|
|
141
141
|
}>;
|
|
142
142
|
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
143
143
|
type: z.ZodLiteral<"text">;
|
|
@@ -148,9 +148,9 @@ export declare const Message: z.ZodObject<{
|
|
|
148
148
|
source: z.ZodOptional<z.ZodObject<{
|
|
149
149
|
type: z.ZodLiteral<"base64">;
|
|
150
150
|
media_type: z.ZodEnum<{
|
|
151
|
+
"image/gif": "image/gif";
|
|
151
152
|
"image/jpeg": "image/jpeg";
|
|
152
153
|
"image/png": "image/png";
|
|
153
|
-
"image/gif": "image/gif";
|
|
154
154
|
"image/webp": "image/webp";
|
|
155
155
|
}>;
|
|
156
156
|
data: z.ZodString;
|
|
@@ -184,10 +184,10 @@ export declare const ContentChunk: z.ZodObject<{
|
|
|
184
184
|
type: z.ZodLiteral<"content">;
|
|
185
185
|
id: z.ZodString;
|
|
186
186
|
role: z.ZodEnum<{
|
|
187
|
-
user: "user";
|
|
188
187
|
assistant: "assistant";
|
|
189
188
|
system: "system";
|
|
190
189
|
tool: "tool";
|
|
190
|
+
user: "user";
|
|
191
191
|
}>;
|
|
192
192
|
contentDelta: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
193
193
|
type: z.ZodLiteral<"text">;
|
|
@@ -198,9 +198,9 @@ export declare const ContentChunk: z.ZodObject<{
|
|
|
198
198
|
source: z.ZodOptional<z.ZodObject<{
|
|
199
199
|
type: z.ZodLiteral<"base64">;
|
|
200
200
|
media_type: z.ZodEnum<{
|
|
201
|
+
"image/gif": "image/gif";
|
|
201
202
|
"image/jpeg": "image/jpeg";
|
|
202
203
|
"image/png": "image/png";
|
|
203
|
-
"image/gif": "image/gif";
|
|
204
204
|
"image/webp": "image/webp";
|
|
205
205
|
}>;
|
|
206
206
|
data: z.ZodString;
|
|
@@ -413,10 +413,10 @@ export declare const MessageChunk: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
413
413
|
type: z.ZodLiteral<"content">;
|
|
414
414
|
id: z.ZodString;
|
|
415
415
|
role: z.ZodEnum<{
|
|
416
|
-
user: "user";
|
|
417
416
|
assistant: "assistant";
|
|
418
417
|
system: "system";
|
|
419
418
|
tool: "tool";
|
|
419
|
+
user: "user";
|
|
420
420
|
}>;
|
|
421
421
|
contentDelta: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
422
422
|
type: z.ZodLiteral<"text">;
|
|
@@ -427,9 +427,9 @@ export declare const MessageChunk: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
427
|
source: z.ZodOptional<z.ZodObject<{
|
|
428
428
|
type: z.ZodLiteral<"base64">;
|
|
429
429
|
media_type: z.ZodEnum<{
|
|
430
|
+
"image/gif": "image/gif";
|
|
430
431
|
"image/jpeg": "image/jpeg";
|
|
431
432
|
"image/png": "image/png";
|
|
432
|
-
"image/gif": "image/gif";
|
|
433
433
|
"image/webp": "image/webp";
|
|
434
434
|
}>;
|
|
435
435
|
data: z.ZodString;
|