@aigentyc/chat-sdk 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +24 -1
- package/claude-skill/aigentyc-chat-sdk/SKILL.md +1 -1
- package/context7.json +1 -1
- package/dist/{ChatInterface-f8ftS56n.d.ts → ChatInterface-2MN5cpYB.d.ts} +1 -1
- package/dist/{ChatInterface-B0zbA3Lm.d.cts → ChatInterface-BnVyOUG5.d.cts} +1 -1
- package/dist/{SlotsContext-BjiX1mRx.d.ts → SlotsContext-BZBi51ZT.d.ts} +89 -4
- package/dist/{SlotsContext-CEOBjzfh.d.cts → SlotsContext-D_C7zlUA.d.cts} +89 -4
- package/dist/ai-elements.cjs +163 -566
- package/dist/ai-elements.cjs.map +1 -1
- package/dist/ai-elements.d.cts +10 -2
- package/dist/ai-elements.d.ts +10 -2
- package/dist/ai-elements.js +16 -461
- package/dist/ai-elements.js.map +1 -1
- package/dist/{chunk-M4YRNNGB.js → chunk-3H4CX3MS.js} +29 -6
- package/dist/chunk-3H4CX3MS.js.map +1 -0
- package/dist/{chunk-BPV66QNM.cjs → chunk-52ZHMTAA.cjs} +30 -8
- package/dist/chunk-52ZHMTAA.cjs.map +1 -0
- package/dist/{chunk-B27JIQ4Z.js → chunk-5XF3NEFB.js} +576 -6
- package/dist/chunk-5XF3NEFB.js.map +1 -0
- package/dist/{chunk-5XF7KH6B.cjs → chunk-7ESWDFF5.cjs} +94 -60
- package/dist/chunk-7ESWDFF5.cjs.map +1 -0
- package/dist/{chunk-YG2COKFR.js → chunk-BWWN5LSE.js} +65 -31
- package/dist/chunk-BWWN5LSE.js.map +1 -0
- package/dist/chunk-BYTPAQ7F.js +70 -0
- package/dist/chunk-BYTPAQ7F.js.map +1 -0
- package/dist/{chunk-FPQ3UCCJ.js → chunk-D75TDRBH.js} +30 -8
- package/dist/chunk-D75TDRBH.js.map +1 -0
- package/dist/chunk-DDATCJ3O.cjs +75 -0
- package/dist/chunk-DDATCJ3O.cjs.map +1 -0
- package/dist/{chunk-NYQSM3EB.cjs → chunk-DVWX2UGY.cjs} +16 -2
- package/dist/chunk-DVWX2UGY.cjs.map +1 -0
- package/dist/{chunk-TZ7EM3EG.cjs → chunk-EMVZ7HWM.cjs} +44 -2
- package/dist/chunk-EMVZ7HWM.cjs.map +1 -0
- package/dist/{chunk-AD6XWKWB.js → chunk-FJZL33KP.js} +3 -3
- package/dist/{chunk-AD6XWKWB.js.map → chunk-FJZL33KP.js.map} +1 -1
- package/dist/{chunk-JHWSG5IB.js → chunk-JAOD6CNW.js} +38 -3
- package/dist/chunk-JAOD6CNW.js.map +1 -0
- package/dist/{chunk-4WOBNRRB.cjs → chunk-KTYYLZN7.cjs} +592 -8
- package/dist/chunk-KTYYLZN7.cjs.map +1 -0
- package/dist/{chunk-3HGOLNGG.cjs → chunk-NBZDBH4M.cjs} +29 -6
- package/dist/chunk-NBZDBH4M.cjs.map +1 -0
- package/dist/{chunk-5F3O3ZJH.js → chunk-P7UR37HP.js} +17 -4
- package/dist/chunk-P7UR37HP.js.map +1 -0
- package/dist/{chunk-7IFBPXT3.cjs → chunk-Q3UJEIBN.cjs} +6 -6
- package/dist/{chunk-7IFBPXT3.cjs.map → chunk-Q3UJEIBN.cjs.map} +1 -1
- package/dist/{chunk-3KSMOHNY.js → chunk-R3TYC66R.js} +46 -81
- package/dist/chunk-R3TYC66R.js.map +1 -0
- package/dist/{chunk-OU5OZKYH.cjs → chunk-Y4B45DW4.cjs} +48 -90
- package/dist/chunk-Y4B45DW4.cjs.map +1 -0
- package/dist/components.cjs +18 -18
- package/dist/components.d.cts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +7 -7
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/hooks.cjs +31 -10
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +4 -3
- package/dist/hooks.js.map +1 -1
- package/dist/i18n.d.cts +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/index.cjs +64 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +23 -11
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +34 -11
- package/dist/styles.css +1 -1
- package/dist/theme.d.cts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/tools.cjs +5 -5
- package/dist/tools.d.cts +2 -2
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +2 -2
- package/dist/{types-DlNwk-bG.d.ts → types-bsR_-fq8.d.cts} +43 -2
- package/dist/{types-DlNwk-bG.d.cts → types-bsR_-fq8.d.ts} +43 -2
- package/dist/ui.cjs +52 -52
- package/dist/ui.js +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/chunk-3HGOLNGG.cjs.map +0 -1
- package/dist/chunk-3KSMOHNY.js.map +0 -1
- package/dist/chunk-4WOBNRRB.cjs.map +0 -1
- package/dist/chunk-5F3O3ZJH.js.map +0 -1
- package/dist/chunk-5XF7KH6B.cjs.map +0 -1
- package/dist/chunk-B27JIQ4Z.js.map +0 -1
- package/dist/chunk-BPV66QNM.cjs.map +0 -1
- package/dist/chunk-FPQ3UCCJ.js.map +0 -1
- package/dist/chunk-JHWSG5IB.js.map +0 -1
- package/dist/chunk-M4YRNNGB.js.map +0 -1
- package/dist/chunk-NYQSM3EB.cjs.map +0 -1
- package/dist/chunk-OU5OZKYH.cjs.map +0 -1
- package/dist/chunk-TZ7EM3EG.cjs.map +0 -1
- package/dist/chunk-YG2COKFR.js.map +0 -1
package/dist/ai-elements.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkDDATCJ3O_cjs = require('./chunk-DDATCJ3O.cjs');
|
|
5
|
+
var chunkKTYYLZN7_cjs = require('./chunk-KTYYLZN7.cjs');
|
|
5
6
|
require('./chunk-X7R334SB.cjs');
|
|
6
7
|
require('./chunk-3MP2EGEJ.cjs');
|
|
7
8
|
var chunkJOO6C3XT_cjs = require('./chunk-JOO6C3XT.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
9
|
+
var chunkY4B45DW4_cjs = require('./chunk-Y4B45DW4.cjs');
|
|
10
|
+
var chunkEMVZ7HWM_cjs = require('./chunk-EMVZ7HWM.cjs');
|
|
10
11
|
var chunkAWAJOSFP_cjs = require('./chunk-AWAJOSFP.cjs');
|
|
11
12
|
var chunk525KS5HM_cjs = require('./chunk-525KS5HM.cjs');
|
|
12
|
-
var
|
|
13
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
13
|
+
var React2 = require('react');
|
|
14
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
15
|
var lucideReact = require('lucide-react');
|
|
16
|
-
var React2 = require('react');
|
|
17
|
-
var streamdown = require('streamdown');
|
|
18
16
|
var shiki = require('shiki');
|
|
19
17
|
var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
20
18
|
var reactUseControllableState = require('@radix-ui/react-use-controllable-state');
|
|
19
|
+
var streamdown = require('streamdown');
|
|
21
20
|
var react = require('motion/react');
|
|
22
21
|
var tokenlens = require('tokenlens');
|
|
23
22
|
var react$1 = require('@xyflow/react');
|
|
24
23
|
var cmdk = require('cmdk');
|
|
24
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
25
25
|
var nanoid = require('nanoid');
|
|
26
26
|
require('@xyflow/react/dist/style.css');
|
|
27
27
|
|
|
@@ -46,454 +46,6 @@ function _interopNamespace(e) {
|
|
|
46
46
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
47
47
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
48
48
|
|
|
49
|
-
var buttonGroupVariants = classVarianceAuthority.cva(
|
|
50
|
-
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
51
|
-
{
|
|
52
|
-
variants: {
|
|
53
|
-
orientation: {
|
|
54
|
-
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
55
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
defaultVariants: {
|
|
59
|
-
orientation: "horizontal"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
function ButtonGroup({
|
|
64
|
-
className,
|
|
65
|
-
orientation,
|
|
66
|
-
...props
|
|
67
|
-
}) {
|
|
68
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
-
"div",
|
|
70
|
-
{
|
|
71
|
-
role: "group",
|
|
72
|
-
"data-slot": "button-group",
|
|
73
|
-
"data-orientation": orientation,
|
|
74
|
-
className: chunk525KS5HM_cjs.cn(buttonGroupVariants({ orientation }), className),
|
|
75
|
-
...props
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
function ButtonGroupText({
|
|
80
|
-
className,
|
|
81
|
-
asChild = false,
|
|
82
|
-
...props
|
|
83
|
-
}) {
|
|
84
|
-
const Comp = asChild ? reactSlot.Slot : "div";
|
|
85
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
-
Comp,
|
|
87
|
-
{
|
|
88
|
-
className: chunk525KS5HM_cjs.cn(
|
|
89
|
-
"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
90
|
-
className
|
|
91
|
-
),
|
|
92
|
-
...props
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
var Message = ({ className, from, fullWidth, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
className: chunk525KS5HM_cjs.cn(
|
|
100
|
-
"group flex w-full flex-col gap-2",
|
|
101
|
-
fullWidth ? "" : from === "assistant" ? "max-w-[var(--ac-assistant-max-width,95%)]" : "max-w-[95%]",
|
|
102
|
-
from === "user" ? "is-user justify-end" : "is-assistant",
|
|
103
|
-
className
|
|
104
|
-
),
|
|
105
|
-
...props
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
var MessageContent = ({
|
|
109
|
-
children,
|
|
110
|
-
className,
|
|
111
|
-
fullWidth,
|
|
112
|
-
...props
|
|
113
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
114
|
-
"div",
|
|
115
|
-
{
|
|
116
|
-
className: chunk525KS5HM_cjs.cn(
|
|
117
|
-
"flex min-w-0 flex-col gap-2 overflow-hidden",
|
|
118
|
-
fullWidth ? "w-full" : "w-fit max-w-full",
|
|
119
|
-
"group-[.is-user]:ml-auto group-[.is-user]:px-6 group-[.is-user]:py-4 group-[.is-user]:text-foreground group-[.is-user]:rounded-bl-[24px] group-[.is-user]:rounded-br-[24px] group-[.is-user]:rounded-tl-[4px] group-[.is-user]:rounded-tr-[24px] group-[.is-user]:bg-[var(--ac-user-bubble-bg,#f0f4f8)]",
|
|
120
|
-
"group-[.is-assistant]:text-foreground group-[.is-assistant]:w-full",
|
|
121
|
-
className
|
|
122
|
-
),
|
|
123
|
-
...props,
|
|
124
|
-
children
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
var MessageActions = ({
|
|
128
|
-
className,
|
|
129
|
-
children,
|
|
130
|
-
...props
|
|
131
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk525KS5HM_cjs.cn("flex items-center gap-1", className), ...props, children });
|
|
132
|
-
var MessageAction = ({
|
|
133
|
-
tooltip,
|
|
134
|
-
children,
|
|
135
|
-
label,
|
|
136
|
-
variant = "ghost",
|
|
137
|
-
size = "icon-sm",
|
|
138
|
-
...props
|
|
139
|
-
}) => {
|
|
140
|
-
const button = /* @__PURE__ */ jsxRuntime.jsxs(chunkTZ7EM3EG_cjs.Button, { size, type: "button", variant, ...props, children: [
|
|
141
|
-
children,
|
|
142
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: label || tooltip })
|
|
143
|
-
] });
|
|
144
|
-
if (tooltip) {
|
|
145
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkOU5OZKYH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkOU5OZKYH_cjs.Tooltip, { children: [
|
|
146
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkOU5OZKYH_cjs.TooltipTrigger, { asChild: true, children: button }),
|
|
147
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkOU5OZKYH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: tooltip }) })
|
|
148
|
-
] }) });
|
|
149
|
-
}
|
|
150
|
-
return button;
|
|
151
|
-
};
|
|
152
|
-
var MessageBranchContext = React2.createContext(
|
|
153
|
-
null
|
|
154
|
-
);
|
|
155
|
-
var useMessageBranch = () => {
|
|
156
|
-
const context = React2.useContext(MessageBranchContext);
|
|
157
|
-
if (!context) {
|
|
158
|
-
throw new Error(
|
|
159
|
-
"MessageBranch components must be used within MessageBranch"
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
return context;
|
|
163
|
-
};
|
|
164
|
-
var MessageBranch = ({
|
|
165
|
-
defaultBranch = 0,
|
|
166
|
-
onBranchChange,
|
|
167
|
-
className,
|
|
168
|
-
...props
|
|
169
|
-
}) => {
|
|
170
|
-
const [currentBranch, setCurrentBranch] = React2.useState(defaultBranch);
|
|
171
|
-
const [branches, setBranches] = React2.useState([]);
|
|
172
|
-
const handleBranchChange = (newBranch) => {
|
|
173
|
-
setCurrentBranch(newBranch);
|
|
174
|
-
onBranchChange?.(newBranch);
|
|
175
|
-
};
|
|
176
|
-
const goToPrevious = () => {
|
|
177
|
-
const newBranch = currentBranch > 0 ? currentBranch - 1 : branches.length - 1;
|
|
178
|
-
handleBranchChange(newBranch);
|
|
179
|
-
};
|
|
180
|
-
const goToNext = () => {
|
|
181
|
-
const newBranch = currentBranch < branches.length - 1 ? currentBranch + 1 : 0;
|
|
182
|
-
handleBranchChange(newBranch);
|
|
183
|
-
};
|
|
184
|
-
const contextValue = {
|
|
185
|
-
currentBranch,
|
|
186
|
-
totalBranches: branches.length,
|
|
187
|
-
goToPrevious,
|
|
188
|
-
goToNext,
|
|
189
|
-
branches,
|
|
190
|
-
setBranches
|
|
191
|
-
};
|
|
192
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MessageBranchContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
193
|
-
"div",
|
|
194
|
-
{
|
|
195
|
-
className: chunk525KS5HM_cjs.cn("grid w-full gap-2 [&>div]:pb-0", className),
|
|
196
|
-
...props
|
|
197
|
-
}
|
|
198
|
-
) });
|
|
199
|
-
};
|
|
200
|
-
var MessageBranchContent = ({
|
|
201
|
-
children,
|
|
202
|
-
...props
|
|
203
|
-
}) => {
|
|
204
|
-
const { currentBranch, setBranches, branches } = useMessageBranch();
|
|
205
|
-
const childrenArray = Array.isArray(children) ? children : [children];
|
|
206
|
-
React2.useEffect(() => {
|
|
207
|
-
if (branches.length !== childrenArray.length) {
|
|
208
|
-
setBranches(childrenArray);
|
|
209
|
-
}
|
|
210
|
-
}, [childrenArray, branches, setBranches]);
|
|
211
|
-
return childrenArray.map((branch, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
212
|
-
"div",
|
|
213
|
-
{
|
|
214
|
-
className: chunk525KS5HM_cjs.cn(
|
|
215
|
-
"grid gap-2 overflow-hidden [&>div]:pb-0",
|
|
216
|
-
index === currentBranch ? "block" : "hidden"
|
|
217
|
-
),
|
|
218
|
-
...props,
|
|
219
|
-
children: branch
|
|
220
|
-
},
|
|
221
|
-
branch.key
|
|
222
|
-
));
|
|
223
|
-
};
|
|
224
|
-
var MessageBranchSelector = ({
|
|
225
|
-
className,
|
|
226
|
-
from,
|
|
227
|
-
...props
|
|
228
|
-
}) => {
|
|
229
|
-
const { totalBranches } = useMessageBranch();
|
|
230
|
-
if (totalBranches <= 1) {
|
|
231
|
-
return null;
|
|
232
|
-
}
|
|
233
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
234
|
-
ButtonGroup,
|
|
235
|
-
{
|
|
236
|
-
className: "[&>*:not(:first-child)]:rounded-l-md [&>*:not(:last-child)]:rounded-r-md",
|
|
237
|
-
orientation: "horizontal",
|
|
238
|
-
...props
|
|
239
|
-
}
|
|
240
|
-
);
|
|
241
|
-
};
|
|
242
|
-
var MessageBranchPrevious = ({
|
|
243
|
-
children,
|
|
244
|
-
...props
|
|
245
|
-
}) => {
|
|
246
|
-
const { goToPrevious, totalBranches } = useMessageBranch();
|
|
247
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
248
|
-
chunkTZ7EM3EG_cjs.Button,
|
|
249
|
-
{
|
|
250
|
-
"aria-label": "Previous branch",
|
|
251
|
-
disabled: totalBranches <= 1,
|
|
252
|
-
onClick: goToPrevious,
|
|
253
|
-
size: "icon-sm",
|
|
254
|
-
type: "button",
|
|
255
|
-
variant: "ghost",
|
|
256
|
-
...props,
|
|
257
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { size: 14 })
|
|
258
|
-
}
|
|
259
|
-
);
|
|
260
|
-
};
|
|
261
|
-
var MessageBranchNext = ({
|
|
262
|
-
children,
|
|
263
|
-
className,
|
|
264
|
-
...props
|
|
265
|
-
}) => {
|
|
266
|
-
const { goToNext, totalBranches } = useMessageBranch();
|
|
267
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
-
chunkTZ7EM3EG_cjs.Button,
|
|
269
|
-
{
|
|
270
|
-
"aria-label": "Next branch",
|
|
271
|
-
disabled: totalBranches <= 1,
|
|
272
|
-
onClick: goToNext,
|
|
273
|
-
size: "icon-sm",
|
|
274
|
-
type: "button",
|
|
275
|
-
variant: "ghost",
|
|
276
|
-
...props,
|
|
277
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { size: 14 })
|
|
278
|
-
}
|
|
279
|
-
);
|
|
280
|
-
};
|
|
281
|
-
var MessageBranchPage = ({
|
|
282
|
-
className,
|
|
283
|
-
...props
|
|
284
|
-
}) => {
|
|
285
|
-
const { currentBranch, totalBranches } = useMessageBranch();
|
|
286
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
287
|
-
ButtonGroupText,
|
|
288
|
-
{
|
|
289
|
-
className: chunk525KS5HM_cjs.cn(
|
|
290
|
-
"border-none bg-transparent text-muted-foreground shadow-none",
|
|
291
|
-
className
|
|
292
|
-
),
|
|
293
|
-
...props,
|
|
294
|
-
children: [
|
|
295
|
-
currentBranch + 1,
|
|
296
|
-
" of ",
|
|
297
|
-
totalBranches
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
};
|
|
302
|
-
function addUtmParams(url) {
|
|
303
|
-
try {
|
|
304
|
-
const urlObj = new URL(url);
|
|
305
|
-
urlObj.searchParams.set("utm_source", "chat");
|
|
306
|
-
urlObj.searchParams.set("utm_medium", "referral");
|
|
307
|
-
return urlObj.toString();
|
|
308
|
-
} catch {
|
|
309
|
-
return url;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
var CustomLink = ({ href, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
313
|
-
"a",
|
|
314
|
-
{
|
|
315
|
-
href: href ? addUtmParams(href) : href,
|
|
316
|
-
target: "_blank",
|
|
317
|
-
rel: "noopener noreferrer",
|
|
318
|
-
className: "hover:underline hover:opacity-80 transition-opacity font-medium",
|
|
319
|
-
...props,
|
|
320
|
-
children
|
|
321
|
-
}
|
|
322
|
-
);
|
|
323
|
-
var CustomImage = ({ src, alt, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
324
|
-
"img",
|
|
325
|
-
{
|
|
326
|
-
src,
|
|
327
|
-
alt: alt || "",
|
|
328
|
-
loading: "lazy",
|
|
329
|
-
className: "rounded-xl max-w-full h-auto my-4",
|
|
330
|
-
...props
|
|
331
|
-
}
|
|
332
|
-
);
|
|
333
|
-
var CustomTable = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-4 overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
334
|
-
"table",
|
|
335
|
-
{
|
|
336
|
-
className: "w-full text-sm rounded-xl border border-black/[0.08] overflow-hidden",
|
|
337
|
-
...props,
|
|
338
|
-
children
|
|
339
|
-
}
|
|
340
|
-
) });
|
|
341
|
-
var CustomThead = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-black/[0.04]", ...props, children });
|
|
342
|
-
var CustomTh = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
343
|
-
"th",
|
|
344
|
-
{
|
|
345
|
-
className: "px-4 py-3 text-start text-xs font-medium uppercase tracking-wider opacity-60 border-b border-black/[0.08]",
|
|
346
|
-
...props,
|
|
347
|
-
children
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
var CustomTd = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
351
|
-
"td",
|
|
352
|
-
{
|
|
353
|
-
className: "px-4 py-3 border-b border-black/[0.08]",
|
|
354
|
-
...props,
|
|
355
|
-
children
|
|
356
|
-
}
|
|
357
|
-
);
|
|
358
|
-
var CustomTr = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
359
|
-
"tr",
|
|
360
|
-
{
|
|
361
|
-
className: "hover:bg-black/[0.02] transition-colors",
|
|
362
|
-
...props,
|
|
363
|
-
children
|
|
364
|
-
}
|
|
365
|
-
);
|
|
366
|
-
var MessageResponse = React2.memo(
|
|
367
|
-
({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
368
|
-
streamdown.Streamdown,
|
|
369
|
-
{
|
|
370
|
-
className: chunk525KS5HM_cjs.cn(
|
|
371
|
-
"message-response size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
372
|
-
className
|
|
373
|
-
),
|
|
374
|
-
components: {
|
|
375
|
-
a: CustomLink,
|
|
376
|
-
img: CustomImage,
|
|
377
|
-
table: CustomTable,
|
|
378
|
-
thead: CustomThead,
|
|
379
|
-
th: CustomTh,
|
|
380
|
-
td: CustomTd,
|
|
381
|
-
tr: CustomTr
|
|
382
|
-
},
|
|
383
|
-
linkSafety: { enabled: false },
|
|
384
|
-
...props
|
|
385
|
-
}
|
|
386
|
-
),
|
|
387
|
-
(prevProps, nextProps) => prevProps.children === nextProps.children
|
|
388
|
-
);
|
|
389
|
-
MessageResponse.displayName = "MessageResponse";
|
|
390
|
-
function MessageAttachment({
|
|
391
|
-
data,
|
|
392
|
-
className,
|
|
393
|
-
onRemove,
|
|
394
|
-
...props
|
|
395
|
-
}) {
|
|
396
|
-
const filename = data.filename || "";
|
|
397
|
-
const mediaType = data.mediaType?.startsWith("image/") && data.url ? "image" : "file";
|
|
398
|
-
const isImage = mediaType === "image";
|
|
399
|
-
const attachmentLabel = filename || (isImage ? "Image" : "Attachment");
|
|
400
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
401
|
-
"div",
|
|
402
|
-
{
|
|
403
|
-
className: chunk525KS5HM_cjs.cn(
|
|
404
|
-
"group relative size-24 overflow-hidden rounded-lg",
|
|
405
|
-
className
|
|
406
|
-
),
|
|
407
|
-
...props,
|
|
408
|
-
children: isImage ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
409
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
410
|
-
"img",
|
|
411
|
-
{
|
|
412
|
-
alt: filename || "attachment",
|
|
413
|
-
className: "size-full object-cover",
|
|
414
|
-
height: 100,
|
|
415
|
-
src: data.url,
|
|
416
|
-
width: 100
|
|
417
|
-
}
|
|
418
|
-
),
|
|
419
|
-
onRemove && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
420
|
-
chunkTZ7EM3EG_cjs.Button,
|
|
421
|
-
{
|
|
422
|
-
"aria-label": "Remove attachment",
|
|
423
|
-
className: "absolute top-2 right-2 size-6 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3",
|
|
424
|
-
onClick: (e) => {
|
|
425
|
-
e.stopPropagation();
|
|
426
|
-
onRemove();
|
|
427
|
-
},
|
|
428
|
-
type: "button",
|
|
429
|
-
variant: "ghost",
|
|
430
|
-
children: [
|
|
431
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
432
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Remove" })
|
|
433
|
-
]
|
|
434
|
-
}
|
|
435
|
-
)
|
|
436
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
437
|
-
/* @__PURE__ */ jsxRuntime.jsxs(chunkOU5OZKYH_cjs.Tooltip, { children: [
|
|
438
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkOU5OZKYH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-full shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PaperclipIcon, { className: "size-4" }) }) }),
|
|
439
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkOU5OZKYH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: attachmentLabel }) })
|
|
440
|
-
] }),
|
|
441
|
-
onRemove && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
442
|
-
chunkTZ7EM3EG_cjs.Button,
|
|
443
|
-
{
|
|
444
|
-
"aria-label": "Remove attachment",
|
|
445
|
-
className: "size-6 shrink-0 rounded-full p-0 opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100 [&>svg]:size-3",
|
|
446
|
-
onClick: (e) => {
|
|
447
|
-
e.stopPropagation();
|
|
448
|
-
onRemove();
|
|
449
|
-
},
|
|
450
|
-
type: "button",
|
|
451
|
-
variant: "ghost",
|
|
452
|
-
children: [
|
|
453
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
454
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Remove" })
|
|
455
|
-
]
|
|
456
|
-
}
|
|
457
|
-
)
|
|
458
|
-
] })
|
|
459
|
-
}
|
|
460
|
-
);
|
|
461
|
-
}
|
|
462
|
-
function MessageAttachments({
|
|
463
|
-
children,
|
|
464
|
-
className,
|
|
465
|
-
...props
|
|
466
|
-
}) {
|
|
467
|
-
if (!children) {
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
471
|
-
"div",
|
|
472
|
-
{
|
|
473
|
-
className: chunk525KS5HM_cjs.cn(
|
|
474
|
-
"ml-auto flex w-fit flex-wrap items-start gap-2",
|
|
475
|
-
className
|
|
476
|
-
),
|
|
477
|
-
...props,
|
|
478
|
-
children
|
|
479
|
-
}
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
var MessageToolbar = ({
|
|
483
|
-
className,
|
|
484
|
-
children,
|
|
485
|
-
...props
|
|
486
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
487
|
-
"div",
|
|
488
|
-
{
|
|
489
|
-
className: chunk525KS5HM_cjs.cn(
|
|
490
|
-
"mt-4 flex w-full items-center justify-between gap-4",
|
|
491
|
-
className
|
|
492
|
-
),
|
|
493
|
-
...props,
|
|
494
|
-
children
|
|
495
|
-
}
|
|
496
|
-
);
|
|
497
49
|
var MOBILE_BREAKPOINT = 768;
|
|
498
50
|
function subscribeToResize(cb) {
|
|
499
51
|
if (typeof window === "undefined") return () => {
|
|
@@ -760,7 +312,7 @@ var ArtifactClose = ({
|
|
|
760
312
|
variant = "ghost",
|
|
761
313
|
...props
|
|
762
314
|
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
763
|
-
|
|
315
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
764
316
|
{
|
|
765
317
|
className: chunk525KS5HM_cjs.cn(
|
|
766
318
|
"size-8 p-0 text-muted-foreground hover:text-foreground",
|
|
@@ -802,7 +354,7 @@ var ArtifactAction = ({
|
|
|
802
354
|
...props
|
|
803
355
|
}) => {
|
|
804
356
|
const button = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
805
|
-
|
|
357
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
806
358
|
{
|
|
807
359
|
className: chunk525KS5HM_cjs.cn(
|
|
808
360
|
"size-8 p-0 text-muted-foreground hover:text-foreground",
|
|
@@ -819,9 +371,9 @@ var ArtifactAction = ({
|
|
|
819
371
|
}
|
|
820
372
|
);
|
|
821
373
|
if (tooltip) {
|
|
822
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
823
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
824
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
374
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkEMVZ7HWM_cjs.Tooltip, { children: [
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipTrigger, { asChild: true, children: button }),
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: tooltip }) })
|
|
825
377
|
] }) });
|
|
826
378
|
}
|
|
827
379
|
return button;
|
|
@@ -945,7 +497,7 @@ var CodeBlockCopyButton = ({
|
|
|
945
497
|
};
|
|
946
498
|
const Icon = isCopied ? lucideReact.CheckIcon : lucideReact.CopyIcon;
|
|
947
499
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
|
-
|
|
500
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
949
501
|
{
|
|
950
502
|
className: chunk525KS5HM_cjs.cn("shrink-0", className),
|
|
951
503
|
onClick: copyToClipboard,
|
|
@@ -1013,9 +565,9 @@ var WebPreviewNavigationButton = ({
|
|
|
1013
565
|
tooltip,
|
|
1014
566
|
children,
|
|
1015
567
|
...props
|
|
1016
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1017
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1018
|
-
|
|
568
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkEMVZ7HWM_cjs.Tooltip, { children: [
|
|
569
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
570
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
1019
571
|
{
|
|
1020
572
|
className: "h-8 w-8 p-0 hover:text-foreground",
|
|
1021
573
|
disabled,
|
|
@@ -1026,7 +578,7 @@ var WebPreviewNavigationButton = ({
|
|
|
1026
578
|
children
|
|
1027
579
|
}
|
|
1028
580
|
) }),
|
|
1029
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
581
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: tooltip }) })
|
|
1030
582
|
] }) });
|
|
1031
583
|
var WebPreviewUrl = ({
|
|
1032
584
|
value,
|
|
@@ -1051,7 +603,7 @@ var WebPreviewUrl = ({
|
|
|
1051
603
|
onKeyDown?.(event);
|
|
1052
604
|
};
|
|
1053
605
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1054
|
-
|
|
606
|
+
chunkY4B45DW4_cjs.Input,
|
|
1055
607
|
{
|
|
1056
608
|
className: "h-8 flex-1 text-sm",
|
|
1057
609
|
onChange: onChange ?? handleChange,
|
|
@@ -1091,15 +643,15 @@ var WebPreviewConsole = ({
|
|
|
1091
643
|
}) => {
|
|
1092
644
|
const { consoleOpen, setConsoleOpen } = useWebPreview();
|
|
1093
645
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1094
|
-
|
|
646
|
+
chunkEMVZ7HWM_cjs.Collapsible,
|
|
1095
647
|
{
|
|
1096
648
|
className: chunk525KS5HM_cjs.cn("border-t bg-muted/50 font-mono text-sm", className),
|
|
1097
649
|
onOpenChange: setConsoleOpen,
|
|
1098
650
|
open: consoleOpen,
|
|
1099
651
|
...props,
|
|
1100
652
|
children: [
|
|
1101
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1102
|
-
|
|
653
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
654
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
1103
655
|
{
|
|
1104
656
|
className: "flex w-full items-center justify-between p-4 text-start font-medium hover:bg-muted/50",
|
|
1105
657
|
variant: "ghost",
|
|
@@ -1118,7 +670,7 @@ var WebPreviewConsole = ({
|
|
|
1118
670
|
}
|
|
1119
671
|
) }),
|
|
1120
672
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1121
|
-
|
|
673
|
+
chunkEMVZ7HWM_cjs.CollapsibleContent,
|
|
1122
674
|
{
|
|
1123
675
|
className: chunk525KS5HM_cjs.cn(
|
|
1124
676
|
"px-4 pb-4",
|
|
@@ -1192,7 +744,7 @@ var InlineCitationCardTrigger = ({
|
|
|
1192
744
|
className,
|
|
1193
745
|
...props
|
|
1194
746
|
}) => /* @__PURE__ */ jsxRuntime.jsx(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
-
|
|
747
|
+
chunkY4B45DW4_cjs.Badge,
|
|
1196
748
|
{
|
|
1197
749
|
className: chunk525KS5HM_cjs.cn("ml-1 rounded-full", className),
|
|
1198
750
|
variant: "secondary",
|
|
@@ -1219,14 +771,14 @@ var InlineCitationCarousel = ({
|
|
|
1219
771
|
...props
|
|
1220
772
|
}) => {
|
|
1221
773
|
const [api, setApi] = React2.useState();
|
|
1222
|
-
return /* @__PURE__ */ jsxRuntime.jsx(CarouselApiContext.Provider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
774
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CarouselApiContext.Provider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.Carousel, { className: chunk525KS5HM_cjs.cn("w-full", className), setApi, ...props, children }) });
|
|
1223
775
|
};
|
|
1224
|
-
var InlineCitationCarouselContent = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
776
|
+
var InlineCitationCarouselContent = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.CarouselContent, { ...props });
|
|
1225
777
|
var InlineCitationCarouselItem = ({
|
|
1226
778
|
className,
|
|
1227
779
|
...props
|
|
1228
780
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1229
|
-
|
|
781
|
+
chunkY4B45DW4_cjs.CarouselItem,
|
|
1230
782
|
{
|
|
1231
783
|
className: chunk525KS5HM_cjs.cn("w-full space-y-2 p-4 pl-8", className),
|
|
1232
784
|
...props
|
|
@@ -1444,7 +996,7 @@ var Reasoning = React2.memo(
|
|
|
1444
996
|
{
|
|
1445
997
|
value: { isStreaming, isOpen, setIsOpen, duration },
|
|
1446
998
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1447
|
-
|
|
999
|
+
chunkEMVZ7HWM_cjs.Collapsible,
|
|
1448
1000
|
{
|
|
1449
1001
|
className: chunk525KS5HM_cjs.cn("not-prose mb-4", className),
|
|
1450
1002
|
onOpenChange: handleOpenChange,
|
|
@@ -1474,7 +1026,7 @@ var ReasoningTrigger = React2.memo(
|
|
|
1474
1026
|
({ className, children, getThinkingMessage = defaultGetThinkingMessage, ...props }) => {
|
|
1475
1027
|
const { isStreaming, isOpen, duration } = useReasoning();
|
|
1476
1028
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1477
|
-
|
|
1029
|
+
chunkEMVZ7HWM_cjs.CollapsibleTrigger,
|
|
1478
1030
|
{
|
|
1479
1031
|
className: chunk525KS5HM_cjs.cn(
|
|
1480
1032
|
"flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",
|
|
@@ -1500,7 +1052,7 @@ var ReasoningTrigger = React2.memo(
|
|
|
1500
1052
|
);
|
|
1501
1053
|
var ReasoningContent = React2.memo(
|
|
1502
1054
|
({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1503
|
-
|
|
1055
|
+
chunkEMVZ7HWM_cjs.CollapsibleContent,
|
|
1504
1056
|
{
|
|
1505
1057
|
className: chunk525KS5HM_cjs.cn(
|
|
1506
1058
|
"mt-4 text-sm",
|
|
@@ -1589,7 +1141,7 @@ function FollowupButtons({
|
|
|
1589
1141
|
}) {
|
|
1590
1142
|
if (!suggestions || suggestions.length === 0) return null;
|
|
1591
1143
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk525KS5HM_cjs.cn("flex flex-wrap gap-2", className), children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1592
|
-
|
|
1144
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
1593
1145
|
{
|
|
1594
1146
|
variant: "outline",
|
|
1595
1147
|
size: "sm",
|
|
@@ -1605,9 +1157,9 @@ var Suggestions = ({
|
|
|
1605
1157
|
className,
|
|
1606
1158
|
children,
|
|
1607
1159
|
...props
|
|
1608
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1160
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(chunkY4B45DW4_cjs.ScrollArea, { className: "w-full overflow-x-auto whitespace-nowrap", ...props, children: [
|
|
1609
1161
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk525KS5HM_cjs.cn("flex w-max flex-nowrap items-center gap-2", className), children }),
|
|
1610
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1162
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.ScrollBar, { className: "hidden", orientation: "horizontal" })
|
|
1611
1163
|
] });
|
|
1612
1164
|
var Suggestion = ({
|
|
1613
1165
|
suggestion,
|
|
@@ -1622,7 +1174,7 @@ var Suggestion = ({
|
|
|
1622
1174
|
onClick?.(suggestion);
|
|
1623
1175
|
};
|
|
1624
1176
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1625
|
-
|
|
1177
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
1626
1178
|
{
|
|
1627
1179
|
className: chunk525KS5HM_cjs.cn("cursor-pointer rounded-full px-4", className),
|
|
1628
1180
|
onClick: handleClick,
|
|
@@ -1719,7 +1271,7 @@ var ContextTrigger = ({ children, ...props }) => {
|
|
|
1719
1271
|
style: "percent",
|
|
1720
1272
|
maximumFractionDigits: 1
|
|
1721
1273
|
}).format(usedPercent);
|
|
1722
|
-
return /* @__PURE__ */ jsxRuntime.jsx(HoverCardTrigger, { asChild: true, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1274
|
+
return /* @__PURE__ */ jsxRuntime.jsx(HoverCardTrigger, { asChild: true, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(chunkEMVZ7HWM_cjs.Button, { type: "button", variant: "ghost", ...props, children: [
|
|
1723
1275
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-muted-foreground", children: renderedPercent }),
|
|
1724
1276
|
/* @__PURE__ */ jsxRuntime.jsx(ContextIcon, {})
|
|
1725
1277
|
] }) });
|
|
@@ -1760,7 +1312,7 @@ var ContextContentHeader = ({
|
|
|
1760
1312
|
total
|
|
1761
1313
|
] })
|
|
1762
1314
|
] }),
|
|
1763
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1315
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.Progress, { className: "bg-muted", value: usedPercent * PERCENT_MAX }) })
|
|
1764
1316
|
] }) });
|
|
1765
1317
|
};
|
|
1766
1318
|
var ContextContentBody = ({
|
|
@@ -1987,8 +1539,8 @@ var ChainOfThought = React2.memo(
|
|
|
1987
1539
|
var ChainOfThoughtHeader = React2.memo(
|
|
1988
1540
|
({ className, children, ...props }) => {
|
|
1989
1541
|
const { isOpen, setIsOpen } = useChainOfThought();
|
|
1990
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1991
|
-
|
|
1542
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Collapsible, { onOpenChange: setIsOpen, open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1543
|
+
chunkEMVZ7HWM_cjs.CollapsibleTrigger,
|
|
1992
1544
|
{
|
|
1993
1545
|
className: chunk525KS5HM_cjs.cn(
|
|
1994
1546
|
"flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",
|
|
@@ -2063,7 +1615,7 @@ var ChainOfThoughtSearchResults = React2.memo(
|
|
|
2063
1615
|
);
|
|
2064
1616
|
var ChainOfThoughtSearchResult = React2.memo(
|
|
2065
1617
|
({ className, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2066
|
-
|
|
1618
|
+
chunkY4B45DW4_cjs.Badge,
|
|
2067
1619
|
{
|
|
2068
1620
|
className: chunk525KS5HM_cjs.cn("gap-1 px-2 py-0.5 font-normal text-xs", className),
|
|
2069
1621
|
variant: "secondary",
|
|
@@ -2075,8 +1627,8 @@ var ChainOfThoughtSearchResult = React2.memo(
|
|
|
2075
1627
|
var ChainOfThoughtContent = React2.memo(
|
|
2076
1628
|
({ className, children, ...props }) => {
|
|
2077
1629
|
const { isOpen } = useChainOfThought();
|
|
2078
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2079
|
-
|
|
1630
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Collapsible, { open: isOpen, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1631
|
+
chunkEMVZ7HWM_cjs.CollapsibleContent,
|
|
2080
1632
|
{
|
|
2081
1633
|
className: chunk525KS5HM_cjs.cn(
|
|
2082
1634
|
"mt-2 space-y-3",
|
|
@@ -2121,12 +1673,12 @@ var Confirmation = ({
|
|
|
2121
1673
|
if (!approval || state === "input-streaming" || state === "input-available") {
|
|
2122
1674
|
return null;
|
|
2123
1675
|
}
|
|
2124
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ConfirmationContext.Provider, { value: { approval, state }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1676
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ConfirmationContext.Provider, { value: { approval, state }, children: /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.Alert, { className: chunk525KS5HM_cjs.cn("flex flex-col gap-2", className), ...props }) });
|
|
2125
1677
|
};
|
|
2126
1678
|
var ConfirmationTitle = ({
|
|
2127
1679
|
className,
|
|
2128
1680
|
...props
|
|
2129
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1681
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.AlertDescription, { className: chunk525KS5HM_cjs.cn("inline", className), ...props });
|
|
2130
1682
|
var ConfirmationRequest = ({ children }) => {
|
|
2131
1683
|
const { state } = useConfirmation();
|
|
2132
1684
|
if (state !== "approval-requested") {
|
|
@@ -2168,7 +1720,7 @@ var ConfirmationActions = ({
|
|
|
2168
1720
|
}
|
|
2169
1721
|
);
|
|
2170
1722
|
};
|
|
2171
|
-
var ConfirmationAction = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1723
|
+
var ConfirmationAction = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Button, { className: "h-8 px-3 text-sm", type: "button", ...props });
|
|
2172
1724
|
var Controls = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2173
1725
|
react$1.Controls,
|
|
2174
1726
|
{
|
|
@@ -2193,7 +1745,7 @@ var Command = React2__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2193
1745
|
));
|
|
2194
1746
|
Command.displayName = cmdk.Command.displayName;
|
|
2195
1747
|
var CommandDialog = ({ children, ...props }) => {
|
|
2196
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1748
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
2197
1749
|
};
|
|
2198
1750
|
var CommandInput = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2199
1751
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
@@ -2277,15 +1829,15 @@ var CommandShortcut = ({
|
|
|
2277
1829
|
);
|
|
2278
1830
|
};
|
|
2279
1831
|
CommandShortcut.displayName = "CommandShortcut";
|
|
2280
|
-
var ModelSelector = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2281
|
-
var ModelSelectorTrigger = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1832
|
+
var ModelSelector = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.Dialog, { ...props });
|
|
1833
|
+
var ModelSelectorTrigger = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DialogTrigger, { ...props });
|
|
2282
1834
|
var ModelSelectorContent = ({
|
|
2283
1835
|
className,
|
|
2284
1836
|
children,
|
|
2285
1837
|
title = "Model Selector",
|
|
2286
1838
|
...props
|
|
2287
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2288
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1839
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(chunkY4B45DW4_cjs.DialogContent, { className: chunk525KS5HM_cjs.cn("p-0", className), ...props, children: [
|
|
1840
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DialogTitle, { className: "sr-only", children: title }),
|
|
2289
1841
|
/* @__PURE__ */ jsxRuntime.jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-auto", children })
|
|
2290
1842
|
] });
|
|
2291
1843
|
var ModelSelectorDialog = (props) => /* @__PURE__ */ jsxRuntime.jsx(CommandDialog, { ...props });
|
|
@@ -2394,19 +1946,19 @@ var useOpenInContext = () => {
|
|
|
2394
1946
|
}
|
|
2395
1947
|
return context;
|
|
2396
1948
|
};
|
|
2397
|
-
var OpenIn = ({ query, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(OpenInContext.Provider, { value: { query }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1949
|
+
var OpenIn = ({ query, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(OpenInContext.Provider, { value: { query }, children: /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenu, { ...props }) });
|
|
2398
1950
|
var OpenInContent = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2399
|
-
|
|
1951
|
+
chunkY4B45DW4_cjs.DropdownMenuContent,
|
|
2400
1952
|
{
|
|
2401
1953
|
align: "start",
|
|
2402
1954
|
className: chunk525KS5HM_cjs.cn("w-[240px]", className),
|
|
2403
1955
|
...props
|
|
2404
1956
|
}
|
|
2405
1957
|
);
|
|
2406
|
-
var OpenInItem = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2407
|
-
var OpenInLabel = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2408
|
-
var OpenInSeparator = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2409
|
-
var OpenInTrigger = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1958
|
+
var OpenInItem = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuItem, { ...props });
|
|
1959
|
+
var OpenInLabel = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuLabel, { ...props });
|
|
1960
|
+
var OpenInSeparator = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuSeparator, { ...props });
|
|
1961
|
+
var OpenInTrigger = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuTrigger, { ...props, asChild: true, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(chunkEMVZ7HWM_cjs.Button, { type: "button", variant: "outline", children: [
|
|
2410
1962
|
"Open in chat",
|
|
2411
1963
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
2412
1964
|
] }) });
|
|
@@ -2414,7 +1966,7 @@ var makeProviderItem = (key) => {
|
|
|
2414
1966
|
return (props) => {
|
|
2415
1967
|
const { query } = useOpenInContext();
|
|
2416
1968
|
const p = providers[key];
|
|
2417
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1969
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuItem, { asChild: true, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2418
1970
|
"a",
|
|
2419
1971
|
{
|
|
2420
1972
|
className: "flex items-center gap-2",
|
|
@@ -2459,7 +2011,7 @@ var Plan = ({
|
|
|
2459
2011
|
isStreaming = false,
|
|
2460
2012
|
children,
|
|
2461
2013
|
...props
|
|
2462
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(PlanContext.Provider, { value: { isStreaming }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2014
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(PlanContext.Provider, { value: { isStreaming }, children: /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Collapsible, { asChild: true, "data-slot": "plan", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWAJOSFP_cjs.Card, { className: chunk525KS5HM_cjs.cn("shadow-none", className), children }) }) });
|
|
2463
2015
|
var PlanHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2464
2016
|
chunkAWAJOSFP_cjs.CardHeader,
|
|
2465
2017
|
{
|
|
@@ -2489,10 +2041,10 @@ var PlanDescription = ({
|
|
|
2489
2041
|
);
|
|
2490
2042
|
};
|
|
2491
2043
|
var PlanAction = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkAWAJOSFP_cjs.CardAction, { "data-slot": "plan-action", ...props });
|
|
2492
|
-
var PlanContent = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2044
|
+
var PlanContent = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.CollapsibleContent, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(chunkAWAJOSFP_cjs.CardContent, { "data-slot": "plan-content", ...props }) });
|
|
2493
2045
|
var PlanFooter = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkAWAJOSFP_cjs.CardFooter, { "data-slot": "plan-footer", ...props });
|
|
2494
|
-
var PlanTrigger = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2495
|
-
|
|
2046
|
+
var PlanTrigger = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2047
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
2496
2048
|
{
|
|
2497
2049
|
className: chunk525KS5HM_cjs.cn("size-8", className),
|
|
2498
2050
|
"data-slot": "plan-trigger",
|
|
@@ -2591,7 +2143,7 @@ function InputGroupButton({
|
|
|
2591
2143
|
...props
|
|
2592
2144
|
}) {
|
|
2593
2145
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2594
|
-
|
|
2146
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
2595
2147
|
{
|
|
2596
2148
|
type,
|
|
2597
2149
|
"data-size": size,
|
|
@@ -2606,7 +2158,7 @@ function InputGroupTextarea({
|
|
|
2606
2158
|
...props
|
|
2607
2159
|
}) {
|
|
2608
2160
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2609
|
-
|
|
2161
|
+
chunkEMVZ7HWM_cjs.Textarea,
|
|
2610
2162
|
{
|
|
2611
2163
|
"data-slot": "input-group-control",
|
|
2612
2164
|
className: chunk525KS5HM_cjs.cn(
|
|
@@ -2783,7 +2335,7 @@ function PromptInputAttachment({
|
|
|
2783
2335
|
}
|
|
2784
2336
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-5 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PaperclipIcon, { className: "size-3" }) }) }),
|
|
2785
2337
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2786
|
-
|
|
2338
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
2787
2339
|
{
|
|
2788
2340
|
"aria-label": "Remove attachment",
|
|
2789
2341
|
className: "absolute inset-0 size-5 cursor-pointer rounded p-0 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100 [&>svg]:size-2.5",
|
|
@@ -2847,7 +2399,7 @@ var PromptInputActionAddAttachments = ({
|
|
|
2847
2399
|
}) => {
|
|
2848
2400
|
const attachments = usePromptInputAttachments();
|
|
2849
2401
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2850
|
-
|
|
2402
|
+
chunkY4B45DW4_cjs.DropdownMenuItem,
|
|
2851
2403
|
{
|
|
2852
2404
|
...props,
|
|
2853
2405
|
onSelect: (e) => {
|
|
@@ -3268,20 +2820,20 @@ var PromptInputButton = ({
|
|
|
3268
2820
|
}
|
|
3269
2821
|
);
|
|
3270
2822
|
};
|
|
3271
|
-
var PromptInputActionMenu = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2823
|
+
var PromptInputActionMenu = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenu, { ...props });
|
|
3272
2824
|
var PromptInputActionMenuTrigger = ({
|
|
3273
2825
|
className,
|
|
3274
2826
|
children,
|
|
3275
2827
|
...props
|
|
3276
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2828
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(PromptInputButton, { className, ...props, children: children ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "size-4" }) }) });
|
|
3277
2829
|
var PromptInputActionMenuContent = ({
|
|
3278
2830
|
className,
|
|
3279
2831
|
...props
|
|
3280
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2832
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuContent, { align: "start", className: chunk525KS5HM_cjs.cn(className), ...props });
|
|
3281
2833
|
var PromptInputActionMenuItem = ({
|
|
3282
2834
|
className,
|
|
3283
2835
|
...props
|
|
3284
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2836
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.DropdownMenuItem, { className: chunk525KS5HM_cjs.cn(className), ...props });
|
|
3285
2837
|
var PromptInputSubmit = ({
|
|
3286
2838
|
className,
|
|
3287
2839
|
variant = "default",
|
|
@@ -3315,6 +2867,7 @@ var PromptInputSpeechButton = ({
|
|
|
3315
2867
|
className,
|
|
3316
2868
|
textareaRef,
|
|
3317
2869
|
onTranscriptionChange,
|
|
2870
|
+
lang,
|
|
3318
2871
|
...props
|
|
3319
2872
|
}) => {
|
|
3320
2873
|
const [isListening, setIsListening] = React2.useState(false);
|
|
@@ -3328,7 +2881,6 @@ var PromptInputSpeechButton = ({
|
|
|
3328
2881
|
const speechRecognition = new SpeechRecognition();
|
|
3329
2882
|
speechRecognition.continuous = true;
|
|
3330
2883
|
speechRecognition.interimResults = true;
|
|
3331
|
-
speechRecognition.lang = "en-US";
|
|
3332
2884
|
speechRecognition.onstart = () => {
|
|
3333
2885
|
setIsListening(true);
|
|
3334
2886
|
};
|
|
@@ -3371,10 +2923,13 @@ var PromptInputSpeechButton = ({
|
|
|
3371
2923
|
}
|
|
3372
2924
|
if (isListening) {
|
|
3373
2925
|
recognition.stop();
|
|
3374
|
-
|
|
3375
|
-
recognition.start();
|
|
2926
|
+
return;
|
|
3376
2927
|
}
|
|
3377
|
-
|
|
2928
|
+
const browserLang = typeof navigator !== "undefined" ? navigator.language : "en-US";
|
|
2929
|
+
const typed = chunkDDATCJ3O_cjs.detectLanguage(textareaRef?.current?.value ?? "");
|
|
2930
|
+
recognition.lang = lang ?? (typed === null || typed === chunkDDATCJ3O_cjs.LATIN ? browserLang : typed);
|
|
2931
|
+
recognition.start();
|
|
2932
|
+
}, [recognition, isListening, lang, textareaRef]);
|
|
3378
2933
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3379
2934
|
PromptInputButton,
|
|
3380
2935
|
{
|
|
@@ -3390,12 +2945,12 @@ var PromptInputSpeechButton = ({
|
|
|
3390
2945
|
}
|
|
3391
2946
|
);
|
|
3392
2947
|
};
|
|
3393
|
-
var PromptInputSelect = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2948
|
+
var PromptInputSelect = (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.Select, { ...props });
|
|
3394
2949
|
var PromptInputSelectTrigger = ({
|
|
3395
2950
|
className,
|
|
3396
2951
|
...props
|
|
3397
2952
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3398
|
-
|
|
2953
|
+
chunkY4B45DW4_cjs.SelectTrigger,
|
|
3399
2954
|
{
|
|
3400
2955
|
className: chunk525KS5HM_cjs.cn(
|
|
3401
2956
|
"border-none bg-transparent font-medium text-muted-foreground shadow-none transition-colors",
|
|
@@ -3408,15 +2963,15 @@ var PromptInputSelectTrigger = ({
|
|
|
3408
2963
|
var PromptInputSelectContent = ({
|
|
3409
2964
|
className,
|
|
3410
2965
|
...props
|
|
3411
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2966
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.SelectContent, { className: chunk525KS5HM_cjs.cn(className), ...props });
|
|
3412
2967
|
var PromptInputSelectItem = ({
|
|
3413
2968
|
className,
|
|
3414
2969
|
...props
|
|
3415
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2970
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.SelectItem, { className: chunk525KS5HM_cjs.cn(className), ...props });
|
|
3416
2971
|
var PromptInputSelectValue = ({
|
|
3417
2972
|
className,
|
|
3418
2973
|
...props
|
|
3419
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2974
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.SelectValue, { className: chunk525KS5HM_cjs.cn(className), ...props });
|
|
3420
2975
|
var PromptInputHoverCard = ({
|
|
3421
2976
|
openDelay = 0,
|
|
3422
2977
|
closeDelay = 0,
|
|
@@ -3556,7 +3111,7 @@ var QueueItemAction = ({
|
|
|
3556
3111
|
className,
|
|
3557
3112
|
...props
|
|
3558
3113
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3559
|
-
|
|
3114
|
+
chunkEMVZ7HWM_cjs.Button,
|
|
3560
3115
|
{
|
|
3561
3116
|
className: chunk525KS5HM_cjs.cn(
|
|
3562
3117
|
"size-auto rounded p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-muted-foreground/10 hover:text-foreground group-hover:opacity-100",
|
|
@@ -3607,17 +3162,17 @@ var QueueList = ({
|
|
|
3607
3162
|
children,
|
|
3608
3163
|
className,
|
|
3609
3164
|
...props
|
|
3610
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3165
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkY4B45DW4_cjs.ScrollArea, { className: chunk525KS5HM_cjs.cn("-mb-1 mt-2", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-40 pr-4", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { children }) }) });
|
|
3611
3166
|
var QueueSection = ({
|
|
3612
3167
|
className,
|
|
3613
3168
|
defaultOpen = true,
|
|
3614
3169
|
...props
|
|
3615
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3170
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Collapsible, { className: chunk525KS5HM_cjs.cn(className), defaultOpen, ...props });
|
|
3616
3171
|
var QueueSectionTrigger = ({
|
|
3617
3172
|
children,
|
|
3618
3173
|
className,
|
|
3619
3174
|
...props
|
|
3620
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3175
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3621
3176
|
"button",
|
|
3622
3177
|
{
|
|
3623
3178
|
className: chunk525KS5HM_cjs.cn(
|
|
@@ -3647,7 +3202,7 @@ var QueueSectionLabel = ({
|
|
|
3647
3202
|
var QueueSectionContent = ({
|
|
3648
3203
|
className,
|
|
3649
3204
|
...props
|
|
3650
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3205
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.CollapsibleContent, { className: chunk525KS5HM_cjs.cn(className), ...props });
|
|
3651
3206
|
var Queue = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3652
3207
|
"div",
|
|
3653
3208
|
{
|
|
@@ -3678,13 +3233,13 @@ var Task = ({
|
|
|
3678
3233
|
defaultOpen = true,
|
|
3679
3234
|
className,
|
|
3680
3235
|
...props
|
|
3681
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3236
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Collapsible, { className: chunk525KS5HM_cjs.cn(className), defaultOpen, ...props });
|
|
3682
3237
|
var TaskTrigger = ({
|
|
3683
3238
|
children,
|
|
3684
3239
|
className,
|
|
3685
3240
|
title,
|
|
3686
3241
|
...props
|
|
3687
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3242
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.CollapsibleTrigger, { asChild: true, className: chunk525KS5HM_cjs.cn("group", className), ...props, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full cursor-pointer items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground", children: [
|
|
3688
3243
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4" }),
|
|
3689
3244
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: title }),
|
|
3690
3245
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 transition-transform group-data-[state=open]:rotate-180" })
|
|
@@ -3694,7 +3249,7 @@ var TaskContent = ({
|
|
|
3694
3249
|
className,
|
|
3695
3250
|
...props
|
|
3696
3251
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3697
|
-
|
|
3252
|
+
chunkEMVZ7HWM_cjs.CollapsibleContent,
|
|
3698
3253
|
{
|
|
3699
3254
|
className: chunk525KS5HM_cjs.cn(
|
|
3700
3255
|
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
@@ -3705,7 +3260,7 @@ var TaskContent = ({
|
|
|
3705
3260
|
}
|
|
3706
3261
|
);
|
|
3707
3262
|
var Tool = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3708
|
-
|
|
3263
|
+
chunkEMVZ7HWM_cjs.Collapsible,
|
|
3709
3264
|
{
|
|
3710
3265
|
className: chunk525KS5HM_cjs.cn("not-prose mb-4 w-full rounded-md border", className),
|
|
3711
3266
|
...props
|
|
@@ -3730,7 +3285,7 @@ var getStatusBadge = (status) => {
|
|
|
3730
3285
|
"output-error": /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircleIcon, { className: "size-4 text-red-600" }),
|
|
3731
3286
|
"output-denied": /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircleIcon, { className: "size-4 text-orange-600" })
|
|
3732
3287
|
};
|
|
3733
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3288
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkY4B45DW4_cjs.Badge, { className: "gap-1.5 rounded-full text-xs", variant: "secondary", children: [
|
|
3734
3289
|
icons[status],
|
|
3735
3290
|
labels[status]
|
|
3736
3291
|
] });
|
|
@@ -3742,7 +3297,7 @@ var ToolHeader = ({
|
|
|
3742
3297
|
state,
|
|
3743
3298
|
...props
|
|
3744
3299
|
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3745
|
-
|
|
3300
|
+
chunkEMVZ7HWM_cjs.CollapsibleTrigger,
|
|
3746
3301
|
{
|
|
3747
3302
|
className: chunk525KS5HM_cjs.cn(
|
|
3748
3303
|
"flex w-full items-center justify-between gap-4 p-3",
|
|
@@ -3760,7 +3315,7 @@ var ToolHeader = ({
|
|
|
3760
3315
|
}
|
|
3761
3316
|
);
|
|
3762
3317
|
var ToolContent = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3763
|
-
|
|
3318
|
+
chunkEMVZ7HWM_cjs.CollapsibleContent,
|
|
3764
3319
|
{
|
|
3765
3320
|
className: chunk525KS5HM_cjs.cn(
|
|
3766
3321
|
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
@@ -3843,7 +3398,7 @@ var Checkpoint = ({
|
|
|
3843
3398
|
...props,
|
|
3844
3399
|
children: [
|
|
3845
3400
|
children,
|
|
3846
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3401
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Separator, {})
|
|
3847
3402
|
]
|
|
3848
3403
|
}
|
|
3849
3404
|
);
|
|
@@ -3859,10 +3414,10 @@ var CheckpointTrigger = ({
|
|
|
3859
3414
|
size = "sm",
|
|
3860
3415
|
tooltip,
|
|
3861
3416
|
...props
|
|
3862
|
-
}) => tooltip ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3863
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3864
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3865
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3417
|
+
}) => tooltip ? /* @__PURE__ */ jsxRuntime.jsxs(chunkEMVZ7HWM_cjs.Tooltip, { children: [
|
|
3418
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Button, { size, type: "button", variant, ...props, children }) }),
|
|
3419
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.TooltipContent, { align: "start", side: "bottom", children: tooltip })
|
|
3420
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkEMVZ7HWM_cjs.Button, { size, type: "button", variant, ...props, children });
|
|
3866
3421
|
var HALF = 0.5;
|
|
3867
3422
|
var Connection = ({
|
|
3868
3423
|
fromX,
|
|
@@ -4045,47 +3600,103 @@ var Image = ({
|
|
|
4045
3600
|
|
|
4046
3601
|
Object.defineProperty(exports, "Conversation", {
|
|
4047
3602
|
enumerable: true,
|
|
4048
|
-
get: function () { return
|
|
3603
|
+
get: function () { return chunkKTYYLZN7_cjs.Conversation; }
|
|
4049
3604
|
});
|
|
4050
3605
|
Object.defineProperty(exports, "ConversationContent", {
|
|
4051
3606
|
enumerable: true,
|
|
4052
|
-
get: function () { return
|
|
3607
|
+
get: function () { return chunkKTYYLZN7_cjs.ConversationContent; }
|
|
4053
3608
|
});
|
|
4054
3609
|
Object.defineProperty(exports, "ConversationEmptyState", {
|
|
4055
3610
|
enumerable: true,
|
|
4056
|
-
get: function () { return
|
|
3611
|
+
get: function () { return chunkKTYYLZN7_cjs.ConversationEmptyState; }
|
|
4057
3612
|
});
|
|
4058
3613
|
Object.defineProperty(exports, "ConversationScrollButton", {
|
|
4059
3614
|
enumerable: true,
|
|
4060
|
-
get: function () { return
|
|
3615
|
+
get: function () { return chunkKTYYLZN7_cjs.ConversationScrollButton; }
|
|
4061
3616
|
});
|
|
4062
3617
|
Object.defineProperty(exports, "Loader", {
|
|
4063
3618
|
enumerable: true,
|
|
4064
|
-
get: function () { return
|
|
3619
|
+
get: function () { return chunkKTYYLZN7_cjs.Loader; }
|
|
3620
|
+
});
|
|
3621
|
+
Object.defineProperty(exports, "Message", {
|
|
3622
|
+
enumerable: true,
|
|
3623
|
+
get: function () { return chunkKTYYLZN7_cjs.Message; }
|
|
3624
|
+
});
|
|
3625
|
+
Object.defineProperty(exports, "MessageAction", {
|
|
3626
|
+
enumerable: true,
|
|
3627
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageAction; }
|
|
3628
|
+
});
|
|
3629
|
+
Object.defineProperty(exports, "MessageActions", {
|
|
3630
|
+
enumerable: true,
|
|
3631
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageActions; }
|
|
3632
|
+
});
|
|
3633
|
+
Object.defineProperty(exports, "MessageAttachment", {
|
|
3634
|
+
enumerable: true,
|
|
3635
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageAttachment; }
|
|
3636
|
+
});
|
|
3637
|
+
Object.defineProperty(exports, "MessageAttachments", {
|
|
3638
|
+
enumerable: true,
|
|
3639
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageAttachments; }
|
|
3640
|
+
});
|
|
3641
|
+
Object.defineProperty(exports, "MessageBranch", {
|
|
3642
|
+
enumerable: true,
|
|
3643
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageBranch; }
|
|
3644
|
+
});
|
|
3645
|
+
Object.defineProperty(exports, "MessageBranchContent", {
|
|
3646
|
+
enumerable: true,
|
|
3647
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageBranchContent; }
|
|
3648
|
+
});
|
|
3649
|
+
Object.defineProperty(exports, "MessageBranchNext", {
|
|
3650
|
+
enumerable: true,
|
|
3651
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageBranchNext; }
|
|
3652
|
+
});
|
|
3653
|
+
Object.defineProperty(exports, "MessageBranchPage", {
|
|
3654
|
+
enumerable: true,
|
|
3655
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageBranchPage; }
|
|
3656
|
+
});
|
|
3657
|
+
Object.defineProperty(exports, "MessageBranchPrevious", {
|
|
3658
|
+
enumerable: true,
|
|
3659
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageBranchPrevious; }
|
|
3660
|
+
});
|
|
3661
|
+
Object.defineProperty(exports, "MessageBranchSelector", {
|
|
3662
|
+
enumerable: true,
|
|
3663
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageBranchSelector; }
|
|
3664
|
+
});
|
|
3665
|
+
Object.defineProperty(exports, "MessageContent", {
|
|
3666
|
+
enumerable: true,
|
|
3667
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageContent; }
|
|
4065
3668
|
});
|
|
4066
3669
|
Object.defineProperty(exports, "MessageFeedback", {
|
|
4067
3670
|
enumerable: true,
|
|
4068
|
-
get: function () { return
|
|
3671
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageFeedback; }
|
|
3672
|
+
});
|
|
3673
|
+
Object.defineProperty(exports, "MessageResponse", {
|
|
3674
|
+
enumerable: true,
|
|
3675
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageResponse; }
|
|
3676
|
+
});
|
|
3677
|
+
Object.defineProperty(exports, "MessageToolbar", {
|
|
3678
|
+
enumerable: true,
|
|
3679
|
+
get: function () { return chunkKTYYLZN7_cjs.MessageToolbar; }
|
|
4069
3680
|
});
|
|
4070
3681
|
Object.defineProperty(exports, "Source", {
|
|
4071
3682
|
enumerable: true,
|
|
4072
|
-
get: function () { return
|
|
3683
|
+
get: function () { return chunkKTYYLZN7_cjs.Source; }
|
|
4073
3684
|
});
|
|
4074
3685
|
Object.defineProperty(exports, "Sources", {
|
|
4075
3686
|
enumerable: true,
|
|
4076
|
-
get: function () { return
|
|
3687
|
+
get: function () { return chunkKTYYLZN7_cjs.Sources; }
|
|
4077
3688
|
});
|
|
4078
3689
|
Object.defineProperty(exports, "SourcesContent", {
|
|
4079
3690
|
enumerable: true,
|
|
4080
|
-
get: function () { return
|
|
3691
|
+
get: function () { return chunkKTYYLZN7_cjs.SourcesContent; }
|
|
4081
3692
|
});
|
|
4082
3693
|
Object.defineProperty(exports, "SourcesTrigger", {
|
|
4083
3694
|
enumerable: true,
|
|
4084
|
-
get: function () { return
|
|
3695
|
+
get: function () { return chunkKTYYLZN7_cjs.SourcesTrigger; }
|
|
4085
3696
|
});
|
|
4086
3697
|
Object.defineProperty(exports, "SpinnerLoader", {
|
|
4087
3698
|
enumerable: true,
|
|
4088
|
-
get: function () { return
|
|
3699
|
+
get: function () { return chunkKTYYLZN7_cjs.SpinnerLoader; }
|
|
4089
3700
|
});
|
|
4090
3701
|
exports.AIImage = Image;
|
|
4091
3702
|
exports.Artifact = Artifact;
|
|
@@ -4145,20 +3756,6 @@ exports.InlineCitationCarouselPrev = InlineCitationCarouselPrev;
|
|
|
4145
3756
|
exports.InlineCitationQuote = InlineCitationQuote;
|
|
4146
3757
|
exports.InlineCitationSource = InlineCitationSource;
|
|
4147
3758
|
exports.InlineCitationText = InlineCitationText;
|
|
4148
|
-
exports.Message = Message;
|
|
4149
|
-
exports.MessageAction = MessageAction;
|
|
4150
|
-
exports.MessageActions = MessageActions;
|
|
4151
|
-
exports.MessageAttachment = MessageAttachment;
|
|
4152
|
-
exports.MessageAttachments = MessageAttachments;
|
|
4153
|
-
exports.MessageBranch = MessageBranch;
|
|
4154
|
-
exports.MessageBranchContent = MessageBranchContent;
|
|
4155
|
-
exports.MessageBranchNext = MessageBranchNext;
|
|
4156
|
-
exports.MessageBranchPage = MessageBranchPage;
|
|
4157
|
-
exports.MessageBranchPrevious = MessageBranchPrevious;
|
|
4158
|
-
exports.MessageBranchSelector = MessageBranchSelector;
|
|
4159
|
-
exports.MessageContent = MessageContent;
|
|
4160
|
-
exports.MessageResponse = MessageResponse;
|
|
4161
|
-
exports.MessageToolbar = MessageToolbar;
|
|
4162
3759
|
exports.ModelSelector = ModelSelector;
|
|
4163
3760
|
exports.ModelSelectorContent = ModelSelectorContent;
|
|
4164
3761
|
exports.ModelSelectorDialog = ModelSelectorDialog;
|