@townco/ui 0.1.7 → 0.1.9
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/index.d.ts +1 -0
- package/dist/core/hooks/index.d.ts.map +1 -0
- package/dist/core/hooks/index.js +1 -0
- package/dist/core/hooks/index.js.map +1 -0
- package/dist/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-input.js +64 -55
- package/dist/core/hooks/use-chat-input.js.map +1 -0
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-messages.js +121 -114
- package/dist/core/hooks/use-chat-messages.js.map +1 -0
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-session.js +78 -80
- package/dist/core/hooks/use-chat-session.js.map +1 -0
- package/dist/core/hooks/use-media-query.d.ts +39 -0
- package/dist/core/hooks/use-media-query.js +84 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/schemas/chat.d.ts +83 -56
- package/dist/core/schemas/chat.d.ts.map +1 -0
- package/dist/core/schemas/chat.js +27 -25
- package/dist/core/schemas/chat.js.map +1 -0
- package/dist/core/schemas/index.d.ts.map +1 -0
- package/dist/core/schemas/index.js.map +1 -0
- package/dist/core/store/chat-store.d.ts +28 -22
- package/dist/core/store/chat-store.d.ts.map +1 -0
- package/dist/core/store/chat-store.js +59 -50
- package/dist/core/store/chat-store.js.map +1 -0
- package/dist/gui/components/Button.d.ts +23 -7
- package/dist/gui/components/Button.d.ts.map +1 -0
- package/dist/gui/components/Button.js +40 -27
- package/dist/gui/components/Button.js.map +1 -0
- package/dist/gui/components/Card.d.ts +26 -7
- package/dist/gui/components/Card.d.ts.map +1 -0
- package/dist/gui/components/Card.js +54 -8
- package/dist/gui/components/Card.js.map +1 -0
- package/dist/gui/components/ChatHeader.d.ts +38 -0
- package/dist/gui/components/ChatHeader.js +86 -0
- package/dist/gui/components/ChatInput.d.ts +19 -1
- package/dist/gui/components/ChatInput.d.ts.map +1 -0
- package/dist/gui/components/ChatInput.js +94 -11
- package/dist/gui/components/ChatInput.js.map +1 -0
- package/dist/gui/components/ChatInputCommandMenu.d.ts +20 -0
- package/dist/gui/components/ChatInputCommandMenu.js +62 -0
- package/dist/gui/components/ChatInterface.d.ts +12 -0
- package/dist/gui/components/ChatInterface.d.ts.map +1 -0
- package/dist/gui/components/ChatInterface.js +204 -0
- package/dist/gui/components/ChatInterface.js.map +1 -0
- package/dist/gui/components/ChatLayout.d.ts +52 -0
- package/dist/gui/components/ChatLayout.js +105 -0
- package/dist/gui/components/ChatPanelTabContent.d.ts +18 -0
- package/dist/gui/components/ChatPanelTabContent.js +15 -0
- package/dist/gui/components/ChatPreview.d.ts +12 -0
- package/dist/gui/components/ChatPreview.d.ts.map +1 -0
- package/dist/gui/components/ChatPreview.js +214 -0
- package/dist/gui/components/ChatPreview.js.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.js +115 -38
- package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
- package/dist/gui/components/ChatSidebar.d.ts +14 -0
- package/dist/gui/components/ChatSidebar.js +23 -0
- package/dist/gui/components/ChatStatus.d.ts +4 -2
- package/dist/gui/components/ChatStatus.d.ts.map +1 -0
- package/dist/gui/components/ChatStatus.js +45 -34
- package/dist/gui/components/ChatStatus.js.map +1 -0
- package/dist/gui/components/ChatView.d.ts +8 -0
- package/dist/gui/components/ChatView.d.ts.map +1 -0
- package/dist/gui/components/ChatView.js +42 -0
- package/dist/gui/components/ChatView.js.map +1 -0
- package/dist/gui/components/ConfigPanel.d.ts +20 -0
- package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
- package/dist/gui/components/ConfigPanel.js +225 -0
- package/dist/gui/components/ConfigPanel.js.map +1 -0
- package/dist/gui/components/Conversation.d.ts +17 -14
- package/dist/gui/components/Conversation.d.ts.map +1 -0
- package/dist/gui/components/Conversation.js +143 -83
- package/dist/gui/components/Conversation.js.map +1 -0
- package/dist/gui/components/Dialog.d.ts +57 -11
- package/dist/gui/components/Dialog.d.ts.map +1 -0
- package/dist/gui/components/Dialog.js +84 -8
- package/dist/gui/components/Dialog.js.map +1 -0
- package/dist/gui/components/DropdownMenu.d.ts +27 -0
- package/dist/gui/components/DropdownMenu.js +68 -0
- package/dist/gui/components/HeightTransition.d.ts +12 -7
- package/dist/gui/components/HeightTransition.d.ts.map +1 -0
- package/dist/gui/components/HeightTransition.js +88 -77
- package/dist/gui/components/HeightTransition.js.map +1 -0
- package/dist/gui/components/Input.d.ts +13 -6
- package/dist/gui/components/Input.d.ts.map +1 -0
- package/dist/gui/components/Input.js +27 -16
- package/dist/gui/components/Input.js.map +1 -0
- package/dist/gui/components/InputBox.d.ts +21 -0
- package/dist/gui/components/InputBox.d.ts.map +1 -0
- package/dist/gui/components/InputBox.js +90 -0
- package/dist/gui/components/InputBox.js.map +1 -0
- package/dist/gui/components/Label.d.ts +7 -1
- package/dist/gui/components/Label.d.ts.map +1 -0
- package/dist/gui/components/Label.js +12 -2
- package/dist/gui/components/Label.js.map +1 -0
- package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
- package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/gui/components/MarkdownRenderer.js +178 -81
- package/dist/gui/components/MarkdownRenderer.js.map +1 -0
- package/dist/gui/components/Message.d.ts +4 -0
- package/dist/gui/components/Message.d.ts.map +1 -0
- package/dist/gui/components/Message.js +77 -3
- package/dist/gui/components/Message.js.map +1 -0
- package/dist/gui/components/MessageContent.d.ts +29 -22
- package/dist/gui/components/MessageContent.d.ts.map +1 -0
- package/dist/gui/components/MessageContent.js +1 -1
- package/dist/gui/components/MessageContent.js.map +1 -0
- package/dist/gui/components/MessageList.d.ts.map +1 -0
- package/dist/gui/components/MessageList.js.map +1 -0
- package/dist/gui/components/PlaygroundLayout.d.ts +14 -0
- package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
- package/dist/gui/components/PlaygroundLayout.js +49 -0
- package/dist/gui/components/PlaygroundLayout.js.map +1 -0
- package/dist/gui/components/Reasoning.d.ts +30 -24
- package/dist/gui/components/Reasoning.d.ts.map +1 -0
- package/dist/gui/components/Reasoning.js +187 -60
- package/dist/gui/components/Reasoning.js.map +1 -0
- package/dist/gui/components/Response.d.ts +11 -9
- package/dist/gui/components/Response.d.ts.map +1 -0
- package/dist/gui/components/Response.js +229 -90
- package/dist/gui/components/Response.js.map +1 -0
- package/dist/gui/components/Select.d.ts +69 -10
- package/dist/gui/components/Select.d.ts.map +1 -0
- package/dist/gui/components/Select.js +118 -12
- package/dist/gui/components/Select.js.map +1 -0
- package/dist/gui/components/Sonner.d.ts +5 -0
- package/dist/gui/components/Sonner.js +23 -0
- package/dist/gui/components/StatusBar.d.ts +12 -0
- package/dist/gui/components/StatusBar.d.ts.map +1 -0
- package/dist/gui/components/StatusBar.js +58 -0
- package/dist/gui/components/StatusBar.js.map +1 -0
- package/dist/gui/components/Tabs.d.ts +24 -4
- package/dist/gui/components/Tabs.d.ts.map +1 -0
- package/dist/gui/components/Tabs.js +32 -4
- package/dist/gui/components/Tabs.js.map +1 -0
- package/dist/gui/components/Task.d.ts +28 -24
- package/dist/gui/components/Task.d.ts.map +1 -0
- package/dist/gui/components/Task.js +164 -31
- package/dist/gui/components/Task.js.map +1 -0
- package/dist/gui/components/Textarea.d.ts +15 -7
- package/dist/gui/components/Textarea.d.ts.map +1 -0
- package/dist/gui/components/Textarea.js +63 -46
- package/dist/gui/components/Textarea.js.map +1 -0
- package/dist/gui/components/ThinkingBlock.d.ts +20 -10
- package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/gui/components/ThinkingBlock.js +134 -35
- package/dist/gui/components/ThinkingBlock.js.map +1 -0
- package/dist/gui/components/TodoList.d.ts +12 -10
- package/dist/gui/components/TodoList.d.ts.map +1 -0
- package/dist/gui/components/TodoList.js +22 -7
- package/dist/gui/components/TodoList.js.map +1 -0
- package/dist/gui/components/TodoListItem.d.ts +9 -6
- package/dist/gui/components/TodoListItem.d.ts.map +1 -0
- package/dist/gui/components/TodoListItem.js +18 -4
- package/dist/gui/components/TodoListItem.js.map +1 -0
- package/dist/gui/components/index.d.ts +9 -1
- package/dist/gui/components/index.d.ts.map +1 -0
- package/dist/gui/components/index.js +11 -1
- package/dist/gui/components/index.js.map +1 -0
- package/dist/gui/index.d.ts.map +1 -0
- package/dist/gui/index.js.map +1 -0
- package/dist/gui/lib/utils.d.ts.map +1 -0
- package/dist/gui/lib/utils.js +1 -1
- package/dist/gui/lib/utils.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.js +0 -1
- package/dist/sdk/client/acp-client.d.ts +88 -76
- package/dist/sdk/client/acp-client.d.ts.map +1 -0
- package/dist/sdk/client/acp-client.js +215 -217
- package/dist/sdk/client/acp-client.js.map +1 -0
- package/dist/sdk/client/index.d.ts.map +1 -0
- package/dist/sdk/client/index.js.map +1 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/schemas/agent.d.ts +111 -64
- package/dist/sdk/schemas/agent.d.ts.map +1 -0
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/agent.js.map +1 -0
- package/dist/sdk/schemas/index.d.ts.map +1 -0
- package/dist/sdk/schemas/index.js.map +1 -0
- package/dist/sdk/schemas/message.d.ts +245 -147
- package/dist/sdk/schemas/message.d.ts.map +1 -0
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/message.js.map +1 -0
- package/dist/sdk/schemas/session.d.ts +219 -135
- package/dist/sdk/schemas/session.d.ts.map +1 -0
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/schemas/session.js.map +1 -0
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.d.ts.map +1 -0
- package/dist/sdk/transports/http.js +472 -469
- package/dist/sdk/transports/http.js.map +1 -0
- package/dist/sdk/transports/index.d.ts.map +1 -0
- package/dist/sdk/transports/index.js.map +1 -0
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.d.ts.map +1 -0
- package/dist/sdk/transports/stdio.js.map +1 -0
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/types.d.ts.map +1 -0
- package/dist/sdk/transports/types.js.map +1 -0
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.d.ts.map +1 -0
- package/dist/sdk/transports/websocket.js +52 -46
- package/dist/sdk/transports/websocket.js.map +1 -0
- package/dist/tui/components/ChatView.d.ts +4 -2
- package/dist/tui/components/ChatView.d.ts.map +1 -0
- package/dist/tui/components/ChatView.js +51 -18
- package/dist/tui/components/ChatView.js.map +1 -0
- package/dist/tui/components/GameOfLife.d.ts.map +1 -0
- package/dist/tui/components/GameOfLife.js +64 -35
- package/dist/tui/components/GameOfLife.js.map +1 -0
- package/dist/tui/components/InputBox.d.ts +18 -11
- package/dist/tui/components/InputBox.d.ts.map +1 -0
- package/dist/tui/components/InputBox.js +70 -10
- package/dist/tui/components/InputBox.js.map +1 -0
- package/dist/tui/components/MessageList.d.ts +4 -2
- package/dist/tui/components/MessageList.d.ts.map +1 -0
- package/dist/tui/components/MessageList.js +37 -10
- package/dist/tui/components/MessageList.js.map +1 -0
- package/dist/tui/components/ReadlineInput.d.ts +12 -6
- package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
- package/dist/tui/components/ReadlineInput.js +252 -237
- package/dist/tui/components/ReadlineInput.js.map +1 -0
- package/dist/tui/components/SingleSelect.d.ts +15 -9
- package/dist/tui/components/SingleSelect.js +84 -43
- package/dist/tui/components/StatusBar.d.ts +11 -6
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +102 -67
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +6 -4
- package/src/styles/global.css +2 -0
|
@@ -1,40 +1,139 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { ChevronDown } from "lucide-react";
|
|
4
3
|
import { useState } from "react";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
6
|
+
|
|
7
|
+
const thinkingBlockVariants = cva(
|
|
8
|
+
"mb-3 p-3 rounded-lg bg-card border border-border",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "opacity-70",
|
|
13
|
+
subtle: "opacity-50",
|
|
14
|
+
prominent: "opacity-90",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
variant: "default",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
const thinkingIconVariants = cva(
|
|
23
|
+
"w-4 h-4 text-foreground opacity-60 transition-transform",
|
|
24
|
+
{
|
|
25
|
+
variants: {
|
|
26
|
+
expanded: {
|
|
27
|
+
true: "rotate-180",
|
|
28
|
+
false: "",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
expanded: false,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
export function ThinkingBlock({
|
|
37
|
+
thinking,
|
|
38
|
+
isStreaming,
|
|
39
|
+
displayMode = "collapsible",
|
|
40
|
+
variant,
|
|
41
|
+
className,
|
|
42
|
+
}) {
|
|
43
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
44
|
+
if (!thinking && !isStreaming) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
// Inline mode - always visible
|
|
48
|
+
if (displayMode === "inline") {
|
|
49
|
+
return _jsxs("div", {
|
|
50
|
+
className: cn(thinkingBlockVariants({ variant }), className),
|
|
51
|
+
children: [
|
|
52
|
+
_jsxs("div", {
|
|
53
|
+
className: "flex items-start gap-2",
|
|
54
|
+
children: [
|
|
55
|
+
_jsx("span", {
|
|
56
|
+
className:
|
|
57
|
+
"text-xs font-medium text-foreground opacity-60 uppercase tracking-wide",
|
|
58
|
+
children: "Thinking",
|
|
59
|
+
}),
|
|
60
|
+
isStreaming &&
|
|
61
|
+
_jsx("span", {
|
|
62
|
+
className:
|
|
63
|
+
"inline-block w-2 h-2 bg-primary rounded-full animate-pulse",
|
|
64
|
+
}),
|
|
65
|
+
],
|
|
66
|
+
}),
|
|
67
|
+
_jsxs("div", {
|
|
68
|
+
className:
|
|
69
|
+
"mt-2 text-sm italic text-foreground opacity-80 leading-relaxed whitespace-pre-wrap",
|
|
70
|
+
children: [
|
|
71
|
+
thinking,
|
|
72
|
+
isStreaming &&
|
|
73
|
+
thinking &&
|
|
74
|
+
_jsx("span", {
|
|
75
|
+
className: "inline-block animate-typing",
|
|
76
|
+
children: "...",
|
|
77
|
+
}),
|
|
78
|
+
],
|
|
79
|
+
}),
|
|
80
|
+
],
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Collapsible mode
|
|
84
|
+
return _jsxs("div", {
|
|
85
|
+
className: cn("mb-3", className),
|
|
86
|
+
children: [
|
|
87
|
+
_jsxs("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
90
|
+
className:
|
|
91
|
+
"w-full flex items-center justify-between p-2 rounded-lg bg-card border border-border hover:bg-card transition-colors text-left",
|
|
92
|
+
children: [
|
|
93
|
+
_jsxs("div", {
|
|
94
|
+
className: "flex items-center gap-2",
|
|
95
|
+
children: [
|
|
96
|
+
_jsx("span", {
|
|
97
|
+
className:
|
|
98
|
+
"text-xs font-medium text-foreground opacity-60 uppercase tracking-wide",
|
|
99
|
+
children: "Thinking",
|
|
100
|
+
}),
|
|
101
|
+
isStreaming &&
|
|
102
|
+
_jsx("span", {
|
|
103
|
+
className:
|
|
104
|
+
"inline-block w-2 h-2 bg-primary rounded-full animate-pulse",
|
|
105
|
+
}),
|
|
106
|
+
!isExpanded &&
|
|
107
|
+
thinking &&
|
|
108
|
+
_jsxs("span", {
|
|
109
|
+
className:
|
|
110
|
+
"text-xs text-foreground opacity-50 truncate max-w-[200px]",
|
|
111
|
+
children: [thinking.substring(0, 50), "..."],
|
|
112
|
+
}),
|
|
113
|
+
],
|
|
114
|
+
}),
|
|
115
|
+
_jsx(ChevronDown, {
|
|
116
|
+
className: thinkingIconVariants({ expanded: isExpanded }),
|
|
117
|
+
}),
|
|
118
|
+
],
|
|
119
|
+
}),
|
|
120
|
+
isExpanded &&
|
|
121
|
+
_jsx("div", {
|
|
122
|
+
className: cn(thinkingBlockVariants({ variant }), "mt-2"),
|
|
123
|
+
children: _jsxs("div", {
|
|
124
|
+
className:
|
|
125
|
+
"text-sm italic text-foreground opacity-80 leading-relaxed whitespace-pre-wrap",
|
|
126
|
+
children: [
|
|
127
|
+
thinking,
|
|
128
|
+
isStreaming &&
|
|
129
|
+
thinking &&
|
|
130
|
+
_jsx("span", {
|
|
131
|
+
className: "inline-block animate-typing",
|
|
132
|
+
children: "...",
|
|
133
|
+
}),
|
|
134
|
+
],
|
|
135
|
+
}),
|
|
136
|
+
}),
|
|
137
|
+
],
|
|
138
|
+
});
|
|
40
139
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThinkingBlock.js","sourceRoot":"","sources":["../../../src/gui/components/ThinkingBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,qBAAqB,GAAG,GAAG,CAC/B,mFAAmF,EACnF;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE,YAAY;YACpB,SAAS,EAAE,YAAY;SACxB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAG,CAC9B,kEAAkE,EAClE;IACE,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,EAAE;SACV;KACF;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,KAAK;KAChB;CACF,CACF,CAAC;AAUF,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAW,EACX,WAAW,GAAG,aAAa,EAC3B,OAAO,EACP,SAAS,GACU;IACnB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,IAAI,CAAC,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,IAAI,WAAW,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,aAC/D,eAAK,SAAS,EAAC,wBAAwB,aACrC,eAAM,SAAS,EAAC,iFAAiF,yBAE1F,EACN,WAAW,IAAI,CACd,eAAM,SAAS,EAAC,0EAA0E,GAAG,CAC9F,IACG,EACN,eAAK,SAAS,EAAC,6FAA6F,aACzG,QAAQ,EACR,WAAW,IAAI,QAAQ,IAAI,CAC1B,eAAM,SAAS,EAAC,6BAA6B,oBAAW,CACzD,IACG,IACF,CACP,CAAC;IACJ,CAAC;IAED,mBAAmB;IACnB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,aACnC,kBACE,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,EACzC,SAAS,EAAC,mLAAmL,aAE7L,eAAK,SAAS,EAAC,yBAAyB,aACtC,eAAM,SAAS,EAAC,iFAAiF,yBAE1F,EACN,WAAW,IAAI,CACd,eAAM,SAAS,EAAC,0EAA0E,GAAG,CAC9F,EACA,CAAC,UAAU,IAAI,QAAQ,IAAI,CAC1B,gBAAM,SAAS,EAAC,oEAAoE,aACjF,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,WACrB,CACR,IACG,EACN,KAAC,WAAW,IAAC,SAAS,EAAE,oBAAoB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,GAAI,IACnE,EACR,UAAU,IAAI,CACb,cAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,YAC5D,eAAK,SAAS,EAAC,wFAAwF,aACpG,QAAQ,EACR,WAAW,IAAI,QAAQ,IAAI,CAC1B,eAAM,SAAS,EAAC,6BAA6B,oBAAW,CACzD,IACG,GACF,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -7,14 +7,16 @@ import { type TodoItem } from "./TodoListItem.js";
|
|
|
7
7
|
* 2. Prop-based: Pass `todos` prop directly
|
|
8
8
|
*/
|
|
9
9
|
export interface TodoListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
/**
|
|
11
|
+
* ACP Client for hook-based todo fetching (future support)
|
|
12
|
+
*/
|
|
13
|
+
client?: AcpClient | null;
|
|
14
|
+
/**
|
|
15
|
+
* Todos to display (prop-based pattern)
|
|
16
|
+
* Either client or todos should be provided
|
|
17
|
+
*/
|
|
18
|
+
todos?: TodoItem[];
|
|
19
19
|
}
|
|
20
|
-
export declare const TodoList: React.ForwardRefExoticComponent<
|
|
20
|
+
export declare const TodoList: React.ForwardRefExoticComponent<
|
|
21
|
+
TodoListProps & React.RefAttributes<HTMLDivElement>
|
|
22
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoList.d.ts","sourceRoot":"","sources":["../../../src/gui/components/TodoList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,sFAsBpB,CAAC"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { TodoListItem } from "./TodoListItem.js";
|
|
5
|
-
export const TodoList = React.forwardRef(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export const TodoList = React.forwardRef(
|
|
6
|
+
({ client, todos, className, ...props }, ref) => {
|
|
7
|
+
// For now, just use prop-based todos
|
|
8
|
+
// Future: Add hook to get todos from store when available
|
|
9
|
+
const todosToDisplay = todos || [];
|
|
10
|
+
return _jsx("div", {
|
|
11
|
+
ref: ref,
|
|
12
|
+
className: cn("space-y-2 max-h-64 overflow-y-auto", className),
|
|
13
|
+
...props,
|
|
14
|
+
children:
|
|
15
|
+
todosToDisplay.length === 0
|
|
16
|
+
? _jsx("p", {
|
|
17
|
+
className: "text-sm text-foreground opacity-60 italic",
|
|
18
|
+
children: "No tasks yet.",
|
|
19
|
+
})
|
|
20
|
+
: todosToDisplay.map((todo) =>
|
|
21
|
+
_jsx(TodoListItem, { todo: todo }, todo.id),
|
|
22
|
+
),
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
);
|
|
11
26
|
TodoList.displayName = "TodoList";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoList.js","sourceRoot":"","sources":["../../../src/gui/components/TodoList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAiB,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC9C,qCAAqC;IACrC,0DAA0D;IAC1D,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE,CAAC;IAEnC,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAC1D,KAAK,YAER,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAC7B,YAAG,SAAS,EAAC,oDAAoD,8BAE7D,CACL,CAAC,CAAC,CAAC,CACF,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,YAAY,IAAe,IAAI,EAAE,IAAI,IAAnB,IAAI,CAAC,EAAE,CAAgB,CAAC,CACzE,GACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export interface TodoItem {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
status: "pending" | "in_progress" | "completed";
|
|
6
6
|
}
|
|
7
|
-
export interface TodoListItemProps
|
|
8
|
-
|
|
7
|
+
export interface TodoListItemProps
|
|
8
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
todo: TodoItem;
|
|
9
10
|
}
|
|
10
|
-
export declare const TodoListItem: React.ForwardRefExoticComponent<
|
|
11
|
+
export declare const TodoListItem: React.ForwardRefExoticComponent<
|
|
12
|
+
TodoListItemProps & React.RefAttributes<HTMLDivElement>
|
|
13
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoListItem.d.ts","sourceRoot":"","sources":["../../../src/gui/components/TodoListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;CACjD;AAED,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,YAAY,0FAoBxB,CAAC"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
export const TodoListItem = React.forwardRef(
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const TodoListItem = React.forwardRef(
|
|
5
|
+
({ todo, className, ...props }, ref) => {
|
|
6
|
+
return _jsx("div", {
|
|
7
|
+
ref: ref,
|
|
8
|
+
className: cn("flex items-center gap-3 px-3 py-2 rounded-lg", className),
|
|
9
|
+
...props,
|
|
10
|
+
children: _jsx("span", {
|
|
11
|
+
className: cn(
|
|
12
|
+
"flex-1 text-[var(--font-size)] font-[var(--font-family)]",
|
|
13
|
+
todo.status === "completed" && "line-through opacity-60",
|
|
14
|
+
todo.status === "in_progress" && "shimmer-animation",
|
|
15
|
+
),
|
|
16
|
+
children: todo.text,
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
);
|
|
7
21
|
TodoListItem.displayName = "TodoListItem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoListItem.js","sourceRoot":"","sources":["../../../src/gui/components/TodoListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAarC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAC1C,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrC,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,KACpE,KAAK,YAET,eACE,SAAS,EAAE,EAAE,CACX,0DAA0D,EAC1D,IAAI,CAAC,MAAM,KAAK,WAAW,IAAI,yBAAyB,EACxD,IAAI,CAAC,MAAM,KAAK,aAAa,IAAI,mBAAmB,CACrD,YAEA,IAAI,CAAC,IAAI,GACL,GACH,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
export { toast } from "sonner";
|
|
1
2
|
export { Button, type ButtonProps, buttonVariants } from "./Button.js";
|
|
2
3
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./Card.js";
|
|
3
|
-
export
|
|
4
|
+
export type { ConnectionStatus } from "./ChatHeader.js";
|
|
5
|
+
export * as ChatHeader from "./ChatHeader.js";
|
|
6
|
+
export { Actions as ChatInputActions, Attachment as ChatInputAttachment, type ChatInputActionsProps, type ChatInputAttachmentProps, type ChatInputCommandMenuProps, type ChatInputFieldProps, type ChatInputRootProps, type ChatInputSubmitProps, type ChatInputToolbarProps, type ChatInputVoiceInputProps, CommandMenu as ChatInputCommandMenu, type CommandMenuItem, Field as ChatInputField, Root as ChatInputRoot, Submit as ChatInputSubmit, Toolbar as ChatInputToolbar, VoiceInput as ChatInputVoiceInput, } from "./ChatInput.js";
|
|
7
|
+
export * as ChatLayout from "./ChatLayout.js";
|
|
8
|
+
export { DatabaseTabContent, type DatabaseTabContentProps, FilesTabContent, type FilesTabContentProps, TodoTabContent, type TodoTabContentProps, } from "./ChatPanelTabContent.js";
|
|
4
9
|
export { ChatSecondaryPanel, type ChatSecondaryPanelProps, } from "./ChatSecondaryPanel.js";
|
|
10
|
+
export * as ChatSidebar from "./ChatSidebar.js";
|
|
5
11
|
export { ChatStatus, type ChatStatusProps } from "./ChatStatus.js";
|
|
6
12
|
export { Conversation, type ConversationProps } from "./Conversation.js";
|
|
7
13
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./Dialog.js";
|
|
14
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./DropdownMenu.js";
|
|
8
15
|
export { HeightTransition } from "./HeightTransition.js";
|
|
9
16
|
export { Input, type InputProps, inputVariants } from "./Input.js";
|
|
10
17
|
export { Label } from "./Label.js";
|
|
@@ -15,6 +22,7 @@ export type { DisplayMessage } from "./MessageList.js";
|
|
|
15
22
|
export { Reasoning, type ReasoningProps } from "./Reasoning.js";
|
|
16
23
|
export { Response, type ResponseProps } from "./Response.js";
|
|
17
24
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./Select.js";
|
|
25
|
+
export { Toaster } from "./Sonner.js";
|
|
18
26
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from "./Tabs.js";
|
|
19
27
|
export { Task, type TaskItem, TaskList, type TaskListProps, type TaskProps, } from "./Task.js";
|
|
20
28
|
export { Textarea, type TextareaProps, textareaVariants } from "./Textarea.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gui/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,IAAI,cAAc,EACvB,IAAI,IAAI,aAAa,EACrB,MAAM,IAAI,eAAe,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EACL,IAAI,EACJ,KAAK,QAAQ,EACb,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,SAAS,GACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,KAAK,QAAQ,EACb,YAAY,EACZ,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
// Base UI components
|
|
2
|
+
export { toast } from "sonner";
|
|
2
3
|
export { Button, buttonVariants } from "./Button.js";
|
|
3
4
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./Card.js";
|
|
5
|
+
export * as ChatHeader from "./ChatHeader.js";
|
|
4
6
|
// Chat components - composable primitives
|
|
5
|
-
export { Field as ChatInputField, Root as ChatInputRoot, Submit as ChatInputSubmit, Toolbar as ChatInputToolbar, } from "./ChatInput.js";
|
|
7
|
+
export { Actions as ChatInputActions, Attachment as ChatInputAttachment, CommandMenu as ChatInputCommandMenu, Field as ChatInputField, Root as ChatInputRoot, Submit as ChatInputSubmit, Toolbar as ChatInputToolbar, VoiceInput as ChatInputVoiceInput, } from "./ChatInput.js";
|
|
8
|
+
// Chat layout components
|
|
9
|
+
export * as ChatLayout from "./ChatLayout.js";
|
|
10
|
+
export { DatabaseTabContent, FilesTabContent, TodoTabContent, } from "./ChatPanelTabContent.js";
|
|
6
11
|
export { ChatSecondaryPanel, } from "./ChatSecondaryPanel.js";
|
|
12
|
+
export * as ChatSidebar from "./ChatSidebar.js";
|
|
7
13
|
export { ChatStatus } from "./ChatStatus.js";
|
|
8
14
|
// Chat components - shadcn.io/ai inspired primitives
|
|
9
15
|
export { Conversation } from "./Conversation.js";
|
|
10
16
|
// Dialog components
|
|
11
17
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./Dialog.js";
|
|
18
|
+
// DropdownMenu components
|
|
19
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./DropdownMenu.js";
|
|
12
20
|
// Utility components
|
|
13
21
|
export { HeightTransition } from "./HeightTransition.js";
|
|
14
22
|
export { Input, inputVariants } from "./Input.js";
|
|
@@ -19,6 +27,8 @@ export { MessageContent } from "./MessageContent.js";
|
|
|
19
27
|
export { Reasoning } from "./Reasoning.js";
|
|
20
28
|
export { Response } from "./Response.js";
|
|
21
29
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./Select.js";
|
|
30
|
+
// Toast components
|
|
31
|
+
export { Toaster } from "./Sonner.js";
|
|
22
32
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from "./Tabs.js";
|
|
23
33
|
// Task/Todo components
|
|
24
34
|
export { Task, TaskList, } from "./Task.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gui/components/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,MAAM,EAAoB,cAAc,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,WAAW,CAAC;AACnB,0CAA0C;AAC1C,OAAO,EAIL,KAAK,IAAI,cAAc,EACvB,IAAI,IAAI,aAAa,EACrB,MAAM,IAAI,eAAe,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kBAAkB,GAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAC;AACnE,qDAAqD;AACrD,OAAO,EAAE,YAAY,EAA0B,MAAM,mBAAmB,CAAC;AACzE,oBAAoB;AACpB,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,qBAAqB;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAmB,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAA4B,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,SAAS,EAAuB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAsB,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrE,uBAAuB;AACvB,OAAO,EACL,IAAI,EAEJ,QAAQ,GAGT,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAsB,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EACL,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAsB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAEL,YAAY,GAEb,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gui/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gui/index.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,cAAc,uBAAuB,CAAC;AAEtC,sBAAsB;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/gui/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/gui/lib/utils.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/gui/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
package/dist/index.test.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,84 +1,96 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
MessageChunk,
|
|
3
|
+
Session,
|
|
4
|
+
SessionConfig,
|
|
5
|
+
SessionUpdate,
|
|
6
|
+
} from "../schemas/index.js";
|
|
7
|
+
import type {
|
|
8
|
+
HttpTransportOptions,
|
|
9
|
+
StdioTransportOptions,
|
|
10
|
+
WebSocketTransportOptions,
|
|
11
|
+
} from "../transports/index.js";
|
|
3
12
|
/**
|
|
4
13
|
* Client configuration with explicit transport selection
|
|
5
14
|
*/
|
|
6
|
-
export type AcpClientConfig =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
export type AcpClientConfig =
|
|
16
|
+
| {
|
|
17
|
+
type: "stdio";
|
|
18
|
+
options: StdioTransportOptions;
|
|
19
|
+
autoConnect?: boolean;
|
|
20
|
+
}
|
|
21
|
+
| {
|
|
22
|
+
type: "http";
|
|
23
|
+
options: HttpTransportOptions;
|
|
24
|
+
autoConnect?: boolean;
|
|
25
|
+
}
|
|
26
|
+
| {
|
|
27
|
+
type: "websocket";
|
|
28
|
+
options: WebSocketTransportOptions;
|
|
29
|
+
autoConnect?: boolean;
|
|
30
|
+
};
|
|
19
31
|
/**
|
|
20
32
|
* Simplified ACP client with explicit transport selection
|
|
21
33
|
*/
|
|
22
34
|
export declare class AcpClient {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
35
|
+
private config;
|
|
36
|
+
private transport;
|
|
37
|
+
private sessions;
|
|
38
|
+
private currentSessionId;
|
|
39
|
+
private sessionUpdateHandlers;
|
|
40
|
+
private errorHandlers;
|
|
41
|
+
constructor(config: AcpClientConfig);
|
|
42
|
+
/**
|
|
43
|
+
* Connect to the agent
|
|
44
|
+
*/
|
|
45
|
+
connect(): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Disconnect from the agent
|
|
48
|
+
*/
|
|
49
|
+
disconnect(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Check if connected
|
|
52
|
+
*/
|
|
53
|
+
isConnected(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Start a new chat session
|
|
56
|
+
*/
|
|
57
|
+
startSession(config?: Partial<SessionConfig>): Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Send a message in the current session
|
|
60
|
+
*/
|
|
61
|
+
sendMessage(content: string, sessionId?: string): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Receive messages from the agent (streaming)
|
|
64
|
+
*/
|
|
65
|
+
receiveMessages(): AsyncIterableIterator<MessageChunk>;
|
|
66
|
+
/**
|
|
67
|
+
* Get a session by ID
|
|
68
|
+
*/
|
|
69
|
+
getSession(sessionId: string): Session | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Get current session
|
|
72
|
+
*/
|
|
73
|
+
getCurrentSession(): Session | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Get all sessions
|
|
76
|
+
*/
|
|
77
|
+
getAllSessions(): Session[];
|
|
78
|
+
/**
|
|
79
|
+
* Subscribe to session updates
|
|
80
|
+
*/
|
|
81
|
+
onSessionUpdate(handler: (update: SessionUpdate) => void): () => void;
|
|
82
|
+
/**
|
|
83
|
+
* Subscribe to errors
|
|
84
|
+
*/
|
|
85
|
+
onError(handler: (error: Error) => void): () => void;
|
|
86
|
+
/**
|
|
87
|
+
* Create transport based on explicit configuration
|
|
88
|
+
*/
|
|
89
|
+
private createTransport;
|
|
90
|
+
private setupTransportListeners;
|
|
91
|
+
private handleSessionUpdate;
|
|
92
|
+
private handleError;
|
|
93
|
+
private updateSessionStatus;
|
|
94
|
+
private generateSessionId;
|
|
95
|
+
private generateMessageId;
|
|
84
96
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../../../src/sdk/client/acp-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,OAAO,EACP,aAAa,EAEb,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EAErB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAIhC;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GACxE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GACtE;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,yBAAyB,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEN;;GAEG;AACH,qBAAa,SAAS;IAQR,OAAO,CAAC,MAAM;IAP1B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,qBAAqB,CACjB;IACZ,OAAO,CAAC,aAAa,CAA0C;gBAE3C,MAAM,EAAE,eAAe;IAW3C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAKjC;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACG,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAyBpE;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCrE;;OAEG;IACI,eAAe,IAAI,qBAAqB,CAAC,YAAY,CAAC;IAQ7D;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAIlD;;OAEG;IACH,iBAAiB,IAAI,OAAO,GAAG,SAAS;IAMxC;;OAEG;IACH,cAAc,IAAI,OAAO,EAAE;IAI3B;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,MAAM,IAAI;IAOrE;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,MAAM,IAAI;IAOpD;;OAEG;IACH,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,uBAAuB;IAY/B,OAAO,CAAC,mBAAmB;IA2B3B,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;CAG1B"}
|