@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
|
@@ -5,7 +5,7 @@ import type { AcpClient } from "../../sdk/client/index.js";
|
|
|
5
5
|
export declare function useChatMessages(client: AcpClient | null, startSession: () => Promise<string | null>): {
|
|
6
6
|
messages: {
|
|
7
7
|
id: string;
|
|
8
|
-
role: "
|
|
8
|
+
role: "assistant" | "system" | "user";
|
|
9
9
|
content: string;
|
|
10
10
|
timestamp: string;
|
|
11
11
|
isStreaming: boolean;
|
|
@@ -13,10 +13,8 @@ export declare function useChatMessages(client: AcpClient | null, startSession:
|
|
|
13
13
|
metadata?: Record<string, unknown> | undefined;
|
|
14
14
|
toolCalls?: {
|
|
15
15
|
id: string;
|
|
16
|
-
title: string;
|
|
17
|
-
kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other";
|
|
18
|
-
status: "pending" | "in_progress" | "completed" | "failed";
|
|
19
16
|
batchId?: string | undefined;
|
|
17
|
+
title: string;
|
|
20
18
|
prettyName?: string | undefined;
|
|
21
19
|
icon?: string | undefined;
|
|
22
20
|
verbiage?: {
|
|
@@ -25,6 +23,8 @@ export declare function useChatMessages(client: AcpClient | null, startSession:
|
|
|
25
23
|
paramKey?: string | undefined;
|
|
26
24
|
} | undefined;
|
|
27
25
|
subline?: string | undefined;
|
|
26
|
+
kind: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "switch_mode" | "think";
|
|
27
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
28
28
|
contentPosition?: number | undefined;
|
|
29
29
|
locations?: {
|
|
30
30
|
path: string;
|
|
@@ -84,9 +84,9 @@ export declare function useChatMessages(client: AcpClient | null, startSession:
|
|
|
84
84
|
toolCalls?: {
|
|
85
85
|
id: string;
|
|
86
86
|
title: string;
|
|
87
|
-
status: "pending" | "in_progress" | "completed" | "failed";
|
|
88
87
|
prettyName?: string | undefined;
|
|
89
88
|
icon?: string | undefined;
|
|
89
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
90
90
|
content?: ({
|
|
91
91
|
type: "content";
|
|
92
92
|
content: {
|
|
@@ -124,9 +124,9 @@ export declare function useChatMessages(client: AcpClient | null, startSession:
|
|
|
124
124
|
toolCall: {
|
|
125
125
|
id: string;
|
|
126
126
|
title: string;
|
|
127
|
-
status: "pending" | "in_progress" | "completed" | "failed";
|
|
128
127
|
prettyName?: string | undefined;
|
|
129
128
|
icon?: string | undefined;
|
|
129
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
130
130
|
content?: ({
|
|
131
131
|
type: "content";
|
|
132
132
|
content: {
|
|
@@ -196,11 +196,11 @@ export declare function useChatMessages(client: AcpClient | null, startSession:
|
|
|
196
196
|
}[] | undefined;
|
|
197
197
|
}[];
|
|
198
198
|
isStreaming: boolean;
|
|
199
|
-
sendMessage: (content: string, attachments?:
|
|
199
|
+
sendMessage: (content: string, attachments?: {
|
|
200
200
|
name: string;
|
|
201
201
|
path: string;
|
|
202
202
|
size: number;
|
|
203
203
|
mimeType: string;
|
|
204
204
|
data: string;
|
|
205
|
-
}
|
|
205
|
+
}[] | undefined) => Promise<void>;
|
|
206
206
|
};
|
|
@@ -3,7 +3,7 @@ import type { AcpClient } from "../../sdk/client/index.js";
|
|
|
3
3
|
* Hook for managing chat session lifecycle
|
|
4
4
|
*/
|
|
5
5
|
export declare function useChatSession(client: AcpClient | null, initialSessionId?: string | null): {
|
|
6
|
-
connectionStatus: "
|
|
6
|
+
connectionStatus: "connected" | "connecting" | "disconnected" | "error";
|
|
7
7
|
sessionId: string | null;
|
|
8
8
|
connect: () => Promise<void>;
|
|
9
9
|
loadSession: (sessionIdToLoad: string) => Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AcpClient } from "../../sdk/client/acp-client.js";
|
|
2
|
-
import type { ToolCall } from "../schemas/tool-call.js";
|
|
3
2
|
/**
|
|
4
3
|
* Hook to track and manage tool calls from ACP sessions
|
|
5
4
|
*
|
|
@@ -11,10 +10,8 @@ import type { ToolCall } from "../schemas/tool-call.js";
|
|
|
11
10
|
export declare function useToolCalls(client: AcpClient | null): {
|
|
12
11
|
toolCalls: Record<string, {
|
|
13
12
|
id: string;
|
|
14
|
-
title: string;
|
|
15
|
-
kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other";
|
|
16
|
-
status: "pending" | "in_progress" | "completed" | "failed";
|
|
17
13
|
batchId?: string | undefined;
|
|
14
|
+
title: string;
|
|
18
15
|
prettyName?: string | undefined;
|
|
19
16
|
icon?: string | undefined;
|
|
20
17
|
verbiage?: {
|
|
@@ -23,6 +20,8 @@ export declare function useToolCalls(client: AcpClient | null): {
|
|
|
23
20
|
paramKey?: string | undefined;
|
|
24
21
|
} | undefined;
|
|
25
22
|
subline?: string | undefined;
|
|
23
|
+
kind: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "switch_mode" | "think";
|
|
24
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
26
25
|
contentPosition?: number | undefined;
|
|
27
26
|
locations?: {
|
|
28
27
|
path: string;
|
|
@@ -82,9 +81,9 @@ export declare function useToolCalls(client: AcpClient | null): {
|
|
|
82
81
|
toolCalls?: {
|
|
83
82
|
id: string;
|
|
84
83
|
title: string;
|
|
85
|
-
status: "pending" | "in_progress" | "completed" | "failed";
|
|
86
84
|
prettyName?: string | undefined;
|
|
87
85
|
icon?: string | undefined;
|
|
86
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
88
87
|
content?: ({
|
|
89
88
|
type: "content";
|
|
90
89
|
content: {
|
|
@@ -122,9 +121,9 @@ export declare function useToolCalls(client: AcpClient | null): {
|
|
|
122
121
|
toolCall: {
|
|
123
122
|
id: string;
|
|
124
123
|
title: string;
|
|
125
|
-
status: "pending" | "in_progress" | "completed" | "failed";
|
|
126
124
|
prettyName?: string | undefined;
|
|
127
125
|
icon?: string | undefined;
|
|
126
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
128
127
|
content?: ({
|
|
129
128
|
type: "content";
|
|
130
129
|
content: {
|
|
@@ -159,5 +158,154 @@ export declare function useToolCalls(client: AcpClient | null): {
|
|
|
159
158
|
}[] | undefined;
|
|
160
159
|
subagentStreaming?: boolean | undefined;
|
|
161
160
|
}[]>;
|
|
162
|
-
getToolCallsForSession: (sessionId: string) =>
|
|
161
|
+
getToolCallsForSession: (sessionId: string) => {
|
|
162
|
+
id: string;
|
|
163
|
+
batchId?: string | undefined;
|
|
164
|
+
title: string;
|
|
165
|
+
prettyName?: string | undefined;
|
|
166
|
+
icon?: string | undefined;
|
|
167
|
+
verbiage?: {
|
|
168
|
+
active: string;
|
|
169
|
+
past: string;
|
|
170
|
+
paramKey?: string | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
subline?: string | undefined;
|
|
173
|
+
kind: "delete" | "edit" | "execute" | "fetch" | "move" | "other" | "read" | "search" | "switch_mode" | "think";
|
|
174
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
175
|
+
contentPosition?: number | undefined;
|
|
176
|
+
locations?: {
|
|
177
|
+
path: string;
|
|
178
|
+
line?: number | null | undefined;
|
|
179
|
+
}[] | undefined;
|
|
180
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
181
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
182
|
+
content?: ({
|
|
183
|
+
type: "content";
|
|
184
|
+
content: {
|
|
185
|
+
type: "text";
|
|
186
|
+
text: string;
|
|
187
|
+
};
|
|
188
|
+
} | {
|
|
189
|
+
type: "text";
|
|
190
|
+
text: string;
|
|
191
|
+
} | {
|
|
192
|
+
type: "image";
|
|
193
|
+
data: string;
|
|
194
|
+
mimeType?: string | undefined;
|
|
195
|
+
alt?: string | undefined;
|
|
196
|
+
} | {
|
|
197
|
+
type: "image";
|
|
198
|
+
url: string;
|
|
199
|
+
alt?: string | undefined;
|
|
200
|
+
} | {
|
|
201
|
+
type: "diff";
|
|
202
|
+
path: string;
|
|
203
|
+
oldText: string;
|
|
204
|
+
newText: string;
|
|
205
|
+
line?: number | null | undefined;
|
|
206
|
+
} | {
|
|
207
|
+
type: "terminal";
|
|
208
|
+
terminalId: string;
|
|
209
|
+
})[] | undefined;
|
|
210
|
+
error?: string | undefined;
|
|
211
|
+
startedAt?: number | undefined;
|
|
212
|
+
completedAt?: number | undefined;
|
|
213
|
+
tokenUsage?: {
|
|
214
|
+
inputTokens?: number | undefined;
|
|
215
|
+
outputTokens?: number | undefined;
|
|
216
|
+
totalTokens?: number | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
_meta?: {
|
|
219
|
+
truncationWarning?: string | undefined;
|
|
220
|
+
compactionAction?: "compacted" | "truncated" | undefined;
|
|
221
|
+
originalTokens?: number | undefined;
|
|
222
|
+
finalTokens?: number | undefined;
|
|
223
|
+
originalContentPreview?: string | undefined;
|
|
224
|
+
originalContentPath?: string | undefined;
|
|
225
|
+
} | undefined;
|
|
226
|
+
subagentPort?: number | undefined;
|
|
227
|
+
subagentSessionId?: string | undefined;
|
|
228
|
+
subagentMessages?: {
|
|
229
|
+
id: string;
|
|
230
|
+
content: string;
|
|
231
|
+
toolCalls?: {
|
|
232
|
+
id: string;
|
|
233
|
+
title: string;
|
|
234
|
+
prettyName?: string | undefined;
|
|
235
|
+
icon?: string | undefined;
|
|
236
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
237
|
+
content?: ({
|
|
238
|
+
type: "content";
|
|
239
|
+
content: {
|
|
240
|
+
type: "text";
|
|
241
|
+
text: string;
|
|
242
|
+
};
|
|
243
|
+
} | {
|
|
244
|
+
type: "text";
|
|
245
|
+
text: string;
|
|
246
|
+
} | {
|
|
247
|
+
type: "image";
|
|
248
|
+
data: string;
|
|
249
|
+
mimeType?: string | undefined;
|
|
250
|
+
alt?: string | undefined;
|
|
251
|
+
} | {
|
|
252
|
+
type: "image";
|
|
253
|
+
url: string;
|
|
254
|
+
alt?: string | undefined;
|
|
255
|
+
} | {
|
|
256
|
+
type: "diff";
|
|
257
|
+
path: string;
|
|
258
|
+
oldText: string;
|
|
259
|
+
newText: string;
|
|
260
|
+
line?: number | null | undefined;
|
|
261
|
+
} | {
|
|
262
|
+
type: "terminal";
|
|
263
|
+
terminalId: string;
|
|
264
|
+
})[] | undefined;
|
|
265
|
+
}[] | undefined;
|
|
266
|
+
contentBlocks?: ({
|
|
267
|
+
type: "text";
|
|
268
|
+
text: string;
|
|
269
|
+
} | {
|
|
270
|
+
type: "tool_call";
|
|
271
|
+
toolCall: {
|
|
272
|
+
id: string;
|
|
273
|
+
title: string;
|
|
274
|
+
prettyName?: string | undefined;
|
|
275
|
+
icon?: string | undefined;
|
|
276
|
+
status: "completed" | "failed" | "in_progress" | "pending";
|
|
277
|
+
content?: ({
|
|
278
|
+
type: "content";
|
|
279
|
+
content: {
|
|
280
|
+
type: "text";
|
|
281
|
+
text: string;
|
|
282
|
+
};
|
|
283
|
+
} | {
|
|
284
|
+
type: "text";
|
|
285
|
+
text: string;
|
|
286
|
+
} | {
|
|
287
|
+
type: "image";
|
|
288
|
+
data: string;
|
|
289
|
+
mimeType?: string | undefined;
|
|
290
|
+
alt?: string | undefined;
|
|
291
|
+
} | {
|
|
292
|
+
type: "image";
|
|
293
|
+
url: string;
|
|
294
|
+
alt?: string | undefined;
|
|
295
|
+
} | {
|
|
296
|
+
type: "diff";
|
|
297
|
+
path: string;
|
|
298
|
+
oldText: string;
|
|
299
|
+
newText: string;
|
|
300
|
+
line?: number | null | undefined;
|
|
301
|
+
} | {
|
|
302
|
+
type: "terminal";
|
|
303
|
+
terminalId: string;
|
|
304
|
+
})[] | undefined;
|
|
305
|
+
};
|
|
306
|
+
})[] | undefined;
|
|
307
|
+
isStreaming?: boolean | undefined;
|
|
308
|
+
}[] | undefined;
|
|
309
|
+
subagentStreaming?: boolean | undefined;
|
|
310
|
+
}[];
|
|
163
311
|
};
|
|
@@ -52,9 +52,9 @@ export { HookType, HookNotification };
|
|
|
52
52
|
export declare const DisplayMessage: z.ZodObject<{
|
|
53
53
|
id: z.ZodString;
|
|
54
54
|
role: z.ZodEnum<{
|
|
55
|
-
user: "user";
|
|
56
55
|
assistant: "assistant";
|
|
57
56
|
system: "system";
|
|
57
|
+
user: "user";
|
|
58
58
|
}>;
|
|
59
59
|
content: z.ZodString;
|
|
60
60
|
timestamp: z.ZodISODateTime;
|
|
@@ -74,22 +74,22 @@ export declare const DisplayMessage: z.ZodObject<{
|
|
|
74
74
|
}, z.core.$strip>>;
|
|
75
75
|
subline: z.ZodOptional<z.ZodString>;
|
|
76
76
|
kind: z.ZodEnum<{
|
|
77
|
-
read: "read";
|
|
78
|
-
edit: "edit";
|
|
79
77
|
delete: "delete";
|
|
80
|
-
|
|
81
|
-
search: "search";
|
|
78
|
+
edit: "edit";
|
|
82
79
|
execute: "execute";
|
|
83
|
-
think: "think";
|
|
84
80
|
fetch: "fetch";
|
|
85
|
-
|
|
81
|
+
move: "move";
|
|
86
82
|
other: "other";
|
|
83
|
+
read: "read";
|
|
84
|
+
search: "search";
|
|
85
|
+
switch_mode: "switch_mode";
|
|
86
|
+
think: "think";
|
|
87
87
|
}>;
|
|
88
88
|
status: z.ZodEnum<{
|
|
89
|
-
pending: "pending";
|
|
90
|
-
in_progress: "in_progress";
|
|
91
89
|
completed: "completed";
|
|
92
90
|
failed: "failed";
|
|
91
|
+
in_progress: "in_progress";
|
|
92
|
+
pending: "pending";
|
|
93
93
|
}>;
|
|
94
94
|
contentPosition: z.ZodOptional<z.ZodNumber>;
|
|
95
95
|
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -156,10 +156,10 @@ export declare const DisplayMessage: z.ZodObject<{
|
|
|
156
156
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
157
157
|
icon: z.ZodOptional<z.ZodString>;
|
|
158
158
|
status: z.ZodEnum<{
|
|
159
|
-
pending: "pending";
|
|
160
|
-
in_progress: "in_progress";
|
|
161
159
|
completed: "completed";
|
|
162
160
|
failed: "failed";
|
|
161
|
+
in_progress: "in_progress";
|
|
162
|
+
pending: "pending";
|
|
163
163
|
}>;
|
|
164
164
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
165
165
|
type: z.ZodLiteral<"content">;
|
|
@@ -201,10 +201,10 @@ export declare const DisplayMessage: z.ZodObject<{
|
|
|
201
201
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
202
202
|
icon: z.ZodOptional<z.ZodString>;
|
|
203
203
|
status: z.ZodEnum<{
|
|
204
|
-
pending: "pending";
|
|
205
|
-
in_progress: "in_progress";
|
|
206
204
|
completed: "completed";
|
|
207
205
|
failed: "failed";
|
|
206
|
+
in_progress: "in_progress";
|
|
207
|
+
pending: "pending";
|
|
208
208
|
}>;
|
|
209
209
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
210
210
|
type: z.ZodLiteral<"content">;
|
|
@@ -306,9 +306,9 @@ export declare const ChatSessionState: z.ZodObject<{
|
|
|
306
306
|
messages: z.ZodArray<z.ZodObject<{
|
|
307
307
|
id: z.ZodString;
|
|
308
308
|
role: z.ZodEnum<{
|
|
309
|
-
user: "user";
|
|
310
309
|
assistant: "assistant";
|
|
311
310
|
system: "system";
|
|
311
|
+
user: "user";
|
|
312
312
|
}>;
|
|
313
313
|
content: z.ZodString;
|
|
314
314
|
timestamp: z.ZodISODateTime;
|
|
@@ -328,22 +328,22 @@ export declare const ChatSessionState: z.ZodObject<{
|
|
|
328
328
|
}, z.core.$strip>>;
|
|
329
329
|
subline: z.ZodOptional<z.ZodString>;
|
|
330
330
|
kind: z.ZodEnum<{
|
|
331
|
-
read: "read";
|
|
332
|
-
edit: "edit";
|
|
333
331
|
delete: "delete";
|
|
334
|
-
|
|
335
|
-
search: "search";
|
|
332
|
+
edit: "edit";
|
|
336
333
|
execute: "execute";
|
|
337
|
-
think: "think";
|
|
338
334
|
fetch: "fetch";
|
|
339
|
-
|
|
335
|
+
move: "move";
|
|
340
336
|
other: "other";
|
|
337
|
+
read: "read";
|
|
338
|
+
search: "search";
|
|
339
|
+
switch_mode: "switch_mode";
|
|
340
|
+
think: "think";
|
|
341
341
|
}>;
|
|
342
342
|
status: z.ZodEnum<{
|
|
343
|
-
pending: "pending";
|
|
344
|
-
in_progress: "in_progress";
|
|
345
343
|
completed: "completed";
|
|
346
344
|
failed: "failed";
|
|
345
|
+
in_progress: "in_progress";
|
|
346
|
+
pending: "pending";
|
|
347
347
|
}>;
|
|
348
348
|
contentPosition: z.ZodOptional<z.ZodNumber>;
|
|
349
349
|
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -410,10 +410,10 @@ export declare const ChatSessionState: z.ZodObject<{
|
|
|
410
410
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
411
411
|
icon: z.ZodOptional<z.ZodString>;
|
|
412
412
|
status: z.ZodEnum<{
|
|
413
|
-
pending: "pending";
|
|
414
|
-
in_progress: "in_progress";
|
|
415
413
|
completed: "completed";
|
|
416
414
|
failed: "failed";
|
|
415
|
+
in_progress: "in_progress";
|
|
416
|
+
pending: "pending";
|
|
417
417
|
}>;
|
|
418
418
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
419
419
|
type: z.ZodLiteral<"content">;
|
|
@@ -455,10 +455,10 @@ export declare const ChatSessionState: z.ZodObject<{
|
|
|
455
455
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
456
456
|
icon: z.ZodOptional<z.ZodString>;
|
|
457
457
|
status: z.ZodEnum<{
|
|
458
|
-
pending: "pending";
|
|
459
|
-
in_progress: "in_progress";
|
|
460
458
|
completed: "completed";
|
|
461
459
|
failed: "failed";
|
|
460
|
+
in_progress: "in_progress";
|
|
461
|
+
pending: "pending";
|
|
462
462
|
}>;
|
|
463
463
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
464
464
|
type: z.ZodLiteral<"content">;
|
|
@@ -552,9 +552,9 @@ export type ChatSessionState = z.infer<typeof ChatSessionState>;
|
|
|
552
552
|
* Connection status
|
|
553
553
|
*/
|
|
554
554
|
export declare const ConnectionStatus: z.ZodEnum<{
|
|
555
|
-
error: "error";
|
|
556
|
-
connecting: "connecting";
|
|
557
555
|
connected: "connected";
|
|
556
|
+
connecting: "connecting";
|
|
558
557
|
disconnected: "disconnected";
|
|
558
|
+
error: "error";
|
|
559
559
|
}>;
|
|
560
560
|
export type ConnectionStatus = z.infer<typeof ConnectionStatus>;
|
|
@@ -3,26 +3,26 @@ import { z } from "zod";
|
|
|
3
3
|
* Tool call status lifecycle
|
|
4
4
|
*/
|
|
5
5
|
export declare const ToolCallStatusSchema: z.ZodEnum<{
|
|
6
|
-
pending: "pending";
|
|
7
|
-
in_progress: "in_progress";
|
|
8
6
|
completed: "completed";
|
|
9
7
|
failed: "failed";
|
|
8
|
+
in_progress: "in_progress";
|
|
9
|
+
pending: "pending";
|
|
10
10
|
}>;
|
|
11
11
|
export type ToolCallStatus = z.infer<typeof ToolCallStatusSchema>;
|
|
12
12
|
/**
|
|
13
13
|
* Tool call categories for UI presentation
|
|
14
14
|
*/
|
|
15
15
|
export declare const ToolCallKindSchema: z.ZodEnum<{
|
|
16
|
-
read: "read";
|
|
17
|
-
edit: "edit";
|
|
18
16
|
delete: "delete";
|
|
19
|
-
|
|
20
|
-
search: "search";
|
|
17
|
+
edit: "edit";
|
|
21
18
|
execute: "execute";
|
|
22
|
-
think: "think";
|
|
23
19
|
fetch: "fetch";
|
|
24
|
-
|
|
20
|
+
move: "move";
|
|
25
21
|
other: "other";
|
|
22
|
+
read: "read";
|
|
23
|
+
search: "search";
|
|
24
|
+
switch_mode: "switch_mode";
|
|
25
|
+
think: "think";
|
|
26
26
|
}>;
|
|
27
27
|
export type ToolCallKind = z.infer<typeof ToolCallKindSchema>;
|
|
28
28
|
/**
|
|
@@ -84,10 +84,10 @@ export declare const SubagentToolCallSchema: z.ZodObject<{
|
|
|
84
84
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
85
85
|
icon: z.ZodOptional<z.ZodString>;
|
|
86
86
|
status: z.ZodEnum<{
|
|
87
|
-
pending: "pending";
|
|
88
|
-
in_progress: "in_progress";
|
|
89
87
|
completed: "completed";
|
|
90
88
|
failed: "failed";
|
|
89
|
+
in_progress: "in_progress";
|
|
90
|
+
pending: "pending";
|
|
91
91
|
}>;
|
|
92
92
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
93
93
|
type: z.ZodLiteral<"content">;
|
|
@@ -133,10 +133,10 @@ export declare const SubagentContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
133
133
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
134
134
|
icon: z.ZodOptional<z.ZodString>;
|
|
135
135
|
status: z.ZodEnum<{
|
|
136
|
-
pending: "pending";
|
|
137
|
-
in_progress: "in_progress";
|
|
138
136
|
completed: "completed";
|
|
139
137
|
failed: "failed";
|
|
138
|
+
in_progress: "in_progress";
|
|
139
|
+
pending: "pending";
|
|
140
140
|
}>;
|
|
141
141
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
142
142
|
type: z.ZodLiteral<"content">;
|
|
@@ -181,10 +181,10 @@ export declare const SubagentMessageSchema: z.ZodObject<{
|
|
|
181
181
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
182
182
|
icon: z.ZodOptional<z.ZodString>;
|
|
183
183
|
status: z.ZodEnum<{
|
|
184
|
-
pending: "pending";
|
|
185
|
-
in_progress: "in_progress";
|
|
186
184
|
completed: "completed";
|
|
187
185
|
failed: "failed";
|
|
186
|
+
in_progress: "in_progress";
|
|
187
|
+
pending: "pending";
|
|
188
188
|
}>;
|
|
189
189
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
190
190
|
type: z.ZodLiteral<"content">;
|
|
@@ -226,10 +226,10 @@ export declare const SubagentMessageSchema: z.ZodObject<{
|
|
|
226
226
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
227
227
|
icon: z.ZodOptional<z.ZodString>;
|
|
228
228
|
status: z.ZodEnum<{
|
|
229
|
-
pending: "pending";
|
|
230
|
-
in_progress: "in_progress";
|
|
231
229
|
completed: "completed";
|
|
232
230
|
failed: "failed";
|
|
231
|
+
in_progress: "in_progress";
|
|
232
|
+
pending: "pending";
|
|
233
233
|
}>;
|
|
234
234
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
235
235
|
type: z.ZodLiteral<"content">;
|
|
@@ -280,22 +280,22 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
280
280
|
}, z.core.$strip>>;
|
|
281
281
|
subline: z.ZodOptional<z.ZodString>;
|
|
282
282
|
kind: z.ZodEnum<{
|
|
283
|
-
read: "read";
|
|
284
|
-
edit: "edit";
|
|
285
283
|
delete: "delete";
|
|
286
|
-
|
|
287
|
-
search: "search";
|
|
284
|
+
edit: "edit";
|
|
288
285
|
execute: "execute";
|
|
289
|
-
think: "think";
|
|
290
286
|
fetch: "fetch";
|
|
291
|
-
|
|
287
|
+
move: "move";
|
|
292
288
|
other: "other";
|
|
289
|
+
read: "read";
|
|
290
|
+
search: "search";
|
|
291
|
+
switch_mode: "switch_mode";
|
|
292
|
+
think: "think";
|
|
293
293
|
}>;
|
|
294
294
|
status: z.ZodEnum<{
|
|
295
|
-
pending: "pending";
|
|
296
|
-
in_progress: "in_progress";
|
|
297
295
|
completed: "completed";
|
|
298
296
|
failed: "failed";
|
|
297
|
+
in_progress: "in_progress";
|
|
298
|
+
pending: "pending";
|
|
299
299
|
}>;
|
|
300
300
|
contentPosition: z.ZodOptional<z.ZodNumber>;
|
|
301
301
|
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -362,10 +362,10 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
362
362
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
363
363
|
icon: z.ZodOptional<z.ZodString>;
|
|
364
364
|
status: z.ZodEnum<{
|
|
365
|
-
pending: "pending";
|
|
366
|
-
in_progress: "in_progress";
|
|
367
365
|
completed: "completed";
|
|
368
366
|
failed: "failed";
|
|
367
|
+
in_progress: "in_progress";
|
|
368
|
+
pending: "pending";
|
|
369
369
|
}>;
|
|
370
370
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
371
371
|
type: z.ZodLiteral<"content">;
|
|
@@ -407,10 +407,10 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
407
407
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
408
408
|
icon: z.ZodOptional<z.ZodString>;
|
|
409
409
|
status: z.ZodEnum<{
|
|
410
|
-
pending: "pending";
|
|
411
|
-
in_progress: "in_progress";
|
|
412
410
|
completed: "completed";
|
|
413
411
|
failed: "failed";
|
|
412
|
+
in_progress: "in_progress";
|
|
413
|
+
pending: "pending";
|
|
414
414
|
}>;
|
|
415
415
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
416
416
|
type: z.ZodLiteral<"content">;
|
|
@@ -453,10 +453,10 @@ export type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
|
453
453
|
export declare const ToolCallUpdateSchema: z.ZodObject<{
|
|
454
454
|
id: z.ZodString;
|
|
455
455
|
status: z.ZodOptional<z.ZodEnum<{
|
|
456
|
-
pending: "pending";
|
|
457
|
-
in_progress: "in_progress";
|
|
458
456
|
completed: "completed";
|
|
459
457
|
failed: "failed";
|
|
458
|
+
in_progress: "in_progress";
|
|
459
|
+
pending: "pending";
|
|
460
460
|
}>>;
|
|
461
461
|
title: z.ZodOptional<z.ZodString>;
|
|
462
462
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
@@ -514,10 +514,10 @@ export declare const ToolCallUpdateSchema: z.ZodObject<{
|
|
|
514
514
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
515
515
|
icon: z.ZodOptional<z.ZodString>;
|
|
516
516
|
status: z.ZodEnum<{
|
|
517
|
-
pending: "pending";
|
|
518
|
-
in_progress: "in_progress";
|
|
519
517
|
completed: "completed";
|
|
520
518
|
failed: "failed";
|
|
519
|
+
in_progress: "in_progress";
|
|
520
|
+
pending: "pending";
|
|
521
521
|
}>;
|
|
522
522
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
523
523
|
type: z.ZodLiteral<"content">;
|
|
@@ -559,10 +559,10 @@ export declare const ToolCallUpdateSchema: z.ZodObject<{
|
|
|
559
559
|
prettyName: z.ZodOptional<z.ZodString>;
|
|
560
560
|
icon: z.ZodOptional<z.ZodString>;
|
|
561
561
|
status: z.ZodEnum<{
|
|
562
|
-
pending: "pending";
|
|
563
|
-
in_progress: "in_progress";
|
|
564
562
|
completed: "completed";
|
|
565
563
|
failed: "failed";
|
|
564
|
+
in_progress: "in_progress";
|
|
565
|
+
pending: "pending";
|
|
566
566
|
}>;
|
|
567
567
|
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
568
568
|
type: z.ZodLiteral<"content">;
|
|
@@ -19,4 +19,4 @@ export interface AppSidebarProps {
|
|
|
19
19
|
/** Additional className for the sidebar */
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
export declare function AppSidebar({ client, currentSessionId, onSessionSelect, onNewSession, onRenameSession, onArchiveSession, onDeleteSession, className
|
|
22
|
+
export declare function AppSidebar({ client, currentSessionId, onSessionSelect, onNewSession, onRenameSession, onArchiveSession, onDeleteSession, className }: AppSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,5 +19,11 @@ export function AppSidebar({ client, currentSessionId, onSessionSelect, onNewSes
|
|
|
19
19
|
}
|
|
20
20
|
setOpenMobile(false);
|
|
21
21
|
};
|
|
22
|
-
return (_jsxs(Sidebar, { className: cn("group-data-[side=left]:border-r-0", className), children: [
|
|
22
|
+
return (_jsxs(Sidebar, { className: cn("group-data-[side=left]:border-r-0", className), children: [
|
|
23
|
+
_jsx(SidebarHeader, { className: "h-16 py-5 px-4 justify-center gap-0", children: _jsxs("div", { className: "flex flex-row items-center justify-between w-full pl-2", children: [
|
|
24
|
+
_jsx("span", { className: "font-semibold text-xl tracking-tight", children: "Sessions" }), _jsx(IconButton, { onClick: handleNewSession, "aria-label": "New Chat", variant: "default", children: _jsx(Plus, { className: "size-4" }) })
|
|
25
|
+
] }) }), _jsx(SidebarContent, { className: "gap-6", children: _jsx(SessionHistory, { client: client, currentSessionId: currentSessionId, onSessionSelect: onSessionSelect, onRenameSession: onRenameSession, onArchiveSession: onArchiveSession, onDeleteSession: onDeleteSession }) }), _jsx(SidebarFooter, { className: "p-0", children: _jsxs("div", { className: "border-t border-border pl-6 pr-4 py-5 flex justify-end gap-2", children: [
|
|
26
|
+
_jsx(ThemeToggle, {}), _jsx(IconButton, { "aria-label": "Settings", children: _jsx(Settings, { className: "size-4 text-muted-foreground" }) })
|
|
27
|
+
] }) })
|
|
28
|
+
] }));
|
|
23
29
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "default" | "icon" | "
|
|
4
|
+
variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | "lg" | "sm" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -17,6 +17,14 @@ export const ChatEmptyState = React.forwardRef(({ title, titleElement, descripti
|
|
|
17
17
|
for (let i = 0; i < suggestedPrompts.length; i += 2) {
|
|
18
18
|
promptRows.push(suggestedPrompts.slice(i, i + 2));
|
|
19
19
|
}
|
|
20
|
-
return (_jsxs("div", { ref: ref, className: cn("flex flex-col items-start", className), ...props, children: [titleElement ? (_jsx("div", { className: "text-heading-4 text-text-primary mb-6", children: titleElement })) : (_jsx("h3", { className: "text-heading-4 text-text-primary mb-6", children: title })), _jsx("p", { className: "text-subheading text-text-secondary max-w-prose mb-6", children: description }), (onOpenFiles || onOpenSettings) && (_jsxs("div", { className: "flex items-center gap-1 -ml-3 mb-6", children: [onOpenFiles && (_jsxs("button", { type: "button", onClick: onOpenFiles, className: "inline-flex items-center gap-1 py-1.5 pr-3 pl-3 rounded-lg hover:bg-accent transition-colors", children: [
|
|
20
|
+
return (_jsxs("div", { ref: ref, className: cn("flex flex-col items-start", className), ...props, children: [titleElement ? (_jsx("div", { className: "text-heading-4 text-text-primary mb-6", children: titleElement })) : (_jsx("h3", { className: "text-heading-4 text-text-primary mb-6", children: title })), _jsx("p", { className: "text-subheading text-text-secondary max-w-prose mb-6", children: description }), (onOpenFiles || onOpenSettings) && (_jsxs("div", { className: "flex items-center gap-1 -ml-3 mb-6", children: [onOpenFiles && (_jsxs("button", { type: "button", onClick: onOpenFiles, className: "inline-flex items-center gap-1 py-1.5 pr-3 pl-3 rounded-lg hover:bg-accent transition-colors", children: [
|
|
21
|
+
_jsx("span", { className: "text-paragraph-sm-medium text-foreground tracking-wide leading-none", children: "View Files" }), _jsx(ChevronRight, { className: "size-4 text-foreground shrink-0" })
|
|
22
|
+
] })), onOpenSettings && (_jsxs("button", { type: "button", onClick: onOpenSettings, className: "inline-flex items-center gap-1 py-1.5 pr-3 pl-3 rounded-lg hover:bg-accent transition-colors", children: [
|
|
23
|
+
_jsxs("span", { className: "text-paragraph-sm-medium text-foreground tracking-wide leading-none", children: ["View Tools & MCPs", toolsAndMcpsCount !== undefined && toolsAndMcpsCount > 0 && (_jsxs("span", { className: "ml-1", children: ["(", toolsAndMcpsCount, ")"] }))] }), _jsx(ChevronRight, { className: "size-4 text-foreground shrink-0" })
|
|
24
|
+
] }))] })), (guideUrl || onGuideClick) && (_jsxs("button", { type: "button", onClick: handleGuideClick, className: "inline-flex items-center gap-1 py-1.5 pr-3 -ml-3 pl-3 rounded-lg hover:bg-accent transition-colors", children: [
|
|
25
|
+
_jsx("span", { className: "text-paragraph-sm-medium text-foreground tracking-wide leading-none", children: guideText }), _jsx(ChevronRight, { className: "size-4 text-foreground shrink-0" })
|
|
26
|
+
] })), suggestedPrompts.length > 0 && (_jsxs("div", { className: "flex flex-col gap-3 w-full max-w-prompt-container", children: [
|
|
27
|
+
_jsx("p", { className: "text-text-tertiary", children: "Suggested Prompts" }), _jsx("div", { className: "flex flex-col gap-2.5", children: promptRows.map((row) => (_jsx("div", { className: "flex gap-2.5 items-center", children: row.map((prompt) => (_jsx("button", { type: "button", onClick: () => handlePromptClick(prompt), onMouseEnter: () => onPromptHover?.(prompt), onMouseLeave: () => onPromptLeave?.(), className: "flex-1 flex items-start gap-2 p-3 bg-secondary hover:bg-secondary/80 rounded-2xl transition-colors min-w-0", children: _jsx("span", { className: "text-paragraph font-normal leading-normal text-text-tertiary truncate", children: prompt }) }, prompt))) }, row.join("-")))) })
|
|
28
|
+
] }))] }));
|
|
21
29
|
});
|
|
22
30
|
ChatEmptyState.displayName = "ChatEmptyState";
|