@townco/ui 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/hooks/index.d.ts +1 -0
- package/dist/core/hooks/index.d.ts.map +1 -0
- package/dist/core/hooks/index.js +1 -0
- package/dist/core/hooks/index.js.map +1 -0
- package/dist/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-input.js +64 -55
- package/dist/core/hooks/use-chat-input.js.map +1 -0
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-messages.js +121 -114
- package/dist/core/hooks/use-chat-messages.js.map +1 -0
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.d.ts.map +1 -0
- package/dist/core/hooks/use-chat-session.js +78 -80
- package/dist/core/hooks/use-chat-session.js.map +1 -0
- package/dist/core/hooks/use-media-query.d.ts +39 -0
- package/dist/core/hooks/use-media-query.js +84 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/schemas/chat.d.ts +83 -56
- package/dist/core/schemas/chat.d.ts.map +1 -0
- package/dist/core/schemas/chat.js +27 -25
- package/dist/core/schemas/chat.js.map +1 -0
- package/dist/core/schemas/index.d.ts.map +1 -0
- package/dist/core/schemas/index.js.map +1 -0
- package/dist/core/store/chat-store.d.ts +28 -22
- package/dist/core/store/chat-store.d.ts.map +1 -0
- package/dist/core/store/chat-store.js +59 -50
- package/dist/core/store/chat-store.js.map +1 -0
- package/dist/gui/components/Button.d.ts +23 -7
- package/dist/gui/components/Button.d.ts.map +1 -0
- package/dist/gui/components/Button.js +40 -27
- package/dist/gui/components/Button.js.map +1 -0
- package/dist/gui/components/Card.d.ts +26 -7
- package/dist/gui/components/Card.d.ts.map +1 -0
- package/dist/gui/components/Card.js +54 -8
- package/dist/gui/components/Card.js.map +1 -0
- package/dist/gui/components/ChatHeader.d.ts +38 -0
- package/dist/gui/components/ChatHeader.js +86 -0
- package/dist/gui/components/ChatInput.d.ts +19 -1
- package/dist/gui/components/ChatInput.d.ts.map +1 -0
- package/dist/gui/components/ChatInput.js +94 -11
- package/dist/gui/components/ChatInput.js.map +1 -0
- package/dist/gui/components/ChatInputCommandMenu.d.ts +20 -0
- package/dist/gui/components/ChatInputCommandMenu.js +62 -0
- package/dist/gui/components/ChatInterface.d.ts +12 -0
- package/dist/gui/components/ChatInterface.d.ts.map +1 -0
- package/dist/gui/components/ChatInterface.js +204 -0
- package/dist/gui/components/ChatInterface.js.map +1 -0
- package/dist/gui/components/ChatLayout.d.ts +52 -0
- package/dist/gui/components/ChatLayout.js +105 -0
- package/dist/gui/components/ChatPanelTabContent.d.ts +18 -0
- package/dist/gui/components/ChatPanelTabContent.js +15 -0
- package/dist/gui/components/ChatPreview.d.ts +12 -0
- package/dist/gui/components/ChatPreview.d.ts.map +1 -0
- package/dist/gui/components/ChatPreview.js +214 -0
- package/dist/gui/components/ChatPreview.js.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.d.ts +14 -11
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +1 -0
- package/dist/gui/components/ChatSecondaryPanel.js +115 -38
- package/dist/gui/components/ChatSecondaryPanel.js.map +1 -0
- package/dist/gui/components/ChatSidebar.d.ts +14 -0
- package/dist/gui/components/ChatSidebar.js +23 -0
- package/dist/gui/components/ChatStatus.d.ts +4 -2
- package/dist/gui/components/ChatStatus.d.ts.map +1 -0
- package/dist/gui/components/ChatStatus.js +45 -34
- package/dist/gui/components/ChatStatus.js.map +1 -0
- package/dist/gui/components/ChatView.d.ts +8 -0
- package/dist/gui/components/ChatView.d.ts.map +1 -0
- package/dist/gui/components/ChatView.js +42 -0
- package/dist/gui/components/ChatView.js.map +1 -0
- package/dist/gui/components/ConfigPanel.d.ts +20 -0
- package/dist/gui/components/ConfigPanel.d.ts.map +1 -0
- package/dist/gui/components/ConfigPanel.js +225 -0
- package/dist/gui/components/ConfigPanel.js.map +1 -0
- package/dist/gui/components/Conversation.d.ts +17 -14
- package/dist/gui/components/Conversation.d.ts.map +1 -0
- package/dist/gui/components/Conversation.js +143 -83
- package/dist/gui/components/Conversation.js.map +1 -0
- package/dist/gui/components/Dialog.d.ts +57 -11
- package/dist/gui/components/Dialog.d.ts.map +1 -0
- package/dist/gui/components/Dialog.js +84 -8
- package/dist/gui/components/Dialog.js.map +1 -0
- package/dist/gui/components/DropdownMenu.d.ts +27 -0
- package/dist/gui/components/DropdownMenu.js +68 -0
- package/dist/gui/components/HeightTransition.d.ts +12 -7
- package/dist/gui/components/HeightTransition.d.ts.map +1 -0
- package/dist/gui/components/HeightTransition.js +88 -77
- package/dist/gui/components/HeightTransition.js.map +1 -0
- package/dist/gui/components/Input.d.ts +13 -6
- package/dist/gui/components/Input.d.ts.map +1 -0
- package/dist/gui/components/Input.js +27 -16
- package/dist/gui/components/Input.js.map +1 -0
- package/dist/gui/components/InputBox.d.ts +21 -0
- package/dist/gui/components/InputBox.d.ts.map +1 -0
- package/dist/gui/components/InputBox.js +90 -0
- package/dist/gui/components/InputBox.js.map +1 -0
- package/dist/gui/components/Label.d.ts +7 -1
- package/dist/gui/components/Label.d.ts.map +1 -0
- package/dist/gui/components/Label.js +12 -2
- package/dist/gui/components/Label.js.map +1 -0
- package/dist/gui/components/MarkdownRenderer.d.ts +6 -4
- package/dist/gui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/gui/components/MarkdownRenderer.js +178 -81
- package/dist/gui/components/MarkdownRenderer.js.map +1 -0
- package/dist/gui/components/Message.d.ts +4 -0
- package/dist/gui/components/Message.d.ts.map +1 -0
- package/dist/gui/components/Message.js +77 -3
- package/dist/gui/components/Message.js.map +1 -0
- package/dist/gui/components/MessageContent.d.ts +29 -22
- package/dist/gui/components/MessageContent.d.ts.map +1 -0
- package/dist/gui/components/MessageContent.js +1 -1
- package/dist/gui/components/MessageContent.js.map +1 -0
- package/dist/gui/components/MessageList.d.ts.map +1 -0
- package/dist/gui/components/MessageList.js.map +1 -0
- package/dist/gui/components/PlaygroundLayout.d.ts +14 -0
- package/dist/gui/components/PlaygroundLayout.d.ts.map +1 -0
- package/dist/gui/components/PlaygroundLayout.js +49 -0
- package/dist/gui/components/PlaygroundLayout.js.map +1 -0
- package/dist/gui/components/Reasoning.d.ts +30 -24
- package/dist/gui/components/Reasoning.d.ts.map +1 -0
- package/dist/gui/components/Reasoning.js +187 -60
- package/dist/gui/components/Reasoning.js.map +1 -0
- package/dist/gui/components/Response.d.ts +11 -9
- package/dist/gui/components/Response.d.ts.map +1 -0
- package/dist/gui/components/Response.js +229 -90
- package/dist/gui/components/Response.js.map +1 -0
- package/dist/gui/components/Select.d.ts +69 -10
- package/dist/gui/components/Select.d.ts.map +1 -0
- package/dist/gui/components/Select.js +118 -12
- package/dist/gui/components/Select.js.map +1 -0
- package/dist/gui/components/Sonner.d.ts +5 -0
- package/dist/gui/components/Sonner.js +23 -0
- package/dist/gui/components/StatusBar.d.ts +12 -0
- package/dist/gui/components/StatusBar.d.ts.map +1 -0
- package/dist/gui/components/StatusBar.js +58 -0
- package/dist/gui/components/StatusBar.js.map +1 -0
- package/dist/gui/components/Tabs.d.ts +24 -4
- package/dist/gui/components/Tabs.d.ts.map +1 -0
- package/dist/gui/components/Tabs.js +32 -4
- package/dist/gui/components/Tabs.js.map +1 -0
- package/dist/gui/components/Task.d.ts +28 -24
- package/dist/gui/components/Task.d.ts.map +1 -0
- package/dist/gui/components/Task.js +164 -31
- package/dist/gui/components/Task.js.map +1 -0
- package/dist/gui/components/Textarea.d.ts +15 -7
- package/dist/gui/components/Textarea.d.ts.map +1 -0
- package/dist/gui/components/Textarea.js +63 -46
- package/dist/gui/components/Textarea.js.map +1 -0
- package/dist/gui/components/ThinkingBlock.d.ts +20 -10
- package/dist/gui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/gui/components/ThinkingBlock.js +134 -35
- package/dist/gui/components/ThinkingBlock.js.map +1 -0
- package/dist/gui/components/TodoList.d.ts +12 -10
- package/dist/gui/components/TodoList.d.ts.map +1 -0
- package/dist/gui/components/TodoList.js +22 -7
- package/dist/gui/components/TodoList.js.map +1 -0
- package/dist/gui/components/TodoListItem.d.ts +9 -6
- package/dist/gui/components/TodoListItem.d.ts.map +1 -0
- package/dist/gui/components/TodoListItem.js +18 -4
- package/dist/gui/components/TodoListItem.js.map +1 -0
- package/dist/gui/components/index.d.ts +9 -1
- package/dist/gui/components/index.d.ts.map +1 -0
- package/dist/gui/components/index.js +11 -1
- package/dist/gui/components/index.js.map +1 -0
- package/dist/gui/index.d.ts.map +1 -0
- package/dist/gui/index.js.map +1 -0
- package/dist/gui/lib/utils.d.ts.map +1 -0
- package/dist/gui/lib/utils.js +1 -1
- package/dist/gui/lib/utils.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.js +0 -1
- package/dist/sdk/client/acp-client.d.ts +88 -76
- package/dist/sdk/client/acp-client.d.ts.map +1 -0
- package/dist/sdk/client/acp-client.js +215 -217
- package/dist/sdk/client/acp-client.js.map +1 -0
- package/dist/sdk/client/index.d.ts.map +1 -0
- package/dist/sdk/client/index.js.map +1 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/schemas/agent.d.ts +111 -64
- package/dist/sdk/schemas/agent.d.ts.map +1 -0
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/agent.js.map +1 -0
- package/dist/sdk/schemas/index.d.ts.map +1 -0
- package/dist/sdk/schemas/index.js.map +1 -0
- package/dist/sdk/schemas/message.d.ts +245 -147
- package/dist/sdk/schemas/message.d.ts.map +1 -0
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/message.js.map +1 -0
- package/dist/sdk/schemas/session.d.ts +219 -135
- package/dist/sdk/schemas/session.d.ts.map +1 -0
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/schemas/session.js.map +1 -0
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.d.ts.map +1 -0
- package/dist/sdk/transports/http.js +472 -469
- package/dist/sdk/transports/http.js.map +1 -0
- package/dist/sdk/transports/index.d.ts.map +1 -0
- package/dist/sdk/transports/index.js.map +1 -0
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.d.ts.map +1 -0
- package/dist/sdk/transports/stdio.js.map +1 -0
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/types.d.ts.map +1 -0
- package/dist/sdk/transports/types.js.map +1 -0
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.d.ts.map +1 -0
- package/dist/sdk/transports/websocket.js +52 -46
- package/dist/sdk/transports/websocket.js.map +1 -0
- package/dist/tui/components/ChatView.d.ts +4 -2
- package/dist/tui/components/ChatView.d.ts.map +1 -0
- package/dist/tui/components/ChatView.js +51 -18
- package/dist/tui/components/ChatView.js.map +1 -0
- package/dist/tui/components/GameOfLife.d.ts.map +1 -0
- package/dist/tui/components/GameOfLife.js +64 -35
- package/dist/tui/components/GameOfLife.js.map +1 -0
- package/dist/tui/components/InputBox.d.ts +18 -11
- package/dist/tui/components/InputBox.d.ts.map +1 -0
- package/dist/tui/components/InputBox.js +70 -10
- package/dist/tui/components/InputBox.js.map +1 -0
- package/dist/tui/components/MessageList.d.ts +4 -2
- package/dist/tui/components/MessageList.d.ts.map +1 -0
- package/dist/tui/components/MessageList.js +37 -10
- package/dist/tui/components/MessageList.js.map +1 -0
- package/dist/tui/components/ReadlineInput.d.ts +12 -6
- package/dist/tui/components/ReadlineInput.d.ts.map +1 -0
- package/dist/tui/components/ReadlineInput.js +252 -237
- package/dist/tui/components/ReadlineInput.js.map +1 -0
- package/dist/tui/components/SingleSelect.d.ts +15 -9
- package/dist/tui/components/SingleSelect.js +84 -43
- package/dist/tui/components/StatusBar.d.ts +11 -6
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +102 -67
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +6 -4
- package/src/styles/global.css +2 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function InputBox({
|
|
3
|
+
value,
|
|
4
|
+
isSubmitting,
|
|
5
|
+
attachedFiles,
|
|
6
|
+
onChange,
|
|
7
|
+
onSubmit,
|
|
8
|
+
onRemoveFile,
|
|
9
|
+
}) {
|
|
10
|
+
const handleKeyDown = (e) => {
|
|
11
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
onSubmit();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return _jsxs("div", {
|
|
17
|
+
className: "border-t border-gray-200 bg-white p-4",
|
|
18
|
+
children: [
|
|
19
|
+
attachedFiles.length > 0 &&
|
|
20
|
+
_jsxs("div", {
|
|
21
|
+
className: "mb-3 space-y-1",
|
|
22
|
+
children: [
|
|
23
|
+
_jsx("p", {
|
|
24
|
+
className: "text-xs text-gray-500",
|
|
25
|
+
children: "Attached files:",
|
|
26
|
+
}),
|
|
27
|
+
_jsx("div", {
|
|
28
|
+
className: "flex flex-wrap gap-2",
|
|
29
|
+
children: attachedFiles.map((file, index) =>
|
|
30
|
+
_jsxs(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className:
|
|
34
|
+
"flex items-center gap-2 px-3 py-1 bg-cyan-50 text-cyan-700 rounded-full text-xs",
|
|
35
|
+
children: [
|
|
36
|
+
_jsx("span", { children: file.name }),
|
|
37
|
+
_jsxs("span", {
|
|
38
|
+
className: "text-gray-400",
|
|
39
|
+
children: ["(", formatFileSize(file.size), ")"],
|
|
40
|
+
}),
|
|
41
|
+
onRemoveFile &&
|
|
42
|
+
_jsx("button", {
|
|
43
|
+
onClick: () => onRemoveFile(index),
|
|
44
|
+
className: "hover:text-cyan-900",
|
|
45
|
+
children: "\u00D7",
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
index,
|
|
50
|
+
),
|
|
51
|
+
),
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
}),
|
|
55
|
+
_jsxs("div", {
|
|
56
|
+
className: "flex items-end gap-2",
|
|
57
|
+
children: [
|
|
58
|
+
_jsx("textarea", {
|
|
59
|
+
value: value,
|
|
60
|
+
onChange: (e) => onChange(e.target.value),
|
|
61
|
+
onKeyDown: handleKeyDown,
|
|
62
|
+
disabled: isSubmitting,
|
|
63
|
+
placeholder:
|
|
64
|
+
"Type your message... (Press Enter to send, Shift+Enter for new line)",
|
|
65
|
+
className:
|
|
66
|
+
"flex-1 resize-none rounded-lg border border-gray-300 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed",
|
|
67
|
+
rows: 3,
|
|
68
|
+
}),
|
|
69
|
+
_jsx("button", {
|
|
70
|
+
onClick: onSubmit,
|
|
71
|
+
disabled: isSubmitting || !value.trim(),
|
|
72
|
+
className:
|
|
73
|
+
"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors",
|
|
74
|
+
children: isSubmitting ? "Sending..." : "Send",
|
|
75
|
+
}),
|
|
76
|
+
],
|
|
77
|
+
}),
|
|
78
|
+
_jsx("p", {
|
|
79
|
+
className: "mt-2 text-xs text-gray-500",
|
|
80
|
+
children: "Press Enter to send \u2022 Shift+Enter for new line",
|
|
81
|
+
}),
|
|
82
|
+
],
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function formatFileSize(bytes) {
|
|
86
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
87
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
88
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=InputBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputBox.js","sourceRoot":"","sources":["../../../src/gui/components/InputBox.tsx"],"names":[],"mappings":";AAWA,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,YAAY,GACE;IACd,MAAM,aAAa,GAAG,CAAC,CAAqC,EAAE,EAAE;QAC9D,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YACrC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uCAAuC,aACnD,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,CAC3B,eAAK,SAAS,EAAC,gBAAgB,aAC7B,YAAG,SAAS,EAAC,uBAAuB,gCAAoB,EACxD,cAAK,SAAS,EAAC,sBAAsB,YAClC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAClC,eAEE,SAAS,EAAC,iFAAiF,aAE3F,yBAAO,IAAI,CAAC,IAAI,GAAQ,EACxB,gBAAM,SAAS,EAAC,eAAe,kBAC3B,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,SACtB,EACN,YAAY,IAAI,CACf,iBACE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAClC,SAAS,EAAC,qBAAqB,uBAGxB,CACV,KAdI,KAAK,CAeN,CACP,CAAC,GACE,IACF,CACP,EAED,eAAK,SAAS,EAAC,sBAAsB,aACnC,mBACE,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,sEAAsE,EAClF,SAAS,EAAC,sMAAsM,EAChN,IAAI,EAAE,CAAC,GACP,EACF,iBACE,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,YAAY,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EACvC,SAAS,EAAC,0MAA0M,YAEnN,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,GAC9B,IACL,EAEN,YAAG,SAAS,EAAC,4BAA4B,oEAErC,IACA,CACP,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AACpD,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const Label: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<
|
|
4
|
+
Omit<
|
|
5
|
+
LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>,
|
|
6
|
+
"ref"
|
|
7
|
+
> &
|
|
8
|
+
React.RefAttributes<HTMLLabelElement>
|
|
9
|
+
>;
|
|
4
10
|
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAGxD,QAAA,MAAM,KAAK,yJAYT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
2
|
import * as React from "react";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
const Label = React.forwardRef(({ className, ...props }, ref) =>
|
|
7
|
+
_jsx(LabelPrimitive.Root, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
className: cn(
|
|
10
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
11
|
+
className,
|
|
12
|
+
),
|
|
13
|
+
...props,
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
6
16
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
7
17
|
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/gui/components/Label.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,cAAc,CAAC,IAAI,IAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,4FAA4F,EAC5F,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface MarkdownRendererProps {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
content: string;
|
|
3
|
+
className?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function MarkdownRenderer({
|
|
6
|
-
|
|
5
|
+
export declare function MarkdownRenderer({
|
|
6
|
+
content,
|
|
7
|
+
className,
|
|
8
|
+
}: MarkdownRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../src/gui/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AAKA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,kDA4K7E"}
|
|
@@ -2,85 +2,182 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import ReactMarkdown from "react-markdown";
|
|
3
3
|
import remarkGfm from "remark-gfm";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
export function MarkdownRenderer({ content, className
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
5
|
+
export function MarkdownRenderer({ content, className }) {
|
|
6
|
+
if (!content) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const components = {
|
|
10
|
+
// Table styling
|
|
11
|
+
table: ({ node, ...props }) =>
|
|
12
|
+
_jsx("div", {
|
|
13
|
+
className: "overflow-x-auto my-4",
|
|
14
|
+
children: _jsx("table", {
|
|
15
|
+
className:
|
|
16
|
+
"min-w-full border-collapse border border-border rounded-md",
|
|
17
|
+
...props,
|
|
18
|
+
}),
|
|
19
|
+
}),
|
|
20
|
+
thead: ({ node, ...props }) =>
|
|
21
|
+
_jsx("thead", { className: "bg-card border-b border-border", ...props }),
|
|
22
|
+
tbody: ({ node, ...props }) => _jsx("tbody", { ...props }),
|
|
23
|
+
tr: ({ node, ...props }) =>
|
|
24
|
+
_jsx("tr", {
|
|
25
|
+
className: "border-b border-border hover:bg-card transition-colors",
|
|
26
|
+
...props,
|
|
27
|
+
}),
|
|
28
|
+
th: ({ node, ...props }) =>
|
|
29
|
+
_jsx("th", {
|
|
30
|
+
className:
|
|
31
|
+
"px-4 py-2 text-left font-semibold text-foreground border-r border-border last:border-r-0",
|
|
32
|
+
...props,
|
|
33
|
+
}),
|
|
34
|
+
td: ({ node, ...props }) =>
|
|
35
|
+
_jsx("td", {
|
|
36
|
+
className:
|
|
37
|
+
"px-4 py-2 text-foreground border-r border-border last:border-r-0",
|
|
38
|
+
...props,
|
|
39
|
+
}),
|
|
40
|
+
// Task list styling
|
|
41
|
+
input: ({ node, checked, ...props }) => {
|
|
42
|
+
if (props.type === "checkbox") {
|
|
43
|
+
return _jsx("input", {
|
|
44
|
+
type: "checkbox",
|
|
45
|
+
checked: checked || false,
|
|
46
|
+
disabled: true,
|
|
47
|
+
readOnly: true,
|
|
48
|
+
className: "mr-2 w-4 h-4 accent-[primary] cursor-not-allowed",
|
|
49
|
+
...props,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return _jsx("input", { ...props });
|
|
53
|
+
},
|
|
54
|
+
// Code block styling
|
|
55
|
+
code: ({ node, ...props }) => {
|
|
56
|
+
const inline = !props.className?.includes("language-");
|
|
57
|
+
if (inline) {
|
|
58
|
+
return _jsx("code", {
|
|
59
|
+
className:
|
|
60
|
+
"px-1.5 py-0.5 bg-card border border-border rounded text-sm font-mono text-foreground",
|
|
61
|
+
...props,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return _jsx("code", {
|
|
65
|
+
className:
|
|
66
|
+
"block p-4 bg-card border border-border rounded-md overflow-x-auto text-sm font-mono text-foreground",
|
|
67
|
+
...props,
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
pre: ({ node, ...props }) => _jsx("pre", { className: "my-4", ...props }),
|
|
71
|
+
// Heading styling
|
|
72
|
+
h1: ({ node, ...props }) =>
|
|
73
|
+
_jsx("h1", {
|
|
74
|
+
className: "text-2xl font-bold mt-6 mb-4 text-foreground",
|
|
75
|
+
...props,
|
|
76
|
+
}),
|
|
77
|
+
h2: ({ node, ...props }) =>
|
|
78
|
+
_jsx("h2", {
|
|
79
|
+
className: "text-xl font-semibold mt-5 mb-3 text-foreground",
|
|
80
|
+
...props,
|
|
81
|
+
}),
|
|
82
|
+
h3: ({ node, ...props }) =>
|
|
83
|
+
_jsx("h3", {
|
|
84
|
+
className: "text-lg font-semibold mt-4 mb-2 text-foreground",
|
|
85
|
+
...props,
|
|
86
|
+
}),
|
|
87
|
+
// List styling
|
|
88
|
+
ul: ({ node, ...props }) => {
|
|
89
|
+
// Check if this is a task list by looking for checkbox inputs in children
|
|
90
|
+
const isTaskList = node?.children?.some(
|
|
91
|
+
(child) =>
|
|
92
|
+
typeof child === "object" &&
|
|
93
|
+
child !== null &&
|
|
94
|
+
"type" in child &&
|
|
95
|
+
child.type === "element" &&
|
|
96
|
+
"tagName" in child &&
|
|
97
|
+
child.tagName === "li" &&
|
|
98
|
+
"children" in child &&
|
|
99
|
+
Array.isArray(child.children) &&
|
|
100
|
+
child.children.some(
|
|
101
|
+
(grandChild) =>
|
|
102
|
+
typeof grandChild === "object" &&
|
|
103
|
+
grandChild !== null &&
|
|
104
|
+
"type" in grandChild &&
|
|
105
|
+
grandChild.type === "element" &&
|
|
106
|
+
"tagName" in grandChild &&
|
|
107
|
+
grandChild.tagName === "input" &&
|
|
108
|
+
"properties" in grandChild &&
|
|
109
|
+
typeof grandChild.properties === "object" &&
|
|
110
|
+
grandChild.properties !== null &&
|
|
111
|
+
"type" in grandChild.properties &&
|
|
112
|
+
grandChild.properties.type === "checkbox",
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
return _jsx("ul", {
|
|
116
|
+
className: cn(
|
|
117
|
+
"my-2 space-y-1 text-foreground",
|
|
118
|
+
isTaskList ? "list-none space-y-2" : "list-disc list-inside",
|
|
119
|
+
),
|
|
120
|
+
...props,
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
ol: ({ node, ...props }) =>
|
|
124
|
+
_jsx("ol", {
|
|
125
|
+
className: "list-decimal list-inside my-2 space-y-1 text-foreground",
|
|
126
|
+
...props,
|
|
127
|
+
}),
|
|
128
|
+
// List item styling
|
|
129
|
+
li: ({ node, ...props }) => {
|
|
130
|
+
// Check if this li contains a checkbox (task list item)
|
|
131
|
+
const isTaskListItem = node?.children?.some(
|
|
132
|
+
(child) =>
|
|
133
|
+
typeof child === "object" &&
|
|
134
|
+
child !== null &&
|
|
135
|
+
"type" in child &&
|
|
136
|
+
child.type === "element" &&
|
|
137
|
+
"tagName" in child &&
|
|
138
|
+
child.tagName === "input" &&
|
|
139
|
+
"properties" in child &&
|
|
140
|
+
typeof child.properties === "object" &&
|
|
141
|
+
child.properties !== null &&
|
|
142
|
+
"type" in child.properties &&
|
|
143
|
+
child.properties.type === "checkbox",
|
|
144
|
+
);
|
|
145
|
+
return _jsx("li", {
|
|
146
|
+
className: cn("flex items-start", isTaskListItem ? "gap-2" : "ml-2"),
|
|
147
|
+
...props,
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
// Link styling
|
|
151
|
+
a: ({ node, ...props }) =>
|
|
152
|
+
_jsx("a", {
|
|
153
|
+
className: "text-primary hover:underline",
|
|
154
|
+
target: "_blank",
|
|
155
|
+
rel: "noopener noreferrer",
|
|
156
|
+
...props,
|
|
157
|
+
}),
|
|
158
|
+
// Paragraph styling
|
|
159
|
+
p: ({ node, ...props }) =>
|
|
160
|
+
_jsx("p", {
|
|
161
|
+
className: "my-2 text-foreground leading-relaxed",
|
|
162
|
+
...props,
|
|
163
|
+
}),
|
|
164
|
+
// Blockquote styling
|
|
165
|
+
blockquote: ({ node, ...props }) =>
|
|
166
|
+
_jsx("blockquote", {
|
|
167
|
+
className:
|
|
168
|
+
"border-l-4 border-[primary] pl-4 italic my-4 text-foreground bg-card py-2",
|
|
169
|
+
...props,
|
|
170
|
+
}),
|
|
171
|
+
};
|
|
172
|
+
return _jsx("div", {
|
|
173
|
+
className: cn(
|
|
174
|
+
"markdown-content prose prose-sm max-w-none dark:prose-invert",
|
|
175
|
+
className,
|
|
176
|
+
),
|
|
177
|
+
children: _jsx(ReactMarkdown, {
|
|
178
|
+
remarkPlugins: [remarkGfm],
|
|
179
|
+
components: components,
|
|
180
|
+
children: content,
|
|
181
|
+
}),
|
|
182
|
+
});
|
|
86
183
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../../src/gui/components/MarkdownRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAOrC,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB;IAC5E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAe;QAC7B,gBAAgB;QAChB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC7B,cAAK,SAAS,EAAC,sBAAsB,YACnC,gBACE,SAAS,EAAC,2EAA2E,KACjF,KAAK,GACT,GACE,CACP;QACD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC7B,gBACE,SAAS,EAAC,iEAAiE,KACvE,KAAK,GACT,CACH;QACD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,mBAAW,KAAK,GAAI;QACnD,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KA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DAAwD;YACxD,MAAM,cAAc,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CACzC,CAAC,KAAU,EAAE,EAAE,CACb,KAAK,CAAC,IAAI,KAAK,SAAS;gBACxB,KAAK,CAAC,OAAO,KAAK,OAAO;gBACzB,KAAK,CAAC,UAAU,EAAE,IAAI,KAAK,UAAU,CACxC,CAAC;YACF,OAAO,CACL,aACE,SAAS,EAAE,EAAE,CACX,kBAAkB,EAClB,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAClC,KACG,KAAK,GACT,CACH,CAAC;QACJ,CAAC;QACD,eAAe;QACf,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACzB,YACE,SAAS,EAAC,4CAA4C,EACtD,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,qBAAqB;QACrB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAClC,qBACE,SAAS,EAAC,kHAAkH,KACxH,KAAK,GACT,CACH;KACF,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,8DAA8D,EAAE,SAAS,CAAC,YAC3F,KAAC,aAAa,IAAC,aAAa,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,YAC9D,OAAO,GACM,GACZ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -21,6 +21,10 @@ export interface MessageProps extends React.HTMLAttributes<HTMLDivElement>, Vari
|
|
|
21
21
|
layout?: "default" | "full" | "compact";
|
|
22
22
|
/** Optional message ID for accessibility (fallback if message not provided) */
|
|
23
23
|
messageId?: string;
|
|
24
|
+
/** Whether to auto-scroll this message into view when mounted (default: true for user messages) */
|
|
25
|
+
autoScroll?: boolean;
|
|
26
|
+
/** Whether this is the last message in the conversation (for dynamic min-height) */
|
|
27
|
+
isLastMessage?: boolean;
|
|
24
28
|
}
|
|
25
29
|
export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
30
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/gui/components/Message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;GAGG;AAEH,QAAA,MAAM,eAAe;;;8EAoBpB,CAAC;AAEF,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,eAAe,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEvC,+BAA+B;IAC/B,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAExC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,qFAmBnB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { cn } from "../lib/utils.js";
|
|
|
9
9
|
const messageVariants = cva("flex animate-fadeIn", {
|
|
10
10
|
variants: {
|
|
11
11
|
role: {
|
|
12
|
-
user: "max-w-[80%] self-end ml-auto",
|
|
12
|
+
user: "max-w-[80%] self-end ml-auto mr-2",
|
|
13
13
|
assistant: "self-start mr-auto",
|
|
14
14
|
system: "self-start mr-auto max-w-full",
|
|
15
15
|
},
|
|
@@ -24,10 +24,84 @@ const messageVariants = cva("flex animate-fadeIn", {
|
|
|
24
24
|
layout: "default",
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
|
-
export const Message = React.forwardRef(({ message, role: roleProp, layout, className, children, messageId: messageIdProp, ...props }, ref) => {
|
|
27
|
+
export const Message = React.forwardRef(({ message, role: roleProp, layout, className, children, messageId: messageIdProp, autoScroll, isLastMessage = false, ...props }, ref) => {
|
|
28
28
|
// Extract role and messageId from message if provided
|
|
29
29
|
const role = message ? message.role : roleProp || "assistant";
|
|
30
30
|
const messageId = message ? message.id : messageIdProp;
|
|
31
|
-
|
|
31
|
+
const messageRef = React.useRef(null);
|
|
32
|
+
const [minHeight, setMinHeight] = React.useState(undefined);
|
|
33
|
+
// Merge refs
|
|
34
|
+
React.useImperativeHandle(ref, () => messageRef.current);
|
|
35
|
+
// Calculate dynamic min-height for last assistant message following a user message
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
if (!isLastMessage || role !== "assistant") {
|
|
38
|
+
setMinHeight(undefined);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const calculateMinHeight = () => {
|
|
42
|
+
const messageElement = messageRef.current;
|
|
43
|
+
if (!messageElement)
|
|
44
|
+
return;
|
|
45
|
+
// Find the ChatLayout.Messages container (scrollable parent)
|
|
46
|
+
let scrollContainer = messageElement.parentElement;
|
|
47
|
+
while (scrollContainer &&
|
|
48
|
+
!scrollContainer.classList.contains("overflow-y-auto")) {
|
|
49
|
+
scrollContainer = scrollContainer.parentElement;
|
|
50
|
+
}
|
|
51
|
+
if (!scrollContainer)
|
|
52
|
+
return;
|
|
53
|
+
// Find the previous user message
|
|
54
|
+
const previousSibling = messageElement.previousElementSibling;
|
|
55
|
+
if (!previousSibling ||
|
|
56
|
+
previousSibling.getAttribute("aria-label") !== "user message") {
|
|
57
|
+
setMinHeight(undefined);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// Calculate: containerHeight - previousUserMessageHeight - spacing
|
|
61
|
+
const containerHeight = scrollContainer.clientHeight;
|
|
62
|
+
const previousMessageHeight = previousSibling.offsetHeight;
|
|
63
|
+
const spacing = 32; // gap-4 = 16px
|
|
64
|
+
// Min height = container height - user message height - spacing
|
|
65
|
+
// This ensures the user message can scroll to the top
|
|
66
|
+
const calculatedMinHeight = Math.max(0, containerHeight - previousMessageHeight - spacing);
|
|
67
|
+
setMinHeight(calculatedMinHeight);
|
|
68
|
+
};
|
|
69
|
+
// Calculate on mount and recalculate on resize
|
|
70
|
+
calculateMinHeight();
|
|
71
|
+
const resizeObserver = new ResizeObserver(calculateMinHeight);
|
|
72
|
+
// Observe the message element and its parent container
|
|
73
|
+
if (messageRef.current) {
|
|
74
|
+
resizeObserver.observe(messageRef.current);
|
|
75
|
+
let scrollContainer = messageRef.current.parentElement;
|
|
76
|
+
while (scrollContainer &&
|
|
77
|
+
!scrollContainer.classList.contains("overflow-y-auto")) {
|
|
78
|
+
scrollContainer = scrollContainer.parentElement;
|
|
79
|
+
}
|
|
80
|
+
if (scrollContainer) {
|
|
81
|
+
resizeObserver.observe(scrollContainer);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return () => resizeObserver.disconnect();
|
|
85
|
+
}, [isLastMessage, role]);
|
|
86
|
+
// Auto-scroll for user messages when they first appear
|
|
87
|
+
React.useEffect(() => {
|
|
88
|
+
// Default to auto-scroll for user messages unless explicitly disabled
|
|
89
|
+
const shouldAutoScroll = autoScroll !== undefined ? autoScroll : role === "user";
|
|
90
|
+
if (shouldAutoScroll && messageRef.current) {
|
|
91
|
+
// Small delay to ensure the message is fully rendered
|
|
92
|
+
const timeoutId = setTimeout(() => {
|
|
93
|
+
messageRef.current?.scrollIntoView({
|
|
94
|
+
behavior: "smooth",
|
|
95
|
+
block: "start",
|
|
96
|
+
inline: "nearest",
|
|
97
|
+
});
|
|
98
|
+
}, 50);
|
|
99
|
+
return () => clearTimeout(timeoutId);
|
|
100
|
+
}
|
|
101
|
+
return undefined;
|
|
102
|
+
}, [role, autoScroll]);
|
|
103
|
+
return (_jsx("article", { ref: messageRef, "aria-label": `${role} message`, "data-message-id": messageId, className: cn(messageVariants({ role, layout }), className), style: {
|
|
104
|
+
minHeight: minHeight !== undefined ? `${minHeight}px` : undefined,
|
|
105
|
+
}, ...props, children: children }));
|
|
32
106
|
});
|
|
33
107
|
Message.displayName = "Message";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../src/gui/components/Message.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAGrC;;;GAGG;AAEH,MAAM,eAAe,GAAG,GAAG,CACzB,qBAAqB,EACrB;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,IAAI,EAAE,8BAA8B;YACpC,SAAS,EAAE,oBAAoB;YAC/B,MAAM,EAAE,+BAA+B;SACxC;QACD,MAAM,EAAE;YACN,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,aAAa;SACvB;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,SAAS;KAClB;CACF,CACF,CAAC;AAqBF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CACrC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACpG,sDAAsD;IACtD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;IAEvD,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,SAAS,gBACF,GAAG,IAAI,UAAU,qBACZ,SAAS,EAC1B,SAAS,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,KACvD,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { DisplayMessage } from "./MessageList.js";
|
|
4
|
-
declare const messageContentVariants: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
declare const messageContentVariants: (
|
|
5
|
+
props?:
|
|
6
|
+
| ({
|
|
7
|
+
role?: "user" | "assistant" | "system" | null | undefined;
|
|
8
|
+
variant?: "default" | "outline" | "ghost" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp)
|
|
10
|
+
| undefined,
|
|
11
|
+
) => string;
|
|
12
|
+
export interface MessageContentProps
|
|
13
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, "children">,
|
|
14
|
+
VariantProps<typeof messageContentVariants> {
|
|
15
|
+
/** Message role - determines styling */
|
|
16
|
+
role?: "user" | "assistant" | "system";
|
|
17
|
+
/** Visual variant */
|
|
18
|
+
variant?: "default" | "outline" | "ghost";
|
|
19
|
+
/** Whether the message is currently streaming */
|
|
20
|
+
isStreaming?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Message object for smart rendering (optional)
|
|
23
|
+
* When provided, automatically renders thinking, waiting, and content
|
|
24
|
+
*/
|
|
25
|
+
message?: DisplayMessage;
|
|
26
|
+
/** Display style for thinking/reasoning blocks (when using smart rendering) */
|
|
27
|
+
thinkingDisplayStyle?: "collapsible" | "inline";
|
|
28
|
+
/** Custom content (overrides smart rendering) */
|
|
29
|
+
children?: React.ReactNode;
|
|
24
30
|
}
|
|
25
|
-
export declare const MessageContent: React.ForwardRefExoticComponent<
|
|
26
|
-
|
|
31
|
+
export declare const MessageContent: React.ForwardRefExoticComponent<
|
|
32
|
+
MessageContentProps & React.RefAttributes<HTMLDivElement>
|
|
33
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageContent.d.ts","sourceRoot":"","sources":["../../../src/gui/components/MessageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA6DvD,QAAA,MAAM,sBAAsB;;;8EAoB3B,CAAC;AAEF,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAC5D,YAAY,CAAC,OAAO,sBAAsB,CAAC;IAC7C,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEvC,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAE1C,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB,+EAA+E;IAC/E,oBAAoB,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC;IAEhD,iDAAiD;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,cAAc,4FA+E1B,CAAC"}
|
|
@@ -66,7 +66,7 @@ const messageContentVariants = cva("w-full px-4 py-3 rounded-xl text-[var(--font
|
|
|
66
66
|
variants: {
|
|
67
67
|
role: {
|
|
68
68
|
user: "bg-primary text-primary-foreground shadow-sm",
|
|
69
|
-
assistant: "
|
|
69
|
+
assistant: "text-foreground",
|
|
70
70
|
system: "bg-card border border-border text-foreground opacity-80 text-sm",
|
|
71
71
|
},
|
|
72
72
|
variant: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageContent.js","sourceRoot":"","sources":["../../../src/gui/components/MessageContent.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D;;;;GAIG;AAEH,+CAA+C;AAC/C,MAAM,cAAc,GAAG;IACrB,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU;IACxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW;IAChD,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa;IAC7D,MAAM,EAAE,YAAY,EAAE,UAAU;CACjC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KA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