@arcadeai/design-system 3.35.2 → 3.36.2
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/assets/icons/claude-code-logotype.js +10 -0
- package/dist/assets/icons/cursor-logotype.js +10 -0
- package/dist/assets/icons/langchain-logotype.js +10 -0
- package/dist/assets/icons/mastra-logotype.js +10 -0
- package/dist/assets/icons/vercel-logotype.js +10 -0
- package/dist/components/index.js +631 -600
- package/dist/components/ui/atoms/arcade-gradient.d.ts +4 -0
- package/dist/components/ui/atoms/arcade-gradient.d.ts.map +1 -0
- package/dist/components/ui/atoms/arcade-gradient.js +26 -0
- package/dist/components/ui/atoms/brand-chip.d.ts +9 -0
- package/dist/components/ui/atoms/brand-chip.d.ts.map +1 -0
- package/dist/components/ui/atoms/brand-chip.js +19 -0
- package/dist/components/ui/atoms/code-block.d.ts.map +1 -1
- package/dist/components/ui/atoms/code-block.js +31 -723
- package/dist/components/ui/atoms/icons/claude-code-logotype.d.ts +4 -0
- package/dist/components/ui/atoms/icons/claude-code-logotype.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/claude-code-logotype.js +34 -0
- package/dist/components/ui/atoms/icons/cursor-logotype.d.ts +4 -0
- package/dist/components/ui/atoms/icons/cursor-logotype.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/cursor-logotype.js +21 -0
- package/dist/components/ui/atoms/icons/index.d.ts +5 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +278 -268
- package/dist/components/ui/atoms/icons/langchain-logotype.d.ts +4 -0
- package/dist/components/ui/atoms/icons/langchain-logotype.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/langchain-logotype.js +45 -0
- package/dist/components/ui/atoms/icons/mastra-logotype.d.ts +4 -0
- package/dist/components/ui/atoms/icons/mastra-logotype.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/mastra-logotype.js +19 -0
- package/dist/components/ui/atoms/icons/vercel-logotype.d.ts +4 -0
- package/dist/components/ui/atoms/icons/vercel-logotype.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/vercel-logotype.js +26 -0
- package/dist/components/ui/atoms/icons/vercel.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/vercel.js +0 -1
- package/dist/components/ui/atoms/index.d.ts +2 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +530 -516
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +16 -16
- package/dist/components/ui/index.js +631 -600
- package/dist/components/ui/molecules/chat-history-item.d.ts +21 -0
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -0
- package/dist/components/ui/molecules/chat-history-item.js +88 -0
- package/dist/components/ui/molecules/chat-message-list.d.ts +6 -0
- package/dist/components/ui/molecules/chat-message-list.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-message-list.js +117 -61
- package/dist/components/ui/molecules/command-bar.d.ts +7 -0
- package/dist/components/ui/molecules/command-bar.d.ts.map +1 -0
- package/dist/components/ui/molecules/command-bar.js +38 -0
- package/dist/components/ui/molecules/confirm-popover.d.ts +20 -0
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -0
- package/dist/components/ui/molecules/confirm-popover.js +50 -0
- package/dist/components/ui/molecules/empty-state.d.ts +2 -1
- package/dist/components/ui/molecules/empty-state.d.ts.map +1 -1
- package/dist/components/ui/molecules/empty-state.js +9 -7
- package/dist/components/ui/molecules/error-state.d.ts +17 -0
- package/dist/components/ui/molecules/error-state.d.ts.map +1 -0
- package/dist/components/ui/molecules/error-state.js +45 -0
- package/dist/components/ui/molecules/index.d.ts +9 -4
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +51 -49
- package/dist/components/ui/molecules/requirement-badges.js +4 -5
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/pages/chat-page-skeleton.d.ts +7 -0
- package/dist/components/ui/pages/chat-page-skeleton.d.ts.map +1 -0
- package/dist/components/ui/pages/chat-page-skeleton.js +18 -0
- package/dist/components/ui/pages/index.d.ts +2 -2
- package/dist/components/ui/pages/index.d.ts.map +1 -1
- package/dist/components/ui/pages/index.js +4 -4
- package/dist/components/ui/templates/chat-template-skeletons.d.ts +12 -0
- package/dist/components/ui/templates/chat-template-skeletons.d.ts.map +1 -0
- package/dist/components/ui/templates/chat-template-skeletons.js +127 -0
- package/dist/components/ui/templates/error-template.d.ts +20 -0
- package/dist/components/ui/templates/error-template.d.ts.map +1 -0
- package/dist/components/ui/templates/error-template.js +117 -0
- package/dist/components/ui/templates/index.d.ts +4 -0
- package/dist/components/ui/templates/index.d.ts.map +1 -1
- package/dist/components/ui/templates/index.js +37 -22
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +12 -11
- package/dist/lib/shiki-themes.d.ts +5 -0
- package/dist/lib/shiki-themes.d.ts.map +1 -0
- package/dist/lib/shiki-themes.js +7 -0
- package/dist/main.js +656 -625
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +187 -186
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/{toolkit-card-B97E7TBA.js → toolkit-card-CB1oiaei.js} +2 -3
- package/dist/web-BwFNdl01.js +697 -0
- package/package.json +3 -2
- package/dist/components/ui/molecules/switcher.d.ts +0 -83
- package/dist/components/ui/molecules/switcher.d.ts.map +0 -1
- package/dist/components/ui/molecules/switcher.js +0 -164
- package/dist/components/ui/pages/chat-page.d.ts +0 -83
- package/dist/components/ui/pages/chat-page.d.ts.map +0 -1
- package/dist/components/ui/pages/chat-page.js +0 -385
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { PlusIcon as X, SquareIcon as Y, ArrowUpIcon as Z, SquarePenIcon as L, LogOutIcon as ee, ChevronsUpDownIcon as re, Trash2Icon as G } from "lucide-react";
|
|
3
|
-
import { useState as w, useRef as te } from "react";
|
|
4
|
-
import { Button as o } from "../atoms/button.js";
|
|
5
|
-
import { ChatContainerRoot as ne, ChatContainerContent as ae, ChatContainerScrollAnchor as ie } from "../atoms/chat-container.js";
|
|
6
|
-
import { DropdownMenuItem as le, DropdownMenu as oe, DropdownMenuTrigger as ce, DropdownMenuContent as se, DropdownMenuRadioGroup as de, DropdownMenuRadioItem as he } from "../atoms/dropdown-menu.js";
|
|
7
|
-
import { ArcadeLogo as me } from "../atoms/icons/arcade-logo.js";
|
|
8
|
-
import { Loader as pe } from "../atoms/loader.js";
|
|
9
|
-
import { Popover as B, PopoverTrigger as R, PopoverContent as U } from "../atoms/popover.js";
|
|
10
|
-
import { ScrollButton as ue } from "../atoms/scroll-button.js";
|
|
11
|
-
import { SidebarTrigger as fe, SidebarProvider as ve, Sidebar as ge, SidebarHeader as Ce, SidebarContent as Ne, SidebarGroup as P, SidebarGroupLabel as H, SidebarGroupContent as _, SidebarMenu as xe, SidebarFooter as be, SidebarInset as Se, SidebarMenuItem as Te, SidebarMenuButton as we, SidebarMenuAction as j } from "../atoms/sidebar.js";
|
|
12
|
-
import { Tooltip as C, TooltipTrigger as N, TooltipContent as x } from "../atoms/tooltip.js";
|
|
13
|
-
import { ChatMessageList as ke } from "../molecules/chat-message-list.js";
|
|
14
|
-
import { PromptInput as ye, PromptInputTextarea as ze, PromptInputActions as Ie, PromptInputAction as Oe } from "../molecules/prompt-input.js";
|
|
15
|
-
import { SuggestionCard as De } from "../molecules/suggestion-card.js";
|
|
16
|
-
import { UserNav as Me } from "../molecules/user-nav.js";
|
|
17
|
-
import { ChatTemplate as Pe, ChatTemplateHeader as He, ChatTemplateHeaderGroup as A, ChatTemplateOverview as _e, ChatTemplateOverviewTitle as je, ChatTemplateOverviewSubtitle as Ae, ChatTemplateFooter as Ge, ChatTemplateSuggestions as Be } from "../templates/chat-template.js";
|
|
18
|
-
import { cn as q } from "../../../lib/utils.js";
|
|
19
|
-
function Re() {
|
|
20
|
-
return /* @__PURE__ */ e(me, { className: "h-5 w-auto text-foreground" });
|
|
21
|
-
}
|
|
22
|
-
function Ue(t, a) {
|
|
23
|
-
if (t.onClick)
|
|
24
|
-
return t.onClick;
|
|
25
|
-
if (!(t.action && a))
|
|
26
|
-
return;
|
|
27
|
-
const n = t.action;
|
|
28
|
-
return () => a(n);
|
|
29
|
-
}
|
|
30
|
-
function qe({
|
|
31
|
-
models: t,
|
|
32
|
-
selectedModelId: a,
|
|
33
|
-
onModelChange: n
|
|
34
|
-
}) {
|
|
35
|
-
return !t || t.length === 0 ? null : /* @__PURE__ */ r(oe, { children: [
|
|
36
|
-
/* @__PURE__ */ e(ce, { asChild: !0, children: /* @__PURE__ */ r(o, { className: "h-[34px] gap-1 px-2", variant: "outline", children: [
|
|
37
|
-
t.find((i) => i.id === a)?.name ?? "Select model",
|
|
38
|
-
/* @__PURE__ */ e(re, { className: "size-3" })
|
|
39
|
-
] }) }),
|
|
40
|
-
/* @__PURE__ */ e(se, { align: "start", className: "min-w-[300px]", children: /* @__PURE__ */ e(
|
|
41
|
-
de,
|
|
42
|
-
{
|
|
43
|
-
onValueChange: n,
|
|
44
|
-
value: a,
|
|
45
|
-
children: t.map((i) => /* @__PURE__ */ e(he, { value: i.id, children: /* @__PURE__ */ r("div", { className: "flex flex-col items-start gap-1", children: [
|
|
46
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children: i.name }),
|
|
47
|
-
i.description && /* @__PURE__ */ e("div", { className: "text-muted-foreground text-xs", children: i.description })
|
|
48
|
-
] }) }, i.id))
|
|
49
|
-
}
|
|
50
|
-
) })
|
|
51
|
-
] });
|
|
52
|
-
}
|
|
53
|
-
function Fe({ onDeleteAll: t }) {
|
|
54
|
-
const [a, n] = w(!1);
|
|
55
|
-
return /* @__PURE__ */ r(B, { onOpenChange: n, open: a, children: [
|
|
56
|
-
/* @__PURE__ */ r(C, { children: [
|
|
57
|
-
/* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ e(R, { asChild: !0, children: /* @__PURE__ */ e(
|
|
58
|
-
o,
|
|
59
|
-
{
|
|
60
|
-
"aria-label": "Delete all chats",
|
|
61
|
-
className: "size-8 text-muted-foreground",
|
|
62
|
-
size: "icon",
|
|
63
|
-
variant: "ghost",
|
|
64
|
-
children: /* @__PURE__ */ e(G, { className: "size-4" })
|
|
65
|
-
}
|
|
66
|
-
) }) }),
|
|
67
|
-
/* @__PURE__ */ e(x, { side: "bottom", children: "Delete all chats" })
|
|
68
|
-
] }),
|
|
69
|
-
/* @__PURE__ */ r(U, { className: "w-auto max-w-64 space-y-3 p-4", side: "bottom", children: [
|
|
70
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-sm", children: "Delete all chats?" }),
|
|
71
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground text-xs", children: "This action cannot be undone." }),
|
|
72
|
-
/* @__PURE__ */ r("div", { className: "flex justify-end gap-2", children: [
|
|
73
|
-
/* @__PURE__ */ e(o, { onClick: () => n(!1), size: "sm", variant: "outline", children: "Cancel" }),
|
|
74
|
-
/* @__PURE__ */ e(
|
|
75
|
-
o,
|
|
76
|
-
{
|
|
77
|
-
onClick: () => {
|
|
78
|
-
t(), n(!1);
|
|
79
|
-
},
|
|
80
|
-
size: "sm",
|
|
81
|
-
variant: "destructive",
|
|
82
|
-
children: "Delete all"
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] })
|
|
86
|
-
] })
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
function We({
|
|
90
|
-
title: t,
|
|
91
|
-
isActive: a,
|
|
92
|
-
isStreaming: n = !1,
|
|
93
|
-
onSelect: i,
|
|
94
|
-
onDelete: h
|
|
95
|
-
}) {
|
|
96
|
-
const [b, u] = w(!1), [f, m] = w(!1), s = te(null);
|
|
97
|
-
return /* @__PURE__ */ r(Te, { children: [
|
|
98
|
-
/* @__PURE__ */ r(C, { onOpenChange: (l) => {
|
|
99
|
-
if (!l) {
|
|
100
|
-
u(!1);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
s.current && s.current.scrollWidth > s.current.offsetWidth && u(!0);
|
|
104
|
-
}, open: b, children: [
|
|
105
|
-
/* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ e(
|
|
106
|
-
we,
|
|
107
|
-
{
|
|
108
|
-
className: q(
|
|
109
|
-
"py-2.5 group-hover/menu-item:bg-sidebar-accent group-hover/menu-item:text-sidebar-accent-foreground",
|
|
110
|
-
(h || n) && "pr-8"
|
|
111
|
-
),
|
|
112
|
-
isActive: a,
|
|
113
|
-
onClick: i,
|
|
114
|
-
children: /* @__PURE__ */ e("span", { className: "truncate", ref: s, children: t })
|
|
115
|
-
}
|
|
116
|
-
) }),
|
|
117
|
-
/* @__PURE__ */ e(x, { side: "right", children: t })
|
|
118
|
-
] }),
|
|
119
|
-
n ? /* @__PURE__ */ e(
|
|
120
|
-
j,
|
|
121
|
-
{
|
|
122
|
-
"aria-hidden": "true",
|
|
123
|
-
className: "pointer-events-none",
|
|
124
|
-
tabIndex: -1,
|
|
125
|
-
children: /* @__PURE__ */ e(
|
|
126
|
-
pe,
|
|
127
|
-
{
|
|
128
|
-
className: "border-sidebar-foreground/25 border-t-sidebar-foreground",
|
|
129
|
-
size: "sm",
|
|
130
|
-
variant: "circular"
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
) : h && /* @__PURE__ */ r(B, { onOpenChange: m, open: f, children: [
|
|
135
|
-
/* @__PURE__ */ e(R, { asChild: !0, children: /* @__PURE__ */ e(
|
|
136
|
-
j,
|
|
137
|
-
{
|
|
138
|
-
"aria-label": `Delete "${t}"`,
|
|
139
|
-
className: "hover:bg-secondary hover:text-secondary-foreground",
|
|
140
|
-
showOnHover: !0,
|
|
141
|
-
children: /* @__PURE__ */ e(G, { className: "size-3.5" })
|
|
142
|
-
}
|
|
143
|
-
) }),
|
|
144
|
-
/* @__PURE__ */ r(
|
|
145
|
-
U,
|
|
146
|
-
{
|
|
147
|
-
className: "w-auto max-w-64 space-y-3 p-4",
|
|
148
|
-
side: "right",
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-sm", children: "Delete this chat?" }),
|
|
151
|
-
/* @__PURE__ */ e("p", { className: "text-muted-foreground text-xs", children: "This action cannot be undone." }),
|
|
152
|
-
/* @__PURE__ */ r("div", { className: "flex justify-end gap-2", children: [
|
|
153
|
-
/* @__PURE__ */ e(
|
|
154
|
-
o,
|
|
155
|
-
{
|
|
156
|
-
onClick: () => m(!1),
|
|
157
|
-
size: "sm",
|
|
158
|
-
variant: "outline",
|
|
159
|
-
children: "Cancel"
|
|
160
|
-
}
|
|
161
|
-
),
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
o,
|
|
164
|
-
{
|
|
165
|
-
onClick: () => {
|
|
166
|
-
h(), m(!1);
|
|
167
|
-
},
|
|
168
|
-
size: "sm",
|
|
169
|
-
variant: "destructive",
|
|
170
|
-
children: "Delete"
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
] })
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
)
|
|
177
|
-
] })
|
|
178
|
-
] });
|
|
179
|
-
}
|
|
180
|
-
function cr({
|
|
181
|
-
user: t,
|
|
182
|
-
logo: a,
|
|
183
|
-
suggestedActions: n,
|
|
184
|
-
onSuggestionAction: i,
|
|
185
|
-
models: h,
|
|
186
|
-
selectedModelId: b,
|
|
187
|
-
onModelChange: u,
|
|
188
|
-
inputValue: f,
|
|
189
|
-
onInputChange: m,
|
|
190
|
-
inputDisabled: s = !1,
|
|
191
|
-
onSubmit: S,
|
|
192
|
-
isLoading: l = !1,
|
|
193
|
-
onStop: F,
|
|
194
|
-
onNewChat: v,
|
|
195
|
-
onDeleteAll: k,
|
|
196
|
-
onSignOut: y,
|
|
197
|
-
chatHistoryGroups: W,
|
|
198
|
-
onSelectChat: z,
|
|
199
|
-
onDeleteChat: I,
|
|
200
|
-
defaultSidebarOpen: V = !0,
|
|
201
|
-
showSidebar: O = !0,
|
|
202
|
-
messages: p,
|
|
203
|
-
renderMessage: $,
|
|
204
|
-
loadingIndicator: E,
|
|
205
|
-
children: D,
|
|
206
|
-
scrollKey: J
|
|
207
|
-
}) {
|
|
208
|
-
const K = !!D || p !== void 0 && p.length > 0, Q = t?.name ?? "there", T = W ?? [], M = /* @__PURE__ */ r(Pe, { children: [
|
|
209
|
-
/* @__PURE__ */ r(He, { children: [
|
|
210
|
-
/* @__PURE__ */ r(A, { children: [
|
|
211
|
-
O && /* @__PURE__ */ r(C, { children: [
|
|
212
|
-
/* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ e(fe, {}) }),
|
|
213
|
-
/* @__PURE__ */ e(x, { side: "bottom", children: "Toggle sidebar" })
|
|
214
|
-
] }),
|
|
215
|
-
/* @__PURE__ */ e(
|
|
216
|
-
qe,
|
|
217
|
-
{
|
|
218
|
-
models: h,
|
|
219
|
-
onModelChange: u,
|
|
220
|
-
selectedModelId: b
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
] }),
|
|
224
|
-
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
225
|
-
/* @__PURE__ */ e(A, { children: v && /* @__PURE__ */ r(C, { children: [
|
|
226
|
-
/* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ r(
|
|
227
|
-
o,
|
|
228
|
-
{
|
|
229
|
-
"aria-label": "New chat",
|
|
230
|
-
className: "h-9 gap-1 px-2 text-foreground",
|
|
231
|
-
onClick: v,
|
|
232
|
-
variant: "outline",
|
|
233
|
-
children: [
|
|
234
|
-
/* @__PURE__ */ e(X, { className: "size-4" }),
|
|
235
|
-
/* @__PURE__ */ e("span", { className: "md:sr-only", children: "New Chat" })
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
) }),
|
|
239
|
-
/* @__PURE__ */ e(x, { children: "New chat" })
|
|
240
|
-
] }) })
|
|
241
|
-
] }),
|
|
242
|
-
/* @__PURE__ */ r(
|
|
243
|
-
ne,
|
|
244
|
-
{
|
|
245
|
-
className: "relative min-w-0 flex-1 flex-col pt-4",
|
|
246
|
-
children: [
|
|
247
|
-
/* @__PURE__ */ r(ae, { className: "gap-6 pb-4", children: [
|
|
248
|
-
D || (p && p.length > 0 ? /* @__PURE__ */ e(
|
|
249
|
-
ke,
|
|
250
|
-
{
|
|
251
|
-
isStreaming: l,
|
|
252
|
-
loadingIndicator: E,
|
|
253
|
-
messages: p,
|
|
254
|
-
renderMessage: $
|
|
255
|
-
}
|
|
256
|
-
) : /* @__PURE__ */ r(_e, { children: [
|
|
257
|
-
/* @__PURE__ */ r(je, { children: [
|
|
258
|
-
"Hi, ",
|
|
259
|
-
/* @__PURE__ */ e("span", { className: "text-primary/80", children: Q })
|
|
260
|
-
] }),
|
|
261
|
-
/* @__PURE__ */ e(Ae, { children: "How can I help you today?" })
|
|
262
|
-
] })),
|
|
263
|
-
/* @__PURE__ */ e(ie, {})
|
|
264
|
-
] }),
|
|
265
|
-
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-0 bottom-0 left-0 z-10 h-10 bg-linear-to-t from-10% from-background to-transparent" }),
|
|
266
|
-
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-0 bottom-4 left-0 z-20 flex justify-center px-4", children: /* @__PURE__ */ e("div", { className: "flex w-full max-w-3xl justify-end pr-4", children: /* @__PURE__ */ e(ue, { className: "pointer-events-auto shadow-md" }) }) })
|
|
267
|
-
]
|
|
268
|
-
},
|
|
269
|
-
J
|
|
270
|
-
),
|
|
271
|
-
/* @__PURE__ */ r(Ge, { children: [
|
|
272
|
-
!K && n && n.length > 0 && /* @__PURE__ */ e(Be, { children: n.map((c, g) => /* @__PURE__ */ e(
|
|
273
|
-
"div",
|
|
274
|
-
{
|
|
275
|
-
className: q(
|
|
276
|
-
"col-span-12 sm:col-span-6",
|
|
277
|
-
g < 3 ? "md:col-span-4" : "md:col-span-6",
|
|
278
|
-
g > 1 && "hidden sm:block"
|
|
279
|
-
),
|
|
280
|
-
children: /* @__PURE__ */ e(
|
|
281
|
-
De,
|
|
282
|
-
{
|
|
283
|
-
icon: c.icon,
|
|
284
|
-
onClick: Ue(
|
|
285
|
-
c,
|
|
286
|
-
i
|
|
287
|
-
),
|
|
288
|
-
subtitle: c.subtitle,
|
|
289
|
-
title: c.title
|
|
290
|
-
}
|
|
291
|
-
)
|
|
292
|
-
},
|
|
293
|
-
c.id
|
|
294
|
-
)) }),
|
|
295
|
-
/* @__PURE__ */ r(
|
|
296
|
-
ye,
|
|
297
|
-
{
|
|
298
|
-
disabled: s,
|
|
299
|
-
isLoading: l,
|
|
300
|
-
onSubmit: S,
|
|
301
|
-
onValueChange: m,
|
|
302
|
-
value: f,
|
|
303
|
-
children: [
|
|
304
|
-
/* @__PURE__ */ e(ze, { placeholder: "Send a message..." }),
|
|
305
|
-
/* @__PURE__ */ e(Ie, { className: "justify-end px-2 pb-2", children: /* @__PURE__ */ e(
|
|
306
|
-
Oe,
|
|
307
|
-
{
|
|
308
|
-
tooltip: l ? "Stop generating" : "Send message",
|
|
309
|
-
children: /* @__PURE__ */ e(
|
|
310
|
-
o,
|
|
311
|
-
{
|
|
312
|
-
"aria-label": l ? "Stop generating" : "Send message",
|
|
313
|
-
disabled: s || !(l || f?.trim()),
|
|
314
|
-
onClick: l ? F : S,
|
|
315
|
-
size: "icon",
|
|
316
|
-
variant: l ? "destructive" : "default",
|
|
317
|
-
children: l ? /* @__PURE__ */ e(Y, { className: "size-4 fill-current" }) : /* @__PURE__ */ e(Z, { className: "size-4" })
|
|
318
|
-
}
|
|
319
|
-
)
|
|
320
|
-
}
|
|
321
|
-
) })
|
|
322
|
-
]
|
|
323
|
-
}
|
|
324
|
-
)
|
|
325
|
-
] })
|
|
326
|
-
] });
|
|
327
|
-
return O ? /* @__PURE__ */ r(ve, { defaultOpen: V, children: [
|
|
328
|
-
/* @__PURE__ */ r(ge, { className: "[--sidebar-accent-foreground:oklch(0.205_0_0)] [--sidebar-accent:oklch(0.95_0_0)] group-data-[side=left]:border-r-0 dark:[--sidebar-accent-foreground:oklch(0.985_0_0)] dark:[--sidebar-accent:oklch(0.269_0_0)]", children: [
|
|
329
|
-
/* @__PURE__ */ r(Ce, { className: "gap-6 pb-2", children: [
|
|
330
|
-
/* @__PURE__ */ r("div", { className: "flex items-center px-2 pt-2", children: [
|
|
331
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: a ?? /* @__PURE__ */ e(Re, {}) }),
|
|
332
|
-
k && T.length > 0 && /* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ e(Fe, { onDeleteAll: k }) })
|
|
333
|
-
] }),
|
|
334
|
-
v && /* @__PURE__ */ r(
|
|
335
|
-
o,
|
|
336
|
-
{
|
|
337
|
-
className: "w-full gap-2 text-foreground",
|
|
338
|
-
onClick: v,
|
|
339
|
-
variant: "outline",
|
|
340
|
-
children: [
|
|
341
|
-
/* @__PURE__ */ e(L, { className: "size-4" }),
|
|
342
|
-
"New Chat"
|
|
343
|
-
]
|
|
344
|
-
}
|
|
345
|
-
)
|
|
346
|
-
] }),
|
|
347
|
-
/* @__PURE__ */ r(Ne, { children: [
|
|
348
|
-
T.length === 0 && /* @__PURE__ */ r(P, { className: "px-2", children: [
|
|
349
|
-
/* @__PURE__ */ e(H, { children: "History" }),
|
|
350
|
-
/* @__PURE__ */ e(_, { children: /* @__PURE__ */ e("p", { className: "px-2 py-2 text-muted-foreground text-xs", children: "No chats yet. Start a conversation!" }) })
|
|
351
|
-
] }),
|
|
352
|
-
T.map(({ label: c, items: g }) => /* @__PURE__ */ r(P, { children: [
|
|
353
|
-
/* @__PURE__ */ e(H, { children: c }),
|
|
354
|
-
/* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(xe, { children: g.map((d) => /* @__PURE__ */ e(
|
|
355
|
-
We,
|
|
356
|
-
{
|
|
357
|
-
isActive: d.isActive,
|
|
358
|
-
isStreaming: l && d.isActive,
|
|
359
|
-
onDelete: I ? () => I(d.id) : void 0,
|
|
360
|
-
onSelect: z ? () => z(d.id) : void 0,
|
|
361
|
-
title: d.title
|
|
362
|
-
},
|
|
363
|
-
d.id
|
|
364
|
-
)) }) })
|
|
365
|
-
] }, c))
|
|
366
|
-
] }),
|
|
367
|
-
/* @__PURE__ */ e(be, { children: /* @__PURE__ */ e(
|
|
368
|
-
Me,
|
|
369
|
-
{
|
|
370
|
-
avatarUrl: t?.avatarUrl,
|
|
371
|
-
email: t?.email,
|
|
372
|
-
name: t?.name,
|
|
373
|
-
children: y && /* @__PURE__ */ r(le, { onClick: y, children: [
|
|
374
|
-
/* @__PURE__ */ e(ee, { className: "size-4" }),
|
|
375
|
-
"Sign out"
|
|
376
|
-
] })
|
|
377
|
-
}
|
|
378
|
-
) })
|
|
379
|
-
] }),
|
|
380
|
-
/* @__PURE__ */ e(Se, { children: M })
|
|
381
|
-
] }) : M;
|
|
382
|
-
}
|
|
383
|
-
export {
|
|
384
|
-
cr as ChatPage
|
|
385
|
-
};
|