@townco/ui 0.1.0

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 (271) hide show
  1. package/README.md +175 -0
  2. package/dist/core/hooks/index.d.ts +6 -0
  3. package/dist/core/hooks/index.d.ts.map +1 -0
  4. package/dist/core/hooks/index.js +6 -0
  5. package/dist/core/hooks/index.js.map +1 -0
  6. package/dist/core/hooks/use-chat-input.d.ts +23 -0
  7. package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
  8. package/dist/core/hooks/use-chat-input.js +63 -0
  9. package/dist/core/hooks/use-chat-input.js.map +1 -0
  10. package/dist/core/hooks/use-chat-messages.d.ts +17 -0
  11. package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
  12. package/dist/core/hooks/use-chat-messages.js +121 -0
  13. package/dist/core/hooks/use-chat-messages.js.map +1 -0
  14. package/dist/core/hooks/use-chat-session.d.ts +11 -0
  15. package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
  16. package/dist/core/hooks/use-chat-session.js +87 -0
  17. package/dist/core/hooks/use-chat-session.js.map +1 -0
  18. package/dist/core/hooks/use-media-query.d.ts +39 -0
  19. package/dist/core/hooks/use-media-query.js +80 -0
  20. package/dist/core/index.d.ts +9 -0
  21. package/dist/core/index.d.ts.map +1 -0
  22. package/dist/core/index.js +9 -0
  23. package/dist/core/index.js.map +1 -0
  24. package/dist/core/schemas/chat.d.ts +78 -0
  25. package/dist/core/schemas/chat.d.ts.map +1 -0
  26. package/dist/core/schemas/chat.js +49 -0
  27. package/dist/core/schemas/chat.js.map +1 -0
  28. package/dist/core/schemas/index.d.ts +4 -0
  29. package/dist/core/schemas/index.d.ts.map +1 -0
  30. package/dist/core/schemas/index.js +4 -0
  31. package/dist/core/schemas/index.js.map +1 -0
  32. package/dist/core/store/chat-store.d.ts +30 -0
  33. package/dist/core/store/chat-store.d.ts.map +1 -0
  34. package/dist/core/store/chat-store.js +56 -0
  35. package/dist/core/store/chat-store.js.map +1 -0
  36. package/dist/gui/components/Button.d.ts +11 -0
  37. package/dist/gui/components/Button.d.ts.map +1 -0
  38. package/dist/gui/components/Button.js +33 -0
  39. package/dist/gui/components/Button.js.map +1 -0
  40. package/dist/gui/components/Card.d.ts +8 -0
  41. package/dist/gui/components/Card.d.ts.map +1 -0
  42. package/dist/gui/components/Card.js +16 -0
  43. package/dist/gui/components/Card.js.map +1 -0
  44. package/dist/gui/components/ChatHeader.d.ts +38 -0
  45. package/dist/gui/components/ChatHeader.js +84 -0
  46. package/dist/gui/components/ChatInput.d.ts +42 -0
  47. package/dist/gui/components/ChatInput.d.ts.map +1 -0
  48. package/dist/gui/components/ChatInput.js +137 -0
  49. package/dist/gui/components/ChatInput.js.map +1 -0
  50. package/dist/gui/components/ChatInterface.d.ts +9 -0
  51. package/dist/gui/components/ChatInterface.d.ts.map +1 -0
  52. package/dist/gui/components/ChatInterface.js +132 -0
  53. package/dist/gui/components/ChatInterface.js.map +1 -0
  54. package/dist/gui/components/ChatLayout.d.ts +52 -0
  55. package/dist/gui/components/ChatLayout.js +105 -0
  56. package/dist/gui/components/ChatPanelTabContent.d.ts +18 -0
  57. package/dist/gui/components/ChatPanelTabContent.js +15 -0
  58. package/dist/gui/components/ChatPreview.d.ts +9 -0
  59. package/dist/gui/components/ChatPreview.d.ts.map +1 -0
  60. package/dist/gui/components/ChatPreview.js +164 -0
  61. package/dist/gui/components/ChatPreview.js.map +1 -0
  62. package/dist/gui/components/ChatSecondaryPanel.d.ts +20 -0
  63. package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
  64. package/dist/gui/components/ChatSecondaryPanel.js +44 -0
  65. package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
  66. package/dist/gui/components/ChatSidebar.d.ts +14 -0
  67. package/dist/gui/components/ChatSidebar.js +23 -0
  68. package/dist/gui/components/ChatStatus.d.ts +6 -0
  69. package/dist/gui/components/ChatStatus.d.ts.map +1 -0
  70. package/dist/gui/components/ChatStatus.js +38 -0
  71. package/dist/gui/components/ChatStatus.js.map +1 -0
  72. package/dist/gui/components/ChatView.d.ts +6 -0
  73. package/dist/gui/components/ChatView.d.ts.map +1 -0
  74. package/dist/gui/components/ChatView.js +13 -0
  75. package/dist/gui/components/ChatView.js.map +1 -0
  76. package/dist/gui/components/ConfigPanel.d.ts +16 -0
  77. package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
  78. package/dist/gui/components/ConfigPanel.js +48 -0
  79. package/dist/gui/components/ConfigPanel.js.map +1 -0
  80. package/dist/gui/components/Conversation.d.ts +20 -0
  81. package/dist/gui/components/Conversation.d.ts.map +1 -0
  82. package/dist/gui/components/Conversation.js +87 -0
  83. package/dist/gui/components/Conversation.js.map +1 -0
  84. package/dist/gui/components/Dialog.d.ts +19 -0
  85. package/dist/gui/components/Dialog.d.ts.map +1 -0
  86. package/dist/gui/components/Dialog.js +22 -0
  87. package/dist/gui/components/Dialog.js.map +1 -0
  88. package/dist/gui/components/DropdownMenu.d.ts +27 -0
  89. package/dist/gui/components/DropdownMenu.js +68 -0
  90. package/dist/gui/components/HeightTransition.d.ts +10 -0
  91. package/dist/gui/components/HeightTransition.d.ts.map +1 -0
  92. package/dist/gui/components/HeightTransition.js +80 -0
  93. package/dist/gui/components/HeightTransition.js.map +1 -0
  94. package/dist/gui/components/Input.d.ts +9 -0
  95. package/dist/gui/components/Input.d.ts.map +1 -0
  96. package/dist/gui/components/Input.js +21 -0
  97. package/dist/gui/components/Input.js.map +1 -0
  98. package/dist/gui/components/InputBox.d.ts +14 -0
  99. package/dist/gui/components/InputBox.d.ts.map +1 -0
  100. package/dist/gui/components/InputBox.js +18 -0
  101. package/dist/gui/components/InputBox.js.map +1 -0
  102. package/dist/gui/components/Label.d.ts +4 -0
  103. package/dist/gui/components/Label.d.ts.map +1 -0
  104. package/dist/gui/components/Label.js +7 -0
  105. package/dist/gui/components/Label.js.map +1 -0
  106. package/dist/gui/components/MarkdownRenderer.d.ts +6 -0
  107. package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
  108. package/dist/gui/components/MarkdownRenderer.js +86 -0
  109. package/dist/gui/components/MarkdownRenderer.js.map +1 -0
  110. package/dist/gui/components/Message.d.ts +26 -0
  111. package/dist/gui/components/Message.d.ts.map +1 -0
  112. package/dist/gui/components/Message.js +33 -0
  113. package/dist/gui/components/Message.js.map +1 -0
  114. package/dist/gui/components/MessageContent.d.ts +26 -0
  115. package/dist/gui/components/MessageContent.d.ts.map +1 -0
  116. package/dist/gui/components/MessageContent.js +104 -0
  117. package/dist/gui/components/MessageContent.js.map +1 -0
  118. package/dist/gui/components/MessageList.d.ts +6 -0
  119. package/dist/gui/components/MessageList.d.ts.map +1 -0
  120. package/dist/gui/components/MessageList.js +1 -0
  121. package/dist/gui/components/MessageList.js.map +1 -0
  122. package/dist/gui/components/PlaygroundLayout.d.ts +10 -0
  123. package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
  124. package/dist/gui/components/PlaygroundLayout.js +18 -0
  125. package/dist/gui/components/PlaygroundLayout.js.map +1 -0
  126. package/dist/gui/components/Reasoning.d.ts +31 -0
  127. package/dist/gui/components/Reasoning.d.ts.map +1 -0
  128. package/dist/gui/components/Reasoning.js +70 -0
  129. package/dist/gui/components/Reasoning.js.map +1 -0
  130. package/dist/gui/components/Response.d.ts +16 -0
  131. package/dist/gui/components/Response.d.ts.map +1 -0
  132. package/dist/gui/components/Response.js +95 -0
  133. package/dist/gui/components/Response.js.map +1 -0
  134. package/dist/gui/components/Select.d.ts +13 -0
  135. package/dist/gui/components/Select.d.ts.map +1 -0
  136. package/dist/gui/components/Select.js +26 -0
  137. package/dist/gui/components/Select.js.map +1 -0
  138. package/dist/gui/components/Sonner.d.ts +5 -0
  139. package/dist/gui/components/Sonner.js +23 -0
  140. package/dist/gui/components/StatusBar.d.ts +8 -0
  141. package/dist/gui/components/StatusBar.d.ts.map +1 -0
  142. package/dist/gui/components/StatusBar.js +11 -0
  143. package/dist/gui/components/StatusBar.js.map +1 -0
  144. package/dist/gui/components/Tabs.d.ts +7 -0
  145. package/dist/gui/components/Tabs.d.ts.map +1 -0
  146. package/dist/gui/components/Tabs.js +12 -0
  147. package/dist/gui/components/Tabs.js.map +1 -0
  148. package/dist/gui/components/Task.d.ts +35 -0
  149. package/dist/gui/components/Task.d.ts.map +1 -0
  150. package/dist/gui/components/Task.js +37 -0
  151. package/dist/gui/components/Task.js.map +1 -0
  152. package/dist/gui/components/Textarea.d.ts +11 -0
  153. package/dist/gui/components/Textarea.d.ts.map +1 -0
  154. package/dist/gui/components/Textarea.js +51 -0
  155. package/dist/gui/components/Textarea.js.map +1 -0
  156. package/dist/gui/components/ThinkingBlock.d.ts +12 -0
  157. package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
  158. package/dist/gui/components/ThinkingBlock.js +40 -0
  159. package/dist/gui/components/ThinkingBlock.js.map +1 -0
  160. package/dist/gui/components/TodoList.d.ts +20 -0
  161. package/dist/gui/components/TodoList.d.ts.map +1 -0
  162. package/dist/gui/components/TodoList.js +11 -0
  163. package/dist/gui/components/TodoList.js.map +1 -0
  164. package/dist/gui/components/TodoListItem.d.ts +10 -0
  165. package/dist/gui/components/TodoListItem.d.ts.map +1 -0
  166. package/dist/gui/components/TodoListItem.js +7 -0
  167. package/dist/gui/components/TodoListItem.js.map +1 -0
  168. package/dist/gui/components/index.d.ts +23 -0
  169. package/dist/gui/components/index.d.ts.map +1 -0
  170. package/dist/gui/components/index.js +28 -0
  171. package/dist/gui/components/index.js.map +1 -0
  172. package/dist/gui/index.d.ts +2 -0
  173. package/dist/gui/index.d.ts.map +1 -0
  174. package/dist/gui/index.js +4 -0
  175. package/dist/gui/index.js.map +1 -0
  176. package/dist/gui/lib/utils.d.ts +2 -0
  177. package/dist/gui/lib/utils.d.ts.map +1 -0
  178. package/dist/gui/lib/utils.js +5 -0
  179. package/dist/gui/lib/utils.js.map +1 -0
  180. package/dist/index.d.ts +11 -0
  181. package/dist/index.d.ts.map +1 -0
  182. package/dist/index.js +12 -0
  183. package/dist/index.js.map +1 -0
  184. package/dist/index.test.d.ts +0 -0
  185. package/dist/index.test.js +1 -0
  186. package/dist/sdk/client/acp-client.d.ts +84 -0
  187. package/dist/sdk/client/acp-client.d.ts.map +1 -0
  188. package/dist/sdk/client/acp-client.js +225 -0
  189. package/dist/sdk/client/acp-client.js.map +1 -0
  190. package/dist/sdk/client/index.d.ts +4 -0
  191. package/dist/sdk/client/index.d.ts.map +1 -0
  192. package/dist/sdk/client/index.js +4 -0
  193. package/dist/sdk/client/index.js.map +1 -0
  194. package/dist/sdk/index.d.ts +9 -0
  195. package/dist/sdk/index.d.ts.map +1 -0
  196. package/dist/sdk/index.js +9 -0
  197. package/dist/sdk/index.js.map +1 -0
  198. package/dist/sdk/schemas/agent.d.ts +87 -0
  199. package/dist/sdk/schemas/agent.d.ts.map +1 -0
  200. package/dist/sdk/schemas/agent.js +50 -0
  201. package/dist/sdk/schemas/agent.js.map +1 -0
  202. package/dist/sdk/schemas/index.d.ts +6 -0
  203. package/dist/sdk/schemas/index.d.ts.map +1 -0
  204. package/dist/sdk/schemas/index.js +6 -0
  205. package/dist/sdk/schemas/index.js.map +1 -0
  206. package/dist/sdk/schemas/message.d.ts +195 -0
  207. package/dist/sdk/schemas/message.d.ts.map +1 -0
  208. package/dist/sdk/schemas/message.js +95 -0
  209. package/dist/sdk/schemas/message.js.map +1 -0
  210. package/dist/sdk/schemas/session.d.ts +158 -0
  211. package/dist/sdk/schemas/session.d.ts.map +1 -0
  212. package/dist/sdk/schemas/session.js +54 -0
  213. package/dist/sdk/schemas/session.js.map +1 -0
  214. package/dist/sdk/transports/http.d.ts +63 -0
  215. package/dist/sdk/transports/http.d.ts.map +1 -0
  216. package/dist/sdk/transports/http.js +476 -0
  217. package/dist/sdk/transports/http.js.map +1 -0
  218. package/dist/sdk/transports/index.d.ts +7 -0
  219. package/dist/sdk/transports/index.d.ts.map +1 -0
  220. package/dist/sdk/transports/index.js +7 -0
  221. package/dist/sdk/transports/index.js.map +1 -0
  222. package/dist/sdk/transports/stdio.d.ts +28 -0
  223. package/dist/sdk/transports/stdio.d.ts.map +1 -0
  224. package/dist/sdk/transports/stdio.js +294 -0
  225. package/dist/sdk/transports/stdio.js.map +1 -0
  226. package/dist/sdk/transports/types.d.ts +63 -0
  227. package/dist/sdk/transports/types.d.ts.map +1 -0
  228. package/dist/sdk/transports/types.js +1 -0
  229. package/dist/sdk/transports/types.js.map +1 -0
  230. package/dist/sdk/transports/websocket.d.ts +20 -0
  231. package/dist/sdk/transports/websocket.d.ts.map +1 -0
  232. package/dist/sdk/transports/websocket.js +52 -0
  233. package/dist/sdk/transports/websocket.js.map +1 -0
  234. package/dist/tui/components/ChatView.d.ts +5 -0
  235. package/dist/tui/components/ChatView.d.ts.map +1 -0
  236. package/dist/tui/components/ChatView.js +24 -0
  237. package/dist/tui/components/ChatView.js.map +1 -0
  238. package/dist/tui/components/GameOfLife.d.ts +1 -0
  239. package/dist/tui/components/GameOfLife.d.ts.map +1 -0
  240. package/dist/tui/components/GameOfLife.js +50 -0
  241. package/dist/tui/components/GameOfLife.js.map +1 -0
  242. package/dist/tui/components/InputBox.d.ts +13 -0
  243. package/dist/tui/components/InputBox.d.ts.map +1 -0
  244. package/dist/tui/components/InputBox.js +15 -0
  245. package/dist/tui/components/InputBox.js.map +1 -0
  246. package/dist/tui/components/MessageList.d.ts +5 -0
  247. package/dist/tui/components/MessageList.d.ts.map +1 -0
  248. package/dist/tui/components/MessageList.js +16 -0
  249. package/dist/tui/components/MessageList.js.map +1 -0
  250. package/dist/tui/components/MultiSelect.d.ts +13 -0
  251. package/dist/tui/components/MultiSelect.js +72 -0
  252. package/dist/tui/components/ReadlineInput.d.ts +8 -0
  253. package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
  254. package/dist/tui/components/ReadlineInput.js +240 -0
  255. package/dist/tui/components/ReadlineInput.js.map +1 -0
  256. package/dist/tui/components/SingleSelect.d.ts +13 -0
  257. package/dist/tui/components/SingleSelect.js +46 -0
  258. package/dist/tui/components/StatusBar.d.ts +9 -0
  259. package/dist/tui/components/StatusBar.d.ts.map +1 -0
  260. package/dist/tui/components/StatusBar.js +82 -0
  261. package/dist/tui/components/StatusBar.js.map +1 -0
  262. package/dist/tui/components/index.d.ts +11 -0
  263. package/dist/tui/components/index.d.ts.map +1 -0
  264. package/dist/tui/components/index.js +11 -0
  265. package/dist/tui/components/index.js.map +1 -0
  266. package/dist/tui/index.d.ts +7 -0
  267. package/dist/tui/index.d.ts.map +1 -0
  268. package/dist/tui/index.js +7 -0
  269. package/dist/tui/index.js.map +1 -0
  270. package/package.json +86 -0
  271. package/src/styles/global.css +152 -0
