@townco/ui 0.1.8 → 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.map +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/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/ChatInput.d.ts.map +1 -0
- package/dist/gui/components/ChatInput.js.map +1 -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/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/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/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.map +1 -0
- 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.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/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.map +1 -0
- 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 +2 -2
|
@@ -2,85 +2,182 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import ReactMarkdown from "react-markdown";
|
|
3
3
|
import remarkGfm from "remark-gfm";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
export function MarkdownRenderer({ content, className
|
|
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
|
-
|
|
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
|
-
|
|
5
|
+
export function MarkdownRenderer({ content, className }) {
|
|
6
|
+
if (!content) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const components = {
|
|
10
|
+
// Table styling
|
|
11
|
+
table: ({ node, ...props }) =>
|
|
12
|
+
_jsx("div", {
|
|
13
|
+
className: "overflow-x-auto my-4",
|
|
14
|
+
children: _jsx("table", {
|
|
15
|
+
className:
|
|
16
|
+
"min-w-full border-collapse border border-border rounded-md",
|
|
17
|
+
...props,
|
|
18
|
+
}),
|
|
19
|
+
}),
|
|
20
|
+
thead: ({ node, ...props }) =>
|
|
21
|
+
_jsx("thead", { className: "bg-card border-b border-border", ...props }),
|
|
22
|
+
tbody: ({ node, ...props }) => _jsx("tbody", { ...props }),
|
|
23
|
+
tr: ({ node, ...props }) =>
|
|
24
|
+
_jsx("tr", {
|
|
25
|
+
className: "border-b border-border hover:bg-card transition-colors",
|
|
26
|
+
...props,
|
|
27
|
+
}),
|
|
28
|
+
th: ({ node, ...props }) =>
|
|
29
|
+
_jsx("th", {
|
|
30
|
+
className:
|
|
31
|
+
"px-4 py-2 text-left font-semibold text-foreground border-r border-border last:border-r-0",
|
|
32
|
+
...props,
|
|
33
|
+
}),
|
|
34
|
+
td: ({ node, ...props }) =>
|
|
35
|
+
_jsx("td", {
|
|
36
|
+
className:
|
|
37
|
+
"px-4 py-2 text-foreground border-r border-border last:border-r-0",
|
|
38
|
+
...props,
|
|
39
|
+
}),
|
|
40
|
+
// Task list styling
|
|
41
|
+
input: ({ node, checked, ...props }) => {
|
|
42
|
+
if (props.type === "checkbox") {
|
|
43
|
+
return _jsx("input", {
|
|
44
|
+
type: "checkbox",
|
|
45
|
+
checked: checked || false,
|
|
46
|
+
disabled: true,
|
|
47
|
+
readOnly: true,
|
|
48
|
+
className: "mr-2 w-4 h-4 accent-[primary] cursor-not-allowed",
|
|
49
|
+
...props,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return _jsx("input", { ...props });
|
|
53
|
+
},
|
|
54
|
+
// Code block styling
|
|
55
|
+
code: ({ node, ...props }) => {
|
|
56
|
+
const inline = !props.className?.includes("language-");
|
|
57
|
+
if (inline) {
|
|
58
|
+
return _jsx("code", {
|
|
59
|
+
className:
|
|
60
|
+
"px-1.5 py-0.5 bg-card border border-border rounded text-sm font-mono text-foreground",
|
|
61
|
+
...props,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return _jsx("code", {
|
|
65
|
+
className:
|
|
66
|
+
"block p-4 bg-card border border-border rounded-md overflow-x-auto text-sm font-mono text-foreground",
|
|
67
|
+
...props,
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
pre: ({ node, ...props }) => _jsx("pre", { className: "my-4", ...props }),
|
|
71
|
+
// Heading styling
|
|
72
|
+
h1: ({ node, ...props }) =>
|
|
73
|
+
_jsx("h1", {
|
|
74
|
+
className: "text-2xl font-bold mt-6 mb-4 text-foreground",
|
|
75
|
+
...props,
|
|
76
|
+
}),
|
|
77
|
+
h2: ({ node, ...props }) =>
|
|
78
|
+
_jsx("h2", {
|
|
79
|
+
className: "text-xl font-semibold mt-5 mb-3 text-foreground",
|
|
80
|
+
...props,
|
|
81
|
+
}),
|
|
82
|
+
h3: ({ node, ...props }) =>
|
|
83
|
+
_jsx("h3", {
|
|
84
|
+
className: "text-lg font-semibold mt-4 mb-2 text-foreground",
|
|
85
|
+
...props,
|
|
86
|
+
}),
|
|
87
|
+
// List styling
|
|
88
|
+
ul: ({ node, ...props }) => {
|
|
89
|
+
// Check if this is a task list by looking for checkbox inputs in children
|
|
90
|
+
const isTaskList = node?.children?.some(
|
|
91
|
+
(child) =>
|
|
92
|
+
typeof child === "object" &&
|
|
93
|
+
child !== null &&
|
|
94
|
+
"type" in child &&
|
|
95
|
+
child.type === "element" &&
|
|
96
|
+
"tagName" in child &&
|
|
97
|
+
child.tagName === "li" &&
|
|
98
|
+
"children" in child &&
|
|
99
|
+
Array.isArray(child.children) &&
|
|
100
|
+
child.children.some(
|
|
101
|
+
(grandChild) =>
|
|
102
|
+
typeof grandChild === "object" &&
|
|
103
|
+
grandChild !== null &&
|
|
104
|
+
"type" in grandChild &&
|
|
105
|
+
grandChild.type === "element" &&
|
|
106
|
+
"tagName" in grandChild &&
|
|
107
|
+
grandChild.tagName === "input" &&
|
|
108
|
+
"properties" in grandChild &&
|
|
109
|
+
typeof grandChild.properties === "object" &&
|
|
110
|
+
grandChild.properties !== null &&
|
|
111
|
+
"type" in grandChild.properties &&
|
|
112
|
+
grandChild.properties.type === "checkbox",
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
return _jsx("ul", {
|
|
116
|
+
className: cn(
|
|
117
|
+
"my-2 space-y-1 text-foreground",
|
|
118
|
+
isTaskList ? "list-none space-y-2" : "list-disc list-inside",
|
|
119
|
+
),
|
|
120
|
+
...props,
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
ol: ({ node, ...props }) =>
|
|
124
|
+
_jsx("ol", {
|
|
125
|
+
className: "list-decimal list-inside my-2 space-y-1 text-foreground",
|
|
126
|
+
...props,
|
|
127
|
+
}),
|
|
128
|
+
// List item styling
|
|
129
|
+
li: ({ node, ...props }) => {
|
|
130
|
+
// Check if this li contains a checkbox (task list item)
|
|
131
|
+
const isTaskListItem = node?.children?.some(
|
|
132
|
+
(child) =>
|
|
133
|
+
typeof child === "object" &&
|
|
134
|
+
child !== null &&
|
|
135
|
+
"type" in child &&
|
|
136
|
+
child.type === "element" &&
|
|
137
|
+
"tagName" in child &&
|
|
138
|
+
child.tagName === "input" &&
|
|
139
|
+
"properties" in child &&
|
|
140
|
+
typeof child.properties === "object" &&
|
|
141
|
+
child.properties !== null &&
|
|
142
|
+
"type" in child.properties &&
|
|
143
|
+
child.properties.type === "checkbox",
|
|
144
|
+
);
|
|
145
|
+
return _jsx("li", {
|
|
146
|
+
className: cn("flex items-start", isTaskListItem ? "gap-2" : "ml-2"),
|
|
147
|
+
...props,
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
// Link styling
|
|
151
|
+
a: ({ node, ...props }) =>
|
|
152
|
+
_jsx("a", {
|
|
153
|
+
className: "text-primary hover:underline",
|
|
154
|
+
target: "_blank",
|
|
155
|
+
rel: "noopener noreferrer",
|
|
156
|
+
...props,
|
|
157
|
+
}),
|
|
158
|
+
// Paragraph styling
|
|
159
|
+
p: ({ node, ...props }) =>
|
|
160
|
+
_jsx("p", {
|
|
161
|
+
className: "my-2 text-foreground leading-relaxed",
|
|
162
|
+
...props,
|
|
163
|
+
}),
|
|
164
|
+
// Blockquote styling
|
|
165
|
+
blockquote: ({ node, ...props }) =>
|
|
166
|
+
_jsx("blockquote", {
|
|
167
|
+
className:
|
|
168
|
+
"border-l-4 border-[primary] pl-4 italic my-4 text-foreground bg-card py-2",
|
|
169
|
+
...props,
|
|
170
|
+
}),
|
|
171
|
+
};
|
|
172
|
+
return _jsx("div", {
|
|
173
|
+
className: cn(
|
|
174
|
+
"markdown-content prose prose-sm max-w-none dark:prose-invert",
|
|
175
|
+
className,
|
|
176
|
+
),
|
|
177
|
+
children: _jsx(ReactMarkdown, {
|
|
178
|
+
remarkPlugins: [remarkGfm],
|
|
179
|
+
components: components,
|
|
180
|
+
children: content,
|
|
181
|
+
}),
|
|
182
|
+
});
|
|
86
183
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../../src/gui/components/MarkdownRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAOrC,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB;IAC5E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAe;QAC7B,gBAAgB;QAChB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC7B,cAAK,SAAS,EAAC,sBAAsB,YACnC,gBACE,SAAS,EAAC,2EAA2E,KACjF,KAAK,GACT,GACE,CACP;QACD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC7B,gBACE,SAAS,EAAC,iEAAiE,KACvE,KAAK,GACT,CACH;QACD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,mBAAW,KAAK,GAAI;QACnD,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC1B,aACE,SAAS,EAAC,yFAAyF,KAC/F,KAAK,GACT,CACH;QACD,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC1B,aACE,SA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EAAE;IACpG,sDAAsD;IACtD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;IAEvD,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,SAAS,gBACF,GAAG,IAAI,UAAU,qBACZ,SAAS,EAC1B,SAAS,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,KACvD,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { DisplayMessage } from "./MessageList.js";
|
|
4
|
-
declare const messageContentVariants: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
declare const messageContentVariants: (
|
|
5
|
+
props?:
|
|
6
|
+
| ({
|
|
7
|
+
role?: "user" | "assistant" | "system" | null | undefined;
|
|
8
|
+
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp)
|
|
10
|
+
| undefined,
|
|
11
|
+
) => string;
|
|
12
|
+
export interface MessageContentProps
|
|
13
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">,
|
|
14
|
+
VariantProps<typeof messageContentVariants> {
|
|
15
|
+
/** Message role - determines styling */
|
|
16
|
+
role?: "user" | "assistant" | "system";
|
|
17
|
+
/** Visual variant */
|
|
18
|
+
variant?: "default" | "outline" | "ghost";
|
|
19
|
+
/** Whether the message is currently streaming */
|
|
20
|
+
isStreaming?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Message object for smart rendering (optional)
|
|
23
|
+
* When provided, automatically renders thinking, waiting, and content
|
|
24
|
+
*/
|
|
25
|
+
message?: DisplayMessage;
|
|
26
|
+
/** Display style for thinking/reasoning blocks (when using smart rendering) */
|
|
27
|
+
thinkingDisplayStyle?: "collapsible" | "inline";
|
|
28
|
+
/** Custom content (overrides smart rendering) */
|
|
29
|
+
children?: React.ReactNode;
|
|
24
30
|
}
|
|
25
|
-
export declare const MessageContent: React.ForwardRefExoticComponent<
|
|
26
|
-
|
|
31
|
+
export declare const MessageContent: React.ForwardRefExoticComponent<
|
|
32
|
+
MessageContentProps & React.RefAttributes<HTMLDivElement>
|
|
33
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageContent.d.ts","sourceRoot":"","sources":["../../../src/gui/components/MessageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA6DvD,QAAA,MAAM,sBAAsB;;;8EAoB3B,CAAC;AAEF,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEvC,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,SAA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AW,EAChC,SAAS,EAAE,KAAK,GAChB,CACH,IACA,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,sBAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EACzC,WAAW,IAAI,sBAAsB,EACrC,SAAS,CACV,KACG,KAAK,YAER,OAAO,GACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/gui/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEvF;;;GAGG;AAEH,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageList.js","sourceRoot":"","sources":["../../../src/gui/components/MessageList.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ThemeConfig } from "./ConfigPanel.js";
|
|
2
|
+
declare const DEFAULT_CONFIG: ThemeConfig;
|
|
3
|
+
interface PlaygroundLayoutProps {
|
|
4
|
+
initialConfig?: ThemeConfig;
|
|
5
|
+
initialStatus?: string;
|
|
6
|
+
iframeSrc?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function PlaygroundLayout({
|
|
9
|
+
initialConfig,
|
|
10
|
+
initialStatus,
|
|
11
|
+
iframeSrc,
|
|
12
|
+
}: PlaygroundLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { DEFAULT_CONFIG };
|
|
14
|
+
//# sourceMappingURL=PlaygroundLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundLayout.d.ts","sourceRoot":"","sources":["../../../src/gui/components/PlaygroundLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGjE,QAAA,MAAM,cAAc,EAAE,WAMrB,CAAC;AAEF,UAAU,qBAAqB;IAC7B,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,aAA8B,EAC9B,aAAwB,EACxB,SAAS,GACV,EAAE,qBAAqB,2CAwBvB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChatPreview } from "./ChatPreview.js";
|
|
4
|
+
import { ConfigPanel } from "./ConfigPanel.js";
|
|
5
|
+
|
|
6
|
+
const DEFAULT_CONFIG = {
|
|
7
|
+
colorScheme: "light",
|
|
8
|
+
accentColor: "#646cff",
|
|
9
|
+
typography: "Inter",
|
|
10
|
+
fontSize: 16,
|
|
11
|
+
thinkingDisplayStyle: "collapsible",
|
|
12
|
+
};
|
|
13
|
+
export function PlaygroundLayout({
|
|
14
|
+
initialConfig = DEFAULT_CONFIG,
|
|
15
|
+
initialStatus = "v0.1.0",
|
|
16
|
+
iframeSrc,
|
|
17
|
+
}) {
|
|
18
|
+
const [config, setConfig] = useState(initialConfig);
|
|
19
|
+
const [status, setStatus] = useState(initialStatus);
|
|
20
|
+
return _jsx("div", {
|
|
21
|
+
className: "w-full h-screen overflow-hidden",
|
|
22
|
+
"data-theme": config.colorScheme,
|
|
23
|
+
children: _jsxs("div", {
|
|
24
|
+
className: "flex h-full w-full",
|
|
25
|
+
children: [
|
|
26
|
+
_jsx("div", {
|
|
27
|
+
className: "w-[400px] flex-shrink-0 h-full overflow-hidden",
|
|
28
|
+
children: _jsx(ConfigPanel, {
|
|
29
|
+
config: config,
|
|
30
|
+
status: status,
|
|
31
|
+
onConfigChange: setConfig,
|
|
32
|
+
onStatusChange: setStatus,
|
|
33
|
+
}),
|
|
34
|
+
}),
|
|
35
|
+
_jsx("div", {
|
|
36
|
+
className:
|
|
37
|
+
"flex-1 h-full overflow-hidden [background-image:radial-gradient(var(--color-border)_1px,var(--color-bg)_1px)] [background-size:20px_20px] flex items-center justify-center p-5",
|
|
38
|
+
children: _jsx(ChatPreview, {
|
|
39
|
+
config: config,
|
|
40
|
+
status: status,
|
|
41
|
+
iframeSrc: iframeSrc,
|
|
42
|
+
}),
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export { DEFAULT_CONFIG };
|
|
49
|
+
//# sourceMappingURL=PlaygroundLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundLayout.js","sourceRoot":"","sources":["../../../src/gui/components/PlaygroundLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAoB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,cAAc,GAAgB;IAClC,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,EAAE;IACZ,oBAAoB,EAAE,aAAa;CACpC,CAAC;AAQF,MAAM,UAAU,gBAAgB,CAAC,EAC/B,aAAa,GAAG,cAAc,EAC9B,aAAa,GAAG,QAAQ,EACxB,SAAS,GACa;IACtB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAc,aAAa,CAAC,CAAC;IACjE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEpD,OAAO,CACL,cACE,SAAS,EAAC,iCAAiC,gBAC/B,MAAM,CAAC,WAAW,YAE9B,eAAK,SAAS,EAAC,oBAAoB,aACjC,cAAK,SAAS,EAAC,gDAAgD,YAC7D,KAAC,WAAW,IACV,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,SAAS,EACzB,cAAc,EAAE,SAAS,GACzB,GACE,EACN,cAAK,SAAS,EAAC,gLAAgL,YAC7L,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,GACjE,IACF,GACF,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -4,28 +4,34 @@ import * as React from "react";
|
|
|
4
4
|
* Reasoning component inspired by shadcn.io/ai
|
|
5
5
|
* Displays AI thinking/reasoning process with auto-collapse support
|
|
6
6
|
*/
|
|
7
|
-
declare const reasoningContainerVariants: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
declare const reasoningContainerVariants: (
|
|
8
|
+
props?:
|
|
9
|
+
| ({
|
|
10
|
+
variant?: "default" | "subtle" | "prominent" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp)
|
|
12
|
+
| undefined,
|
|
13
|
+
) => string;
|
|
14
|
+
export interface ReasoningProps
|
|
15
|
+
extends VariantProps<typeof reasoningContainerVariants> {
|
|
16
|
+
/** The reasoning/thinking content */
|
|
17
|
+
content?: string;
|
|
18
|
+
/** Whether the content is currently streaming */
|
|
19
|
+
isStreaming?: boolean;
|
|
20
|
+
/** Display mode - collapsible or always visible */
|
|
21
|
+
mode?: "collapsible" | "inline";
|
|
22
|
+
/** Default expanded state (default: false - collapsed by default) */
|
|
23
|
+
defaultExpanded?: boolean;
|
|
24
|
+
/** Auto-expand when streaming starts (default: false) */
|
|
25
|
+
autoExpand?: boolean;
|
|
26
|
+
/** Auto-collapse after streaming completes */
|
|
27
|
+
autoCollapse?: boolean;
|
|
28
|
+
/** Delay before auto-collapsing (ms) */
|
|
29
|
+
autoCollapseDelay?: number;
|
|
30
|
+
/** Custom label */
|
|
31
|
+
label?: string;
|
|
32
|
+
/** Additional CSS class */
|
|
33
|
+
className?: string;
|
|
29
34
|
}
|
|
30
|
-
export declare const Reasoning: React.ForwardRefExoticComponent<
|
|
31
|
-
|
|
35
|
+
export declare const Reasoning: React.ForwardRefExoticComponent<
|
|
36
|
+
ReasoningProps & React.RefAttributes<HTMLDivElement>
|
|
37
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Reasoning.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Reasoning.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;GAGG;AAEH,QAAA,MAAM,0BAA0B;;8EAc/B,CAAC;AAiBF,MAAM,WAAW,cACf,SAAQ,YAAY,CAAC,OAAO,0BAA0B,CAAC;IACvD,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,IAAI,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC;IAChC,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,uFA+HrB,CAAC"}
|