@townco/ui 0.1.3 → 0.1.7
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/README.md +11 -11
- package/dist/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.js +55 -64
- package/dist/core/hooks/use-chat-messages.d.ts +11 -11
- package/dist/core/hooks/use-chat-messages.js +114 -121
- package/dist/core/hooks/use-chat-session.d.ts +5 -5
- package/dist/core/hooks/use-chat-session.js +80 -78
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/schemas/chat.d.ts +56 -83
- package/dist/core/schemas/chat.js +25 -27
- package/dist/core/store/chat-store.d.ts +22 -28
- package/dist/core/store/chat-store.js +50 -59
- package/dist/gui/components/Button.d.ts +7 -23
- package/dist/gui/components/Button.js +27 -40
- package/dist/gui/components/Card.d.ts +7 -26
- package/dist/gui/components/Card.js +8 -54
- package/dist/gui/components/ChatInput.d.ts +36 -58
- package/dist/gui/components/ChatInput.js +121 -191
- package/dist/gui/components/ChatSecondaryPanel.d.ts +11 -14
- package/dist/gui/components/ChatSecondaryPanel.js +38 -115
- package/dist/gui/components/ChatStatus.d.ts +2 -4
- package/dist/gui/components/ChatStatus.js +34 -45
- package/dist/gui/components/Conversation.d.ts +14 -17
- package/dist/gui/components/Conversation.js +83 -143
- package/dist/gui/components/Dialog.d.ts +11 -57
- package/dist/gui/components/Dialog.js +8 -84
- package/dist/gui/components/HeightTransition.d.ts +7 -12
- package/dist/gui/components/HeightTransition.js +77 -88
- package/dist/gui/components/Input.d.ts +6 -13
- package/dist/gui/components/Input.js +16 -27
- package/dist/gui/components/Label.d.ts +1 -7
- package/dist/gui/components/Label.js +2 -12
- package/dist/gui/components/MarkdownRenderer.d.ts +4 -6
- package/dist/gui/components/MarkdownRenderer.js +81 -178
- package/dist/gui/components/Message.d.ts +18 -25
- package/dist/gui/components/Message.js +23 -44
- package/dist/gui/components/MessageContent.d.ts +22 -29
- package/dist/gui/components/MessageContent.js +85 -157
- package/dist/gui/components/Reasoning.d.ts +24 -30
- package/dist/gui/components/Reasoning.js +60 -187
- package/dist/gui/components/Response.d.ts +9 -11
- package/dist/gui/components/Response.js +90 -229
- package/dist/gui/components/Select.d.ts +10 -69
- package/dist/gui/components/Select.js +12 -118
- package/dist/gui/components/Tabs.d.ts +4 -24
- package/dist/gui/components/Tabs.js +4 -32
- package/dist/gui/components/Task.d.ts +24 -28
- package/dist/gui/components/Task.js +31 -164
- package/dist/gui/components/Textarea.d.ts +7 -15
- package/dist/gui/components/Textarea.js +46 -63
- package/dist/gui/components/ThinkingBlock.d.ts +10 -20
- package/dist/gui/components/ThinkingBlock.js +35 -134
- package/dist/gui/components/TodoList.d.ts +10 -12
- package/dist/gui/components/TodoList.js +7 -22
- package/dist/gui/components/TodoListItem.d.ts +6 -9
- package/dist/gui/components/TodoListItem.js +4 -18
- package/dist/gui/components/index.d.ts +8 -59
- package/dist/gui/components/index.js +8 -42
- package/dist/gui/lib/utils.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.test.js +1 -0
- package/dist/sdk/client/acp-client.d.ts +76 -88
- package/dist/sdk/client/acp-client.js +217 -215
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/schemas/agent.d.ts +64 -111
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/message.d.ts +147 -245
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/session.d.ts +135 -219
- package/dist/sdk/schemas/session.js +27 -27
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.js +469 -472
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/stdio.js +286 -289
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.js +46 -52
- package/dist/tui/components/ChatView.d.ts +2 -4
- package/dist/tui/components/ChatView.js +18 -51
- package/dist/tui/components/GameOfLife.js +35 -64
- package/dist/tui/components/InputBox.d.ts +11 -18
- package/dist/tui/components/InputBox.js +10 -70
- package/dist/tui/components/MessageList.d.ts +2 -4
- package/dist/tui/components/MessageList.js +10 -37
- package/dist/tui/components/MultiSelect.d.ts +10 -15
- package/dist/tui/components/MultiSelect.js +73 -116
- package/dist/tui/components/ReadlineInput.d.ts +6 -12
- package/dist/tui/components/ReadlineInput.js +237 -252
- package/dist/tui/components/SingleSelect.d.ts +9 -15
- package/dist/tui/components/SingleSelect.js +43 -84
- package/dist/tui/components/StatusBar.d.ts +6 -11
- package/dist/tui/components/StatusBar.js +67 -102
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +2 -2
- package/dist/core/hooks/index.d.ts.map +0 -1
- package/dist/core/hooks/index.js.map +0 -1
- package/dist/core/hooks/use-chat-input.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-input.js.map +0 -1
- package/dist/core/hooks/use-chat-messages.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-messages.js.map +0 -1
- package/dist/core/hooks/use-chat-session.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-session.js.map +0 -1
- package/dist/core/hooks/use-media-query.d.ts +0 -39
- package/dist/core/hooks/use-media-query.js +0 -80
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/schemas/chat.d.ts.map +0 -1
- package/dist/core/schemas/chat.js.map +0 -1
- package/dist/core/schemas/index.d.ts.map +0 -1
- package/dist/core/schemas/index.js.map +0 -1
- package/dist/core/store/chat-store.d.ts.map +0 -1
- package/dist/core/store/chat-store.js.map +0 -1
- package/dist/gui/components/Button.d.ts.map +0 -1
- package/dist/gui/components/Button.js.map +0 -1
- package/dist/gui/components/Card.d.ts.map +0 -1
- package/dist/gui/components/Card.js.map +0 -1
- package/dist/gui/components/ChatHeader.d.ts +0 -65
- package/dist/gui/components/ChatHeader.js +0 -189
- package/dist/gui/components/ChatInput.d.ts.map +0 -1
- package/dist/gui/components/ChatInput.js.map +0 -1
- package/dist/gui/components/ChatInterface.d.ts +0 -12
- package/dist/gui/components/ChatInterface.d.ts.map +0 -1
- package/dist/gui/components/ChatInterface.js +0 -204
- package/dist/gui/components/ChatInterface.js.map +0 -1
- package/dist/gui/components/ChatLayout.d.ts +0 -82
- package/dist/gui/components/ChatLayout.js +0 -232
- package/dist/gui/components/ChatPanelTabContent.d.ts +0 -27
- package/dist/gui/components/ChatPanelTabContent.js +0 -93
- package/dist/gui/components/ChatPreview.d.ts +0 -12
- package/dist/gui/components/ChatPreview.d.ts.map +0 -1
- package/dist/gui/components/ChatPreview.js +0 -214
- package/dist/gui/components/ChatPreview.js.map +0 -1
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +0 -1
- package/dist/gui/components/ChatSecondaryPanel.js.map +0 -1
- package/dist/gui/components/ChatSidebar.d.ts +0 -27
- package/dist/gui/components/ChatSidebar.js +0 -57
- package/dist/gui/components/ChatStatus.d.ts.map +0 -1
- package/dist/gui/components/ChatStatus.js.map +0 -1
- package/dist/gui/components/ChatView.d.ts +0 -8
- package/dist/gui/components/ChatView.d.ts.map +0 -1
- package/dist/gui/components/ChatView.js +0 -42
- package/dist/gui/components/ChatView.js.map +0 -1
- package/dist/gui/components/ConfigPanel.d.ts +0 -20
- package/dist/gui/components/ConfigPanel.d.ts.map +0 -1
- package/dist/gui/components/ConfigPanel.js +0 -225
- package/dist/gui/components/ConfigPanel.js.map +0 -1
- package/dist/gui/components/Conversation.d.ts.map +0 -1
- package/dist/gui/components/Conversation.js.map +0 -1
- package/dist/gui/components/Dialog.d.ts.map +0 -1
- package/dist/gui/components/Dialog.js.map +0 -1
- package/dist/gui/components/DropdownMenu.d.ts +0 -108
- package/dist/gui/components/DropdownMenu.js +0 -215
- package/dist/gui/components/HeightTransition.d.ts.map +0 -1
- package/dist/gui/components/HeightTransition.js.map +0 -1
- package/dist/gui/components/Input.d.ts.map +0 -1
- package/dist/gui/components/Input.js.map +0 -1
- package/dist/gui/components/InputBox.d.ts +0 -21
- package/dist/gui/components/InputBox.d.ts.map +0 -1
- package/dist/gui/components/InputBox.js +0 -90
- package/dist/gui/components/InputBox.js.map +0 -1
- package/dist/gui/components/Label.d.ts.map +0 -1
- package/dist/gui/components/Label.js.map +0 -1
- package/dist/gui/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/gui/components/MarkdownRenderer.js.map +0 -1
- package/dist/gui/components/Message.d.ts.map +0 -1
- package/dist/gui/components/Message.js.map +0 -1
- package/dist/gui/components/MessageContent.d.ts.map +0 -1
- package/dist/gui/components/MessageContent.js.map +0 -1
- package/dist/gui/components/MessageList.d.ts.map +0 -1
- package/dist/gui/components/MessageList.js.map +0 -1
- package/dist/gui/components/PlaygroundLayout.d.ts +0 -14
- package/dist/gui/components/PlaygroundLayout.d.ts.map +0 -1
- package/dist/gui/components/PlaygroundLayout.js +0 -49
- package/dist/gui/components/PlaygroundLayout.js.map +0 -1
- package/dist/gui/components/Reasoning.d.ts.map +0 -1
- package/dist/gui/components/Reasoning.js.map +0 -1
- package/dist/gui/components/Response.d.ts.map +0 -1
- package/dist/gui/components/Response.js.map +0 -1
- package/dist/gui/components/Select.d.ts.map +0 -1
- package/dist/gui/components/Select.js.map +0 -1
- package/dist/gui/components/Sonner.d.ts +0 -7
- package/dist/gui/components/Sonner.js +0 -34
- package/dist/gui/components/StatusBar.d.ts +0 -12
- package/dist/gui/components/StatusBar.d.ts.map +0 -1
- package/dist/gui/components/StatusBar.js +0 -58
- package/dist/gui/components/StatusBar.js.map +0 -1
- package/dist/gui/components/Tabs.d.ts.map +0 -1
- package/dist/gui/components/Tabs.js.map +0 -1
- package/dist/gui/components/Task.d.ts.map +0 -1
- package/dist/gui/components/Task.js.map +0 -1
- package/dist/gui/components/Textarea.d.ts.map +0 -1
- package/dist/gui/components/Textarea.js.map +0 -1
- package/dist/gui/components/ThinkingBlock.d.ts.map +0 -1
- package/dist/gui/components/ThinkingBlock.js.map +0 -1
- package/dist/gui/components/TodoList.d.ts.map +0 -1
- package/dist/gui/components/TodoList.js.map +0 -1
- package/dist/gui/components/TodoListItem.d.ts.map +0 -1
- package/dist/gui/components/TodoListItem.js.map +0 -1
- package/dist/gui/components/index.d.ts.map +0 -1
- package/dist/gui/components/index.js.map +0 -1
- package/dist/gui/index.d.ts.map +0 -1
- package/dist/gui/index.js.map +0 -1
- package/dist/gui/lib/utils.d.ts.map +0 -1
- package/dist/gui/lib/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/sdk/client/acp-client.d.ts.map +0 -1
- package/dist/sdk/client/acp-client.js.map +0 -1
- package/dist/sdk/client/index.d.ts.map +0 -1
- package/dist/sdk/client/index.js.map +0 -1
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/schemas/agent.d.ts.map +0 -1
- package/dist/sdk/schemas/agent.js.map +0 -1
- package/dist/sdk/schemas/index.d.ts.map +0 -1
- package/dist/sdk/schemas/index.js.map +0 -1
- package/dist/sdk/schemas/message.d.ts.map +0 -1
- package/dist/sdk/schemas/message.js.map +0 -1
- package/dist/sdk/schemas/session.d.ts.map +0 -1
- package/dist/sdk/schemas/session.js.map +0 -1
- package/dist/sdk/transports/http.d.ts.map +0 -1
- package/dist/sdk/transports/http.js.map +0 -1
- package/dist/sdk/transports/index.d.ts.map +0 -1
- package/dist/sdk/transports/index.js.map +0 -1
- package/dist/sdk/transports/stdio.d.ts.map +0 -1
- package/dist/sdk/transports/stdio.js.map +0 -1
- package/dist/sdk/transports/types.d.ts.map +0 -1
- package/dist/sdk/transports/types.js.map +0 -1
- package/dist/sdk/transports/websocket.d.ts.map +0 -1
- package/dist/sdk/transports/websocket.js.map +0 -1
- package/dist/tui/components/ChatView.d.ts.map +0 -1
- package/dist/tui/components/ChatView.js.map +0 -1
- package/dist/tui/components/GameOfLife.d.ts.map +0 -1
- package/dist/tui/components/GameOfLife.js.map +0 -1
- package/dist/tui/components/InputBox.d.ts.map +0 -1
- package/dist/tui/components/InputBox.js.map +0 -1
- package/dist/tui/components/MessageList.d.ts.map +0 -1
- package/dist/tui/components/MessageList.js.map +0 -1
- package/dist/tui/components/ReadlineInput.d.ts.map +0 -1
- package/dist/tui/components/ReadlineInput.js.map +0 -1
- package/dist/tui/components/StatusBar.d.ts.map +0 -1
- package/dist/tui/components/StatusBar.js.map +0 -1
- package/dist/tui/components/index.d.ts.map +0 -1
- package/dist/tui/components/index.js.map +0 -1
- package/dist/tui/index.d.ts.map +0 -1
- package/dist/tui/index.js.map +0 -1
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import { ArrowDown } from "lucide-react";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { cn } from "../lib/utils.js";
|
|
5
|
-
import { Toaster } from "./Sonner.js";
|
|
6
|
-
|
|
7
|
-
const ChatLayoutContext = React.createContext(undefined);
|
|
8
|
-
const useChatLayoutContext = () => {
|
|
9
|
-
const context = React.useContext(ChatLayoutContext);
|
|
10
|
-
if (!context) {
|
|
11
|
-
throw new Error(
|
|
12
|
-
"ChatLayout components must be used within ChatLayout.Root",
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
return context;
|
|
16
|
-
};
|
|
17
|
-
const ChatLayoutRoot = React.forwardRef(
|
|
18
|
-
(
|
|
19
|
-
{
|
|
20
|
-
defaultSidebarOpen = false,
|
|
21
|
-
defaultPanelSize = "hidden",
|
|
22
|
-
defaultActiveTab = "todo",
|
|
23
|
-
className,
|
|
24
|
-
children,
|
|
25
|
-
...props
|
|
26
|
-
},
|
|
27
|
-
ref,
|
|
28
|
-
) => {
|
|
29
|
-
const [sidebarOpen, setSidebarOpen] = React.useState(defaultSidebarOpen);
|
|
30
|
-
const [panelSize, setPanelSize] = React.useState(defaultPanelSize);
|
|
31
|
-
const [activeTab, setActiveTab] = React.useState(defaultActiveTab);
|
|
32
|
-
return _jsx(ChatLayoutContext.Provider, {
|
|
33
|
-
value: {
|
|
34
|
-
sidebarOpen,
|
|
35
|
-
setSidebarOpen,
|
|
36
|
-
panelSize,
|
|
37
|
-
setPanelSize,
|
|
38
|
-
activeTab,
|
|
39
|
-
setActiveTab,
|
|
40
|
-
},
|
|
41
|
-
children: _jsx("div", {
|
|
42
|
-
ref: ref,
|
|
43
|
-
className: cn(
|
|
44
|
-
"flex h-screen flex-row bg-background text-foreground",
|
|
45
|
-
className,
|
|
46
|
-
),
|
|
47
|
-
...props,
|
|
48
|
-
children: children,
|
|
49
|
-
}),
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
);
|
|
53
|
-
ChatLayoutRoot.displayName = "ChatLayout.Root";
|
|
54
|
-
const ChatLayoutHeader = React.forwardRef(
|
|
55
|
-
({ className, children, ...props }, ref) => {
|
|
56
|
-
return _jsx("div", {
|
|
57
|
-
ref: ref,
|
|
58
|
-
className: cn(
|
|
59
|
-
"relative z-10 border-b border-border bg-card shrink-0",
|
|
60
|
-
className,
|
|
61
|
-
),
|
|
62
|
-
...props,
|
|
63
|
-
children: children,
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
);
|
|
67
|
-
ChatLayoutHeader.displayName = "ChatLayout.Header";
|
|
68
|
-
const ChatLayoutMain = React.forwardRef(
|
|
69
|
-
({ className, children, ...props }, ref) => {
|
|
70
|
-
return _jsx("div", {
|
|
71
|
-
ref: ref,
|
|
72
|
-
className: cn("flex flex-1 flex-col overflow-hidden", className),
|
|
73
|
-
...props,
|
|
74
|
-
children: children,
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
);
|
|
78
|
-
ChatLayoutMain.displayName = "ChatLayout.Main";
|
|
79
|
-
const ChatLayoutBody = React.forwardRef(
|
|
80
|
-
({ showToaster = true, className, children, ...props }, ref) => {
|
|
81
|
-
return _jsxs("div", {
|
|
82
|
-
ref: ref,
|
|
83
|
-
className: cn("relative flex flex-1 flex-col overflow-hidden", className),
|
|
84
|
-
...props,
|
|
85
|
-
children: [children, showToaster && _jsx(Toaster, {})],
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
);
|
|
89
|
-
ChatLayoutBody.displayName = "ChatLayout.Body";
|
|
90
|
-
const ChatLayoutMessages = React.forwardRef(
|
|
91
|
-
(
|
|
92
|
-
{
|
|
93
|
-
className,
|
|
94
|
-
children,
|
|
95
|
-
onScrollChange,
|
|
96
|
-
showScrollToBottom = true,
|
|
97
|
-
...props
|
|
98
|
-
},
|
|
99
|
-
ref,
|
|
100
|
-
) => {
|
|
101
|
-
const [showScrollButton, setShowScrollButton] = React.useState(false);
|
|
102
|
-
const scrollContainerRef = React.useRef(null);
|
|
103
|
-
// Merge refs
|
|
104
|
-
React.useImperativeHandle(ref, () => scrollContainerRef.current);
|
|
105
|
-
// Check if user is at bottom of scroll
|
|
106
|
-
const checkScrollPosition = React.useCallback(() => {
|
|
107
|
-
const container = scrollContainerRef.current;
|
|
108
|
-
if (!container) return;
|
|
109
|
-
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
110
|
-
const distanceFromBottom = scrollHeight - scrollTop - clientHeight;
|
|
111
|
-
const isAtBottom = distanceFromBottom < 100; // 100px threshold
|
|
112
|
-
setShowScrollButton(!isAtBottom && showScrollToBottom);
|
|
113
|
-
onScrollChange?.(isAtBottom);
|
|
114
|
-
}, [onScrollChange, showScrollToBottom]);
|
|
115
|
-
// Handle scroll events
|
|
116
|
-
const handleScroll = React.useCallback(() => {
|
|
117
|
-
checkScrollPosition();
|
|
118
|
-
}, [checkScrollPosition]);
|
|
119
|
-
// Scroll to bottom function
|
|
120
|
-
const scrollToBottom = React.useCallback(() => {
|
|
121
|
-
const container = scrollContainerRef.current;
|
|
122
|
-
if (!container) return;
|
|
123
|
-
container.scrollTo({
|
|
124
|
-
top: container.scrollHeight,
|
|
125
|
-
behavior: "smooth",
|
|
126
|
-
});
|
|
127
|
-
}, []);
|
|
128
|
-
// Check scroll position on mount and when children change
|
|
129
|
-
React.useEffect(() => {
|
|
130
|
-
checkScrollPosition();
|
|
131
|
-
}, [checkScrollPosition]);
|
|
132
|
-
return _jsxs("div", {
|
|
133
|
-
className: "relative flex-1 overflow-hidden",
|
|
134
|
-
children: [
|
|
135
|
-
_jsx("div", {
|
|
136
|
-
ref: scrollContainerRef,
|
|
137
|
-
className: cn("h-full overflow-y-auto", className),
|
|
138
|
-
onScroll: handleScroll,
|
|
139
|
-
...props,
|
|
140
|
-
children: children,
|
|
141
|
-
}),
|
|
142
|
-
showScrollButton &&
|
|
143
|
-
_jsx("button", {
|
|
144
|
-
type: "button",
|
|
145
|
-
onClick: scrollToBottom,
|
|
146
|
-
className: cn(
|
|
147
|
-
"absolute bottom-4 left-1/2 -translate-x-1/2 z-10",
|
|
148
|
-
"flex items-center justify-center p-2 rounded-full",
|
|
149
|
-
"bg-card border border-border shadow-lg",
|
|
150
|
-
"text-foreground",
|
|
151
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
152
|
-
"transition-all duration-200 ease-in-out",
|
|
153
|
-
"animate-in fade-in slide-in-from-bottom-2",
|
|
154
|
-
),
|
|
155
|
-
"aria-label": "Scroll to bottom",
|
|
156
|
-
children: _jsx(ArrowDown, { className: "h-4 w-4" }),
|
|
157
|
-
}),
|
|
158
|
-
],
|
|
159
|
-
});
|
|
160
|
-
},
|
|
161
|
-
);
|
|
162
|
-
ChatLayoutMessages.displayName = "ChatLayout.Messages";
|
|
163
|
-
const ChatLayoutFooter = React.forwardRef(
|
|
164
|
-
({ className, children, ...props }, ref) => {
|
|
165
|
-
return _jsx("div", {
|
|
166
|
-
ref: ref,
|
|
167
|
-
className: cn(
|
|
168
|
-
"bg-linear-to-t from-background to-transparent px-4 pb-4",
|
|
169
|
-
className,
|
|
170
|
-
),
|
|
171
|
-
...props,
|
|
172
|
-
children: children,
|
|
173
|
-
});
|
|
174
|
-
},
|
|
175
|
-
);
|
|
176
|
-
ChatLayoutFooter.displayName = "ChatLayout.Footer";
|
|
177
|
-
const ChatLayoutSidebar = React.forwardRef(
|
|
178
|
-
({ className, children, ...props }, ref) => {
|
|
179
|
-
const { sidebarOpen } = useChatLayoutContext();
|
|
180
|
-
if (!sidebarOpen) return null;
|
|
181
|
-
return _jsx("div", {
|
|
182
|
-
ref: ref,
|
|
183
|
-
className: cn(
|
|
184
|
-
"border-r border-border bg-card w-64 overflow-y-auto",
|
|
185
|
-
className,
|
|
186
|
-
),
|
|
187
|
-
...props,
|
|
188
|
-
children: children,
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
);
|
|
192
|
-
ChatLayoutSidebar.displayName = "ChatLayout.Sidebar";
|
|
193
|
-
const ChatLayoutAside = React.forwardRef(
|
|
194
|
-
({ breakpoint = "lg", className, children, ...props }, ref) => {
|
|
195
|
-
const { panelSize } = useChatLayoutContext();
|
|
196
|
-
// Hidden state - don't render
|
|
197
|
-
if (panelSize === "hidden") return null;
|
|
198
|
-
return _jsx("div", {
|
|
199
|
-
ref: ref,
|
|
200
|
-
className: cn(
|
|
201
|
-
// Hidden by default, visible at breakpoint
|
|
202
|
-
"hidden border-l border-border bg-card overflow-y-auto transition-all duration-300",
|
|
203
|
-
// Breakpoint visibility
|
|
204
|
-
breakpoint === "md" && "md:block",
|
|
205
|
-
breakpoint === "lg" && "lg:block",
|
|
206
|
-
breakpoint === "xl" && "xl:block",
|
|
207
|
-
breakpoint === "2xl" && "2xl:block",
|
|
208
|
-
// Size variants
|
|
209
|
-
panelSize === "small" && "w-80",
|
|
210
|
-
panelSize === "large" && "w-[32rem]",
|
|
211
|
-
className,
|
|
212
|
-
),
|
|
213
|
-
...props,
|
|
214
|
-
children: children,
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
);
|
|
218
|
-
ChatLayoutAside.displayName = "ChatLayout.Aside";
|
|
219
|
-
/* -------------------------------------------------------------------------------------------------
|
|
220
|
-
* Exports
|
|
221
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
222
|
-
export {
|
|
223
|
-
ChatLayoutRoot as Root,
|
|
224
|
-
ChatLayoutHeader as Header,
|
|
225
|
-
ChatLayoutMain as Main,
|
|
226
|
-
ChatLayoutBody as Body,
|
|
227
|
-
ChatLayoutMessages as Messages,
|
|
228
|
-
ChatLayoutFooter as Footer,
|
|
229
|
-
ChatLayoutSidebar as Sidebar,
|
|
230
|
-
ChatLayoutAside as Aside,
|
|
231
|
-
useChatLayoutContext,
|
|
232
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { TodoItem } from "./TodoListItem.js";
|
|
3
|
-
/**
|
|
4
|
-
* Shared tab content components for both mobile (ChatHeader) and desktop (Panel) views
|
|
5
|
-
* Following component architecture best practices
|
|
6
|
-
*/
|
|
7
|
-
export interface TodoTabContentProps
|
|
8
|
-
extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
-
todos: TodoItem[];
|
|
10
|
-
}
|
|
11
|
-
export declare const TodoTabContent: React.ForwardRefExoticComponent<
|
|
12
|
-
TodoTabContentProps & React.RefAttributes<HTMLDivElement>
|
|
13
|
-
>;
|
|
14
|
-
export interface FilesTabContentProps
|
|
15
|
-
extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
-
files?: string[];
|
|
17
|
-
}
|
|
18
|
-
export declare const FilesTabContent: React.ForwardRefExoticComponent<
|
|
19
|
-
FilesTabContentProps & React.RefAttributes<HTMLDivElement>
|
|
20
|
-
>;
|
|
21
|
-
export interface DatabaseTabContentProps
|
|
22
|
-
extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
-
data?: unknown;
|
|
24
|
-
}
|
|
25
|
-
export declare const DatabaseTabContent: React.ForwardRefExoticComponent<
|
|
26
|
-
DatabaseTabContentProps & React.RefAttributes<HTMLDivElement>
|
|
27
|
-
>;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../lib/utils.js";
|
|
4
|
-
export const TodoTabContent = React.forwardRef(
|
|
5
|
-
({ todos, className, ...props }, ref) => {
|
|
6
|
-
return _jsxs("div", {
|
|
7
|
-
ref: ref,
|
|
8
|
-
className: cn("space-y-4", className),
|
|
9
|
-
...props,
|
|
10
|
-
children: [
|
|
11
|
-
_jsx("h3", { className: "font-semibold text-lg", children: "Tasks" }),
|
|
12
|
-
_jsx("div", {
|
|
13
|
-
className: "space-y-2",
|
|
14
|
-
children:
|
|
15
|
-
todos.length === 0
|
|
16
|
-
? _jsx("p", {
|
|
17
|
-
className: "text-sm text-muted-foreground",
|
|
18
|
-
children: "No tasks yet",
|
|
19
|
-
})
|
|
20
|
-
: todos.map((todo) =>
|
|
21
|
-
_jsx(
|
|
22
|
-
"div",
|
|
23
|
-
{ className: "text-sm", children: todo.text },
|
|
24
|
-
todo.id,
|
|
25
|
-
),
|
|
26
|
-
),
|
|
27
|
-
}),
|
|
28
|
-
],
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
);
|
|
32
|
-
TodoTabContent.displayName = "TodoTabContent";
|
|
33
|
-
export const FilesTabContent = React.forwardRef(
|
|
34
|
-
({ files = [], className, ...props }, ref) => {
|
|
35
|
-
return _jsxs("div", {
|
|
36
|
-
ref: ref,
|
|
37
|
-
className: cn("space-y-4", className),
|
|
38
|
-
...props,
|
|
39
|
-
children: [
|
|
40
|
-
_jsx("h3", { className: "font-semibold text-lg", children: "Files" }),
|
|
41
|
-
files.length === 0
|
|
42
|
-
? _jsx("p", {
|
|
43
|
-
className: "text-sm text-muted-foreground",
|
|
44
|
-
children: "No files attached",
|
|
45
|
-
})
|
|
46
|
-
: _jsx("div", {
|
|
47
|
-
className: "space-y-2",
|
|
48
|
-
children: files.map((file) =>
|
|
49
|
-
_jsx("div", { className: "text-sm", children: file }, file),
|
|
50
|
-
),
|
|
51
|
-
}),
|
|
52
|
-
],
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
);
|
|
56
|
-
FilesTabContent.displayName = "FilesTabContent";
|
|
57
|
-
export const DatabaseTabContent = React.forwardRef(
|
|
58
|
-
({ data, className, ...props }, ref) => {
|
|
59
|
-
return _jsxs("div", {
|
|
60
|
-
ref: ref,
|
|
61
|
-
className: cn("space-y-4", className),
|
|
62
|
-
...props,
|
|
63
|
-
children: [
|
|
64
|
-
_jsx("h3", {
|
|
65
|
-
className: "font-semibold text-lg",
|
|
66
|
-
children: "Database",
|
|
67
|
-
}),
|
|
68
|
-
_jsxs("div", {
|
|
69
|
-
className: "text-sm text-muted-foreground",
|
|
70
|
-
children: [
|
|
71
|
-
_jsx("p", {
|
|
72
|
-
children:
|
|
73
|
-
"Database viewer - panel automatically expanded to large size",
|
|
74
|
-
}),
|
|
75
|
-
_jsxs("div", {
|
|
76
|
-
className: "mt-4 p-4 border border-border rounded",
|
|
77
|
-
children: [
|
|
78
|
-
_jsx("p", { children: "Your large data table would go here" }),
|
|
79
|
-
data && typeof data === "object"
|
|
80
|
-
? _jsx("pre", {
|
|
81
|
-
className: "mt-2 text-xs overflow-auto",
|
|
82
|
-
children: JSON.stringify(data, null, 2),
|
|
83
|
-
})
|
|
84
|
-
: null,
|
|
85
|
-
],
|
|
86
|
-
}),
|
|
87
|
-
],
|
|
88
|
-
}),
|
|
89
|
-
],
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
);
|
|
93
|
-
DatabaseTabContent.displayName = "DatabaseTabContent";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ThemeConfig } from "./ConfigPanel.js";
|
|
2
|
-
interface ChatPreviewProps {
|
|
3
|
-
config: ThemeConfig;
|
|
4
|
-
status: string;
|
|
5
|
-
iframeSrc?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function ChatPreview({
|
|
8
|
-
config,
|
|
9
|
-
status,
|
|
10
|
-
iframeSrc,
|
|
11
|
-
}: ChatPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=ChatPreview.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatPreview.d.ts","sourceRoot":"","sources":["../../../src/gui/components/ChatPreview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,UAAU,gBAAgB;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,MAAM,EACN,SAA8B,GAC/B,EAAE,gBAAgB,2CA2OlB"}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
export function ChatPreview({
|
|
4
|
-
config,
|
|
5
|
-
status,
|
|
6
|
-
iframeSrc = "/chat-standalone",
|
|
7
|
-
}) {
|
|
8
|
-
const iframeRef = useRef(null);
|
|
9
|
-
const containerRef = useRef(null);
|
|
10
|
-
const [dimensions, setDimensions] = useState({
|
|
11
|
-
width: 800,
|
|
12
|
-
height: 600,
|
|
13
|
-
});
|
|
14
|
-
const [isResizing, setIsResizing] = useState({
|
|
15
|
-
horizontal: false,
|
|
16
|
-
vertical: false,
|
|
17
|
-
});
|
|
18
|
-
const resizeStartRef = useRef({ x: 0, y: 0, width: 0, height: 0 });
|
|
19
|
-
const isResizingRef = useRef({
|
|
20
|
-
horizontal: false,
|
|
21
|
-
vertical: false,
|
|
22
|
-
});
|
|
23
|
-
const resizeHandlersRef = useRef({
|
|
24
|
-
mouseMove: null,
|
|
25
|
-
mouseUp: null,
|
|
26
|
-
mouseLeave: null,
|
|
27
|
-
});
|
|
28
|
-
const sendConfigToIframe = (configToSend) => {
|
|
29
|
-
const iframe = iframeRef.current;
|
|
30
|
-
if (iframe?.contentWindow) {
|
|
31
|
-
iframe.contentWindow.postMessage(
|
|
32
|
-
{
|
|
33
|
-
type: "CONFIG_UPDATE",
|
|
34
|
-
config: configToSend,
|
|
35
|
-
},
|
|
36
|
-
"*",
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
const sendStatusToIframe = (statusToSend) => {
|
|
41
|
-
const iframe = iframeRef.current;
|
|
42
|
-
if (iframe?.contentWindow) {
|
|
43
|
-
iframe.contentWindow.postMessage(
|
|
44
|
-
{
|
|
45
|
-
type: "STATUS_UPDATE",
|
|
46
|
-
status: statusToSend,
|
|
47
|
-
},
|
|
48
|
-
"*",
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
const iframe = iframeRef.current;
|
|
54
|
-
if (!iframe) return;
|
|
55
|
-
const handleMessage = (event) => {
|
|
56
|
-
if (event.data && event.data.type === "REQUEST_CONFIG") {
|
|
57
|
-
sendConfigToIframe(config);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
window.addEventListener("message", handleMessage);
|
|
61
|
-
// Send initial config and status when iframe loads
|
|
62
|
-
const handleLoad = () => {
|
|
63
|
-
sendConfigToIframe(config);
|
|
64
|
-
sendStatusToIframe(status);
|
|
65
|
-
};
|
|
66
|
-
iframe.addEventListener("load", handleLoad);
|
|
67
|
-
return () => {
|
|
68
|
-
window.removeEventListener("message", handleMessage);
|
|
69
|
-
iframe.removeEventListener("load", handleLoad);
|
|
70
|
-
};
|
|
71
|
-
}, [config, status]);
|
|
72
|
-
// Update iframe when config changes (after initial load)
|
|
73
|
-
useEffect(() => {
|
|
74
|
-
const iframe = iframeRef.current;
|
|
75
|
-
// Only send if iframe is already loaded
|
|
76
|
-
if (
|
|
77
|
-
iframe?.contentWindow &&
|
|
78
|
-
iframe.contentDocument?.readyState === "complete"
|
|
79
|
-
) {
|
|
80
|
-
sendConfigToIframe(config);
|
|
81
|
-
}
|
|
82
|
-
}, [config]);
|
|
83
|
-
// Update iframe when status changes (after initial load)
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
const iframe = iframeRef.current;
|
|
86
|
-
// Only send if iframe is already loaded
|
|
87
|
-
if (
|
|
88
|
-
iframe?.contentWindow &&
|
|
89
|
-
iframe.contentDocument?.readyState === "complete"
|
|
90
|
-
) {
|
|
91
|
-
sendStatusToIframe(status);
|
|
92
|
-
}
|
|
93
|
-
}, [status]);
|
|
94
|
-
// Sync ref with state for UI updates
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
isResizingRef.current = isResizing;
|
|
97
|
-
}, [isResizing]);
|
|
98
|
-
// Cleanup on unmount
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
return () => {
|
|
101
|
-
stopResizing();
|
|
102
|
-
};
|
|
103
|
-
}, []);
|
|
104
|
-
const stopResizing = () => {
|
|
105
|
-
const handlers = resizeHandlersRef.current;
|
|
106
|
-
if (handlers.mouseMove) {
|
|
107
|
-
window.removeEventListener("mousemove", handlers.mouseMove);
|
|
108
|
-
}
|
|
109
|
-
if (handlers.mouseUp) {
|
|
110
|
-
window.removeEventListener("mouseup", handlers.mouseUp, true);
|
|
111
|
-
}
|
|
112
|
-
if (handlers.mouseLeave) {
|
|
113
|
-
document.removeEventListener("mouseleave", handlers.mouseLeave);
|
|
114
|
-
}
|
|
115
|
-
setIsResizing({ horizontal: false, vertical: false });
|
|
116
|
-
isResizingRef.current = { horizontal: false, vertical: false };
|
|
117
|
-
resizeHandlersRef.current = {
|
|
118
|
-
mouseMove: null,
|
|
119
|
-
mouseUp: null,
|
|
120
|
-
mouseLeave: null,
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
const handleResizeStart = (direction, e) => {
|
|
124
|
-
e.preventDefault();
|
|
125
|
-
e.stopPropagation();
|
|
126
|
-
// Clean up any existing listeners first
|
|
127
|
-
stopResizing();
|
|
128
|
-
const resizeState =
|
|
129
|
-
direction === "horizontal"
|
|
130
|
-
? { horizontal: true, vertical: false }
|
|
131
|
-
: { horizontal: false, vertical: true };
|
|
132
|
-
setIsResizing(resizeState);
|
|
133
|
-
isResizingRef.current = resizeState;
|
|
134
|
-
resizeStartRef.current = {
|
|
135
|
-
x: e.clientX,
|
|
136
|
-
y: e.clientY,
|
|
137
|
-
width: dimensions.width,
|
|
138
|
-
height: dimensions.height,
|
|
139
|
-
};
|
|
140
|
-
const handleMouseMove = (e) => {
|
|
141
|
-
if (
|
|
142
|
-
!isResizingRef.current.horizontal &&
|
|
143
|
-
!isResizingRef.current.vertical
|
|
144
|
-
) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
const deltaX = e.clientX - resizeStartRef.current.x;
|
|
148
|
-
const deltaY = e.clientY - resizeStartRef.current.y;
|
|
149
|
-
let newWidth = resizeStartRef.current.width;
|
|
150
|
-
let newHeight = resizeStartRef.current.height;
|
|
151
|
-
if (isResizingRef.current.horizontal) {
|
|
152
|
-
newWidth = Math.max(
|
|
153
|
-
400,
|
|
154
|
-
Math.min(1200, resizeStartRef.current.width + deltaX),
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
if (isResizingRef.current.vertical) {
|
|
158
|
-
newHeight = Math.max(
|
|
159
|
-
300,
|
|
160
|
-
Math.min(900, resizeStartRef.current.height + deltaY),
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
setDimensions({ width: newWidth, height: newHeight });
|
|
164
|
-
};
|
|
165
|
-
const handleMouseUp = (e) => {
|
|
166
|
-
e.preventDefault();
|
|
167
|
-
e.stopPropagation();
|
|
168
|
-
stopResizing();
|
|
169
|
-
};
|
|
170
|
-
const handleMouseLeave = () => {
|
|
171
|
-
// If mouse leaves window during resize, stop resizing
|
|
172
|
-
stopResizing();
|
|
173
|
-
};
|
|
174
|
-
// Store handlers for cleanup
|
|
175
|
-
resizeHandlersRef.current = {
|
|
176
|
-
mouseMove: handleMouseMove,
|
|
177
|
-
mouseUp: handleMouseUp,
|
|
178
|
-
mouseLeave: handleMouseLeave,
|
|
179
|
-
};
|
|
180
|
-
// Use capture phase to ensure we catch events even if they bubble
|
|
181
|
-
window.addEventListener("mousemove", handleMouseMove);
|
|
182
|
-
window.addEventListener("mouseup", handleMouseUp, { capture: true });
|
|
183
|
-
document.addEventListener("mouseleave", handleMouseLeave);
|
|
184
|
-
};
|
|
185
|
-
return _jsxs("div", {
|
|
186
|
-
ref: containerRef,
|
|
187
|
-
className:
|
|
188
|
-
"relative rounded-xl overflow-visible bg-[var(--color-surface)] shadow-lg min-w-[400px] min-h-[300px]",
|
|
189
|
-
style: {
|
|
190
|
-
width: `${dimensions.width}px`,
|
|
191
|
-
height: `${dimensions.height}px`,
|
|
192
|
-
},
|
|
193
|
-
children: [
|
|
194
|
-
_jsx("iframe", {
|
|
195
|
-
ref: iframeRef,
|
|
196
|
-
src: iframeSrc,
|
|
197
|
-
className:
|
|
198
|
-
"w-full h-full rounded-xl border-1 border-[var(--color-border)] block",
|
|
199
|
-
title: "Chat Preview",
|
|
200
|
-
}),
|
|
201
|
-
_jsx("div", {
|
|
202
|
-
className:
|
|
203
|
-
"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",
|
|
204
|
-
onMouseDown: (e) => handleResizeStart("horizontal", e),
|
|
205
|
-
}),
|
|
206
|
-
_jsx("div", {
|
|
207
|
-
className:
|
|
208
|
-
"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",
|
|
209
|
-
onMouseDown: (e) => handleResizeStart("vertical", e),
|
|
210
|
-
}),
|
|
211
|
-
],
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
//# sourceMappingURL=ChatPreview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatPreview.js","sourceRoot":"","sources":["../../../src/gui/components/ChatPreview.t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-
declare const ChatSidebarRoot: React.ForwardRefExoticComponent<
|
|
5
|
-
ChatSidebarRootProps & React.RefAttributes<HTMLDivElement>
|
|
6
|
-
>;
|
|
7
|
-
export interface ChatSidebarHeaderProps
|
|
8
|
-
extends React.HTMLAttributes<HTMLDivElement> {}
|
|
9
|
-
declare const ChatSidebarHeader: React.ForwardRefExoticComponent<
|
|
10
|
-
ChatSidebarHeaderProps & React.RefAttributes<HTMLDivElement>
|
|
11
|
-
>;
|
|
12
|
-
export interface ChatSidebarContentProps
|
|
13
|
-
extends React.HTMLAttributes<HTMLDivElement> {}
|
|
14
|
-
declare const ChatSidebarContent: React.ForwardRefExoticComponent<
|
|
15
|
-
ChatSidebarContentProps & React.RefAttributes<HTMLDivElement>
|
|
16
|
-
>;
|
|
17
|
-
export interface ChatSidebarFooterProps
|
|
18
|
-
extends React.HTMLAttributes<HTMLDivElement> {}
|
|
19
|
-
declare const ChatSidebarFooter: React.ForwardRefExoticComponent<
|
|
20
|
-
ChatSidebarFooterProps & React.RefAttributes<HTMLDivElement>
|
|
21
|
-
>;
|
|
22
|
-
export {
|
|
23
|
-
ChatSidebarRoot as Root,
|
|
24
|
-
ChatSidebarHeader as Header,
|
|
25
|
-
ChatSidebarContent as Content,
|
|
26
|
-
ChatSidebarFooter as Footer,
|
|
27
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
const ChatSidebarRoot = React.forwardRef(
|
|
6
|
-
({ className, children, ...props }, ref) => {
|
|
7
|
-
return _jsx("div", {
|
|
8
|
-
ref: ref,
|
|
9
|
-
className: cn("flex h-full flex-col", className),
|
|
10
|
-
...props,
|
|
11
|
-
children: children,
|
|
12
|
-
});
|
|
13
|
-
},
|
|
14
|
-
);
|
|
15
|
-
ChatSidebarRoot.displayName = "ChatSidebar.Root";
|
|
16
|
-
const ChatSidebarHeader = React.forwardRef(
|
|
17
|
-
({ className, children, ...props }, ref) => {
|
|
18
|
-
return _jsx("div", {
|
|
19
|
-
ref: ref,
|
|
20
|
-
className: cn("border-b border-border px-4 py-3", className),
|
|
21
|
-
...props,
|
|
22
|
-
children: children,
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
ChatSidebarHeader.displayName = "ChatSidebar.Header";
|
|
27
|
-
const ChatSidebarContent = React.forwardRef(
|
|
28
|
-
({ className, children, ...props }, ref) => {
|
|
29
|
-
return _jsx("div", {
|
|
30
|
-
ref: ref,
|
|
31
|
-
className: cn("flex-1 overflow-y-auto p-4", className),
|
|
32
|
-
...props,
|
|
33
|
-
children: children,
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
ChatSidebarContent.displayName = "ChatSidebar.Content";
|
|
38
|
-
const ChatSidebarFooter = React.forwardRef(
|
|
39
|
-
({ className, children, ...props }, ref) => {
|
|
40
|
-
return _jsx("div", {
|
|
41
|
-
ref: ref,
|
|
42
|
-
className: cn("border-t border-border px-4 py-3", className),
|
|
43
|
-
...props,
|
|
44
|
-
children: children,
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
);
|
|
48
|
-
ChatSidebarFooter.displayName = "ChatSidebar.Footer";
|
|
49
|
-
/* -------------------------------------------------------------------------------------------------
|
|
50
|
-
* Exports
|
|
51
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
52
|
-
export {
|
|
53
|
-
ChatSidebarRoot as Root,
|
|
54
|
-
ChatSidebarHeader as Header,
|
|
55
|
-
ChatSidebarContent as Content,
|
|
56
|
-
ChatSidebarFooter as Footer,
|
|
57
|
-
};
|