@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.
Files changed (243) hide show
  1. package/dist/core/hooks/index.d.ts +1 -0
  2. package/dist/core/hooks/index.d.ts.map +1 -0
  3. package/dist/core/hooks/index.js +1 -0
  4. package/dist/core/hooks/index.js.map +1 -0
  5. package/dist/core/hooks/use-chat-input.d.ts +17 -17
  6. package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
  7. package/dist/core/hooks/use-chat-input.js +64 -55
  8. package/dist/core/hooks/use-chat-input.js.map +1 -0
  9. package/dist/core/hooks/use-chat-messages.d.ts +11 -11
  10. package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
  11. package/dist/core/hooks/use-chat-messages.js +121 -114
  12. package/dist/core/hooks/use-chat-messages.js.map +1 -0
  13. package/dist/core/hooks/use-chat-session.d.ts +5 -5
  14. package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
  15. package/dist/core/hooks/use-chat-session.js +78 -80
  16. package/dist/core/hooks/use-chat-session.js.map +1 -0
  17. package/dist/core/hooks/use-media-query.d.ts +39 -0
  18. package/dist/core/hooks/use-media-query.js +84 -0
  19. package/dist/core/index.d.ts.map +1 -0
  20. package/dist/core/index.js.map +1 -0
  21. package/dist/core/schemas/chat.d.ts +83 -56
  22. package/dist/core/schemas/chat.d.ts.map +1 -0
  23. package/dist/core/schemas/chat.js +27 -25
  24. package/dist/core/schemas/chat.js.map +1 -0
  25. package/dist/core/schemas/index.d.ts.map +1 -0
  26. package/dist/core/schemas/index.js.map +1 -0
  27. package/dist/core/store/chat-store.d.ts +28 -22
  28. package/dist/core/store/chat-store.d.ts.map +1 -0
  29. package/dist/core/store/chat-store.js +59 -50
  30. package/dist/core/store/chat-store.js.map +1 -0
  31. package/dist/gui/components/Button.d.ts +23 -7
  32. package/dist/gui/components/Button.d.ts.map +1 -0
  33. package/dist/gui/components/Button.js +40 -27
  34. package/dist/gui/components/Button.js.map +1 -0
  35. package/dist/gui/components/Card.d.ts +26 -7
  36. package/dist/gui/components/Card.d.ts.map +1 -0
  37. package/dist/gui/components/Card.js +54 -8
  38. package/dist/gui/components/Card.js.map +1 -0
  39. package/dist/gui/components/ChatHeader.d.ts +38 -0
  40. package/dist/gui/components/ChatHeader.js +86 -0
  41. package/dist/gui/components/ChatInput.d.ts +19 -1
  42. package/dist/gui/components/ChatInput.d.ts.map +1 -0
  43. package/dist/gui/components/ChatInput.js +94 -11
  44. package/dist/gui/components/ChatInput.js.map +1 -0
  45. package/dist/gui/components/ChatInputCommandMenu.d.ts +20 -0
  46. package/dist/gui/components/ChatInputCommandMenu.js +62 -0
  47. package/dist/gui/components/ChatInterface.d.ts +12 -0
  48. package/dist/gui/components/ChatInterface.d.ts.map +1 -0
  49. package/dist/gui/components/ChatInterface.js +204 -0
  50. package/dist/gui/components/ChatInterface.js.map +1 -0
  51. package/dist/gui/components/ChatLayout.d.ts +52 -0
  52. package/dist/gui/components/ChatLayout.js +105 -0
  53. package/dist/gui/components/ChatPanelTabContent.d.ts +18 -0
  54. package/dist/gui/components/ChatPanelTabContent.js +15 -0
  55. package/dist/gui/components/ChatPreview.d.ts +12 -0
  56. package/dist/gui/components/ChatPreview.d.ts.map +1 -0
  57. package/dist/gui/components/ChatPreview.js +214 -0
  58. package/dist/gui/components/ChatPreview.js.map +1 -0
  59. package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
  60. package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
  61. package/dist/gui/components/ChatSecondaryPanel.js +115 -38
  62. package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
  63. package/dist/gui/components/ChatSidebar.d.ts +14 -0
  64. package/dist/gui/components/ChatSidebar.js +23 -0
  65. package/dist/gui/components/ChatStatus.d.ts +4 -2
  66. package/dist/gui/components/ChatStatus.d.ts.map +1 -0
  67. package/dist/gui/components/ChatStatus.js +45 -34
  68. package/dist/gui/components/ChatStatus.js.map +1 -0
  69. package/dist/gui/components/ChatView.d.ts +8 -0
  70. package/dist/gui/components/ChatView.d.ts.map +1 -0
  71. package/dist/gui/components/ChatView.js +42 -0
  72. package/dist/gui/components/ChatView.js.map +1 -0
  73. package/dist/gui/components/ConfigPanel.d.ts +20 -0
  74. package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
  75. package/dist/gui/components/ConfigPanel.js +225 -0
  76. package/dist/gui/components/ConfigPanel.js.map +1 -0
  77. package/dist/gui/components/Conversation.d.ts +17 -14
  78. package/dist/gui/components/Conversation.d.ts.map +1 -0
  79. package/dist/gui/components/Conversation.js +143 -83
  80. package/dist/gui/components/Conversation.js.map +1 -0
  81. package/dist/gui/components/Dialog.d.ts +57 -11
  82. package/dist/gui/components/Dialog.d.ts.map +1 -0
  83. package/dist/gui/components/Dialog.js +84 -8
  84. package/dist/gui/components/Dialog.js.map +1 -0
  85. package/dist/gui/components/DropdownMenu.d.ts +27 -0
  86. package/dist/gui/components/DropdownMenu.js +68 -0
  87. package/dist/gui/components/HeightTransition.d.ts +12 -7
  88. package/dist/gui/components/HeightTransition.d.ts.map +1 -0
  89. package/dist/gui/components/HeightTransition.js +88 -77
  90. package/dist/gui/components/HeightTransition.js.map +1 -0
  91. package/dist/gui/components/Input.d.ts +13 -6
  92. package/dist/gui/components/Input.d.ts.map +1 -0
  93. package/dist/gui/components/Input.js +27 -16
  94. package/dist/gui/components/Input.js.map +1 -0
  95. package/dist/gui/components/InputBox.d.ts +21 -0
  96. package/dist/gui/components/InputBox.d.ts.map +1 -0
  97. package/dist/gui/components/InputBox.js +90 -0
  98. package/dist/gui/components/InputBox.js.map +1 -0
  99. package/dist/gui/components/Label.d.ts +7 -1
  100. package/dist/gui/components/Label.d.ts.map +1 -0
  101. package/dist/gui/components/Label.js +12 -2
  102. package/dist/gui/components/Label.js.map +1 -0
  103. package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
  104. package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
  105. package/dist/gui/components/MarkdownRenderer.js +178 -81
  106. package/dist/gui/components/MarkdownRenderer.js.map +1 -0
  107. package/dist/gui/components/Message.d.ts +4 -0
  108. package/dist/gui/components/Message.d.ts.map +1 -0
  109. package/dist/gui/components/Message.js +77 -3
  110. package/dist/gui/components/Message.js.map +1 -0
  111. package/dist/gui/components/MessageContent.d.ts +29 -22
  112. package/dist/gui/components/MessageContent.d.ts.map +1 -0
  113. package/dist/gui/components/MessageContent.js +1 -1
  114. package/dist/gui/components/MessageContent.js.map +1 -0
  115. package/dist/gui/components/MessageList.d.ts.map +1 -0
  116. package/dist/gui/components/MessageList.js.map +1 -0
  117. package/dist/gui/components/PlaygroundLayout.d.ts +14 -0
  118. package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
  119. package/dist/gui/components/PlaygroundLayout.js +49 -0
  120. package/dist/gui/components/PlaygroundLayout.js.map +1 -0
  121. package/dist/gui/components/Reasoning.d.ts +30 -24
  122. package/dist/gui/components/Reasoning.d.ts.map +1 -0
  123. package/dist/gui/components/Reasoning.js +187 -60
  124. package/dist/gui/components/Reasoning.js.map +1 -0
  125. package/dist/gui/components/Response.d.ts +11 -9
  126. package/dist/gui/components/Response.d.ts.map +1 -0
  127. package/dist/gui/components/Response.js +229 -90
  128. package/dist/gui/components/Response.js.map +1 -0
  129. package/dist/gui/components/Select.d.ts +69 -10
  130. package/dist/gui/components/Select.d.ts.map +1 -0
  131. package/dist/gui/components/Select.js +118 -12
  132. package/dist/gui/components/Select.js.map +1 -0
  133. package/dist/gui/components/Sonner.d.ts +5 -0
  134. package/dist/gui/components/Sonner.js +23 -0
  135. package/dist/gui/components/StatusBar.d.ts +12 -0
  136. package/dist/gui/components/StatusBar.d.ts.map +1 -0
  137. package/dist/gui/components/StatusBar.js +58 -0
  138. package/dist/gui/components/StatusBar.js.map +1 -0
  139. package/dist/gui/components/Tabs.d.ts +24 -4
  140. package/dist/gui/components/Tabs.d.ts.map +1 -0
  141. package/dist/gui/components/Tabs.js +32 -4
  142. package/dist/gui/components/Tabs.js.map +1 -0
  143. package/dist/gui/components/Task.d.ts +28 -24
  144. package/dist/gui/components/Task.d.ts.map +1 -0
  145. package/dist/gui/components/Task.js +164 -31
  146. package/dist/gui/components/Task.js.map +1 -0
  147. package/dist/gui/components/Textarea.d.ts +15 -7
  148. package/dist/gui/components/Textarea.d.ts.map +1 -0
  149. package/dist/gui/components/Textarea.js +63 -46
  150. package/dist/gui/components/Textarea.js.map +1 -0
  151. package/dist/gui/components/ThinkingBlock.d.ts +20 -10
  152. package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
  153. package/dist/gui/components/ThinkingBlock.js +134 -35
  154. package/dist/gui/components/ThinkingBlock.js.map +1 -0
  155. package/dist/gui/components/TodoList.d.ts +12 -10
  156. package/dist/gui/components/TodoList.d.ts.map +1 -0
  157. package/dist/gui/components/TodoList.js +22 -7
  158. package/dist/gui/components/TodoList.js.map +1 -0
  159. package/dist/gui/components/TodoListItem.d.ts +9 -6
  160. package/dist/gui/components/TodoListItem.d.ts.map +1 -0
  161. package/dist/gui/components/TodoListItem.js +18 -4
  162. package/dist/gui/components/TodoListItem.js.map +1 -0
  163. package/dist/gui/components/index.d.ts +9 -1
  164. package/dist/gui/components/index.d.ts.map +1 -0
  165. package/dist/gui/components/index.js +11 -1
  166. package/dist/gui/components/index.js.map +1 -0
  167. package/dist/gui/index.d.ts.map +1 -0
  168. package/dist/gui/index.js.map +1 -0
  169. package/dist/gui/lib/utils.d.ts.map +1 -0
  170. package/dist/gui/lib/utils.js +1 -1
  171. package/dist/gui/lib/utils.js.map +1 -0
  172. package/dist/index.d.ts.map +1 -0
  173. package/dist/index.js.map +1 -0
  174. package/dist/index.test.js +0 -1
  175. package/dist/sdk/client/acp-client.d.ts +88 -76
  176. package/dist/sdk/client/acp-client.d.ts.map +1 -0
  177. package/dist/sdk/client/acp-client.js +215 -217
  178. package/dist/sdk/client/acp-client.js.map +1 -0
  179. package/dist/sdk/client/index.d.ts.map +1 -0
  180. package/dist/sdk/client/index.js.map +1 -0
  181. package/dist/sdk/index.d.ts.map +1 -0
  182. package/dist/sdk/index.js.map +1 -0
  183. package/dist/sdk/schemas/agent.d.ts +111 -64
  184. package/dist/sdk/schemas/agent.d.ts.map +1 -0
  185. package/dist/sdk/schemas/agent.js +24 -24
  186. package/dist/sdk/schemas/agent.js.map +1 -0
  187. package/dist/sdk/schemas/index.d.ts.map +1 -0
  188. package/dist/sdk/schemas/index.js.map +1 -0
  189. package/dist/sdk/schemas/message.d.ts +245 -147
  190. package/dist/sdk/schemas/message.d.ts.map +1 -0
  191. package/dist/sdk/schemas/message.js +40 -40
  192. package/dist/sdk/schemas/message.js.map +1 -0
  193. package/dist/sdk/schemas/session.d.ts +219 -135
  194. package/dist/sdk/schemas/session.d.ts.map +1 -0
  195. package/dist/sdk/schemas/session.js +27 -27
  196. package/dist/sdk/schemas/session.js.map +1 -0
  197. package/dist/sdk/transports/http.d.ts +55 -55
  198. package/dist/sdk/transports/http.d.ts.map +1 -0
  199. package/dist/sdk/transports/http.js +472 -469
  200. package/dist/sdk/transports/http.js.map +1 -0
  201. package/dist/sdk/transports/index.d.ts.map +1 -0
  202. package/dist/sdk/transports/index.js.map +1 -0
  203. package/dist/sdk/transports/stdio.d.ts +20 -20
  204. package/dist/sdk/transports/stdio.d.ts.map +1 -0
  205. package/dist/sdk/transports/stdio.js.map +1 -0
  206. package/dist/sdk/transports/types.d.ts +42 -42
  207. package/dist/sdk/transports/types.d.ts.map +1 -0
  208. package/dist/sdk/transports/types.js.map +1 -0
  209. package/dist/sdk/transports/websocket.d.ts +12 -12
  210. package/dist/sdk/transports/websocket.d.ts.map +1 -0
  211. package/dist/sdk/transports/websocket.js +52 -46
  212. package/dist/sdk/transports/websocket.js.map +1 -0
  213. package/dist/tui/components/ChatView.d.ts +4 -2
  214. package/dist/tui/components/ChatView.d.ts.map +1 -0
  215. package/dist/tui/components/ChatView.js +51 -18
  216. package/dist/tui/components/ChatView.js.map +1 -0
  217. package/dist/tui/components/GameOfLife.d.ts.map +1 -0
  218. package/dist/tui/components/GameOfLife.js +64 -35
  219. package/dist/tui/components/GameOfLife.js.map +1 -0
  220. package/dist/tui/components/InputBox.d.ts +18 -11
  221. package/dist/tui/components/InputBox.d.ts.map +1 -0
  222. package/dist/tui/components/InputBox.js +70 -10
  223. package/dist/tui/components/InputBox.js.map +1 -0
  224. package/dist/tui/components/MessageList.d.ts +4 -2
  225. package/dist/tui/components/MessageList.d.ts.map +1 -0
  226. package/dist/tui/components/MessageList.js +37 -10
  227. package/dist/tui/components/MessageList.js.map +1 -0
  228. package/dist/tui/components/ReadlineInput.d.ts +12 -6
  229. package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
  230. package/dist/tui/components/ReadlineInput.js +252 -237
  231. package/dist/tui/components/ReadlineInput.js.map +1 -0
  232. package/dist/tui/components/SingleSelect.d.ts +15 -9
  233. package/dist/tui/components/SingleSelect.js +84 -43
  234. package/dist/tui/components/StatusBar.d.ts +11 -6
  235. package/dist/tui/components/StatusBar.d.ts.map +1 -0
  236. package/dist/tui/components/StatusBar.js +102 -67
  237. package/dist/tui/components/StatusBar.js.map +1 -0
  238. package/dist/tui/components/index.d.ts.map +1 -0
  239. package/dist/tui/components/index.js.map +1 -0
  240. package/dist/tui/index.d.ts.map +1 -0
  241. package/dist/tui/index.js.map +1 -0
  242. package/package.json +6 -4
  243. 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(({ content, isStreaming = false, showEmpty = true, emptyMessage = "", className, ...props }, ref) => {
7
- // Show empty state during streaming if no content yet
8
- if (!content && isStreaming && showEmpty) {
9
- return (_jsx("div", { ref: ref, className: cn("opacity-70 italic text-sm", className), ...props, children: emptyMessage }));
10
- }
11
- if (!content) {
12
- return null;
13
- }
14
- const components = {
15
- // Table styling
16
- table: ({ node, ...props }) => (_jsx("div", { className: "overflow-x-auto my-4", children: _jsx("table", { className: "min-w-full border-collapse border border-border rounded-md", ...props }) })),
17
- thead: ({ node, ...props }) => (_jsx("thead", { className: "bg-card border-b border-border", ...props })),
18
- tbody: ({ node, ...props }) => _jsx("tbody", { ...props }),
19
- tr: ({ node, ...props }) => (_jsx("tr", { className: "border-b border-border hover:bg-card transition-colors", ...props })),
20
- th: ({ node, ...props }) => (_jsx("th", { className: "px-4 py-2 text-left font-semibold text-foreground border-r border-border last:border-r-0", ...props })),
21
- td: ({ node, ...props }) => (_jsx("td", { className: "px-4 py-2 text-foreground border-r border-border last:border-r-0", ...props })),
22
- // Task list styling
23
- input: ({ node, checked, ...props }) => {
24
- if (props.type === "checkbox") {
25
- return (_jsx("input", { type: "checkbox", checked: checked || false, disabled: true, readOnly: true, className: "mr-2 w-4 h-4 accent-[primary] cursor-not-allowed", ...props }));
26
- }
27
- return _jsx("input", { ...props });
28
- },
29
- // Code block styling with enhanced shadows
30
- code: ({ node, ...props }) => {
31
- const inline = !props.className?.includes("language-");
32
- if (inline) {
33
- return (_jsx("code", { className: "px-1.5 py-0.5 bg-card border border-border rounded text-sm font-mono text-foreground", ...props }));
34
- }
35
- return (_jsx("code", { className: "block p-4 bg-card border border-border rounded-md overflow-x-auto text-sm font-mono text-foreground shadow-sm", ...props }));
36
- },
37
- pre: ({ node, ...props }) => (_jsx("pre", { className: "my-4 rounded-lg", ...props })),
38
- // Heading styling with improved hierarchy
39
- h1: ({ node, ...props }) => (_jsx("h1", { className: "text-2xl font-bold mt-6 mb-4 text-foreground border-b border-border pb-2", ...props })),
40
- h2: ({ node, ...props }) => (_jsx("h2", { className: "text-xl font-semibold mt-5 mb-3 text-foreground border-b border-border/50 pb-1.5", ...props })),
41
- h3: ({ node, ...props }) => (_jsx("h3", { className: "text-lg font-semibold mt-4 mb-2 text-foreground", ...props })),
42
- h4: ({ node, ...props }) => (_jsx("h4", { className: "text-base font-semibold mt-3 mb-2 text-foreground", ...props })),
43
- // List styling
44
- ul: ({ node, ...props }) => {
45
- // Check if this is a task list by looking for checkbox inputs in children
46
- const isTaskList = node?.children?.some((child) => typeof child === "object" &&
47
- child !== null &&
48
- "type" in child &&
49
- child.type === "element" &&
50
- "tagName" in child &&
51
- child.tagName === "li" &&
52
- "children" in child &&
53
- Array.isArray(child.children) &&
54
- child.children.some((grandChild) => typeof grandChild === "object" &&
55
- grandChild !== null &&
56
- "type" in grandChild &&
57
- grandChild.type === "element" &&
58
- "tagName" in grandChild &&
59
- grandChild.tagName === "input" &&
60
- "properties" in grandChild &&
61
- typeof grandChild.properties === "object" &&
62
- grandChild.properties !== null &&
63
- "type" in grandChild.properties &&
64
- grandChild.properties.type === "checkbox"));
65
- return (_jsx("ul", { className: cn("my-2 space-y-1 text-foreground", isTaskList ? "list-none space-y-2" : "list-disc list-inside"), ...props }));
66
- },
67
- ol: ({ node, ...props }) => (_jsx("ol", { className: "list-decimal list-inside my-2 space-y-1 text-foreground", ...props })),
68
- // List item styling
69
- li: ({ node, ...props }) => {
70
- // Check if this li contains a checkbox (task list item)
71
- const isTaskListItem = node?.children?.some((child) => typeof child === "object" &&
72
- child !== null &&
73
- "type" in child &&
74
- child.type === "element" &&
75
- "tagName" in child &&
76
- child.tagName === "input" &&
77
- "properties" in child &&
78
- typeof child.properties === "object" &&
79
- child.properties !== null &&
80
- "type" in child.properties &&
81
- child.properties.type === "checkbox");
82
- return (_jsx("li", { className: cn("flex items-start", isTaskListItem ? "gap-2" : "ml-2"), ...props }));
83
- },
84
- // Link styling with hover effect
85
- a: ({ node, ...props }) => (_jsx("a", { className: "text-primary hover:underline decoration-2 underline-offset-2 transition-all", target: "_blank", rel: "noopener noreferrer", ...props })),
86
- // Paragraph styling
87
- p: ({ node, ...props }) => (_jsx("p", { className: "my-2 text-foreground leading-relaxed", ...props })),
88
- // Blockquote styling with enhanced visual
89
- blockquote: ({ node, ...props }) => (_jsx("blockquote", { className: "border-l-4 border-[primary] pl-4 italic my-4 text-foreground bg-card py-2 rounded-r-md shadow-sm", ...props })),
90
- // Horizontal rule
91
- hr: ({ node, ...props }) => (_jsx("hr", { className: "my-6 border-t border-border opacity-50", ...props })),
92
- };
93
- return (_jsxs("div", { ref: ref, className: cn("markdown-content prose prose-sm max-w-none dark:prose-invert", className), ...props, children: [_jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], components: components, children: content }), isStreaming && content && (_jsx("span", { className: "inline-block ml-1 animate-typing text-primary", children: "..." }))] }));
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,CAAC;AAC/B,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAkBrC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CACE,EACE,OAAO,EACP,WAAW,GAAG,KAAK,EACnB,SAAS,GAAG,IAAI,EAChB,YAAY,GAAG,EAAE,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,sDAAsD;IACtD,IAAI,CAAC,OAAO,IAA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CACH,CAAC;QACJ,CAAC;QACD,iCAAiC;QACjC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACzB,YACE,SAAS,EAAC,2FAA2F,EACrG,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,KACrB,KAAK,GACT,CACH;QACD,oBAAoB;QACpB,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACzB,YAAG,SAAS,EAAC,+CAA+C,KAAK,KAAK,GAAI,CAC3E;QACD,0CAA0C;QAC1C,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAClC,qBACE,SAAS,EAAC,yIAAyI,KAC/I,KAAK,GACT,CACH;QACD,kBAAkB;QAClB,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC1B,aACE,SAAS,EAAC,uDAAuD,KAC7D,KAAK,GACT,CACH;KACF,CAAC;IAEF,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,8DAA8D,EAC9D,SAAS,CACV,KACG,KAAK,aAET,KAAC,aAAa,IAAC,aAAa,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,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<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
- declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
- declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
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(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("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", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronsUpDown, { className: "h-4 w-4 opacity-50" }) })] })));
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) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
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(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
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
- SelectPrimitive.ScrollDownButton.displayName;
16
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("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", position === "popper" &&
17
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
18
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
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) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props })));
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) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("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", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
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) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
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 { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
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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AAe,CAAC,KAAK,CAAC,WAAW,CAAC;AAE5D,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,MAAC,eAAe,CAAC,IAAI,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,2NAA2N,EAC3N,SAAS,CACV,KACG,KAAK,aAET,eAAM,SAAS,EAAC,8DAA8D,YAC5E,KAAC,eAAe,CAAC,aAAa,cAC5B,KAAC,KAAK,IAAC,SAAS,EAAC,SAAS,GAAG,GACC,GAC3B,EAEP,KAAC,eAAe,CAAC,QAAQ,cAAE,QAAQ,GAA4B,IAC1C,CACxB,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC;AAE1D,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,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,5 @@
1
+ import type * as React from "react";
2
+ import { Toaster as Sonner } from "sonner";
3
+ type ToasterProps = React.ComponentProps<typeof Sonner>;
4
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
5
+ export { Toaster };
@@ -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"}