@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,95 +1,234 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import ReactMarkdown from "react-markdown";
|
|
4
4
|
import remarkGfm from "remark-gfm";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
export const Response = React.forwardRef(
|
|
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
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
})
|
|
6
|
+
export const Response = React.forwardRef(
|
|
7
|
+
(
|
|
8
|
+
{
|
|
9
|
+
content,
|
|
10
|
+
isStreaming = false,
|
|
11
|
+
showEmpty = true,
|
|
12
|
+
emptyMessage = "",
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
},
|
|
16
|
+
ref,
|
|
17
|
+
) => {
|
|
18
|
+
// Show empty state during streaming if no content yet
|
|
19
|
+
if (!content && isStreaming && showEmpty) {
|
|
20
|
+
return _jsx("div", {
|
|
21
|
+
ref: ref,
|
|
22
|
+
className: cn("opacity-70 italic text-sm", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: emptyMessage,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (!content) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const components = {
|
|
31
|
+
// Table styling
|
|
32
|
+
table: ({ node, ...props }) =>
|
|
33
|
+
_jsx("div", {
|
|
34
|
+
className: "overflow-x-auto my-4",
|
|
35
|
+
children: _jsx("table", {
|
|
36
|
+
className:
|
|
37
|
+
"min-w-full border-collapse border border-border rounded-md",
|
|
38
|
+
...props,
|
|
39
|
+
}),
|
|
40
|
+
}),
|
|
41
|
+
thead: ({ node, ...props }) =>
|
|
42
|
+
_jsx("thead", {
|
|
43
|
+
className: "bg-card border-b border-border",
|
|
44
|
+
...props,
|
|
45
|
+
}),
|
|
46
|
+
tbody: ({ node, ...props }) => _jsx("tbody", { ...props }),
|
|
47
|
+
tr: ({ node, ...props }) =>
|
|
48
|
+
_jsx("tr", {
|
|
49
|
+
className: "border-b border-border hover:bg-card transition-colors",
|
|
50
|
+
...props,
|
|
51
|
+
}),
|
|
52
|
+
th: ({ node, ...props }) =>
|
|
53
|
+
_jsx("th", {
|
|
54
|
+
className:
|
|
55
|
+
"px-4 py-2 text-left font-semibold text-foreground border-r border-border last:border-r-0",
|
|
56
|
+
...props,
|
|
57
|
+
}),
|
|
58
|
+
td: ({ node, ...props }) =>
|
|
59
|
+
_jsx("td", {
|
|
60
|
+
className:
|
|
61
|
+
"px-4 py-2 text-foreground border-r border-border last:border-r-0",
|
|
62
|
+
...props,
|
|
63
|
+
}),
|
|
64
|
+
// Task list styling
|
|
65
|
+
input: ({ node, checked, ...props }) => {
|
|
66
|
+
if (props.type === "checkbox") {
|
|
67
|
+
return _jsx("input", {
|
|
68
|
+
type: "checkbox",
|
|
69
|
+
checked: checked || false,
|
|
70
|
+
disabled: true,
|
|
71
|
+
readOnly: true,
|
|
72
|
+
className: "mr-2 w-4 h-4 accent-[primary] cursor-not-allowed",
|
|
73
|
+
...props,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return _jsx("input", { ...props });
|
|
77
|
+
},
|
|
78
|
+
// Code block styling with enhanced shadows
|
|
79
|
+
code: ({ node, ...props }) => {
|
|
80
|
+
const inline = !props.className?.includes("language-");
|
|
81
|
+
if (inline) {
|
|
82
|
+
return _jsx("code", {
|
|
83
|
+
className:
|
|
84
|
+
"px-1.5 py-0.5 bg-card border border-border rounded text-sm font-mono text-foreground",
|
|
85
|
+
...props,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return _jsx("code", {
|
|
89
|
+
className:
|
|
90
|
+
"block p-4 bg-card border border-border rounded-md overflow-x-auto text-sm font-mono text-foreground shadow-sm",
|
|
91
|
+
...props,
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
pre: ({ node, ...props }) =>
|
|
95
|
+
_jsx("pre", { className: "my-4 rounded-lg", ...props }),
|
|
96
|
+
// Heading styling with improved hierarchy
|
|
97
|
+
h1: ({ node, ...props }) =>
|
|
98
|
+
_jsx("h1", {
|
|
99
|
+
className:
|
|
100
|
+
"text-2xl font-bold mt-6 mb-4 text-foreground border-b border-border pb-2",
|
|
101
|
+
...props,
|
|
102
|
+
}),
|
|
103
|
+
h2: ({ node, ...props }) =>
|
|
104
|
+
_jsx("h2", {
|
|
105
|
+
className:
|
|
106
|
+
"text-xl font-semibold mt-5 mb-3 text-foreground border-b border-border/50 pb-1.5",
|
|
107
|
+
...props,
|
|
108
|
+
}),
|
|
109
|
+
h3: ({ node, ...props }) =>
|
|
110
|
+
_jsx("h3", {
|
|
111
|
+
className: "text-lg font-semibold mt-4 mb-2 text-foreground",
|
|
112
|
+
...props,
|
|
113
|
+
}),
|
|
114
|
+
h4: ({ node, ...props }) =>
|
|
115
|
+
_jsx("h4", {
|
|
116
|
+
className: "text-base font-semibold mt-3 mb-2 text-foreground",
|
|
117
|
+
...props,
|
|
118
|
+
}),
|
|
119
|
+
// List styling
|
|
120
|
+
ul: ({ node, ...props }) => {
|
|
121
|
+
// Check if this is a task list by looking for checkbox inputs in children
|
|
122
|
+
const isTaskList = node?.children?.some(
|
|
123
|
+
(child) =>
|
|
124
|
+
typeof child === "object" &&
|
|
125
|
+
child !== null &&
|
|
126
|
+
"type" in child &&
|
|
127
|
+
child.type === "element" &&
|
|
128
|
+
"tagName" in child &&
|
|
129
|
+
child.tagName === "li" &&
|
|
130
|
+
"children" in child &&
|
|
131
|
+
Array.isArray(child.children) &&
|
|
132
|
+
child.children.some(
|
|
133
|
+
(grandChild) =>
|
|
134
|
+
typeof grandChild === "object" &&
|
|
135
|
+
grandChild !== null &&
|
|
136
|
+
"type" in grandChild &&
|
|
137
|
+
grandChild.type === "element" &&
|
|
138
|
+
"tagName" in grandChild &&
|
|
139
|
+
grandChild.tagName === "input" &&
|
|
140
|
+
"properties" in grandChild &&
|
|
141
|
+
typeof grandChild.properties === "object" &&
|
|
142
|
+
grandChild.properties !== null &&
|
|
143
|
+
"type" in grandChild.properties &&
|
|
144
|
+
grandChild.properties.type === "checkbox",
|
|
145
|
+
),
|
|
146
|
+
);
|
|
147
|
+
return _jsx("ul", {
|
|
148
|
+
className: cn(
|
|
149
|
+
"my-2 space-y-1 text-foreground",
|
|
150
|
+
isTaskList ? "list-none space-y-2" : "list-disc list-inside",
|
|
151
|
+
),
|
|
152
|
+
...props,
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
ol: ({ node, ...props }) =>
|
|
156
|
+
_jsx("ol", {
|
|
157
|
+
className: "list-decimal list-inside my-2 space-y-1 text-foreground",
|
|
158
|
+
...props,
|
|
159
|
+
}),
|
|
160
|
+
// List item styling
|
|
161
|
+
li: ({ node, ...props }) => {
|
|
162
|
+
// Check if this li contains a checkbox (task list item)
|
|
163
|
+
const isTaskListItem = node?.children?.some(
|
|
164
|
+
(child) =>
|
|
165
|
+
typeof child === "object" &&
|
|
166
|
+
child !== null &&
|
|
167
|
+
"type" in child &&
|
|
168
|
+
child.type === "element" &&
|
|
169
|
+
"tagName" in child &&
|
|
170
|
+
child.tagName === "input" &&
|
|
171
|
+
"properties" in child &&
|
|
172
|
+
typeof child.properties === "object" &&
|
|
173
|
+
child.properties !== null &&
|
|
174
|
+
"type" in child.properties &&
|
|
175
|
+
child.properties.type === "checkbox",
|
|
176
|
+
);
|
|
177
|
+
return _jsx("li", {
|
|
178
|
+
className: cn("flex items-start", isTaskListItem ? "gap-2" : "ml-2"),
|
|
179
|
+
...props,
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
// Link styling with hover effect
|
|
183
|
+
a: ({ node, ...props }) =>
|
|
184
|
+
_jsx("a", {
|
|
185
|
+
className:
|
|
186
|
+
"text-primary hover:underline decoration-2 underline-offset-2 transition-all",
|
|
187
|
+
target: "_blank",
|
|
188
|
+
rel: "noopener noreferrer",
|
|
189
|
+
...props,
|
|
190
|
+
}),
|
|
191
|
+
// Paragraph styling
|
|
192
|
+
p: ({ node, ...props }) =>
|
|
193
|
+
_jsx("p", {
|
|
194
|
+
className: "my-2 text-foreground leading-relaxed",
|
|
195
|
+
...props,
|
|
196
|
+
}),
|
|
197
|
+
// Blockquote styling with enhanced visual
|
|
198
|
+
blockquote: ({ node, ...props }) =>
|
|
199
|
+
_jsx("blockquote", {
|
|
200
|
+
className:
|
|
201
|
+
"border-l-4 border-[primary] pl-4 italic my-4 text-foreground bg-card py-2 rounded-r-md shadow-sm",
|
|
202
|
+
...props,
|
|
203
|
+
}),
|
|
204
|
+
// Horizontal rule
|
|
205
|
+
hr: ({ node, ...props }) =>
|
|
206
|
+
_jsx("hr", {
|
|
207
|
+
className: "my-6 border-t border-border opacity-50",
|
|
208
|
+
...props,
|
|
209
|
+
}),
|
|
210
|
+
};
|
|
211
|
+
return _jsxs("div", {
|
|
212
|
+
ref: ref,
|
|
213
|
+
className: cn(
|
|
214
|
+
"markdown-content prose prose-sm max-w-none dark:prose-invert",
|
|
215
|
+
className,
|
|
216
|
+
),
|
|
217
|
+
...props,
|
|
218
|
+
children: [
|
|
219
|
+
_jsx(ReactMarkdown, {
|
|
220
|
+
remarkPlugins: [remarkGfm],
|
|
221
|
+
components: components,
|
|
222
|
+
children: content,
|
|
223
|
+
}),
|
|
224
|
+
isStreaming &&
|
|
225
|
+
content &&
|
|
226
|
+
_jsx("span", {
|
|
227
|
+
className: "inline-block ml-1 animate-typing text-primary",
|
|
228
|
+
children: "...",
|
|
229
|
+
}),
|
|
230
|
+
],
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
);
|
|
95
234
|
Response.displayName = "Response";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../src/gui/components/Response.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO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AAU,YAC9D,OAAO,GACM,EACf,WAAW,IAAI,OAAO,IAAI,CACzB,eAAM,SAAS,EAAC,6DAA6D,oBAEtE,CACR,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,13 +1,72 @@
|
|
|
1
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
-
declare const SelectGroup: React.ForwardRefExoticComponent<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<
|
|
5
|
+
SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>
|
|
6
|
+
>;
|
|
7
|
+
declare const SelectValue: React.ForwardRefExoticComponent<
|
|
8
|
+
SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>
|
|
9
|
+
>;
|
|
10
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<
|
|
11
|
+
Omit<
|
|
12
|
+
SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>,
|
|
13
|
+
"ref"
|
|
14
|
+
> &
|
|
15
|
+
React.RefAttributes<HTMLButtonElement>
|
|
16
|
+
>;
|
|
17
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<
|
|
18
|
+
Omit<
|
|
19
|
+
SelectPrimitive.SelectScrollUpButtonProps &
|
|
20
|
+
React.RefAttributes<HTMLDivElement>,
|
|
21
|
+
"ref"
|
|
22
|
+
> &
|
|
23
|
+
React.RefAttributes<HTMLDivElement>
|
|
24
|
+
>;
|
|
25
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<
|
|
26
|
+
Omit<
|
|
27
|
+
SelectPrimitive.SelectScrollDownButtonProps &
|
|
28
|
+
React.RefAttributes<HTMLDivElement>,
|
|
29
|
+
"ref"
|
|
30
|
+
> &
|
|
31
|
+
React.RefAttributes<HTMLDivElement>
|
|
32
|
+
>;
|
|
33
|
+
declare const SelectContent: React.ForwardRefExoticComponent<
|
|
34
|
+
Omit<
|
|
35
|
+
SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>,
|
|
36
|
+
"ref"
|
|
37
|
+
> &
|
|
38
|
+
React.RefAttributes<HTMLDivElement>
|
|
39
|
+
>;
|
|
40
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<
|
|
41
|
+
Omit<
|
|
42
|
+
SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>,
|
|
43
|
+
"ref"
|
|
44
|
+
> &
|
|
45
|
+
React.RefAttributes<HTMLDivElement>
|
|
46
|
+
>;
|
|
47
|
+
declare const SelectItem: React.ForwardRefExoticComponent<
|
|
48
|
+
Omit<
|
|
49
|
+
SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>,
|
|
50
|
+
"ref"
|
|
51
|
+
> &
|
|
52
|
+
React.RefAttributes<HTMLDivElement>
|
|
53
|
+
>;
|
|
54
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<
|
|
55
|
+
Omit<
|
|
56
|
+
SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>,
|
|
57
|
+
"ref"
|
|
58
|
+
> &
|
|
59
|
+
React.RefAttributes<HTMLDivElement>
|
|
60
|
+
>;
|
|
61
|
+
export {
|
|
62
|
+
Select,
|
|
63
|
+
SelectGroup,
|
|
64
|
+
SelectValue,
|
|
65
|
+
SelectTrigger,
|
|
66
|
+
SelectContent,
|
|
67
|
+
SelectLabel,
|
|
68
|
+
SelectItem,
|
|
69
|
+
SelectSeparator,
|
|
70
|
+
SelectScrollUpButton,
|
|
71
|
+
SelectScrollDownButton,
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,WAAW,yGAAwB,CAAC;AAE1C,QAAA,MAAM,WAAW,0GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,oKAiBjB,CAAC;AAGH,QAAA,MAAM,oBAAoB,qKAcxB,CAAC;AAGH,QAAA,MAAM,sBAAsB,uKAc1B,CAAC;AAIH,QAAA,MAAM,aAAa,8JA6BjB,CAAC;AAGH,QAAA,MAAM,WAAW,4JASf,CAAC;AAGH,QAAA,MAAM,UAAU,2JAoBd,CAAC;AAGH,QAAA,MAAM,eAAe,gKASnB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
|
|
@@ -1,26 +1,132 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
2
|
import { Check, ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
|
|
4
3
|
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
+
|
|
6
7
|
const Select = SelectPrimitive.Root;
|
|
7
8
|
const SelectGroup = SelectPrimitive.Group;
|
|
8
9
|
const SelectValue = SelectPrimitive.Value;
|
|
9
|
-
const SelectTrigger = React.forwardRef(
|
|
10
|
+
const SelectTrigger = React.forwardRef(
|
|
11
|
+
({ className, children, ...props }, ref) =>
|
|
12
|
+
_jsxs(SelectPrimitive.Trigger, {
|
|
13
|
+
ref: ref,
|
|
14
|
+
className: cn(
|
|
15
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
16
|
+
className,
|
|
17
|
+
),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
children,
|
|
21
|
+
_jsx(SelectPrimitive.Icon, {
|
|
22
|
+
asChild: true,
|
|
23
|
+
children: _jsx(ChevronsUpDown, { className: "h-4 w-4 opacity-50" }),
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
10
28
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
11
|
-
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) =>
|
|
29
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) =>
|
|
30
|
+
_jsx(SelectPrimitive.ScrollUpButton, {
|
|
31
|
+
ref: ref,
|
|
32
|
+
className: cn(
|
|
33
|
+
"flex cursor-default items-center justify-center py-1",
|
|
34
|
+
className,
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: _jsx(ChevronUp, { className: "h-4 w-4" }),
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
12
40
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
13
|
-
const SelectScrollDownButton = React.forwardRef(
|
|
41
|
+
const SelectScrollDownButton = React.forwardRef(
|
|
42
|
+
({ className, ...props }, ref) =>
|
|
43
|
+
_jsx(SelectPrimitive.ScrollDownButton, {
|
|
44
|
+
ref: ref,
|
|
45
|
+
className: cn(
|
|
46
|
+
"flex cursor-default items-center justify-center py-1",
|
|
47
|
+
className,
|
|
48
|
+
),
|
|
49
|
+
...props,
|
|
50
|
+
children: _jsx(ChevronDown, { className: "h-4 w-4" }),
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
14
53
|
SelectScrollDownButton.displayName =
|
|
15
|
-
|
|
16
|
-
const SelectContent = React.forwardRef(
|
|
17
|
-
|
|
18
|
-
|
|
54
|
+
SelectPrimitive.ScrollDownButton.displayName;
|
|
55
|
+
const SelectContent = React.forwardRef(
|
|
56
|
+
({ className, children, position = "popper", ...props }, ref) =>
|
|
57
|
+
_jsx(SelectPrimitive.Portal, {
|
|
58
|
+
children: _jsxs(SelectPrimitive.Content, {
|
|
59
|
+
ref: ref,
|
|
60
|
+
className: cn(
|
|
61
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
62
|
+
position === "popper" &&
|
|
63
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
64
|
+
className,
|
|
65
|
+
),
|
|
66
|
+
position: position,
|
|
67
|
+
...props,
|
|
68
|
+
children: [
|
|
69
|
+
_jsx(SelectScrollUpButton, {}),
|
|
70
|
+
_jsx(SelectPrimitive.Viewport, {
|
|
71
|
+
className: cn(
|
|
72
|
+
"p-1",
|
|
73
|
+
position === "popper" &&
|
|
74
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
75
|
+
),
|
|
76
|
+
children: children,
|
|
77
|
+
}),
|
|
78
|
+
_jsx(SelectScrollDownButton, {}),
|
|
79
|
+
],
|
|
80
|
+
}),
|
|
81
|
+
}),
|
|
82
|
+
);
|
|
19
83
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
20
|
-
const SelectLabel = React.forwardRef(({ className, ...props }, ref) =>
|
|
84
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) =>
|
|
85
|
+
_jsx(SelectPrimitive.Label, {
|
|
86
|
+
ref: ref,
|
|
87
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
88
|
+
...props,
|
|
89
|
+
}),
|
|
90
|
+
);
|
|
21
91
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
22
|
-
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
92
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
93
|
+
_jsxs(SelectPrimitive.Item, {
|
|
94
|
+
ref: ref,
|
|
95
|
+
className: cn(
|
|
96
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
97
|
+
className,
|
|
98
|
+
),
|
|
99
|
+
...props,
|
|
100
|
+
children: [
|
|
101
|
+
_jsx("span", {
|
|
102
|
+
className:
|
|
103
|
+
"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
104
|
+
children: _jsx(SelectPrimitive.ItemIndicator, {
|
|
105
|
+
children: _jsx(Check, { className: "h-4 w-4" }),
|
|
106
|
+
}),
|
|
107
|
+
}),
|
|
108
|
+
_jsx(SelectPrimitive.ItemText, { children: children }),
|
|
109
|
+
],
|
|
110
|
+
}),
|
|
111
|
+
);
|
|
23
112
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
24
|
-
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) =>
|
|
113
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) =>
|
|
114
|
+
_jsx(SelectPrimitive.Separator, {
|
|
115
|
+
ref: ref,
|
|
116
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
117
|
+
...props,
|
|
118
|
+
}),
|
|
119
|
+
);
|
|
25
120
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
26
|
-
export {
|
|
121
|
+
export {
|
|
122
|
+
Select,
|
|
123
|
+
SelectGroup,
|
|
124
|
+
SelectValue,
|
|
125
|
+
SelectTrigger,
|
|
126
|
+
SelectContent,
|
|
127
|
+
SelectLabel,
|
|
128
|
+
SelectItem,
|
|
129
|
+
SelectSeparator,
|
|
130
|
+
SelectScrollUpButton,
|
|
131
|
+
SelectScrollDownButton,
|
|
132
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/gui/components/Select.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AAEpC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,MAAC,eAAe,CAAC,OAAO,IACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,iTAAiT,EACjT,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,eAAe,CAAC,IAAI,IAAC,OAAO,kBAC3B,KAAC,cAAc,IAAC,SAAS,EAAC,oBAAoB,GAAG,GAC5B,IACC,CAC3B,CAAC,CAAC;AACH,aAAa,CAA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eAAe,CAAC,SAAS,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC;AAEpE,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Toaster as Sonner } from "sonner";
|
|
3
|
+
const Toaster = ({ ...props }) => {
|
|
4
|
+
return (_jsx(Sonner, { position: "top-center", className: "toaster group", style: {
|
|
5
|
+
"--top-offset": "16px",
|
|
6
|
+
"--width:": "calc(100% - 2 * var(--top-offset))",
|
|
7
|
+
position: "absolute",
|
|
8
|
+
zIndex: 5,
|
|
9
|
+
top: "var(--top-offset)",
|
|
10
|
+
left: "50%",
|
|
11
|
+
transform: "translateX(-50%)",
|
|
12
|
+
width: "calc(100% - 2 * var(--top-offset))",
|
|
13
|
+
maxWidth: "480px",
|
|
14
|
+
}, offset: 0, toastOptions: {
|
|
15
|
+
classNames: {
|
|
16
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
17
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
18
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
19
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
20
|
+
},
|
|
21
|
+
}, ...props }));
|
|
22
|
+
};
|
|
23
|
+
export { Toaster };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConnectionStatus } from "../../core/index.js";
|
|
2
|
+
export interface StatusBarProps {
|
|
3
|
+
connectionStatus: ConnectionStatus;
|
|
4
|
+
sessionId: string | null;
|
|
5
|
+
isStreaming: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function StatusBar({
|
|
8
|
+
connectionStatus,
|
|
9
|
+
sessionId,
|
|
10
|
+
isStreaming,
|
|
11
|
+
}: StatusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=StatusBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../src/gui/components/StatusBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,EACxB,gBAAgB,EAChB,SAAS,EACT,WAAW,GACZ,EAAE,cAAc,2CAsChB"}
|