@yourgpt/copilot-sdk 2.1.8 → 2.1.9-alpha.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/dist/{chunk-ISOMZAYN.js → chunk-RBULQ6EJ.js} +207 -62
- package/dist/chunk-RBULQ6EJ.js.map +1 -0
- package/dist/chunk-RPR5GMWF.js +52 -0
- package/dist/chunk-RPR5GMWF.js.map +1 -0
- package/dist/{chunk-IDAQU3FP.cjs → chunk-TD7NF6OE.cjs} +207 -62
- package/dist/chunk-TD7NF6OE.cjs.map +1 -0
- package/dist/{chunk-JFVTY757.cjs → chunk-WYFJZNFT.cjs} +16 -16
- package/dist/{chunk-JFVTY757.cjs.map → chunk-WYFJZNFT.cjs.map} +1 -1
- package/dist/{chunk-H3LX6FTP.js → chunk-XVKKLLKW.js} +3 -3
- package/dist/{chunk-H3LX6FTP.js.map → chunk-XVKKLLKW.js.map} +1 -1
- package/dist/chunk-YBLAHX2Z.cjs +55 -0
- package/dist/chunk-YBLAHX2Z.cjs.map +1 -0
- package/dist/experimental/index.cjs +416 -536
- package/dist/experimental/index.cjs.map +1 -1
- package/dist/experimental/index.d.cts +189 -853
- package/dist/experimental/index.d.ts +189 -853
- package/dist/experimental/index.js +415 -530
- package/dist/experimental/index.js.map +1 -1
- package/dist/react/index.cjs +62 -62
- package/dist/react/index.d.cts +18 -0
- package/dist/react/index.d.ts +18 -0
- package/dist/react/index.js +2 -2
- package/dist/ui/index.cjs +521 -263
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.js +352 -94
- package/dist/ui/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/chunk-5EGBIQYS.cjs +0 -292
- package/dist/chunk-5EGBIQYS.cjs.map +0 -1
- package/dist/chunk-IDAQU3FP.cjs.map +0 -1
- package/dist/chunk-ISOMZAYN.js.map +0 -1
- package/dist/chunk-TXQ37MAO.js +0 -287
- package/dist/chunk-TXQ37MAO.js.map +0 -1
package/dist/ui/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWYFJZNFT_cjs = require('../chunk-WYFJZNFT.cjs');
|
|
4
4
|
var chunkJO4BHPAD_cjs = require('../chunk-JO4BHPAD.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkYBLAHX2Z_cjs = require('../chunk-YBLAHX2Z.cjs');
|
|
6
|
+
var chunkTD7NF6OE_cjs = require('../chunk-TD7NF6OE.cjs');
|
|
7
7
|
var chunk7GWEW2DU_cjs = require('../chunk-7GWEW2DU.cjs');
|
|
8
8
|
require('../chunk-JGPDQDY4.cjs');
|
|
9
9
|
require('../chunk-BJYA5NDL.cjs');
|
|
@@ -19,10 +19,8 @@ require('../chunk-2FAWEBZS.cjs');
|
|
|
19
19
|
require('../chunk-6T5XXJEP.cjs');
|
|
20
20
|
require('../chunk-GANCV72Z.cjs');
|
|
21
21
|
require('../chunk-JEQ2X3Z6.cjs');
|
|
22
|
-
var React19 = require('react');
|
|
23
|
-
var streamdown = require('streamdown');
|
|
24
|
-
var code = require('@streamdown/code');
|
|
25
22
|
var jsxRuntime = require('react/jsx-runtime');
|
|
23
|
+
var React19 = require('react');
|
|
26
24
|
var reactSlot = require('@radix-ui/react-slot');
|
|
27
25
|
var classVarianceAuthority = require('class-variance-authority');
|
|
28
26
|
var useStickToBottom = require('use-stick-to-bottom');
|
|
@@ -56,47 +54,286 @@ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive)
|
|
|
56
54
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
57
55
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
const HeadingComponent = ({
|
|
61
|
-
children,
|
|
62
|
-
className: _,
|
|
63
|
-
...props
|
|
64
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(Tag, { className: "text-[1em] font-semibold my-2 first:mt-0", ...props, children });
|
|
65
|
-
HeadingComponent.displayName = Tag.toUpperCase();
|
|
66
|
-
return HeadingComponent;
|
|
67
|
-
};
|
|
68
|
-
var headingComponents = {
|
|
69
|
-
h1: createHeading("h1"),
|
|
70
|
-
h2: createHeading("h2"),
|
|
71
|
-
h3: createHeading("h3"),
|
|
72
|
-
h4: createHeading("h4"),
|
|
73
|
-
h5: createHeading("h5"),
|
|
74
|
-
h6: createHeading("h6")
|
|
75
|
-
};
|
|
76
|
-
function MarkdownComponent({
|
|
77
|
-
children,
|
|
57
|
+
function DotsLoader({
|
|
78
58
|
className,
|
|
79
|
-
|
|
80
|
-
linkSafety = { enabled: false }
|
|
59
|
+
size = "md"
|
|
81
60
|
}) {
|
|
82
|
-
|
|
83
|
-
|
|
61
|
+
const dotSizes = {
|
|
62
|
+
sm: "h-1 w-1",
|
|
63
|
+
md: "h-1.5 w-1.5",
|
|
64
|
+
lg: "h-2 w-2"
|
|
65
|
+
};
|
|
66
|
+
const containerSizes = {
|
|
67
|
+
sm: "h-4",
|
|
68
|
+
md: "h-5",
|
|
69
|
+
lg: "h-6"
|
|
70
|
+
};
|
|
71
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
72
|
+
"div",
|
|
84
73
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
74
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
75
|
+
"flex items-center translate-y-[-2px] space-x-1",
|
|
76
|
+
containerSizes[size],
|
|
77
|
+
className
|
|
78
|
+
),
|
|
79
|
+
children: [
|
|
80
|
+
[...Array(3)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
84
|
+
"bg-primary csdk-loader-bounce-dots rounded-full",
|
|
85
|
+
dotSizes[size]
|
|
86
|
+
),
|
|
87
|
+
style: {
|
|
88
|
+
animationDelay: `${i * 160}ms`
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
i
|
|
92
|
+
)),
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
94
|
+
]
|
|
90
95
|
}
|
|
91
|
-
)
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function TypingLoader({
|
|
99
|
+
className,
|
|
100
|
+
size = "md"
|
|
101
|
+
}) {
|
|
102
|
+
const dotSizes = {
|
|
103
|
+
sm: "h-1 w-1",
|
|
104
|
+
md: "h-1.5 w-1.5",
|
|
105
|
+
lg: "h-2 w-2"
|
|
106
|
+
};
|
|
107
|
+
const containerSizes = {
|
|
108
|
+
sm: "h-4",
|
|
109
|
+
md: "h-5",
|
|
110
|
+
lg: "h-6"
|
|
111
|
+
};
|
|
112
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
116
|
+
"flex items-center space-x-1",
|
|
117
|
+
containerSizes[size],
|
|
118
|
+
className
|
|
119
|
+
),
|
|
120
|
+
children: [
|
|
121
|
+
[...Array(3)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
125
|
+
"bg-primary csdk-loader-typing rounded-full",
|
|
126
|
+
dotSizes[size]
|
|
127
|
+
),
|
|
128
|
+
style: {
|
|
129
|
+
animationDelay: `${i * 250}ms`
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
i
|
|
133
|
+
)),
|
|
134
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function WaveLoader({
|
|
140
|
+
className,
|
|
141
|
+
size = "md"
|
|
142
|
+
}) {
|
|
143
|
+
const barWidths = {
|
|
144
|
+
sm: "w-0.5",
|
|
145
|
+
md: "w-0.5",
|
|
146
|
+
lg: "w-1"
|
|
147
|
+
};
|
|
148
|
+
const containerSizes = {
|
|
149
|
+
sm: "h-4",
|
|
150
|
+
md: "h-5",
|
|
151
|
+
lg: "h-6"
|
|
152
|
+
};
|
|
153
|
+
const heights = {
|
|
154
|
+
sm: ["6px", "9px", "12px", "9px", "6px"],
|
|
155
|
+
md: ["8px", "12px", "16px", "12px", "8px"],
|
|
156
|
+
lg: ["10px", "15px", "20px", "15px", "10px"]
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
162
|
+
"flex items-center gap-0.5",
|
|
163
|
+
containerSizes[size],
|
|
164
|
+
className
|
|
165
|
+
),
|
|
166
|
+
children: [
|
|
167
|
+
[...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
171
|
+
"bg-primary csdk-loader-wave rounded-full",
|
|
172
|
+
barWidths[size]
|
|
173
|
+
),
|
|
174
|
+
style: {
|
|
175
|
+
animationDelay: `${i * 100}ms`,
|
|
176
|
+
height: heights[size][i]
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
i
|
|
180
|
+
)),
|
|
181
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function TerminalLoader({
|
|
187
|
+
className,
|
|
188
|
+
size = "md"
|
|
189
|
+
}) {
|
|
190
|
+
const cursorSizes = {
|
|
191
|
+
sm: "h-3 w-1.5",
|
|
192
|
+
md: "h-4 w-2",
|
|
193
|
+
lg: "h-5 w-2.5"
|
|
194
|
+
};
|
|
195
|
+
const textSizes = {
|
|
196
|
+
sm: "text-xs",
|
|
197
|
+
md: "text-sm",
|
|
198
|
+
lg: "text-base"
|
|
199
|
+
};
|
|
200
|
+
const containerSizes = {
|
|
201
|
+
sm: "h-4",
|
|
202
|
+
md: "h-5",
|
|
203
|
+
lg: "h-6"
|
|
204
|
+
};
|
|
205
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
209
|
+
"flex items-center space-x-1",
|
|
210
|
+
containerSizes[size],
|
|
211
|
+
className
|
|
212
|
+
),
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkYBLAHX2Z_cjs.cn("text-primary font-mono", textSizes[size]), children: ">" }),
|
|
215
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("bg-primary csdk-loader-blink", cursorSizes[size]) }),
|
|
216
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
function TextBlinkLoader({
|
|
222
|
+
text = "Thinking",
|
|
223
|
+
className,
|
|
224
|
+
size = "md"
|
|
225
|
+
}) {
|
|
226
|
+
const textSizes = {
|
|
227
|
+
sm: "text-xs",
|
|
228
|
+
md: "text-sm",
|
|
229
|
+
lg: "text-base"
|
|
230
|
+
};
|
|
231
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
235
|
+
"csdk-loader-text-blink font-medium",
|
|
236
|
+
textSizes[size],
|
|
237
|
+
className
|
|
238
|
+
),
|
|
239
|
+
children: text
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
function TextShimmerLoader({
|
|
244
|
+
text = "Thinking",
|
|
245
|
+
className,
|
|
246
|
+
size = "md"
|
|
247
|
+
}) {
|
|
248
|
+
const textSizes = {
|
|
249
|
+
sm: "text-xs",
|
|
250
|
+
md: "text-sm",
|
|
251
|
+
lg: "text-base"
|
|
252
|
+
};
|
|
253
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
257
|
+
"bg-[linear-gradient(to_right,var(--muted-foreground)_40%,var(--foreground)_60%,var(--muted-foreground)_80%)]",
|
|
258
|
+
"bg-[length:200%_auto] bg-clip-text font-medium text-transparent",
|
|
259
|
+
"csdk-loader-shimmer",
|
|
260
|
+
textSizes[size],
|
|
261
|
+
className
|
|
262
|
+
),
|
|
263
|
+
children: text
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
function TextDotsLoader({
|
|
268
|
+
className,
|
|
269
|
+
text = "Thinking",
|
|
270
|
+
size = "md"
|
|
271
|
+
}) {
|
|
272
|
+
const textSizes = {
|
|
273
|
+
sm: "text-xs",
|
|
274
|
+
md: "text-sm",
|
|
275
|
+
lg: "text-base"
|
|
276
|
+
};
|
|
277
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("inline-flex items-center", className), children: [
|
|
278
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkYBLAHX2Z_cjs.cn("text-primary font-medium", textSizes[size]), children: text }),
|
|
279
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex", children: [
|
|
280
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
281
|
+
"span",
|
|
282
|
+
{
|
|
283
|
+
className: "text-primary csdk-loader-loading-dots",
|
|
284
|
+
style: { animationDelay: "0.2s" },
|
|
285
|
+
children: "."
|
|
286
|
+
}
|
|
287
|
+
),
|
|
288
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
289
|
+
"span",
|
|
290
|
+
{
|
|
291
|
+
className: "text-primary csdk-loader-loading-dots",
|
|
292
|
+
style: { animationDelay: "0.4s" },
|
|
293
|
+
children: "."
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
297
|
+
"span",
|
|
298
|
+
{
|
|
299
|
+
className: "text-primary csdk-loader-loading-dots",
|
|
300
|
+
style: { animationDelay: "0.6s" },
|
|
301
|
+
children: "."
|
|
302
|
+
}
|
|
303
|
+
)
|
|
304
|
+
] })
|
|
305
|
+
] });
|
|
306
|
+
}
|
|
307
|
+
function Loader({
|
|
308
|
+
variant = "typing",
|
|
309
|
+
size = "md",
|
|
310
|
+
text,
|
|
311
|
+
className
|
|
312
|
+
}) {
|
|
313
|
+
switch (variant) {
|
|
314
|
+
case "dots":
|
|
315
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DotsLoader, { size, className });
|
|
316
|
+
case "typing":
|
|
317
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TypingLoader, { size, className });
|
|
318
|
+
case "wave":
|
|
319
|
+
return /* @__PURE__ */ jsxRuntime.jsx(WaveLoader, { size, className });
|
|
320
|
+
case "terminal":
|
|
321
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TerminalLoader, { size, className });
|
|
322
|
+
case "text-blink":
|
|
323
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextBlinkLoader, { text, size, className });
|
|
324
|
+
case "text-shimmer":
|
|
325
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextShimmerLoader, { text, size, className });
|
|
326
|
+
case "loading-dots":
|
|
327
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextDotsLoader, { text, size, className });
|
|
328
|
+
default:
|
|
329
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TypingLoader, { size, className });
|
|
330
|
+
}
|
|
92
331
|
}
|
|
93
|
-
var Markdown = React19.memo(MarkdownComponent);
|
|
94
|
-
Markdown.displayName = "Markdown";
|
|
95
332
|
function CodeBlock({ children, className, ...props }) {
|
|
96
333
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
334
|
"div",
|
|
98
335
|
{
|
|
99
|
-
className:
|
|
336
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
100
337
|
"not-prose flex w-full flex-col overflow-clip border",
|
|
101
338
|
"border-border bg-card text-card-foreground rounded-xl",
|
|
102
339
|
className
|
|
@@ -137,7 +374,7 @@ var Button = React19__namespace.forwardRef(
|
|
|
137
374
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
138
375
|
Comp,
|
|
139
376
|
{
|
|
140
|
-
className:
|
|
377
|
+
className: chunkYBLAHX2Z_cjs.cn(buttonVariants({ variant, size, className })),
|
|
141
378
|
ref,
|
|
142
379
|
...props
|
|
143
380
|
}
|
|
@@ -213,7 +450,7 @@ function FeedbackBar({
|
|
|
213
450
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
214
451
|
"div",
|
|
215
452
|
{
|
|
216
|
-
className:
|
|
453
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
217
454
|
"bg-background border-border inline-flex rounded-[12px] border text-sm",
|
|
218
455
|
className
|
|
219
456
|
),
|
|
@@ -274,7 +511,7 @@ function ChatContainerRoot({
|
|
|
274
511
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
275
512
|
StickToBottom,
|
|
276
513
|
{
|
|
277
|
-
className:
|
|
514
|
+
className: chunkYBLAHX2Z_cjs.cn("min-h-0", className),
|
|
278
515
|
resize: "smooth",
|
|
279
516
|
initial: "instant",
|
|
280
517
|
role: "log",
|
|
@@ -291,7 +528,7 @@ function ChatContainerContent({
|
|
|
291
528
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
292
529
|
StickToBottom.Content,
|
|
293
530
|
{
|
|
294
|
-
className:
|
|
531
|
+
className: chunkYBLAHX2Z_cjs.cn("flex w-full flex-col", className),
|
|
295
532
|
...props,
|
|
296
533
|
children
|
|
297
534
|
}
|
|
@@ -304,7 +541,7 @@ function ChatContainerScrollAnchor({
|
|
|
304
541
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
305
542
|
"div",
|
|
306
543
|
{
|
|
307
|
-
className:
|
|
544
|
+
className: chunkYBLAHX2Z_cjs.cn("h-px w-full shrink-0 scroll-mt-4", className),
|
|
308
545
|
"aria-hidden": "true",
|
|
309
546
|
...props
|
|
310
547
|
}
|
|
@@ -338,7 +575,7 @@ function ScrollButton({
|
|
|
338
575
|
{
|
|
339
576
|
variant,
|
|
340
577
|
size,
|
|
341
|
-
className:
|
|
578
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
342
579
|
"h-10 w-10 rounded-full transition-all duration-150 ease-out shadow-md bg-background",
|
|
343
580
|
!isAtBottom ? "translate-y-0 scale-100 opacity-100" : "pointer-events-none translate-y-4 scale-95 opacity-0",
|
|
344
581
|
className
|
|
@@ -388,7 +625,7 @@ function TooltipContent({
|
|
|
388
625
|
return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Positioner, { side, align, sideOffset, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
389
626
|
tooltip.Tooltip.Popup,
|
|
390
627
|
{
|
|
391
|
-
className:
|
|
628
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
392
629
|
"z-50 rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-md",
|
|
393
630
|
"animate-in fade-in-0 zoom-in-95",
|
|
394
631
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
@@ -405,7 +642,7 @@ var Avatar = React19__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
405
642
|
AvatarPrimitive__namespace.Root,
|
|
406
643
|
{
|
|
407
644
|
ref,
|
|
408
|
-
className:
|
|
645
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
409
646
|
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
410
647
|
className
|
|
411
648
|
),
|
|
@@ -417,7 +654,7 @@ var AvatarImage = React19__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
417
654
|
AvatarPrimitive__namespace.Image,
|
|
418
655
|
{
|
|
419
656
|
ref,
|
|
420
|
-
className:
|
|
657
|
+
className: chunkYBLAHX2Z_cjs.cn("aspect-square h-full w-full object-cover", className),
|
|
421
658
|
...props
|
|
422
659
|
}
|
|
423
660
|
));
|
|
@@ -426,7 +663,7 @@ var AvatarFallback = React19__namespace.forwardRef(({ className, ...props }, ref
|
|
|
426
663
|
AvatarPrimitive__namespace.Fallback,
|
|
427
664
|
{
|
|
428
665
|
ref,
|
|
429
|
-
className:
|
|
666
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
430
667
|
"csdk-avatar-fallback flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
431
668
|
className
|
|
432
669
|
),
|
|
@@ -434,7 +671,7 @@ var AvatarFallback = React19__namespace.forwardRef(({ className, ...props }, ref
|
|
|
434
671
|
}
|
|
435
672
|
));
|
|
436
673
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
437
|
-
var Message = ({ children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
674
|
+
var Message = ({ children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-message flex gap-3", className), ...props, children });
|
|
438
675
|
var MessageAvatar = ({
|
|
439
676
|
src,
|
|
440
677
|
alt = "Avatar",
|
|
@@ -445,9 +682,9 @@ var MessageAvatar = ({
|
|
|
445
682
|
className
|
|
446
683
|
}) => {
|
|
447
684
|
if (children) {
|
|
448
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
685
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkYBLAHX2Z_cjs.cn("csdk-avatar flex shrink-0 size-7", className), children });
|
|
449
686
|
}
|
|
450
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className:
|
|
687
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: chunkYBLAHX2Z_cjs.cn("csdk-avatar size-7 shrink-0", className), children: [
|
|
451
688
|
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src, alt }),
|
|
452
689
|
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { delayMs, children: fallbackIcon || fallback })
|
|
453
690
|
] });
|
|
@@ -464,7 +701,7 @@ var MessageContent = ({
|
|
|
464
701
|
size = "sm",
|
|
465
702
|
...props
|
|
466
703
|
}) => {
|
|
467
|
-
const classNames =
|
|
704
|
+
const classNames = chunkYBLAHX2Z_cjs.cn(
|
|
468
705
|
"csdk-message-content rounded-lg p-2 break-words whitespace-normal max-w-full overflow-x-auto overflow-y-hidden",
|
|
469
706
|
// Typography - simple Tailwind utilities (no prose)
|
|
470
707
|
"[&_p]:my-1 ",
|
|
@@ -480,7 +717,7 @@ var MessageContent = ({
|
|
|
480
717
|
textSizeMap[size],
|
|
481
718
|
className
|
|
482
719
|
);
|
|
483
|
-
return markdown ? /* @__PURE__ */ jsxRuntime.jsx(Markdown, { className: classNames, ...props, children }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames, ...props, children });
|
|
720
|
+
return markdown ? /* @__PURE__ */ jsxRuntime.jsx(chunkYBLAHX2Z_cjs.Markdown, { className: classNames, ...props, children }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames, ...props, children });
|
|
484
721
|
};
|
|
485
722
|
var MessageActions = ({
|
|
486
723
|
children,
|
|
@@ -489,7 +726,7 @@ var MessageActions = ({
|
|
|
489
726
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
490
727
|
"div",
|
|
491
728
|
{
|
|
492
|
-
className:
|
|
729
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
493
730
|
"csdk-message-actions text-muted-foreground flex items-center gap-2",
|
|
494
731
|
className
|
|
495
732
|
),
|
|
@@ -513,7 +750,7 @@ var Textarea = React19__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
|
513
750
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
514
751
|
"textarea",
|
|
515
752
|
{
|
|
516
|
-
className:
|
|
753
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
517
754
|
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
518
755
|
className
|
|
519
756
|
),
|
|
@@ -574,7 +811,7 @@ function PromptInput({
|
|
|
574
811
|
"div",
|
|
575
812
|
{
|
|
576
813
|
onClick: handleClick,
|
|
577
|
-
className:
|
|
814
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
578
815
|
"csdk-input border-input bg-background cursor-text rounded-3xl border p-2 shadow-xs",
|
|
579
816
|
disabled && "cursor-not-allowed opacity-60",
|
|
580
817
|
className
|
|
@@ -634,7 +871,7 @@ function PromptInputTextarea({
|
|
|
634
871
|
value,
|
|
635
872
|
onChange: handleChange,
|
|
636
873
|
onKeyDown: handleKeyDown,
|
|
637
|
-
className:
|
|
874
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
638
875
|
"csdk-input-textarea text-foreground min-h-[44px] w-full resize-none border-none bg-transparent shadow-none outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
639
876
|
className
|
|
640
877
|
),
|
|
@@ -649,7 +886,7 @@ function PromptInputActions({
|
|
|
649
886
|
className,
|
|
650
887
|
...props
|
|
651
888
|
}) {
|
|
652
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
889
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("flex items-center gap-2", className), ...props, children });
|
|
653
890
|
}
|
|
654
891
|
function PromptInputAction({
|
|
655
892
|
tooltip,
|
|
@@ -679,7 +916,7 @@ var HoverCardContent = React19__namespace.forwardRef(({ className, align = "cent
|
|
|
679
916
|
ref,
|
|
680
917
|
align,
|
|
681
918
|
sideOffset,
|
|
682
|
-
className:
|
|
919
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
683
920
|
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
684
921
|
className
|
|
685
922
|
),
|
|
@@ -715,7 +952,7 @@ function SourceTrigger({
|
|
|
715
952
|
href,
|
|
716
953
|
target: "_blank",
|
|
717
954
|
rel: "noopener noreferrer",
|
|
718
|
-
className:
|
|
955
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
719
956
|
"inline-flex h-7 items-center gap-1.5 rounded-full border border-border/50 bg-background px-2.5 text-xs text-foreground/80 no-underline shadow-sm transition-all duration-150",
|
|
720
957
|
"hover:bg-muted hover:border-border hover:shadow-md hover:text-foreground",
|
|
721
958
|
className
|
|
@@ -747,7 +984,7 @@ function SourceContent({
|
|
|
747
984
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
748
985
|
HoverCardContent,
|
|
749
986
|
{
|
|
750
|
-
className:
|
|
987
|
+
className: chunkYBLAHX2Z_cjs.cn("w-80 p-0 shadow-lg border border-border/50", className),
|
|
751
988
|
sideOffset: 8,
|
|
752
989
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
753
990
|
"a",
|
|
@@ -791,7 +1028,7 @@ function SourceGroup({
|
|
|
791
1028
|
if (!sources || sources.length === 0) return null;
|
|
792
1029
|
const visibleSources = sources.slice(0, maxVisible);
|
|
793
1030
|
const hiddenCount = sources.length - maxVisible;
|
|
794
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1031
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("flex flex-wrap items-center gap-2", className), children: [
|
|
795
1032
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }),
|
|
796
1033
|
visibleSources.map((source, index) => /* @__PURE__ */ jsxRuntime.jsxs(Source, { href: source.href, children: [
|
|
797
1034
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -835,7 +1072,7 @@ function SimpleSource({
|
|
|
835
1072
|
href,
|
|
836
1073
|
target: "_blank",
|
|
837
1074
|
rel: "noopener noreferrer",
|
|
838
|
-
className:
|
|
1075
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
839
1076
|
"bg-muted text-muted-foreground hover:bg-primary/20 hover:text-primary",
|
|
840
1077
|
"inline-flex h-5 items-center gap-1 rounded-full text-xs no-underline transition-colors",
|
|
841
1078
|
showFavicon ? "pr-2 pl-1" : "px-1.5",
|
|
@@ -874,13 +1111,13 @@ function SearchResults({
|
|
|
874
1111
|
}) {
|
|
875
1112
|
const displayResults = maxResults ? results.slice(0, maxResults) : results;
|
|
876
1113
|
if (displayResults.length === 0) {
|
|
877
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1114
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("text-muted-foreground text-sm", className), children: "No results found" });
|
|
878
1115
|
}
|
|
879
1116
|
if (variant === "compact") {
|
|
880
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1117
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("flex flex-wrap gap-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(SearchResultCompact, { result, index: i + 1 }, i)) });
|
|
881
1118
|
}
|
|
882
1119
|
if (variant === "list") {
|
|
883
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1120
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("space-y-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
884
1121
|
SearchResultList,
|
|
885
1122
|
{
|
|
886
1123
|
result,
|
|
@@ -891,7 +1128,7 @@ function SearchResults({
|
|
|
891
1128
|
i
|
|
892
1129
|
)) });
|
|
893
1130
|
}
|
|
894
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1131
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("grid gap-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
895
1132
|
SearchResultCard,
|
|
896
1133
|
{
|
|
897
1134
|
result,
|
|
@@ -1014,7 +1251,7 @@ function SearchAnswer({ answer, className }) {
|
|
|
1014
1251
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1015
1252
|
"div",
|
|
1016
1253
|
{
|
|
1017
|
-
className:
|
|
1254
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1018
1255
|
"p-3 bg-muted/50 rounded-lg border-l-2 border-primary/50",
|
|
1019
1256
|
className
|
|
1020
1257
|
),
|
|
@@ -1029,7 +1266,7 @@ function SearchResultsWithAnswer({
|
|
|
1029
1266
|
showAnswer = true,
|
|
1030
1267
|
maxResults
|
|
1031
1268
|
}) {
|
|
1032
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1269
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("space-y-3", className), children: [
|
|
1033
1270
|
showAnswer && response.answer && /* @__PURE__ */ jsxRuntime.jsx(SearchAnswer, { answer: response.answer }),
|
|
1034
1271
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1035
1272
|
SearchResults,
|
|
@@ -1094,7 +1331,7 @@ function CitationBadge({
|
|
|
1094
1331
|
const badge = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1095
1332
|
"span",
|
|
1096
1333
|
{
|
|
1097
|
-
className:
|
|
1334
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1098
1335
|
"inline-flex items-center justify-center rounded font-medium",
|
|
1099
1336
|
"bg-primary/10 text-primary hover:bg-primary/20",
|
|
1100
1337
|
"cursor-pointer transition-colors",
|
|
@@ -1129,7 +1366,7 @@ function CitationSuperscript({
|
|
|
1129
1366
|
const sup = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1130
1367
|
"sup",
|
|
1131
1368
|
{
|
|
1132
|
-
className:
|
|
1369
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1133
1370
|
"text-[10px] text-primary hover:underline cursor-pointer ml-0.5",
|
|
1134
1371
|
className
|
|
1135
1372
|
),
|
|
@@ -1160,7 +1397,7 @@ function SourcePill({
|
|
|
1160
1397
|
target: "_blank",
|
|
1161
1398
|
rel: "noopener noreferrer",
|
|
1162
1399
|
title: citation.title,
|
|
1163
|
-
className:
|
|
1400
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1164
1401
|
"inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded-full",
|
|
1165
1402
|
"bg-muted hover:bg-muted/80 transition-colors",
|
|
1166
1403
|
"text-muted-foreground hover:text-foreground",
|
|
@@ -1195,7 +1432,7 @@ function SourcesBar({
|
|
|
1195
1432
|
const visibleCitations = citations.slice(0, maxVisible);
|
|
1196
1433
|
const hiddenCount = citations.length - maxVisible;
|
|
1197
1434
|
if (citations.length === 0) return null;
|
|
1198
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1435
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("flex items-center gap-2", className), children: [
|
|
1199
1436
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground flex items-center gap-1", children: [
|
|
1200
1437
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "w-3 h-3" }),
|
|
1201
1438
|
label
|
|
@@ -1218,7 +1455,7 @@ function SourcesCollapsible({
|
|
|
1218
1455
|
}) {
|
|
1219
1456
|
const [expanded, setExpanded] = React19__namespace.useState(defaultExpanded);
|
|
1220
1457
|
if (citations.length === 0) return null;
|
|
1221
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1458
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("border rounded-lg", className), children: [
|
|
1222
1459
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1223
1460
|
"button",
|
|
1224
1461
|
{
|
|
@@ -1280,7 +1517,7 @@ function SourcesList({
|
|
|
1280
1517
|
}) {
|
|
1281
1518
|
if (citations.length === 0) return null;
|
|
1282
1519
|
if (compact) {
|
|
1283
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1520
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("text-xs text-muted-foreground", className), children: [
|
|
1284
1521
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Sources: " }),
|
|
1285
1522
|
citations.map((c, i) => /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
|
|
1286
1523
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1301,7 +1538,7 @@ function SourcesList({
|
|
|
1301
1538
|
] }, c.index))
|
|
1302
1539
|
] });
|
|
1303
1540
|
}
|
|
1304
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1541
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("space-y-1", className), children: citations.map((citation) => /* @__PURE__ */ jsxRuntime.jsx(SourceItem, { citation }, citation.index)) });
|
|
1305
1542
|
}
|
|
1306
1543
|
function MessageWithCitations({
|
|
1307
1544
|
children,
|
|
@@ -1313,7 +1550,7 @@ function MessageWithCitations({
|
|
|
1313
1550
|
if (!enabled || citations.length === 0) {
|
|
1314
1551
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children });
|
|
1315
1552
|
}
|
|
1316
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1553
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("space-y-3", className), children: [
|
|
1317
1554
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children }),
|
|
1318
1555
|
sourcesPosition === "bottom" && /* @__PURE__ */ jsxRuntime.jsx(SourcesBar, { citations, maxVisible }),
|
|
1319
1556
|
sourcesPosition === "collapsible" && /* @__PURE__ */ jsxRuntime.jsx(SourcesCollapsible, { citations })
|
|
@@ -1403,7 +1640,7 @@ function Reasoning({
|
|
|
1403
1640
|
}
|
|
1404
1641
|
prevStreamingRef.current = isStreaming;
|
|
1405
1642
|
}, [isStreaming, setIsOpen]);
|
|
1406
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ReasoningContext.Provider, { value: { isOpen, setIsOpen, isStreaming }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1643
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReasoningContext.Provider, { value: { isOpen, setIsOpen, isStreaming }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("reasoning", className), children }) });
|
|
1407
1644
|
}
|
|
1408
1645
|
function ReasoningTrigger({
|
|
1409
1646
|
children,
|
|
@@ -1415,7 +1652,7 @@ function ReasoningTrigger({
|
|
|
1415
1652
|
{
|
|
1416
1653
|
type: "button",
|
|
1417
1654
|
onClick: () => setIsOpen(!isOpen),
|
|
1418
|
-
className:
|
|
1655
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1419
1656
|
"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",
|
|
1420
1657
|
"py-1 px-0 bg-transparent border-none cursor-pointer",
|
|
1421
1658
|
className
|
|
@@ -1425,7 +1662,7 @@ function ReasoningTrigger({
|
|
|
1425
1662
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1426
1663
|
"svg",
|
|
1427
1664
|
{
|
|
1428
|
-
className:
|
|
1665
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1429
1666
|
"size-3 transition-transform duration-200",
|
|
1430
1667
|
isOpen && "rotate-90"
|
|
1431
1668
|
),
|
|
@@ -1455,9 +1692,9 @@ function ReasoningContent({
|
|
|
1455
1692
|
const [height, setHeight] = React19__namespace.useState(0);
|
|
1456
1693
|
React19__namespace.useEffect(() => {
|
|
1457
1694
|
if (contentRef.current) {
|
|
1458
|
-
const resizeObserver = new ResizeObserver((
|
|
1459
|
-
|
|
1460
|
-
setHeight(
|
|
1695
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
1696
|
+
if (contentRef.current) {
|
|
1697
|
+
setHeight(contentRef.current.offsetHeight);
|
|
1461
1698
|
}
|
|
1462
1699
|
});
|
|
1463
1700
|
resizeObserver.observe(contentRef.current);
|
|
@@ -1467,7 +1704,7 @@ function ReasoningContent({
|
|
|
1467
1704
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1468
1705
|
"div",
|
|
1469
1706
|
{
|
|
1470
|
-
className:
|
|
1707
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1471
1708
|
"overflow-hidden transition-[max-height] duration-200 ease-out",
|
|
1472
1709
|
isOpen ? "opacity-100" : "opacity-0"
|
|
1473
1710
|
),
|
|
@@ -1477,12 +1714,12 @@ function ReasoningContent({
|
|
|
1477
1714
|
"div",
|
|
1478
1715
|
{
|
|
1479
1716
|
ref: contentRef,
|
|
1480
|
-
className:
|
|
1481
|
-
"mt-1 pl-3 border-l-2 border-muted-foreground/20",
|
|
1717
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1718
|
+
"mt-1 pl-3 pb-2 border-l-2 border-muted-foreground/20",
|
|
1482
1719
|
"text-xs text-muted-foreground",
|
|
1483
1720
|
className
|
|
1484
1721
|
),
|
|
1485
|
-
children: markdown && typeof children === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Markdown, { className: "prose-xs", children }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap", children })
|
|
1722
|
+
children: markdown && typeof children === "string" ? /* @__PURE__ */ jsxRuntime.jsx(chunkYBLAHX2Z_cjs.Markdown, { className: "prose-xs", children }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap", children })
|
|
1486
1723
|
}
|
|
1487
1724
|
)
|
|
1488
1725
|
}
|
|
@@ -1562,7 +1799,7 @@ function StatusIndicator({ status, className }) {
|
|
|
1562
1799
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1563
1800
|
"div",
|
|
1564
1801
|
{
|
|
1565
|
-
className:
|
|
1802
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1566
1803
|
baseClasses,
|
|
1567
1804
|
"size-3 flex items-center justify-center",
|
|
1568
1805
|
className
|
|
@@ -1576,7 +1813,7 @@ function StatusIndicator({ status, className }) {
|
|
|
1576
1813
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1577
1814
|
"div",
|
|
1578
1815
|
{
|
|
1579
|
-
className:
|
|
1816
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1580
1817
|
baseClasses,
|
|
1581
1818
|
"size-3 flex items-center justify-center",
|
|
1582
1819
|
className
|
|
@@ -1607,7 +1844,7 @@ function StatusIndicator({ status, className }) {
|
|
|
1607
1844
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1608
1845
|
"div",
|
|
1609
1846
|
{
|
|
1610
|
-
className:
|
|
1847
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1611
1848
|
baseClasses,
|
|
1612
1849
|
"size-3 flex items-center justify-center",
|
|
1613
1850
|
className
|
|
@@ -1672,7 +1909,7 @@ function ToolStep({
|
|
|
1672
1909
|
const isExecuting = step.status === "executing";
|
|
1673
1910
|
const isCompleted = step.status === "completed";
|
|
1674
1911
|
const isError = step.status === "error" || step.status === "failed" || step.status === "rejected";
|
|
1675
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1912
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("relative", className), children: [
|
|
1676
1913
|
showLine && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1677
1914
|
"div",
|
|
1678
1915
|
{
|
|
@@ -1689,16 +1926,16 @@ function ToolStep({
|
|
|
1689
1926
|
type: "button",
|
|
1690
1927
|
onClick: () => debug && hasDebugContent && setExpanded(!expanded),
|
|
1691
1928
|
disabled: !debug || !hasDebugContent,
|
|
1692
|
-
className:
|
|
1929
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1693
1930
|
"flex items-center gap-2 text-left min-w-0 w-full",
|
|
1694
1931
|
debug && hasDebugContent && "cursor-pointer hover:text-foreground",
|
|
1695
1932
|
!debug && "cursor-default"
|
|
1696
1933
|
),
|
|
1697
1934
|
children: [
|
|
1698
|
-
isExecuting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1935
|
+
isExecuting ? /* @__PURE__ */ jsxRuntime.jsx(TextShimmerLoader, { text: displayTitle, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1699
1936
|
"span",
|
|
1700
1937
|
{
|
|
1701
|
-
className:
|
|
1938
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1702
1939
|
"text-sm truncate",
|
|
1703
1940
|
isCompleted && "text-foreground",
|
|
1704
1941
|
isError && "text-red-500",
|
|
@@ -1710,7 +1947,7 @@ function ToolStep({
|
|
|
1710
1947
|
debug && hasDebugContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1711
1948
|
"svg",
|
|
1712
1949
|
{
|
|
1713
|
-
className:
|
|
1950
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1714
1951
|
"size-3 text-muted-foreground/40 transition-transform ml-auto flex-shrink-0",
|
|
1715
1952
|
expanded && "rotate-90"
|
|
1716
1953
|
),
|
|
@@ -1739,7 +1976,7 @@ function ToolStep({
|
|
|
1739
1976
|
step.result && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1740
1977
|
"div",
|
|
1741
1978
|
{
|
|
1742
|
-
className:
|
|
1979
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
1743
1980
|
"text-[10px] font-mono rounded px-2 py-1 overflow-x-auto whitespace-pre-wrap break-all",
|
|
1744
1981
|
step.result.success !== false ? "bg-green-500/10 text-green-600 dark:text-green-400" : "bg-red-500/10 text-red-600 dark:text-red-400"
|
|
1745
1982
|
),
|
|
@@ -1770,7 +2007,7 @@ function ToolSteps({
|
|
|
1770
2007
|
className
|
|
1771
2008
|
}) {
|
|
1772
2009
|
if (steps.length === 0) return null;
|
|
1773
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2010
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("space-y-1.5", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1774
2011
|
ToolStep,
|
|
1775
2012
|
{
|
|
1776
2013
|
step,
|
|
@@ -1789,7 +2026,7 @@ function InlineToolSteps({
|
|
|
1789
2026
|
if (steps.length === 0) return null;
|
|
1790
2027
|
const visibleSteps = steps.slice(0, maxVisible);
|
|
1791
2028
|
const hiddenCount = steps.length - maxVisible;
|
|
1792
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2029
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("flex items-center gap-1", className), children: [
|
|
1793
2030
|
visibleSteps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1794
2031
|
"div",
|
|
1795
2032
|
{
|
|
@@ -2170,7 +2407,7 @@ function Confirmation({
|
|
|
2170
2407
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2171
2408
|
"div",
|
|
2172
2409
|
{
|
|
2173
|
-
className:
|
|
2410
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2174
2411
|
"csdk-confirm-card",
|
|
2175
2412
|
"confirmation rounded-2xl overflow-hidden",
|
|
2176
2413
|
"border border-border/60",
|
|
@@ -2189,7 +2426,7 @@ function ConfirmationPending({
|
|
|
2189
2426
|
}) {
|
|
2190
2427
|
const { state } = useConfirmationContext();
|
|
2191
2428
|
if (state !== "pending") return null;
|
|
2192
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2429
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("pl-5 pr-4 pt-4 pb-3", className), children });
|
|
2193
2430
|
}
|
|
2194
2431
|
function ConfirmationApproved({
|
|
2195
2432
|
children,
|
|
@@ -2200,7 +2437,7 @@ function ConfirmationApproved({
|
|
|
2200
2437
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2201
2438
|
"div",
|
|
2202
2439
|
{
|
|
2203
|
-
className:
|
|
2440
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2204
2441
|
"csdk-confirm-result",
|
|
2205
2442
|
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2206
2443
|
"rounded-2xl border border-green-200/60 dark:border-green-800/40",
|
|
@@ -2223,7 +2460,7 @@ function ConfirmationRejected({
|
|
|
2223
2460
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2224
2461
|
"div",
|
|
2225
2462
|
{
|
|
2226
|
-
className:
|
|
2463
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2227
2464
|
"csdk-confirm-result",
|
|
2228
2465
|
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2229
2466
|
"rounded-2xl border border-red-200/60 dark:border-red-800/40",
|
|
@@ -2242,7 +2479,7 @@ function ConfirmationMessage({
|
|
|
2242
2479
|
className
|
|
2243
2480
|
}) {
|
|
2244
2481
|
const { message } = useConfirmationContext();
|
|
2245
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2482
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("flex items-start gap-3", className), children: [
|
|
2246
2483
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-xl bg-amber-100 dark:bg-amber-950/50 ring-1 ring-amber-200/60 dark:ring-amber-800/40", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTriangleIcon, { className: "h-4 w-4 text-amber-600 dark:text-amber-400" }) }),
|
|
2247
2484
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "flex-1 min-w-0 pt-0.5 text-sm text-foreground leading-snug", children: children || message || "This action requires your approval." })
|
|
2248
2485
|
] });
|
|
@@ -2255,17 +2492,17 @@ function ConfirmationActions({
|
|
|
2255
2492
|
}) {
|
|
2256
2493
|
const { onApprove, onReject } = useConfirmationContext();
|
|
2257
2494
|
if (children) {
|
|
2258
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2495
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("mt-3 flex justify-end gap-2", className), children });
|
|
2259
2496
|
}
|
|
2260
2497
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2261
2498
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0 border-t border-border/40 mt-3" }),
|
|
2262
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2499
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("flex justify-end gap-2 pt-3", className), children: [
|
|
2263
2500
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2264
2501
|
"button",
|
|
2265
2502
|
{
|
|
2266
2503
|
type: "button",
|
|
2267
2504
|
onClick: onReject,
|
|
2268
|
-
className:
|
|
2505
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2269
2506
|
"csdk-confirm-btn",
|
|
2270
2507
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2271
2508
|
"border border-border/80 bg-transparent text-muted-foreground",
|
|
@@ -2279,7 +2516,7 @@ function ConfirmationActions({
|
|
|
2279
2516
|
{
|
|
2280
2517
|
type: "button",
|
|
2281
2518
|
onClick: onApprove,
|
|
2282
|
-
className:
|
|
2519
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2283
2520
|
"csdk-confirm-btn",
|
|
2284
2521
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2285
2522
|
"bg-primary text-primary-foreground",
|
|
@@ -2366,7 +2603,7 @@ function PermissionConfirmation({
|
|
|
2366
2603
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2367
2604
|
"div",
|
|
2368
2605
|
{
|
|
2369
|
-
className:
|
|
2606
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2370
2607
|
"csdk-confirm-result",
|
|
2371
2608
|
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2372
2609
|
"rounded-2xl border border-green-200/60 dark:border-green-800/40",
|
|
@@ -2384,7 +2621,7 @@ function PermissionConfirmation({
|
|
|
2384
2621
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2385
2622
|
"div",
|
|
2386
2623
|
{
|
|
2387
|
-
className:
|
|
2624
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2388
2625
|
"csdk-confirm-result",
|
|
2389
2626
|
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2390
2627
|
"rounded-2xl border border-red-200/60 dark:border-red-800/40",
|
|
@@ -2401,7 +2638,7 @@ function PermissionConfirmation({
|
|
|
2401
2638
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2402
2639
|
"div",
|
|
2403
2640
|
{
|
|
2404
|
-
className:
|
|
2641
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2405
2642
|
"csdk-confirm-card",
|
|
2406
2643
|
"w-full rounded-2xl overflow-hidden",
|
|
2407
2644
|
"border border-border/60",
|
|
@@ -2423,7 +2660,7 @@ function PermissionConfirmation({
|
|
|
2423
2660
|
{
|
|
2424
2661
|
type: "button",
|
|
2425
2662
|
onClick: handleReject,
|
|
2426
|
-
className:
|
|
2663
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2427
2664
|
"csdk-confirm-btn",
|
|
2428
2665
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2429
2666
|
"border border-border/80 bg-transparent text-muted-foreground",
|
|
@@ -2437,7 +2674,7 @@ function PermissionConfirmation({
|
|
|
2437
2674
|
{
|
|
2438
2675
|
type: "button",
|
|
2439
2676
|
onClick: handleApprove,
|
|
2440
|
-
className:
|
|
2677
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2441
2678
|
"csdk-confirm-btn",
|
|
2442
2679
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2443
2680
|
"bg-primary text-primary-foreground",
|
|
@@ -2469,7 +2706,7 @@ function CompactPermissionConfirmation({
|
|
|
2469
2706
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2470
2707
|
"div",
|
|
2471
2708
|
{
|
|
2472
|
-
className:
|
|
2709
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2473
2710
|
"csdk-confirm-result",
|
|
2474
2711
|
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2475
2712
|
"rounded-2xl border border-green-200/60 dark:border-green-800/40",
|
|
@@ -2487,7 +2724,7 @@ function CompactPermissionConfirmation({
|
|
|
2487
2724
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2488
2725
|
"div",
|
|
2489
2726
|
{
|
|
2490
|
-
className:
|
|
2727
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2491
2728
|
"csdk-confirm-result",
|
|
2492
2729
|
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2493
2730
|
"rounded-2xl border border-red-200/60 dark:border-red-800/40",
|
|
@@ -2504,7 +2741,7 @@ function CompactPermissionConfirmation({
|
|
|
2504
2741
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2505
2742
|
"div",
|
|
2506
2743
|
{
|
|
2507
|
-
className:
|
|
2744
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2508
2745
|
"csdk-confirm-card",
|
|
2509
2746
|
"w-full rounded-2xl overflow-hidden",
|
|
2510
2747
|
"border border-border/60",
|
|
@@ -2523,7 +2760,7 @@ function CompactPermissionConfirmation({
|
|
|
2523
2760
|
{
|
|
2524
2761
|
type: "button",
|
|
2525
2762
|
onClick: handleReject,
|
|
2526
|
-
className:
|
|
2763
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2527
2764
|
"csdk-confirm-btn",
|
|
2528
2765
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2529
2766
|
"border border-border/80 bg-transparent text-muted-foreground",
|
|
@@ -2537,7 +2774,7 @@ function CompactPermissionConfirmation({
|
|
|
2537
2774
|
{
|
|
2538
2775
|
type: "button",
|
|
2539
2776
|
onClick: handleApprove,
|
|
2540
|
-
className:
|
|
2777
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2541
2778
|
"csdk-confirm-btn",
|
|
2542
2779
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2543
2780
|
"bg-primary text-primary-foreground",
|
|
@@ -2576,11 +2813,11 @@ function FollowUpQuestions({
|
|
|
2576
2813
|
if (!questions || questions.length === 0) {
|
|
2577
2814
|
return null;
|
|
2578
2815
|
}
|
|
2579
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2816
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-followup flex flex-wrap gap-2 mt-2", className), children: questions.map((question, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2580
2817
|
"button",
|
|
2581
2818
|
{
|
|
2582
2819
|
onClick: () => onSelect(question),
|
|
2583
|
-
className:
|
|
2820
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2584
2821
|
"csdk-followup-button px-3 py-1.5 text-sm rounded-full",
|
|
2585
2822
|
"bg-primary/10 hover:bg-primary/20 text-primary",
|
|
2586
2823
|
"border border-primary/20 hover:border-primary/40",
|
|
@@ -2605,7 +2842,7 @@ function BranchNavigator({
|
|
|
2605
2842
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2606
2843
|
"div",
|
|
2607
2844
|
{
|
|
2608
|
-
className:
|
|
2845
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2609
2846
|
"csdk-branch-navigator flex items-center gap-1 text-xs text-muted-foreground select-none",
|
|
2610
2847
|
className
|
|
2611
2848
|
),
|
|
@@ -2617,7 +2854,7 @@ function BranchNavigator({
|
|
|
2617
2854
|
onClick: onPrevious,
|
|
2618
2855
|
disabled: !hasPrevious,
|
|
2619
2856
|
"aria-label": "Previous version",
|
|
2620
|
-
className:
|
|
2857
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2621
2858
|
"p-0.5 rounded transition-colors",
|
|
2622
2859
|
hasPrevious ? "hover:text-foreground hover:bg-muted cursor-pointer" : "opacity-30 cursor-default"
|
|
2623
2860
|
),
|
|
@@ -2649,7 +2886,7 @@ function BranchNavigator({
|
|
|
2649
2886
|
onClick: onNext,
|
|
2650
2887
|
disabled: !hasNext,
|
|
2651
2888
|
"aria-label": "Next version",
|
|
2652
|
-
className:
|
|
2889
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2653
2890
|
"p-0.5 rounded transition-colors",
|
|
2654
2891
|
hasNext ? "hover:text-foreground hover:bg-muted cursor-pointer" : "opacity-30 cursor-default"
|
|
2655
2892
|
),
|
|
@@ -2692,7 +2929,7 @@ function DevLogger({
|
|
|
2692
2929
|
{
|
|
2693
2930
|
type: "button",
|
|
2694
2931
|
onClick: () => setIsOpen(true),
|
|
2695
|
-
className:
|
|
2932
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2696
2933
|
"fixed z-[9999] flex items-center justify-center",
|
|
2697
2934
|
"w-12 h-12 rounded-full shadow-lg",
|
|
2698
2935
|
"bg-orange-500 hover:bg-orange-600 text-white",
|
|
@@ -2769,7 +3006,7 @@ function DevLogger({
|
|
|
2769
3006
|
{
|
|
2770
3007
|
type: "button",
|
|
2771
3008
|
onClick: () => setActiveTab(tab),
|
|
2772
|
-
className:
|
|
3009
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2773
3010
|
"px-4 py-2 text-sm font-medium capitalize",
|
|
2774
3011
|
activeTab === tab ? "border-b-2 border-primary text-primary" : "text-muted-foreground hover:text-foreground"
|
|
2775
3012
|
),
|
|
@@ -2928,7 +3165,7 @@ function Row({
|
|
|
2928
3165
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2929
3166
|
"span",
|
|
2930
3167
|
{
|
|
2931
|
-
className:
|
|
3168
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2932
3169
|
mono && "font-mono text-xs bg-muted px-1.5 py-0.5 rounded",
|
|
2933
3170
|
valueClass
|
|
2934
3171
|
),
|
|
@@ -2947,7 +3184,7 @@ function Badge({ level }) {
|
|
|
2947
3184
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2948
3185
|
"span",
|
|
2949
3186
|
{
|
|
2950
|
-
className:
|
|
3187
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2951
3188
|
"px-1.5 py-0.5 rounded text-xs font-medium",
|
|
2952
3189
|
colors[level] || colors.ask
|
|
2953
3190
|
),
|
|
@@ -2965,7 +3202,7 @@ function StatusBadge({ status }) {
|
|
|
2965
3202
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2966
3203
|
"span",
|
|
2967
3204
|
{
|
|
2968
|
-
className:
|
|
3205
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
2969
3206
|
"px-1.5 py-0.5 rounded text-xs font-medium",
|
|
2970
3207
|
colors[status] || "bg-gray-100 text-gray-800"
|
|
2971
3208
|
),
|
|
@@ -3048,7 +3285,7 @@ function CapabilityBadge({
|
|
|
3048
3285
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3049
3286
|
"div",
|
|
3050
3287
|
{
|
|
3051
|
-
className:
|
|
3288
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3052
3289
|
"inline-flex items-center gap-1 rounded-full font-medium transition-colors",
|
|
3053
3290
|
sizeClasses[size],
|
|
3054
3291
|
supported ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground opacity-50",
|
|
@@ -3056,7 +3293,7 @@ function CapabilityBadge({
|
|
|
3056
3293
|
),
|
|
3057
3294
|
title: `${labels[type]}: ${descriptions[type]}`,
|
|
3058
3295
|
children: [
|
|
3059
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
3296
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkYBLAHX2Z_cjs.cn("flex-shrink-0", iconSizes[size]), children: icons[type] }),
|
|
3060
3297
|
showLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { children: labels[type] })
|
|
3061
3298
|
]
|
|
3062
3299
|
}
|
|
@@ -3081,7 +3318,7 @@ function CapabilityList({
|
|
|
3081
3318
|
];
|
|
3082
3319
|
const filteredItems = onlySupported ? items.filter((item) => item.supported) : items;
|
|
3083
3320
|
if (filteredItems.length === 0) return null;
|
|
3084
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
3321
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("flex flex-wrap gap-1", className), children: filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3085
3322
|
CapabilityBadge,
|
|
3086
3323
|
{
|
|
3087
3324
|
type: item.type,
|
|
@@ -3137,14 +3374,14 @@ function ModelSelector({
|
|
|
3137
3374
|
onChange?.(modelId, provider);
|
|
3138
3375
|
setIsOpen(false);
|
|
3139
3376
|
};
|
|
3140
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className:
|
|
3377
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: chunkYBLAHX2Z_cjs.cn("relative", className), children: [
|
|
3141
3378
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3142
3379
|
"button",
|
|
3143
3380
|
{
|
|
3144
3381
|
type: "button",
|
|
3145
3382
|
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
3146
3383
|
disabled,
|
|
3147
|
-
className:
|
|
3384
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3148
3385
|
"flex items-center justify-between gap-2 w-full rounded-md border bg-background",
|
|
3149
3386
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3150
3387
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -3159,7 +3396,7 @@ function ModelSelector({
|
|
|
3159
3396
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3160
3397
|
"svg",
|
|
3161
3398
|
{
|
|
3162
|
-
className:
|
|
3399
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3163
3400
|
"w-4 h-4 flex-shrink-0 text-muted-foreground transition-transform",
|
|
3164
3401
|
isOpen && "rotate-180"
|
|
3165
3402
|
),
|
|
@@ -3191,7 +3428,7 @@ function ModelSelector({
|
|
|
3191
3428
|
isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3192
3429
|
"div",
|
|
3193
3430
|
{
|
|
3194
|
-
className:
|
|
3431
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3195
3432
|
"csdk-model-dropdown absolute z-50 top-full left-0 right-0 mt-1",
|
|
3196
3433
|
"max-h-[300px] overflow-auto",
|
|
3197
3434
|
"rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
@@ -3205,7 +3442,7 @@ function ModelSelector({
|
|
|
3205
3442
|
{
|
|
3206
3443
|
type: "button",
|
|
3207
3444
|
onClick: () => handleSelect(model.id, provider.name),
|
|
3208
|
-
className:
|
|
3445
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3209
3446
|
"flex flex-col gap-0.5 w-full px-3 py-2 text-left",
|
|
3210
3447
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3211
3448
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
@@ -3251,7 +3488,7 @@ function ModelSelector({
|
|
|
3251
3488
|
{
|
|
3252
3489
|
type: "button",
|
|
3253
3490
|
onClick: () => handleSelect(model.id, model.provider),
|
|
3254
|
-
className:
|
|
3491
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3255
3492
|
"flex flex-col gap-0.5 w-full px-3 py-2 text-left",
|
|
3256
3493
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3257
3494
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
@@ -3311,7 +3548,7 @@ function SimpleModelSelector({
|
|
|
3311
3548
|
value: value || "",
|
|
3312
3549
|
onChange: (e) => onChange?.(e.target.value),
|
|
3313
3550
|
disabled,
|
|
3314
|
-
className:
|
|
3551
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3315
3552
|
"h-9 px-3 rounded-md border bg-background text-sm",
|
|
3316
3553
|
"focus:outline-none focus:ring-2 focus:ring-ring",
|
|
3317
3554
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -3356,7 +3593,7 @@ function PopoverContent({
|
|
|
3356
3593
|
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Positioner, { side, align, sideOffset, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3357
3594
|
popover.Popover.Popup,
|
|
3358
3595
|
{
|
|
3359
|
-
className:
|
|
3596
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3360
3597
|
"csdk-popover-popup",
|
|
3361
3598
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3362
3599
|
className
|
|
@@ -3389,7 +3626,7 @@ function ChevronIcon({ className }) {
|
|
|
3389
3626
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3390
3627
|
"svg",
|
|
3391
3628
|
{
|
|
3392
|
-
className:
|
|
3629
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3393
3630
|
fill: "none",
|
|
3394
3631
|
viewBox: "0 0 24 24",
|
|
3395
3632
|
stroke: "currentColor",
|
|
@@ -3402,7 +3639,7 @@ function PlusIcon2({ className }) {
|
|
|
3402
3639
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3403
3640
|
"svg",
|
|
3404
3641
|
{
|
|
3405
|
-
className:
|
|
3642
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3406
3643
|
fill: "none",
|
|
3407
3644
|
viewBox: "0 0 24 24",
|
|
3408
3645
|
stroke: "currentColor",
|
|
@@ -3415,7 +3652,7 @@ function CheckIcon2({ className }) {
|
|
|
3415
3652
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3416
3653
|
"svg",
|
|
3417
3654
|
{
|
|
3418
|
-
className:
|
|
3655
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3419
3656
|
fill: "none",
|
|
3420
3657
|
viewBox: "0 0 24 24",
|
|
3421
3658
|
stroke: "currentColor",
|
|
@@ -3428,7 +3665,7 @@ function TrashIcon({ className }) {
|
|
|
3428
3665
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3429
3666
|
"svg",
|
|
3430
3667
|
{
|
|
3431
|
-
className:
|
|
3668
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3432
3669
|
fill: "none",
|
|
3433
3670
|
viewBox: "0 0 24 24",
|
|
3434
3671
|
stroke: "currentColor",
|
|
@@ -3493,12 +3730,12 @@ function ThreadPicker({
|
|
|
3493
3730
|
setDisplayedThreads((prev) => prev.filter((t) => t.id !== threadId));
|
|
3494
3731
|
onDeleteThread?.(threadId);
|
|
3495
3732
|
};
|
|
3496
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
3733
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("relative w-44", className), children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
3497
3734
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3498
3735
|
PopoverTrigger,
|
|
3499
3736
|
{
|
|
3500
3737
|
disabled: disabled || loading,
|
|
3501
|
-
className:
|
|
3738
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3502
3739
|
"flex items-center gap-1.5 w-full rounded-md px-1.5 py-0.5",
|
|
3503
3740
|
"hover:bg-muted/70 transition-colors duration-150",
|
|
3504
3741
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -3510,7 +3747,7 @@ function ThreadPicker({
|
|
|
3510
3747
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3511
3748
|
ChevronIcon,
|
|
3512
3749
|
{
|
|
3513
|
-
className:
|
|
3750
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3514
3751
|
"flex-shrink-0 size-3 text-muted-foreground/60 transition-transform duration-150",
|
|
3515
3752
|
isOpen && "rotate-180"
|
|
3516
3753
|
)
|
|
@@ -3523,7 +3760,7 @@ function ThreadPicker({
|
|
|
3523
3760
|
PopoverContent,
|
|
3524
3761
|
{
|
|
3525
3762
|
align: "start",
|
|
3526
|
-
className:
|
|
3763
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3527
3764
|
"p-0 w-56 max-h-[280px] overflow-auto",
|
|
3528
3765
|
dropdownClassName
|
|
3529
3766
|
),
|
|
@@ -3533,7 +3770,7 @@ function ThreadPicker({
|
|
|
3533
3770
|
{
|
|
3534
3771
|
type: "button",
|
|
3535
3772
|
onClick: handleNewThread,
|
|
3536
|
-
className:
|
|
3773
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3537
3774
|
"flex items-center gap-2 w-full px-2.5 py-1.5 text-left",
|
|
3538
3775
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3539
3776
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
@@ -3549,7 +3786,7 @@ function ThreadPicker({
|
|
|
3549
3786
|
displayedThreads.length > 0 ? displayedThreads.map((thread) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3550
3787
|
"div",
|
|
3551
3788
|
{
|
|
3552
|
-
className:
|
|
3789
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3553
3790
|
"group flex items-center gap-1 w-full px-2.5 py-1.5",
|
|
3554
3791
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3555
3792
|
"focus-within:bg-accent focus-within:text-accent-foreground",
|
|
@@ -3622,7 +3859,7 @@ function TrashIcon2({ className }) {
|
|
|
3622
3859
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3623
3860
|
"svg",
|
|
3624
3861
|
{
|
|
3625
|
-
className:
|
|
3862
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3626
3863
|
fill: "none",
|
|
3627
3864
|
viewBox: "0 0 24 24",
|
|
3628
3865
|
stroke: "currentColor",
|
|
@@ -3642,7 +3879,7 @@ function PlusIcon3({ className }) {
|
|
|
3642
3879
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3643
3880
|
"svg",
|
|
3644
3881
|
{
|
|
3645
|
-
className:
|
|
3882
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3646
3883
|
fill: "none",
|
|
3647
3884
|
viewBox: "0 0 24 24",
|
|
3648
3885
|
stroke: "currentColor",
|
|
@@ -3655,7 +3892,7 @@ function MessageIcon({ className }) {
|
|
|
3655
3892
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3656
3893
|
"svg",
|
|
3657
3894
|
{
|
|
3658
|
-
className:
|
|
3895
|
+
className: chunkYBLAHX2Z_cjs.cn("w-4 h-4", className),
|
|
3659
3896
|
fill: "none",
|
|
3660
3897
|
viewBox: "0 0 24 24",
|
|
3661
3898
|
stroke: "currentColor",
|
|
@@ -3700,7 +3937,7 @@ function ThreadCard({
|
|
|
3700
3937
|
onClick,
|
|
3701
3938
|
onMouseEnter: () => setIsHovered(true),
|
|
3702
3939
|
onMouseLeave: () => setIsHovered(false),
|
|
3703
|
-
className:
|
|
3940
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3704
3941
|
"w-full p-3 rounded-lg border bg-card text-left transition-colors",
|
|
3705
3942
|
"hover:bg-accent hover:border-accent-foreground/20",
|
|
3706
3943
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -3711,7 +3948,7 @@ function ThreadCard({
|
|
|
3711
3948
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3712
3949
|
"div",
|
|
3713
3950
|
{
|
|
3714
|
-
className:
|
|
3951
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3715
3952
|
"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center",
|
|
3716
3953
|
selected ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
3717
3954
|
),
|
|
@@ -3726,7 +3963,7 @@ function ThreadCard({
|
|
|
3726
3963
|
{
|
|
3727
3964
|
type: "button",
|
|
3728
3965
|
onClick: handleDelete,
|
|
3729
|
-
className:
|
|
3966
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3730
3967
|
"flex-shrink-0 p-1 rounded",
|
|
3731
3968
|
"hover:bg-destructive/10 hover:text-destructive",
|
|
3732
3969
|
"focus:outline-none focus:ring-2 focus:ring-destructive"
|
|
@@ -3762,13 +3999,13 @@ function ThreadList({
|
|
|
3762
3999
|
showDelete = true,
|
|
3763
4000
|
className
|
|
3764
4001
|
}) {
|
|
3765
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
4002
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("flex flex-col gap-2", className), children: [
|
|
3766
4003
|
onNewThread && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3767
4004
|
"button",
|
|
3768
4005
|
{
|
|
3769
4006
|
type: "button",
|
|
3770
4007
|
onClick: onNewThread,
|
|
3771
|
-
className:
|
|
4008
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3772
4009
|
"flex items-center gap-2 p-3 rounded-lg border border-dashed",
|
|
3773
4010
|
"hover:bg-accent hover:border-accent-foreground/20",
|
|
3774
4011
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -3808,7 +4045,7 @@ var CopilotSDKLogo = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
3808
4045
|
fill: "none",
|
|
3809
4046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3810
4047
|
...props,
|
|
3811
|
-
className:
|
|
4048
|
+
className: chunkYBLAHX2Z_cjs.cn("w-auto h-[30px]", props.className),
|
|
3812
4049
|
children: [
|
|
3813
4050
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3814
4051
|
"path",
|
|
@@ -3867,7 +4104,7 @@ function ChatHeader({
|
|
|
3867
4104
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3868
4105
|
"div",
|
|
3869
4106
|
{
|
|
3870
|
-
className:
|
|
4107
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
3871
4108
|
"flex flex-col border-b border-border bg-background",
|
|
3872
4109
|
className
|
|
3873
4110
|
),
|
|
@@ -3907,7 +4144,7 @@ function Suggestions({
|
|
|
3907
4144
|
className
|
|
3908
4145
|
}) {
|
|
3909
4146
|
if (!suggestions.length) return null;
|
|
3910
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
4147
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("flex flex-wrap gap-2 px-4 py-2", className), children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3911
4148
|
"button",
|
|
3912
4149
|
{
|
|
3913
4150
|
type: "button",
|
|
@@ -4020,7 +4257,7 @@ function MCPUIFrame({
|
|
|
4020
4257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4021
4258
|
"div",
|
|
4022
4259
|
{
|
|
4023
|
-
className:
|
|
4260
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4024
4261
|
"flex items-center justify-center rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive",
|
|
4025
4262
|
className
|
|
4026
4263
|
),
|
|
@@ -4053,11 +4290,11 @@ function MCPUIFrame({
|
|
|
4053
4290
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4054
4291
|
"div",
|
|
4055
4292
|
{
|
|
4056
|
-
className:
|
|
4293
|
+
className: chunkYBLAHX2Z_cjs.cn("relative overflow-hidden rounded-lg border", className),
|
|
4057
4294
|
"data-testid": testId,
|
|
4058
4295
|
children: [
|
|
4059
4296
|
resource.metadata?.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b bg-muted/50 px-3 py-1.5 text-xs font-medium text-muted-foreground", children: resource.metadata.title }),
|
|
4060
|
-
showLoading && isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-mcp-loading absolute inset-0 z-10 flex items-center justify-center bg-background/80", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4297
|
+
showLoading && isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-mcp-loading absolute inset-0 z-10 flex items-center justify-center bg-background/80", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "md" }) }),
|
|
4061
4298
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4062
4299
|
"iframe",
|
|
4063
4300
|
{
|
|
@@ -4093,7 +4330,7 @@ function MCPUIFrameList({
|
|
|
4093
4330
|
md: "space-y-2",
|
|
4094
4331
|
lg: "space-y-4"
|
|
4095
4332
|
};
|
|
4096
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
4333
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn(gapClasses[gap], className), children: resources.map((resource, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4097
4334
|
MCPUIFrame,
|
|
4098
4335
|
{
|
|
4099
4336
|
resource,
|
|
@@ -4342,7 +4579,7 @@ function FloatingActions({
|
|
|
4342
4579
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4343
4580
|
"div",
|
|
4344
4581
|
{
|
|
4345
|
-
className:
|
|
4582
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4346
4583
|
"flex items-center gap-0.5 mt-1",
|
|
4347
4584
|
"opacity-0 group-hover/message:opacity-100 transition-opacity duration-150",
|
|
4348
4585
|
align === "right" ? "justify-end" : "justify-start"
|
|
@@ -4357,7 +4594,7 @@ function FloatingActions({
|
|
|
4357
4594
|
type: "button",
|
|
4358
4595
|
title: action.tooltip,
|
|
4359
4596
|
"aria-label": action.tooltip,
|
|
4360
|
-
className:
|
|
4597
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4361
4598
|
"flex items-center justify-center size-6 rounded-md",
|
|
4362
4599
|
"text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
4363
4600
|
"transition-colors",
|
|
@@ -4541,7 +4778,7 @@ function DefaultMessage({
|
|
|
4541
4778
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4542
4779
|
Message,
|
|
4543
4780
|
{
|
|
4544
|
-
className:
|
|
4781
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4545
4782
|
"csdk-message csdk-user-message flex gap-2 group/user-msg group/message justify-end"
|
|
4546
4783
|
),
|
|
4547
4784
|
children: [
|
|
@@ -4554,7 +4791,7 @@ function DefaultMessage({
|
|
|
4554
4791
|
onChange: (e) => setEditValue(e.target.value),
|
|
4555
4792
|
onKeyDown: handleEditKeyDown,
|
|
4556
4793
|
rows: Math.max(2, (editValue.match(/\n/g) || []).length + 1),
|
|
4557
|
-
className:
|
|
4794
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4558
4795
|
"csdk-edit-textarea w-full rounded-lg px-3 py-2 text-sm resize-none",
|
|
4559
4796
|
"bg-primary text-primary-foreground placeholder:text-primary-foreground/50",
|
|
4560
4797
|
"focus:outline-none focus:ring-2 focus:ring-primary-foreground/30",
|
|
@@ -4588,7 +4825,7 @@ function DefaultMessage({
|
|
|
4588
4825
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4589
4826
|
"div",
|
|
4590
4827
|
{
|
|
4591
|
-
className:
|
|
4828
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4592
4829
|
"csdk-message-user rounded-2xl overflow-hidden bg-primary text-primary-foreground",
|
|
4593
4830
|
hasAttachments && "p-[3px]",
|
|
4594
4831
|
hasAttachments && !message.content && "max-w-[260px]",
|
|
@@ -4608,7 +4845,7 @@ function DefaultMessage({
|
|
|
4608
4845
|
message.content && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4609
4846
|
MessageContent,
|
|
4610
4847
|
{
|
|
4611
|
-
className:
|
|
4848
|
+
className: chunkYBLAHX2Z_cjs.cn("px-4 py-2"),
|
|
4612
4849
|
markdown: true,
|
|
4613
4850
|
size,
|
|
4614
4851
|
children: message.content
|
|
@@ -4623,7 +4860,7 @@ function DefaultMessage({
|
|
|
4623
4860
|
type: "button",
|
|
4624
4861
|
onClick: startEdit,
|
|
4625
4862
|
"aria-label": "Edit message",
|
|
4626
|
-
className:
|
|
4863
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4627
4864
|
"csdk-edit-btn absolute -left-7 top-1/2 -translate-y-1/2",
|
|
4628
4865
|
"size-6 flex items-center justify-center rounded-full",
|
|
4629
4866
|
"text-muted-foreground bg-background border border-border shadow-sm",
|
|
@@ -4733,7 +4970,7 @@ function DefaultMessage({
|
|
|
4733
4970
|
alt: "Assistant",
|
|
4734
4971
|
fallback: assistantAvatar.fallback,
|
|
4735
4972
|
fallbackIcon: !assistantAvatar.src && !assistantAvatar.fallback && !assistantAvatar.component ? /* @__PURE__ */ jsxRuntime.jsx(copilot_sdk_logo_default, { className: "size-5" }) : void 0,
|
|
4736
|
-
className:
|
|
4973
|
+
className: chunkYBLAHX2Z_cjs.cn("bg-muted", assistantAvatar.className),
|
|
4737
4974
|
children: assistantAvatar.component
|
|
4738
4975
|
}
|
|
4739
4976
|
),
|
|
@@ -4746,13 +4983,13 @@ function DefaultMessage({
|
|
|
4746
4983
|
className: "mb-2"
|
|
4747
4984
|
}
|
|
4748
4985
|
),
|
|
4749
|
-
isLastMessage && isProcessing && !completedTools?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4986
|
+
isLastMessage && isProcessing && !completedTools?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "sm" }) }) : (
|
|
4750
4987
|
/* Show streaming loader when loading with no content and no tools */
|
|
4751
|
-
isLastMessage && isLoading && !cleanContent?.trim() && !toolsWithCustomRender?.length && !toolsWithoutCustomRender?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4988
|
+
isLastMessage && isLoading && !cleanContent?.trim() && !toolsWithCustomRender?.length && !toolsWithoutCustomRender?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: loaderVariant, size: "sm" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4752
4989
|
cleanContent?.trim() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4753
4990
|
MessageContent,
|
|
4754
4991
|
{
|
|
4755
|
-
className:
|
|
4992
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4756
4993
|
"csdk-message-assistant rounded-lg px-4 py-2 bg-muted",
|
|
4757
4994
|
assistantMessageClassName
|
|
4758
4995
|
),
|
|
@@ -4761,7 +4998,7 @@ function DefaultMessage({
|
|
|
4761
4998
|
children: cleanContent
|
|
4762
4999
|
}
|
|
4763
5000
|
),
|
|
4764
|
-
toolsWithCustomRender && toolsWithCustomRender.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5001
|
+
toolsWithCustomRender && toolsWithCustomRender.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("space-y-2", cleanContent?.trim() && "mt-2"), children: toolsWithCustomRender.map((exec) => {
|
|
4765
5002
|
const toolDef = registeredTools?.find(
|
|
4766
5003
|
(t) => t.name === exec.name
|
|
4767
5004
|
);
|
|
@@ -4846,7 +5083,7 @@ function DefaultMessage({
|
|
|
4846
5083
|
toolSteps && toolSteps.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4847
5084
|
"div",
|
|
4848
5085
|
{
|
|
4849
|
-
className:
|
|
5086
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
4850
5087
|
"rounded-lg bg-muted/50 px-3 py-2",
|
|
4851
5088
|
cleanContent?.trim() && "mt-2"
|
|
4852
5089
|
),
|
|
@@ -4865,7 +5102,7 @@ function DefaultMessage({
|
|
|
4865
5102
|
`${exec.id}-ui`
|
|
4866
5103
|
);
|
|
4867
5104
|
}),
|
|
4868
|
-
isLastMessage && isProcessing && completedTools && completedTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5105
|
+
isLastMessage && isProcessing && completedTools && completedTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "sm" }) }),
|
|
4869
5106
|
pendingApprovalTools && pendingApprovalTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 space-y-2", children: pendingApprovalTools.map((tool) => {
|
|
4870
5107
|
const approvalCallbacks = {
|
|
4871
5108
|
onApprove: (extraData) => onApproveToolExecution?.(tool.id, extraData),
|
|
@@ -4937,7 +5174,7 @@ function DefaultMessage({
|
|
|
4937
5174
|
showFavicon: citations.showFavicon ?? true,
|
|
4938
5175
|
numbered: citations.numbered ?? false,
|
|
4939
5176
|
maxVisible: citations.maxVisible ?? 6,
|
|
4940
|
-
className:
|
|
5177
|
+
className: chunkYBLAHX2Z_cjs.cn("mt-2", citations.className)
|
|
4941
5178
|
}
|
|
4942
5179
|
),
|
|
4943
5180
|
shouldShowFollowUps && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5088,7 +5325,7 @@ function ImageThumb({
|
|
|
5088
5325
|
{
|
|
5089
5326
|
type: "button",
|
|
5090
5327
|
onClick: () => setExpanded(true),
|
|
5091
|
-
className:
|
|
5328
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5092
5329
|
"csdk-attachment-image relative overflow-hidden cursor-zoom-in",
|
|
5093
5330
|
"transition-[opacity,transform] duration-150 hover:opacity-90 active:scale-[0.98]",
|
|
5094
5331
|
className
|
|
@@ -5125,7 +5362,7 @@ function FileCard({ attachment }) {
|
|
|
5125
5362
|
target: "_blank",
|
|
5126
5363
|
rel: "noopener noreferrer",
|
|
5127
5364
|
download: isPdfFile ? void 0 : attachment.filename,
|
|
5128
|
-
className:
|
|
5365
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5129
5366
|
cssClass,
|
|
5130
5367
|
"flex items-center gap-2 rounded-lg min-w-0 w-full",
|
|
5131
5368
|
"px-2 py-1.5 cursor-pointer transition-opacity duration-150 hover:opacity-80",
|
|
@@ -5319,11 +5556,11 @@ function MessageMedia({
|
|
|
5319
5556
|
const pdfs = attachments.filter((a) => isPdf(a));
|
|
5320
5557
|
const files = attachments.filter((a) => a.type !== "image" && !isPdf(a));
|
|
5321
5558
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5322
|
-
images.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5559
|
+
images.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-attachment-images", hasText ? "mb-0" : ""), children: /* @__PURE__ */ jsxRuntime.jsx(ImageGrid, { images, bubbleRadius: "0.5rem" }) }),
|
|
5323
5560
|
(pdfs.length > 0 || files.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5324
5561
|
"div",
|
|
5325
5562
|
{
|
|
5326
|
-
className:
|
|
5563
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5327
5564
|
"csdk-attachment-files flex flex-col gap-1",
|
|
5328
5565
|
hasText || images.length > 0 ? "px-1.5 pb-1.5 pt-1" : "p-1.5"
|
|
5329
5566
|
),
|
|
@@ -5512,7 +5749,7 @@ function ChatWelcome({
|
|
|
5512
5749
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5513
5750
|
"div",
|
|
5514
5751
|
{
|
|
5515
|
-
className:
|
|
5752
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5516
5753
|
"flex flex-1 flex-col items-center justify-center px-4 py-8 overflow-auto",
|
|
5517
5754
|
classNames.root
|
|
5518
5755
|
),
|
|
@@ -5520,7 +5757,7 @@ function ChatWelcome({
|
|
|
5520
5757
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5521
5758
|
"div",
|
|
5522
5759
|
{
|
|
5523
|
-
className:
|
|
5760
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5524
5761
|
"flex flex-col items-center text-center mb-8",
|
|
5525
5762
|
classNames.hero
|
|
5526
5763
|
),
|
|
@@ -5538,7 +5775,7 @@ function ChatWelcome({
|
|
|
5538
5775
|
]
|
|
5539
5776
|
}
|
|
5540
5777
|
),
|
|
5541
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
5778
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("w-full max-w-lg mb-6", classNames.input), children: [
|
|
5542
5779
|
pendingAttachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2 p-2 mb-2 bg-muted/30 rounded-lg", children: pendingAttachments.map((att) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
|
|
5543
5780
|
att.attachment.type === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5544
5781
|
"img",
|
|
@@ -5568,7 +5805,7 @@ function ChatWelcome({
|
|
|
5568
5805
|
),
|
|
5569
5806
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground truncate w-full text-center mt-1", children: att.file.name.length > 10 ? att.file.name.slice(0, 8) + "..." : att.file.name })
|
|
5570
5807
|
] }),
|
|
5571
|
-
att.status === "processing" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-attachment-loading absolute inset-0 bg-background/80 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5808
|
+
att.status === "processing" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-attachment-loading absolute inset-0 bg-background/80 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "sm" }) }),
|
|
5572
5809
|
att.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-attachment-error absolute inset-0 bg-destructive/20 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive text-xs", children: "Error" }) }),
|
|
5573
5810
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5574
5811
|
"button",
|
|
@@ -5598,7 +5835,7 @@ function ChatWelcome({
|
|
|
5598
5835
|
"label",
|
|
5599
5836
|
{
|
|
5600
5837
|
htmlFor: fileInputId,
|
|
5601
|
-
className:
|
|
5838
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5602
5839
|
"flex h-8 w-8 items-center justify-center rounded-2xl",
|
|
5603
5840
|
attachmentsEnabled ? "hover:bg-secondary-foreground/10 cursor-pointer" : "opacity-50 cursor-not-allowed"
|
|
5604
5841
|
),
|
|
@@ -5649,7 +5886,7 @@ function ChatWelcome({
|
|
|
5649
5886
|
suggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5650
5887
|
"div",
|
|
5651
5888
|
{
|
|
5652
|
-
className:
|
|
5889
|
+
className: chunkYBLAHX2Z_cjs.cn("w-full max-w-lg mb-6 px-3", classNames.suggestions),
|
|
5653
5890
|
children: [
|
|
5654
5891
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-2", children: suggestionsLabel }),
|
|
5655
5892
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5690,7 +5927,7 @@ function HomeView({ children, className }) {
|
|
|
5690
5927
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5691
5928
|
"div",
|
|
5692
5929
|
{
|
|
5693
|
-
className:
|
|
5930
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5694
5931
|
"csdk-chat-home-view flex flex-1 flex-col overflow-auto",
|
|
5695
5932
|
className
|
|
5696
5933
|
),
|
|
@@ -5703,7 +5940,7 @@ function ChatView({ children, className }) {
|
|
|
5703
5940
|
const { view } = useCopilotChatContext();
|
|
5704
5941
|
if (view !== "chat") return null;
|
|
5705
5942
|
if (children) {
|
|
5706
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5943
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-chat-view flex flex-col", className), children });
|
|
5707
5944
|
}
|
|
5708
5945
|
return null;
|
|
5709
5946
|
}
|
|
@@ -5717,10 +5954,10 @@ function chatViewHasOnlyLayoutChildren(chatViewElement) {
|
|
|
5717
5954
|
);
|
|
5718
5955
|
}
|
|
5719
5956
|
function Header({ children, className }) {
|
|
5720
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5957
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-chat-header", className), children });
|
|
5721
5958
|
}
|
|
5722
5959
|
function Footer({ children, className }) {
|
|
5723
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5960
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-chat-footer", className), children });
|
|
5724
5961
|
}
|
|
5725
5962
|
function Input({ placeholder: placeholderProp, className }) {
|
|
5726
5963
|
const {
|
|
@@ -5743,7 +5980,7 @@ function Input({ placeholder: placeholderProp, className }) {
|
|
|
5743
5980
|
onValueChange: setValue,
|
|
5744
5981
|
isLoading,
|
|
5745
5982
|
onSubmit: handleSubmit,
|
|
5746
|
-
className:
|
|
5983
|
+
className: chunkYBLAHX2Z_cjs.cn("csdk-compound-input", className),
|
|
5747
5984
|
children: [
|
|
5748
5985
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5749
5986
|
PromptInputTextarea,
|
|
@@ -5782,13 +6019,13 @@ function SuggestionsCompound({
|
|
|
5782
6019
|
}) {
|
|
5783
6020
|
const { send } = useCopilotChatContext();
|
|
5784
6021
|
if (items.length === 0) return null;
|
|
5785
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
6022
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("csdk-compound-suggestions", className), children: [
|
|
5786
6023
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground mb-2 block", children: label }),
|
|
5787
6024
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5788
6025
|
"button",
|
|
5789
6026
|
{
|
|
5790
6027
|
onClick: () => send(item),
|
|
5791
|
-
className:
|
|
6028
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5792
6029
|
"csdk-followup-button px-3 py-1.5 text-sm rounded-full border",
|
|
5793
6030
|
"bg-background hover:bg-accent transition-colors",
|
|
5794
6031
|
buttonClassName
|
|
@@ -5814,7 +6051,7 @@ function BackButton({
|
|
|
5814
6051
|
onClick: onNewChat,
|
|
5815
6052
|
disabled: disabled || isThreadBusy,
|
|
5816
6053
|
"aria-label": ariaLabel,
|
|
5817
|
-
className:
|
|
6054
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
5818
6055
|
"csdk-back-button flex items-center gap-1 text-sm",
|
|
5819
6056
|
"hover:bg-accent rounded px-2 py-1",
|
|
5820
6057
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -6228,7 +6465,7 @@ function ChatComponent({
|
|
|
6228
6465
|
return /* @__PURE__ */ jsxRuntime.jsx(MessageActionsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(CopilotChatContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6229
6466
|
"div",
|
|
6230
6467
|
{
|
|
6231
|
-
className:
|
|
6468
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
6232
6469
|
"flex h-full flex-col bg-background relative",
|
|
6233
6470
|
className,
|
|
6234
6471
|
classNames.root
|
|
@@ -6279,12 +6516,12 @@ function ChatComponent({
|
|
|
6279
6516
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6280
6517
|
ChatContainerRoot,
|
|
6281
6518
|
{
|
|
6282
|
-
className:
|
|
6519
|
+
className: chunkYBLAHX2Z_cjs.cn("flex-1 relative", classNames.container),
|
|
6283
6520
|
children: [
|
|
6284
6521
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6285
6522
|
ChatContainerContent,
|
|
6286
6523
|
{
|
|
6287
|
-
className:
|
|
6524
|
+
className: chunkYBLAHX2Z_cjs.cn("gap-4 p-4", classNames.messageList),
|
|
6288
6525
|
children: [
|
|
6289
6526
|
messages.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-8 text-center text-muted-foreground", children: welcomeMessage || "Send a message to start the conversation" }),
|
|
6290
6527
|
(() => {
|
|
@@ -6416,7 +6653,7 @@ function ChatComponent({
|
|
|
6416
6653
|
displayedError && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6417
6654
|
"div",
|
|
6418
6655
|
{
|
|
6419
|
-
className:
|
|
6656
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
6420
6657
|
"mx-2 mb-1 overflow-hidden transition-all duration-200 ease-in-out",
|
|
6421
6658
|
showErrorBanner ? "max-h-20 opacity-100" : "max-h-0 opacity-0 mb-0"
|
|
6422
6659
|
),
|
|
@@ -6473,7 +6710,7 @@ function ChatComponent({
|
|
|
6473
6710
|
] })
|
|
6474
6711
|
}
|
|
6475
6712
|
),
|
|
6476
|
-
renderInput ? renderInput() : /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
6713
|
+
renderInput ? renderInput() : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkYBLAHX2Z_cjs.cn("p-2 pt-0", classNames.input), children: [
|
|
6477
6714
|
pendingAttachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2 p-2 mb-2 bg-muted/30 rounded-lg", children: pendingAttachments.map((att) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
|
|
6478
6715
|
att.attachment.type === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6479
6716
|
"img",
|
|
@@ -6503,7 +6740,7 @@ function ChatComponent({
|
|
|
6503
6740
|
),
|
|
6504
6741
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground truncate w-full text-center mt-1", children: att.file.name.length > 10 ? att.file.name.slice(0, 8) + "..." : att.file.name })
|
|
6505
6742
|
] }),
|
|
6506
|
-
att.status === "processing" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-attachment-loading absolute inset-0 bg-background/80 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6743
|
+
att.status === "processing" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-attachment-loading absolute inset-0 bg-background/80 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "sm" }) }),
|
|
6507
6744
|
att.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-attachment-error absolute inset-0 bg-destructive/20 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive text-xs", children: "Error" }) }),
|
|
6508
6745
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6509
6746
|
"button",
|
|
@@ -6534,7 +6771,7 @@ function ChatComponent({
|
|
|
6534
6771
|
"label",
|
|
6535
6772
|
{
|
|
6536
6773
|
htmlFor: fileInputId,
|
|
6537
|
-
className:
|
|
6774
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
6538
6775
|
"csdk-button-attach flex h-8 w-8 items-center justify-center rounded-2xl",
|
|
6539
6776
|
attachmentsEnabled ? "hover:bg-secondary-foreground/10 cursor-pointer" : "opacity-50 cursor-not-allowed"
|
|
6540
6777
|
),
|
|
@@ -6661,7 +6898,7 @@ function ToolExecutionMessage({
|
|
|
6661
6898
|
const allCompleted = executions.every(
|
|
6662
6899
|
(exec) => exec.status === "completed" || exec.status === "error"
|
|
6663
6900
|
);
|
|
6664
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Message, { className:
|
|
6901
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Message, { className: chunkYBLAHX2Z_cjs.cn("flex gap-2", className), children: [
|
|
6665
6902
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6666
6903
|
MessageAvatar,
|
|
6667
6904
|
{
|
|
@@ -6880,7 +7117,7 @@ function useInternalThreadManager(config = {}) {
|
|
|
6880
7117
|
} = config;
|
|
6881
7118
|
const [state, dispatch] = React19.useReducer(threadReducer, INITIAL_STATE);
|
|
6882
7119
|
const isLoadingRef = React19.useRef(false);
|
|
6883
|
-
const threadManager =
|
|
7120
|
+
const threadManager = chunkWYFJZNFT_cjs.useThreadManager({
|
|
6884
7121
|
adapter,
|
|
6885
7122
|
saveDebounce,
|
|
6886
7123
|
autoRestoreLastThread
|
|
@@ -6902,7 +7139,7 @@ function useInternalThreadManager(config = {}) {
|
|
|
6902
7139
|
switchBranch,
|
|
6903
7140
|
threadId: sdkThreadId,
|
|
6904
7141
|
setActiveThread
|
|
6905
|
-
} =
|
|
7142
|
+
} = chunkTD7NF6OE_cjs.useCopilot();
|
|
6906
7143
|
React19.useEffect(() => {
|
|
6907
7144
|
if (!enabled || state.initialized || !currentThread) return;
|
|
6908
7145
|
dispatch({ type: "RESTORE_START" });
|
|
@@ -7132,7 +7369,7 @@ function CopilotChatBase(props) {
|
|
|
7132
7369
|
getBranchInfo,
|
|
7133
7370
|
editMessage,
|
|
7134
7371
|
error: chatError
|
|
7135
|
-
} =
|
|
7372
|
+
} = chunkTD7NF6OE_cjs.useCopilot();
|
|
7136
7373
|
const toolExecutions = rawToolExecutions.map(
|
|
7137
7374
|
(exec) => ({
|
|
7138
7375
|
id: exec.id,
|
|
@@ -7160,68 +7397,88 @@ function CopilotChatBase(props) {
|
|
|
7160
7397
|
const toolCallIds = new Set(
|
|
7161
7398
|
m.toolCalls.map((tc) => tc.id)
|
|
7162
7399
|
);
|
|
7163
|
-
const
|
|
7164
|
-
|
|
7165
|
-
)
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7400
|
+
const isLastMsg = m.id === [...messages].reverse().find((msg) => msg.role === "assistant")?.id;
|
|
7401
|
+
const savedMeta = m.metadata?.toolExecutions;
|
|
7402
|
+
if (!isLastMsg && savedMeta && savedMeta.length > 0) {
|
|
7403
|
+
messageToolExecutions = savedMeta;
|
|
7404
|
+
} else {
|
|
7405
|
+
const liveExecutions = isLastMsg ? toolExecutions.filter(
|
|
7406
|
+
(exec) => toolCallIds.has(exec.id)
|
|
7407
|
+
) : [];
|
|
7408
|
+
if (liveExecutions.length > 0) {
|
|
7409
|
+
messageToolExecutions = liveExecutions.map(
|
|
7410
|
+
(exec) => {
|
|
7411
|
+
if (!exec.result && toolResultsMap.has(exec.id)) {
|
|
7412
|
+
const resultContent = toolResultsMap.get(exec.id);
|
|
7413
|
+
try {
|
|
7414
|
+
return { ...exec, result: JSON.parse(resultContent) };
|
|
7415
|
+
} catch {
|
|
7416
|
+
return {
|
|
7417
|
+
...exec,
|
|
7418
|
+
result: { success: false, message: resultContent }
|
|
7419
|
+
};
|
|
7420
|
+
}
|
|
7178
7421
|
}
|
|
7422
|
+
return exec;
|
|
7179
7423
|
}
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7424
|
+
);
|
|
7425
|
+
} else {
|
|
7426
|
+
const toolCallsHidden = m.metadata?.toolCallsHidden;
|
|
7427
|
+
messageToolExecutions = m.toolCalls.map(
|
|
7428
|
+
(tc) => {
|
|
7429
|
+
const resultContent = toolResultsMap.get(tc.id);
|
|
7430
|
+
let result = void 0;
|
|
7431
|
+
if (resultContent) {
|
|
7432
|
+
try {
|
|
7433
|
+
result = JSON.parse(resultContent);
|
|
7434
|
+
} catch {
|
|
7435
|
+
result = { success: false, message: resultContent };
|
|
7436
|
+
}
|
|
7437
|
+
}
|
|
7438
|
+
let args = {};
|
|
7190
7439
|
try {
|
|
7191
|
-
|
|
7440
|
+
args = JSON.parse(tc.function.arguments || "{}");
|
|
7192
7441
|
} catch {
|
|
7193
|
-
result = { success: false, message: resultContent };
|
|
7194
7442
|
}
|
|
7443
|
+
let hidden = toolCallsHidden?.[tc.id];
|
|
7444
|
+
if (hidden === void 0) {
|
|
7445
|
+
const toolDef = registeredTools?.find(
|
|
7446
|
+
(t) => t.name === tc.function.name
|
|
7447
|
+
);
|
|
7448
|
+
hidden = toolDef?.hidden;
|
|
7449
|
+
}
|
|
7450
|
+
return {
|
|
7451
|
+
id: tc.id,
|
|
7452
|
+
name: tc.function.name,
|
|
7453
|
+
args,
|
|
7454
|
+
status: result ? "completed" : "pending",
|
|
7455
|
+
result,
|
|
7456
|
+
timestamp: m.createdAt instanceof Date ? m.createdAt.getTime() : Date.now(),
|
|
7457
|
+
hidden
|
|
7458
|
+
};
|
|
7195
7459
|
}
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
args = JSON.parse(tc.function.arguments || "{}");
|
|
7199
|
-
} catch {
|
|
7200
|
-
}
|
|
7201
|
-
let hidden = toolCallsHidden?.[tc.id];
|
|
7202
|
-
if (hidden === void 0) {
|
|
7203
|
-
const toolDef = registeredTools?.find(
|
|
7204
|
-
(t) => t.name === tc.function.name
|
|
7205
|
-
);
|
|
7206
|
-
hidden = toolDef?.hidden;
|
|
7207
|
-
}
|
|
7208
|
-
return {
|
|
7209
|
-
id: tc.id,
|
|
7210
|
-
name: tc.function.name,
|
|
7211
|
-
args,
|
|
7212
|
-
status: result ? "completed" : "pending",
|
|
7213
|
-
result,
|
|
7214
|
-
timestamp: m.createdAt instanceof Date ? m.createdAt.getTime() : Date.now(),
|
|
7215
|
-
hidden
|
|
7216
|
-
};
|
|
7217
|
-
}
|
|
7218
|
-
);
|
|
7460
|
+
);
|
|
7461
|
+
}
|
|
7219
7462
|
}
|
|
7220
7463
|
}
|
|
7221
7464
|
const savedExecutions = m.metadata?.toolExecutions;
|
|
7222
7465
|
if (savedExecutions && savedExecutions.length > 0 && !messageToolExecutions) {
|
|
7223
7466
|
messageToolExecutions = savedExecutions;
|
|
7224
7467
|
}
|
|
7468
|
+
const isLastAssistant = m.id === [...messages].reverse().find((msg) => msg.role === "assistant")?.id;
|
|
7469
|
+
if (isLastAssistant && !messageToolExecutions && m.role === "assistant" && isLoading && toolExecutions.length > 0) {
|
|
7470
|
+
const allMatchedIds = new Set(
|
|
7471
|
+
messages.filter((msg) => msg.toolCalls).flatMap(
|
|
7472
|
+
(msg) => (msg.toolCalls || []).map((tc) => tc.id)
|
|
7473
|
+
)
|
|
7474
|
+
);
|
|
7475
|
+
const unmatchedExecutions = toolExecutions.filter(
|
|
7476
|
+
(exec) => !allMatchedIds.has(exec.id) && (exec.status === "executing" || exec.status === "pending" || exec.approvalStatus === "required")
|
|
7477
|
+
);
|
|
7478
|
+
if (unmatchedExecutions.length > 0) {
|
|
7479
|
+
messageToolExecutions = unmatchedExecutions;
|
|
7480
|
+
}
|
|
7481
|
+
}
|
|
7225
7482
|
const visibleToolExecutions = messageToolExecutions?.filter(
|
|
7226
7483
|
(exec) => !exec.hidden
|
|
7227
7484
|
);
|
|
@@ -7242,6 +7499,7 @@ function CopilotChatBase(props) {
|
|
|
7242
7499
|
_hasOnlyHiddenTools: messageToolExecutions && messageToolExecutions.length > 0 && (!visibleToolExecutions || visibleToolExecutions.length === 0)
|
|
7243
7500
|
};
|
|
7244
7501
|
}).filter((m) => {
|
|
7502
|
+
if (!m) return false;
|
|
7245
7503
|
if (m.role === "assistant" && !m.content && m._hasOnlyHiddenTools) {
|
|
7246
7504
|
return false;
|
|
7247
7505
|
}
|
|
@@ -7398,7 +7656,7 @@ function PoweredBy({ className, showLogo = true }) {
|
|
|
7398
7656
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7399
7657
|
"div",
|
|
7400
7658
|
{
|
|
7401
|
-
className:
|
|
7659
|
+
className: chunkYBLAHX2Z_cjs.cn(
|
|
7402
7660
|
"flex items-center justify-center gap-1.5 py-2 text-xs text-muted-foreground",
|
|
7403
7661
|
className
|
|
7404
7662
|
),
|
|
@@ -7958,16 +8216,16 @@ var ChatPrimitives = {
|
|
|
7958
8216
|
ScrollAnchor: ChatContainerScrollAnchor,
|
|
7959
8217
|
// ── Indicators ────────────────────────────────────────
|
|
7960
8218
|
/** Loading / streaming indicator (dots, wave, typing variants) */
|
|
7961
|
-
Loader
|
|
8219
|
+
Loader
|
|
7962
8220
|
};
|
|
7963
8221
|
|
|
7964
|
-
Object.defineProperty(exports, "
|
|
8222
|
+
Object.defineProperty(exports, "Markdown", {
|
|
7965
8223
|
enumerable: true,
|
|
7966
|
-
get: function () { return
|
|
8224
|
+
get: function () { return chunkYBLAHX2Z_cjs.Markdown; }
|
|
7967
8225
|
});
|
|
7968
8226
|
Object.defineProperty(exports, "cn", {
|
|
7969
8227
|
enumerable: true,
|
|
7970
|
-
get: function () { return
|
|
8228
|
+
get: function () { return chunkYBLAHX2Z_cjs.cn; }
|
|
7971
8229
|
});
|
|
7972
8230
|
exports.AlertTriangleIcon = AlertTriangleIcon;
|
|
7973
8231
|
exports.AttachmentStrip = AttachmentStrip;
|
|
@@ -8007,9 +8265,9 @@ exports.DropZoneOverlay = DropZoneOverlay;
|
|
|
8007
8265
|
exports.FeedbackBar = FeedbackBar;
|
|
8008
8266
|
exports.FollowUpQuestions = FollowUpQuestions;
|
|
8009
8267
|
exports.InlineToolSteps = InlineToolSteps;
|
|
8268
|
+
exports.Loader = Loader;
|
|
8010
8269
|
exports.MCPUIFrame = MCPUIFrame;
|
|
8011
8270
|
exports.MCPUIFrameList = MCPUIFrameList;
|
|
8012
|
-
exports.Markdown = Markdown;
|
|
8013
8271
|
exports.MessageAvatar = MessageAvatar;
|
|
8014
8272
|
exports.MessageContent = MessageContent;
|
|
8015
8273
|
exports.MessagePrimitive = Message;
|