@@ -0,0 +1,164 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ export function ChatPreview({ config, status, iframeSrc = "/chat-standalone", }) {
4
+ const iframeRef = useRef(null);
5
+ const containerRef = useRef(null);
6
+ const [dimensions, setDimensions] = useState({
7
+ width: 800,
8
+ height: 600,
9
+ });
10
+ const [isResizing, setIsResizing] = useState({
11
+ horizontal: false,
12
+ vertical: false,
13
+ });
14
+ const resizeStartRef = useRef({ x: 0, y: 0, width: 0, height: 0 });
15
+ const isResizingRef = useRef({
16
+ horizontal: false,
17
+ vertical: false,
18
+ });
19
+ const resizeHandlersRef = useRef({ mouseMove: null, mouseUp: null, mouseLeave: null });
20
+ const sendConfigToIframe = (configToSend) => {
21
+ const iframe = iframeRef.current;
22
+ if (iframe?.contentWindow) {
23
+ iframe.contentWindow.postMessage({
24
+ type: "CONFIG_UPDATE",
25
+ config: configToSend,
26
+ }, "*");
27
+ }
28
+ };
29
+ const sendStatusToIframe = (statusToSend) => {
30
+ const iframe = iframeRef.current;
31
+ if (iframe?.contentWindow) {
32
+ iframe.contentWindow.postMessage({
33
+ type: "STATUS_UPDATE",
34
+ status: statusToSend,
35
+ }, "*");
36
+ }
37
+ };
38
+ useEffect(() => {
39
+ const iframe = iframeRef.current;
40
+ if (!iframe)
41
+ return;
42
+ const handleMessage = (event) => {
43
+ if (event.data && event.data.type === "REQUEST_CONFIG") {
44
+ sendConfigToIframe(config);
45
+ }
46
+ };
47
+ window.addEventListener("message", handleMessage);
48
+ // Send initial config and status when iframe loads
49
+ const handleLoad = () => {
50
+ sendConfigToIframe(config);
51
+ sendStatusToIframe(status);
52
+ };
53
+ iframe.addEventListener("load", handleLoad);
54
+ return () => {
55
+ window.removeEventListener("message", handleMessage);
56
+ iframe.removeEventListener("load", handleLoad);
57
+ };
58
+ }, [config, status]);
59
+ // Update iframe when config changes (after initial load)
60
+ useEffect(() => {
61
+ const iframe = iframeRef.current;
62
+ // Only send if iframe is already loaded
63
+ if (iframe?.contentWindow &&
64
+ iframe.contentDocument?.readyState === "complete") {
65
+ sendConfigToIframe(config);
66
+ }
67
+ }, [config]);
68
+ // Update iframe when status changes (after initial load)
69
+ useEffect(() => {
70
+ const iframe = iframeRef.current;
71
+ // Only send if iframe is already loaded
72
+ if (iframe?.contentWindow &&
73
+ iframe.contentDocument?.readyState === "complete") {
74
+ sendStatusToIframe(status);
75
+ }
76
+ }, [status]);
77
+ // Sync ref with state for UI updates
78
+ useEffect(() => {
79
+ isResizingRef.current = isResizing;
80
+ }, [isResizing]);
81
+ // Cleanup on unmount
82
+ useEffect(() => {
83
+ return () => {
84
+ stopResizing();
85
+ };
86
+ }, []);
87
+ const stopResizing = () => {
88
+ const handlers = resizeHandlersRef.current;
89
+ if (handlers.mouseMove) {
90
+ window.removeEventListener("mousemove", handlers.mouseMove);
91
+ }
92
+ if (handlers.mouseUp) {
93
+ window.removeEventListener("mouseup", handlers.mouseUp, true);
94
+ }
95
+ if (handlers.mouseLeave) {
96
+ document.removeEventListener("mouseleave", handlers.mouseLeave);
97
+ }
98
+ setIsResizing({ horizontal: false, vertical: false });
99
+ isResizingRef.current = { horizontal: false, vertical: false };
100
+ resizeHandlersRef.current = {
101
+ mouseMove: null,
102
+ mouseUp: null,
103
+ mouseLeave: null,
104
+ };
105
+ };
106
+ const handleResizeStart = (direction, e) => {
107
+ e.preventDefault();
108
+ e.stopPropagation();
109
+ // Clean up any existing listeners first
110
+ stopResizing();
111
+ const resizeState = direction === "horizontal"
112
+ ? { horizontal: true, vertical: false }
113
+ : { horizontal: false, vertical: true };
114
+ setIsResizing(resizeState);
115
+ isResizingRef.current = resizeState;
116
+ resizeStartRef.current = {
117
+ x: e.clientX,
118
+ y: e.clientY,
119
+ width: dimensions.width,
120
+ height: dimensions.height,
121
+ };
122
+ const handleMouseMove = (e) => {
123
+ if (!isResizingRef.current.horizontal &&
124
+ !isResizingRef.current.vertical) {
125
+ return;
126
+ }
127
+ const deltaX = e.clientX - resizeStartRef.current.x;
128
+ const deltaY = e.clientY - resizeStartRef.current.y;
129
+ let newWidth = resizeStartRef.current.width;
130
+ let newHeight = resizeStartRef.current.height;
131
+ if (isResizingRef.current.horizontal) {
132
+ newWidth = Math.max(400, Math.min(1200, resizeStartRef.current.width + deltaX));
133
+ }
134
+ if (isResizingRef.current.vertical) {
135
+ newHeight = Math.max(300, Math.min(900, resizeStartRef.current.height + deltaY));
136
+ }
137
+ setDimensions({ width: newWidth, height: newHeight });
138
+ };
139
+ const handleMouseUp = (e) => {
140
+ e.preventDefault();
141
+ e.stopPropagation();
142
+ stopResizing();
143
+ };
144
+ const handleMouseLeave = () => {
145
+ // If mouse leaves window during resize, stop resizing
146
+ stopResizing();
147
+ };
148
+ // Store handlers for cleanup
149
+ resizeHandlersRef.current = {
150
+ mouseMove: handleMouseMove,
151
+ mouseUp: handleMouseUp,
152
+ mouseLeave: handleMouseLeave,
153
+ };
154
+ // Use capture phase to ensure we catch events even if they bubble
155
+ window.addEventListener("mousemove", handleMouseMove);
156
+ window.addEventListener("mouseup", handleMouseUp, { capture: true });
157
+ document.addEventListener("mouseleave", handleMouseLeave);
158
+ };
159
+ return (_jsxs("div", { ref: containerRef, className: "relative rounded-xl overflow-visible bg-[var(--color-surface)] shadow-lg min-w-[400px] min-h-[300px]", style: {
160
+ width: `${dimensions.width}px`,
161
+ height: `${dimensions.height}px`,
162
+ }, children: [_jsx("iframe", { ref: iframeRef, src: iframeSrc, className: "w-full h-full rounded-xl border-1 border-[var(--color-border)] block", title: "Chat Preview" }), _jsx("div", { className: "absolute -right-4 top-1/2 -translate-y-1/2 w-1.5 h-10 rounded-full bg-black/20 cursor-ew-resize hover:opacity-80 transition-opacity", onMouseDown: (e) => handleResizeStart("horizontal", e) }), _jsx("div", { className: "absolute -bottom-4 left-1/2 -translate-x-1/2 w-10 h-1.5 rounded-full bg-black/20 cursor-ns-resize hover:opacity-80 transition-opacity", onMouseDown: (e) => handleResizeStart("vertical", e) })] }));
163
+ }
164
+ //# sourceMappingURL=ChatPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatPreview.js","sourceRoot":"","sources":["../../../src/gui/components/ChatPreview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAmBpD,MAAM,UAAU,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,SAAS,GAAG,kBAAkB,GACb;IACjB,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAa;QACvD,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;KACZ,CAAC,CAAC;IACH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAc;QACxD,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAC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E,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import type { AcpClient } from "../../sdk/client/index.js";
3
+ import type { TodoItem } from "./TodoListItem.js";
4
+ /**
5
+ * Supports two usage patterns:
6
+ * 1. Hook-based: Pass `client` prop (future support when todos are in store)
7
+ * 2. Prop-based: Pass `todos` prop directly
8
+ */
9
+ export interface ChatSecondaryPanelProps extends React.HTMLAttributes<HTMLDivElement> {
10
+ /**
11
+ * ACP Client for hook-based todo fetching (future support)
12
+ */
13
+ client?: AcpClient | null;
14
+ /**
15
+ * Todos to display (prop-based pattern)
16
+ * Either client or todos should be provided
17
+ */
18
+ todos?: TodoItem[];
19
+ }
20
+ export declare const ChatSecondaryPanel: React.ForwardRefExoticComponent<ChatSecondaryPanelProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatSecondaryPanel.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ChatSecondaryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;;;GAIG;AACH,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,gGAwG7B,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "./Tabs.js";
6
+ import { TodoList } from "./TodoList.js";
7
+ export const ChatSecondaryPanel = React.forwardRef(({ client, todos, className, ...props }, ref) => {
8
+ // For now, just use prop-based todos
9
+ // Future: Add hook to get todos from store when available
10
+ const todosToDisplay = todos || [];
11
+ const [activeTab, setActiveTab] = useState("todo");
12
+ const containerRef = useRef(null);
13
+ const activeTabElementRef = useRef(null);
14
+ useEffect(() => {
15
+ const updateClipPath = () => {
16
+ const container = containerRef.current;
17
+ if (activeTab && container) {
18
+ const activeTabElement = activeTabElementRef.current;
19
+ if (activeTabElement) {
20
+ const containerRect = container.getBoundingClientRect();
21
+ const tabRect = activeTabElement.getBoundingClientRect();
22
+ const offsetLeft = tabRect.left - containerRect.left;
23
+ const offsetWidth = tabRect.width;
24
+ const clipLeftPercent = (offsetLeft / containerRect.width) * 100;
25
+ const clipRightPercent = 100 - ((offsetLeft + offsetWidth) / containerRect.width) * 100;
26
+ container.style.clipPath = `inset(0 ${clipRightPercent.toFixed(2)}% 0 ${clipLeftPercent.toFixed(2)}% round 999px)`;
27
+ }
28
+ }
29
+ };
30
+ // Small delay to ensure DOM is ready
31
+ const timeoutId = setTimeout(updateClipPath, 0);
32
+ return () => clearTimeout(timeoutId);
33
+ }, [activeTab]);
34
+ const tabs = [
35
+ { id: "todo", label: "To-Do List" },
36
+ { id: "files", label: "Files" },
37
+ { id: "database", label: "Database" },
38
+ ];
39
+ return (_jsx("div", { ref: ref, className: cn("select-none", className), ...props, children: _jsxs(Tabs, { value: activeTab, onValueChange: setActiveTab, className: "w-full", children: [_jsxs("div", { className: "relative mb-4 border-border", children: [_jsx(TabsList, { className: "bg-transparent p-0 h-auto rounded-none w-full border-none", children: tabs.map((tab) => (_jsx(TabsTrigger, { value: tab.id, className: "px-3 py-1 text-sm font-[var(--font-family)] font-medium rounded-none text-foreground opacity-60 data-[state=active]:opacity-100 data-[state=active]:bg-transparent data-[state=active]:shadow-none", children: tab.label }, tab.id))) }), _jsx("div", { ref: containerRef, className: "absolute top-0 left-0 w-full overflow-hidden z-10 pointer-events-none", style: {
40
+ clipPath: "inset(0 100% 0 0% round 999px)",
41
+ transition: "clip-path 0.25s ease-out",
42
+ }, children: _jsx(TabsList, { className: "bg-secondary p-0 h-auto rounded-none w-full border-none", children: tabs.map((tab) => (_jsx(TabsTrigger, { value: tab.id, ref: activeTab === tab.id ? activeTabElementRef : null, className: "px-3 py-1 text-sm font-[var(--font-family)] font-medium rounded-none text-primary bg-transparent data-[state=active]:shadow-none shadow-none", tabIndex: -1, children: tab.label }, tab.id))) }) })] }), _jsx(TabsContent, { value: "todo", children: _jsx(TodoList, { todos: todosToDisplay }) }), _jsx(TabsContent, { value: "files", children: _jsx("div", { className: "text-sm text-foreground opacity-60 italic", children: "Files tab coming soon..." }) }), _jsx(TabsContent, { value: "database", children: _jsx("div", { className: "text-sm text-foreground opacity-60 italic", children: "Database tab coming soon..." }) })] }) }));
43
+ });
44
+ ChatSecondaryPanel.displayName = "ChatSecondaryPanel";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatSecondaryPanel.js","sourceRoot":"","sources":["../../../src/gui/components/ChatSecondaryPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGrE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAqBrC,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGhD,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChD,qCAAqC;IACrC,0DAA0D;IAC1D,MAAM,cAAc,GAAG,KAAK,IAA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,IANL,GAAG,CAAC,EAAE,CAOC,CACf,CAAC,GACO,GACP,IACF,EAGN,KAAC,WAAW,IAAC,KAAK,EAAC,MAAM,YACvB,KAAC,QAAQ,IAAC,KAAK,EAAE,cAAc,GAAI,GACvB,EAEd,KAAC,WAAW,IAAC,KAAK,EAAC,OAAO,YACxB,cAAK,SAAS,EAAC,oDAAoD,yCAE7D,GACM,EAEd,KAAC,WAAW,IAAC,KAAK,EAAC,UAAU,YAC3B,cAAK,SAAS,EAAC,oDAAoD,4CAE7D,GACM,IACT,GACH,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ export interface ChatSidebarRootProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ declare const ChatSidebarRoot: React.ForwardRefExoticComponent<ChatSidebarRootProps & React.RefAttributes<HTMLDivElement>>;
5
+ export interface ChatSidebarHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ }
7
+ declare const ChatSidebarHeader: React.ForwardRefExoticComponent<ChatSidebarHeaderProps & React.RefAttributes<HTMLDivElement>>;
8
+ export interface ChatSidebarContentProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ }
10
+ declare const ChatSidebarContent: React.ForwardRefExoticComponent<ChatSidebarContentProps & React.RefAttributes<HTMLDivElement>>;
11
+ export interface ChatSidebarFooterProps extends React.HTMLAttributes<HTMLDivElement> {
12
+ }
13
+ declare const ChatSidebarFooter: React.ForwardRefExoticComponent<ChatSidebarFooterProps & React.RefAttributes<HTMLDivElement>>;
14
+ export { ChatSidebarRoot as Root, ChatSidebarHeader as Header, ChatSidebarContent as Content, ChatSidebarFooter as Footer, };
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../lib/utils.js";
4
+ const ChatSidebarRoot = React.forwardRef(({ className, children, ...props }, ref) => {
5
+ return (_jsx("div", { ref: ref, className: cn("flex h-full flex-col", className), ...props, children: children }));
6
+ });
7
+ ChatSidebarRoot.displayName = "ChatSidebar.Root";
8
+ const ChatSidebarHeader = React.forwardRef(({ className, children, ...props }, ref) => {
9
+ return (_jsx("div", { ref: ref, className: cn("border-b border-border px-4 py-3", className), ...props, children: children }));
10
+ });
11
+ ChatSidebarHeader.displayName = "ChatSidebar.Header";
12
+ const ChatSidebarContent = React.forwardRef(({ className, children, ...props }, ref) => {
13
+ return (_jsx("div", { ref: ref, className: cn("flex-1 overflow-y-auto p-4", className), ...props, children: children }));
14
+ });
15
+ ChatSidebarContent.displayName = "ChatSidebar.Content";
16
+ const ChatSidebarFooter = React.forwardRef(({ className, children, ...props }, ref) => {
17
+ return (_jsx("div", { ref: ref, className: cn("border-t border-border px-4 py-3", className), ...props, children: children }));
18
+ });
19
+ ChatSidebarFooter.displayName = "ChatSidebar.Footer";
20
+ /* -------------------------------------------------------------------------------------------------
21
+ * Exports
22
+ * -----------------------------------------------------------------------------------------------*/
23
+ export { ChatSidebarRoot as Root, ChatSidebarHeader as Header, ChatSidebarContent as Content, ChatSidebarFooter as Footer, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { type ReactNode } from "react";
3
+ export interface ChatStatusProps extends React.HTMLAttributes<HTMLSpanElement> {
4
+ children: ReactNode;
5
+ }
6
+ export declare const ChatStatus: React.ForwardRefExoticComponent<ChatStatusProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatStatus.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ChatStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC5E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,yFAqDtB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ export const ChatStatus = React.forwardRef(({ children, className, ...props }, ref) => {
6
+ const [displayContent, setDisplayContent] = useState(children);
7
+ const [isTransitioning, setIsTransitioning] = useState(false);
8
+ const previousContentRef = useRef(children);
9
+ const isInitialMountRef = useRef(true);
10
+ useEffect(() => {
11
+ // Skip transition on initial mount
12
+ if (isInitialMountRef.current) {
13
+ isInitialMountRef.current = false;
14
+ previousContentRef.current = children;
15
+ return;
16
+ }
17
+ // Only transition if content actually changed
18
+ if (previousContentRef.current === children) {
19
+ return;
20
+ }
21
+ // Start transition out
22
+ setIsTransitioning(true);
23
+ // After fade out, update content and fade in
24
+ const timeoutId = setTimeout(() => {
25
+ setDisplayContent(children);
26
+ previousContentRef.current = children;
27
+ // Trigger fade in
28
+ requestAnimationFrame(() => {
29
+ setIsTransitioning(false);
30
+ });
31
+ }, 150); // Half of transition duration (300ms total)
32
+ return () => {
33
+ clearTimeout(timeoutId);
34
+ };
35
+ }, [children]);
36
+ return (_jsx("span", { ref: ref, className: cn("text-sm text-foreground opacity-60 transition-opacity duration-300", isTransitioning ? "opacity-0" : "opacity-60", className), ...props, children: displayContent }));
37
+ });
38
+ ChatStatus.displayName = "ChatStatus";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatStatus.js","sourceRoot":"","sources":["../../../src/gui/components/ChatStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAMrC,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACxC,CAA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E,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,EAC5C,SAAS,CACV,KACG,KAAK,YAER,cAAc,GACV,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { AcpClient } from "@agent-hub/sdk";
2
+ export interface ChatViewProps {
3
+ client: AcpClient | null;
4
+ }
5
+ export declare function ChatView({ client }: ChatViewProps): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=ChatView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatView.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ChatView.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,2CAoCjD"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StatusBar } from "./StatusBar.js";
3
+ import { MessageList } from "./MessageList.js";
4
+ import { InputBox } from "./InputBox.js";
5
+ import { useChatSession, useChatMessages, useChatInput, } from "../../core/index.js";
6
+ export function ChatView({ client }) {
7
+ // Use headless hooks for business logic (same as TUI!)
8
+ const { connectionStatus, sessionId } = useChatSession(client);
9
+ const { messages, isStreaming } = useChatMessages(client);
10
+ const { value, isSubmitting, attachedFiles, onChange, onSubmit, onRemoveFile, } = useChatInput(client);
11
+ return (_jsxs("div", { className: "flex flex-col h-screen bg-gray-50", children: [_jsx(StatusBar, { connectionStatus: connectionStatus, sessionId: sessionId, isStreaming: isStreaming }), _jsx(MessageList, { messages: messages }), _jsx(InputBox, { value: value, isSubmitting: isSubmitting, attachedFiles: attachedFiles, onChange: onChange, onSubmit: onSubmit, onRemoveFile: onRemoveFile })] }));
12
+ }
13
+ //# sourceMappingURL=ChatView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatView.js","sourceRoot":"","sources":["../../../src/gui/components/ChatView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,qBAAqB,CAAC;AAO7B,MAAM,UAAU,QAAQ,CAAC,EAAE,MAAM,EAAiB;IAChD,uDAAuD;IACvD,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,EACJ,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,YAAY,GACb,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAEzB,OAAO,CACL,eAAK,SAAS,EAAC,mCAAmC,aAEhD,KAAC,SAAS,IACR,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,GACxB,EAGF,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,GAAI,EAGnC,KAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,GAC1B,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface ThemeConfig {
2
+ colorScheme: "light" | "dark";
3
+ accentColor: string;
4
+ typography: string;
5
+ fontSize: number;
6
+ thinkingDisplayStyle: "collapsible" | "inline";
7
+ }
8
+ interface ConfigPanelProps {
9
+ config: ThemeConfig;
10
+ status: string;
11
+ onConfigChange: (config: ThemeConfig) => void;
12
+ onStatusChange: (status: string) => void;
13
+ }
14
+ export declare function ConfigPanel({ config, status, onConfigChange, onStatusChange, }: ConfigPanelProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ConfigPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigPanel.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ConfigPanel.tsx"],"names":[],"mappings":"AA4BA,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,aAAa,GAAG,QAAQ,CAAC;CAChD;AAED,UAAU,gBAAgB;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,GACf,EAAE,gBAAgB,2CA6JlB"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label } from "./Label.js";
3
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "./Select.js";
4
+ import { Input } from "./Input.js";
5
+ const fontOptions = [
6
+ "Inter",
7
+ "Arial",
8
+ "Georgia",
9
+ "Courier New",
10
+ "Times New Roman",
11
+ "Verdana",
12
+ ];
13
+ const statusOptions = [
14
+ "v0.1.0",
15
+ "Connected",
16
+ "Syncing...",
17
+ "Ready",
18
+ "Processing",
19
+ "Online",
20
+ ];
21
+ export function ConfigPanel({ config, status, onConfigChange, onStatusChange, }) {
22
+ const handleColorSchemeChange = (newScheme) => {
23
+ onConfigChange({ ...config, colorScheme: newScheme });
24
+ };
25
+ const handleAccentColorChange = (e) => {
26
+ const newColor = e.target.value;
27
+ onConfigChange({ ...config, accentColor: newColor });
28
+ };
29
+ const handleTypographyChange = (newTypography) => {
30
+ onConfigChange({ ...config, typography: newTypography });
31
+ };
32
+ const handleFontSizeChange = (e) => {
33
+ const newSize = parseInt(e.target.value, 10);
34
+ if (!isNaN(newSize) && newSize > 0) {
35
+ onConfigChange({ ...config, fontSize: newSize });
36
+ }
37
+ };
38
+ const handleThinkingDisplayStyleChange = (newStyle) => {
39
+ onConfigChange({ ...config, thinkingDisplayStyle: newStyle });
40
+ };
41
+ const handleStatusChange = () => {
42
+ const currentIndex = statusOptions.indexOf(status);
43
+ const nextIndex = (currentIndex + 1) % statusOptions.length;
44
+ onStatusChange(statusOptions[nextIndex]);
45
+ };
46
+ return (_jsxs("div", { className: "h-full p-6 bg-[var(--color-surface)] border-r border-[var(--color-border)] overflow-y-auto", children: [_jsx("h2", { className: "text-2xl font-semibold mb-8 m-0 text-[var(--color-text)]", children: "Design Configuration" }), _jsxs("div", { className: "mb-6", children: [_jsx(Label, { htmlFor: "color-scheme", className: "mb-2 text-[var(--color-text)]", children: "Color Scheme" }), _jsxs(Select, { value: config.colorScheme, onValueChange: handleColorSchemeChange, children: [_jsx(SelectTrigger, { id: "color-scheme", className: "w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { className: "bg-[var(--color-bg)] border-[var(--color-border)]", children: [_jsx(SelectItem, { value: "light", children: "Light" }), _jsx(SelectItem, { value: "dark", children: "Dark" })] })] })] }), _jsxs("div", { className: "mb-6", children: [_jsx(Label, { htmlFor: "accent-color", className: "mb-2 text-[var(--color-text)]", children: "Accent Color" }), _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx("input", { type: "color", id: "accent-color", value: config.accentColor, onChange: handleAccentColorChange, className: "w-[60px] h-10 border border-[var(--color-border)] rounded-md cursor-pointer bg-transparent" }), _jsx(Input, { type: "text", value: config.accentColor, onChange: handleAccentColorChange, pattern: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", className: "flex-1 bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]" })] })] }), _jsxs("div", { className: "mb-6", children: [_jsx(Label, { htmlFor: "typography", className: "mb-2 text-[var(--color-text)]", children: "Typography" }), _jsxs(Select, { value: config.typography, onValueChange: handleTypographyChange, children: [_jsx(SelectTrigger, { id: "typography", className: "w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { className: "bg-[var(--color-bg)] border-[var(--color-border)]", children: fontOptions.map((font) => (_jsx(SelectItem, { value: font, children: font }, font))) })] })] }), _jsxs("div", { className: "mb-6", children: [_jsx(Label, { htmlFor: "font-size", className: "mb-2 text-[var(--color-text)]", children: "Font Size (px)" }), _jsx(Input, { type: "number", id: "font-size", value: config.fontSize, onChange: handleFontSizeChange, min: "8", max: "32", className: "w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]" })] }), _jsxs("div", { className: "mb-6", children: [_jsx(Label, { htmlFor: "thinking-display-style", className: "mb-2 text-[var(--color-text)]", children: "Thinking Display Style" }), _jsxs(Select, { value: config.thinkingDisplayStyle || "collapsible", onValueChange: handleThinkingDisplayStyleChange, children: [_jsx(SelectTrigger, { id: "thinking-display-style", className: "w-full bg-[var(--color-bg)] text-[var(--color-text)] border-[var(--color-border)] focus:border-[var(--color-accent)]", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { className: "bg-[var(--color-bg)] border-[var(--color-border)]", children: [_jsx(SelectItem, { value: "collapsible", children: "Collapsible Section" }), _jsx(SelectItem, { value: "inline", children: "Inline" })] })] })] }), _jsxs("div", { className: "mb-6", children: [_jsx(Label, { htmlFor: "status-test", className: "mb-2 text-[var(--color-text)]", children: "Chat Status" }), _jsxs("button", { onClick: handleStatusChange, className: "w-full px-4 py-2 rounded-lg bg-[var(--color-accent)] text-white font-medium hover:opacity-90 transition-opacity text-[var(--font-size)] font-[var(--font-family)]", children: ["Change Status: ", status] })] })] }));
47
+ }
48
+ //# sourceMappingURL=ConfigPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigPanel.js","sourceRoot":"","sources":["../../../src/gui/components/ConfigPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,GAAG;IAClB,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,iBAAiB;IACjB,SAAS;CACV,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,QAAQ;CACT,CAAC;AAiBF,MAAM,UAAU,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,GACG;IACjB,MAAM,uBAAuB,GAAG,CAAC,SAA2B,EAAE,EAAE;QAC9D,cAAc,CAAC,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC;IAEF,MAAM,uBAAuB,GAAG,CAC9B,CAAsC,EACtC,EAAE;QACF,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAChC,cAAc,CAAC,EAAE,GAAG,MAAM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AAM,aACnB,KAAC,KAAK,IAAC,OAAO,EAAC,WAAW,EAAC,SAAS,EAAC,+BAA+B,+BAE5D,EACR,KAAC,KAAK,IACJ,IAAI,EAAC,QAAQ,EACb,EAAE,EAAC,WAAW,EACd,KAAK,EAAE,MAAM,CAAC,QAAQ,EACtB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,EAAC,GAAG,EACP,GAAG,EAAC,IAAI,EACR,SAAS,EAAC,sHAAsH,GAChI,IACE,EAEN,eAAK,SAAS,EAAC,MAAM,aACnB,KAAC,KAAK,IACJ,OAAO,EAAC,wBAAwB,EAChC,SAAS,EAAC,+BAA+B,uCAGnC,EACR,MAAC,MAAM,IACL,KAAK,EAAE,MAAM,CAAC,oBAAoB,IAAI,aAAa,EACnD,aAAa,EAAE,gCAAgC,aAE/C,KAAC,aAAa,IACZ,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAC,sHAAsH,YAEhI,KAAC,WAAW,KAAG,GACD,EAChB,MAAC,aAAa,IAAC,SAAS,EAAC,mDAAmD,aAC1E,KAAC,UAAU,IAAC,KAAK,EAAC,aAAa,oCAAiC,EAChE,KAAC,UAAU,IAAC,KAAK,EAAC,QAAQ,uBAAoB,IAChC,IACT,IACL,EAEN,eAAK,SAAS,EAAC,MAAM,aACnB,KAAC,KAAK,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,+BAA+B,4BAE9D,EACR,kBACE,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAC,mKAAmK,gCAE7J,MAAM,IACf,IACL,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Conversation component inspired by shadcn.io/ai
4
+ * Auto-scrolling chat container that maintains scroll position during streaming
5
+ */
6
+ export interface ConversationProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ /** Whether to auto-scroll to bottom on new messages */
8
+ autoScroll?: boolean;
9
+ /** Whether content is currently streaming */
10
+ isStreaming?: boolean;
11
+ /** Scroll behavior type */
12
+ scrollBehavior?: ScrollBehavior;
13
+ /** Threshold for considering user at bottom (px from bottom) */
14
+ scrollThreshold?: number;
15
+ /** Show scroll-to-bottom button when not at bottom */
16
+ showScrollButton?: boolean;
17
+ /** Custom scroll button */
18
+ scrollButton?: React.ReactNode;
19
+ }
20
+ export declare const Conversation: React.ForwardRefExoticComponent<ConversationProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Conversation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;GAGG;AAEH,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,0FAsJxB,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ export const Conversation = React.forwardRef(({ autoScroll = true, isStreaming = false, scrollBehavior = "smooth", scrollThreshold = 100, showScrollButton = true, scrollButton, className, children, ...props }, ref) => {
6
+ const containerRef = useRef(null);
7
+ const [isNearBottom, setIsNearBottom] = useState(true);
8
+ const [showButton, setShowButton] = useState(false);
9
+ const lastScrollTopRef = useRef(0);
10
+ // Combine refs
11
+ React.useImperativeHandle(ref, () => {
12
+ if (!containerRef.current) {
13
+ throw new Error("Container ref not initialized");
14
+ }
15
+ return containerRef.current;
16
+ });
17
+ // Check if user is near bottom of scroll area
18
+ const checkScrollPosition = useCallback(() => {
19
+ const container = containerRef.current;
20
+ if (!container)
21
+ return;
22
+ const { scrollTop, scrollHeight, clientHeight } = container;
23
+ const distanceFromBottom = scrollHeight - scrollTop - clientHeight;
24
+ const nearBottom = distanceFromBottom < scrollThreshold;
25
+ setIsNearBottom(nearBottom);
26
+ setShowButton(!nearBottom && showScrollButton);
27
+ lastScrollTopRef.current = scrollTop;
28
+ }, [scrollThreshold, showScrollButton]);
29
+ // Scroll to bottom
30
+ const scrollToBottom = useCallback((behavior = scrollBehavior) => {
31
+ const container = containerRef.current;
32
+ if (!container)
33
+ return;
34
+ container.scrollTo({
35
+ top: container.scrollHeight,
36
+ behavior,
37
+ });
38
+ }, [scrollBehavior]);
39
+ // Auto-scroll when new content appears and user is near bottom
40
+ useEffect(() => {
41
+ if (!autoScroll)
42
+ return;
43
+ const container = containerRef.current;
44
+ if (!container)
45
+ return;
46
+ // Always scroll during streaming if user is near bottom
47
+ if (isStreaming && isNearBottom) {
48
+ scrollToBottom("auto");
49
+ }
50
+ // Scroll on new messages if near bottom
51
+ else if (!isStreaming && isNearBottom) {
52
+ scrollToBottom();
53
+ }
54
+ }, [autoScroll, isStreaming, isNearBottom, scrollToBottom]);
55
+ // Set up scroll listener
56
+ useEffect(() => {
57
+ const container = containerRef.current;
58
+ if (!container)
59
+ return;
60
+ const handleScroll = () => {
61
+ checkScrollPosition();
62
+ };
63
+ container.addEventListener("scroll", handleScroll, { passive: true });
64
+ // Check initial position
65
+ checkScrollPosition();
66
+ return () => {
67
+ container.removeEventListener("scroll", handleScroll);
68
+ };
69
+ }, [checkScrollPosition]);
70
+ // Watch for resize events
71
+ useEffect(() => {
72
+ const container = containerRef.current;
73
+ if (!container)
74
+ return;
75
+ const resizeObserver = new ResizeObserver(() => {
76
+ if (isNearBottom && autoScroll) {
77
+ scrollToBottom("auto");
78
+ }
79
+ });
80
+ resizeObserver.observe(container);
81
+ return () => {
82
+ resizeObserver.disconnect();
83
+ };
84
+ }, [isNearBottom, autoScroll, scrollToBottom]);
85
+ return (_jsxs("div", { className: "relative flex-1", children: [_jsx("div", { ref: containerRef, className: cn("h-full overflow-y-auto overflow-x-hidden", "scrollbar-thin scrollbar-thumb-[border] scrollbar-track-transparent", className), ...props, children: _jsx("div", { className: "flex flex-col gap-4 px-4 py-4", children: children }) }), showButton && (_jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-10", children: scrollButton || (_jsxs("button", { type: "button", onClick: () => scrollToBottom(), className: "px-4 py-2 rounded-full bg-card border border-border shadow-lg hover:shadow-xl hover:bg-card/90 transition-all text-sm font-medium text-foreground flex items-center gap-2", "aria-label": "Scroll to bottom", children: [_jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": "Down arrow", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 14l-7 7m0 0l-7-7m7 7V3" }) }), "Scroll to bottom"] })) }))] }));
86
+ });
87
+ Conversation.displayName = "Conversation";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Conversation.js","sourceRoot":"","sources":["../../../src/gui/components/Conversation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAuBrC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,UAAU,GAAG,IAAI,EACjB,WAAW,GAAG,KAAK,EACnB,cAAc,GAAG,QAAQ,EACzB,eAAe,GA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AAc,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE;YAC7C,IAAI,YAAY,IAAI,UAAU,EAAE,CAAC;gBAC/B,cAAc,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAElC,OAAO,GAAG,EAAE;YACV,cAAc,CAAC,UAAU,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;IAE/C,OAAO,CACL,eAAK,SAAS,EAAC,iBAAiB,aAC9B,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,EAAE,CACX,0CAA0C,EAC1C,kFAAkF,EAClF,SAAS,CACV,KACG,KAAK,YAET,cAAK,SAAS,EAAC,+BAA+B,YAAE,QAAQ,GAAO,GAC3D,EAGL,UAAU,IAAI,CACb,cAAK,SAAS,EAAC,kDAAkD,YAC9D,YAAY,IAAI,CACf,kBACE,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE,EAC/B,SAAS,EAAC,uOAAuO,gBACtO,kBAAkB,aAE7B,cACE,SAAS,EAAC,SAAS,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,YAElC,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,4BAA4B,GAC9B,GACE,wBAEC,CACV,GACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
2
+ import * as React from "react";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM,uCAAuB,CAAC;AAEpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAE9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAE5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JAqBjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAC;AAGF,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}