@yourgpt/copilot-sdk 2.1.5-alpha.3 → 2.1.5-alpha.5
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/{MessageTree-CoIt_4nB.d.cts → MessageTree-Clhiv_k2.d.ts} +5 -4
- package/dist/{MessageTree-CzaN9Eul.d.ts → MessageTree-Dt9qfJ55.d.cts} +5 -4
- package/dist/{ThreadManager-BEAECB7Y.d.ts → ThreadManager-D7KwT2FJ.d.ts} +3 -1
- package/dist/{ThreadManager-Cw5fwyCN.d.cts → ThreadManager-DK46fVl3.d.cts} +3 -1
- package/dist/{chunk-NUXLAZOE.cjs → chunk-3ZDRX7J2.cjs} +2 -2
- package/dist/{chunk-NUXLAZOE.cjs.map → chunk-3ZDRX7J2.cjs.map} +1 -1
- package/dist/{chunk-RKGRQRZU.js → chunk-533K2Z7C.js} +4 -4
- package/dist/{chunk-RKGRQRZU.js.map → chunk-533K2Z7C.js.map} +1 -1
- package/dist/chunk-5EGBIQYS.cjs +292 -0
- package/dist/chunk-5EGBIQYS.cjs.map +1 -0
- package/dist/chunk-5UGWLGFS.cjs +2039 -0
- package/dist/chunk-5UGWLGFS.cjs.map +1 -0
- package/dist/{chunk-3AONOZLY.js → chunk-AIVXGTWS.js} +2 -2
- package/dist/chunk-AIVXGTWS.js.map +1 -0
- package/dist/{chunk-LLM7AHMO.js → chunk-DDZLRCVX.js} +2 -2
- package/dist/{chunk-LLM7AHMO.js.map → chunk-DDZLRCVX.js.map} +1 -1
- package/dist/{chunk-PT2TOHG5.js → chunk-DH6EO6NW.js} +1337 -3049
- package/dist/chunk-DH6EO6NW.js.map +1 -0
- package/dist/{chunk-WIXFZUEZ.cjs → chunk-KGYDGK3U.cjs} +84 -30
- package/dist/chunk-KGYDGK3U.cjs.map +1 -0
- package/dist/{chunk-TCPAT3WG.cjs → chunk-LHLVTGIP.cjs} +1339 -3101
- package/dist/chunk-LHLVTGIP.cjs.map +1 -0
- package/dist/{chunk-TPB7XED6.cjs → chunk-TPDMBDQX.cjs} +2 -2
- package/dist/chunk-TPDMBDQX.cjs.map +1 -0
- package/dist/chunk-TXQ37MAO.js +287 -0
- package/dist/chunk-TXQ37MAO.js.map +1 -0
- package/dist/{chunk-MDS23G2S.cjs → chunk-Y2A6AMGO.cjs} +10 -10
- package/dist/{chunk-MDS23G2S.cjs.map → chunk-Y2A6AMGO.cjs.map} +1 -1
- package/dist/{chunk-WZ2TOZ7M.js → chunk-YLZCTR4O.js} +65 -11
- package/dist/chunk-YLZCTR4O.js.map +1 -0
- package/dist/chunk-ZAOTYA5L.js +1983 -0
- package/dist/chunk-ZAOTYA5L.js.map +1 -0
- package/dist/core/index.cjs +93 -93
- package/dist/core/index.d.cts +7 -7
- package/dist/core/index.d.ts +7 -7
- package/dist/core/index.js +5 -5
- package/dist/experimental/index.cjs +644 -0
- package/dist/experimental/index.cjs.map +1 -0
- package/dist/experimental/index.d.cts +924 -0
- package/dist/experimental/index.d.ts +924 -0
- package/dist/experimental/index.js +611 -0
- package/dist/experimental/index.js.map +1 -0
- package/dist/{index-D7169xuR.d.ts → index-D8zza1Q8.d.ts} +1 -1
- package/dist/{index-CzJB8Ddo.d.cts → index-DCVjTdIZ.d.cts} +1 -1
- package/dist/mcp/index.d.cts +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/react/index.cjs +136 -123
- package/dist/react/index.d.cts +178 -12
- package/dist/react/index.d.ts +178 -12
- package/dist/react/index.js +7 -6
- package/dist/styles.css +45 -0
- package/dist/tools/anthropic/index.cjs +3 -3
- package/dist/tools/anthropic/index.d.cts +1 -1
- package/dist/tools/anthropic/index.d.ts +1 -1
- package/dist/tools/anthropic/index.js +2 -2
- package/dist/tools/brave/index.cjs +6 -6
- package/dist/tools/brave/index.d.cts +1 -1
- package/dist/tools/brave/index.d.ts +1 -1
- package/dist/tools/brave/index.js +3 -3
- package/dist/tools/exa/index.cjs +6 -6
- package/dist/tools/exa/index.d.cts +1 -1
- package/dist/tools/exa/index.d.ts +1 -1
- package/dist/tools/exa/index.js +3 -3
- package/dist/tools/google/index.cjs +6 -6
- package/dist/tools/google/index.d.cts +1 -1
- package/dist/tools/google/index.d.ts +1 -1
- package/dist/tools/google/index.js +4 -4
- package/dist/tools/openai/index.cjs +6 -6
- package/dist/tools/openai/index.d.cts +1 -1
- package/dist/tools/openai/index.d.ts +1 -1
- package/dist/tools/openai/index.js +3 -3
- package/dist/tools/searxng/index.cjs +6 -6
- package/dist/tools/searxng/index.d.cts +1 -1
- package/dist/tools/searxng/index.d.ts +1 -1
- package/dist/tools/searxng/index.js +3 -3
- package/dist/tools/serper/index.cjs +6 -6
- package/dist/tools/serper/index.d.cts +1 -1
- package/dist/tools/serper/index.d.ts +1 -1
- package/dist/tools/serper/index.js +3 -3
- package/dist/tools/tavily/index.cjs +6 -6
- package/dist/tools/tavily/index.d.cts +1 -1
- package/dist/tools/tavily/index.d.ts +1 -1
- package/dist/tools/tavily/index.js +3 -3
- package/dist/tools/web-search/index.cjs +7 -7
- package/dist/tools/web-search/index.d.cts +2 -2
- package/dist/tools/web-search/index.d.ts +2 -2
- package/dist/tools/web-search/index.js +4 -4
- package/dist/{tools-tmksfhUo.d.cts → tools-DcS6Aeao.d.cts} +7 -3
- package/dist/{tools-tmksfhUo.d.ts → tools-DcS6Aeao.d.ts} +7 -3
- package/dist/{types-BqwW3Baj.d.ts → types-BUYni9B8.d.ts} +1 -1
- package/dist/{types-BLw7mxtW.d.cts → types-Cvg4DUoc.d.cts} +1 -1
- package/dist/{types-BeFBBZ5i.d.ts → types-waEqyE4K.d.cts} +5 -0
- package/dist/{types-BeFBBZ5i.d.cts → types-waEqyE4K.d.ts} +5 -0
- package/dist/ui/index.cjs +354 -524
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +22 -4
- package/dist/ui/index.d.ts +22 -4
- package/dist/ui/index.js +197 -372
- package/dist/ui/index.js.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-3AONOZLY.js.map +0 -1
- package/dist/chunk-PT2TOHG5.js.map +0 -1
- package/dist/chunk-TCPAT3WG.cjs.map +0 -1
- package/dist/chunk-TPB7XED6.cjs.map +0 -1
- package/dist/chunk-WIXFZUEZ.cjs.map +0 -1
- package/dist/chunk-WZ2TOZ7M.js.map +0 -1
package/dist/ui/index.cjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunkWIXFZUEZ_cjs = require('../chunk-WIXFZUEZ.cjs');
|
|
3
|
+
var chunk5UGWLGFS_cjs = require('../chunk-5UGWLGFS.cjs');
|
|
5
4
|
var chunkJO4BHPAD_cjs = require('../chunk-JO4BHPAD.cjs');
|
|
5
|
+
var chunk5EGBIQYS_cjs = require('../chunk-5EGBIQYS.cjs');
|
|
6
|
+
var chunkLHLVTGIP_cjs = require('../chunk-LHLVTGIP.cjs');
|
|
7
|
+
var chunkKGYDGK3U_cjs = require('../chunk-KGYDGK3U.cjs');
|
|
6
8
|
require('../chunk-JGPDQDY4.cjs');
|
|
7
9
|
require('../chunk-BJYA5NDL.cjs');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-Y2A6AMGO.cjs');
|
|
11
|
+
require('../chunk-TPDMBDQX.cjs');
|
|
12
|
+
require('../chunk-3ZDRX7J2.cjs');
|
|
13
|
+
require('../chunk-XWOHNY3F.cjs');
|
|
11
14
|
require('../chunk-TXLIY7GF.cjs');
|
|
12
15
|
require('../chunk-CBAHCI4R.cjs');
|
|
13
16
|
require('../chunk-MEBXW75C.cjs');
|
|
@@ -15,14 +18,11 @@ require('../chunk-W73FBYIH.cjs');
|
|
|
15
18
|
require('../chunk-2FAWEBZS.cjs');
|
|
16
19
|
require('../chunk-6T5XXJEP.cjs');
|
|
17
20
|
require('../chunk-GANCV72Z.cjs');
|
|
18
|
-
require('../chunk-XWOHNY3F.cjs');
|
|
19
21
|
require('../chunk-JEQ2X3Z6.cjs');
|
|
20
|
-
var clsx = require('clsx');
|
|
21
|
-
var tailwindMerge = require('tailwind-merge');
|
|
22
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
23
22
|
var React19 = require('react');
|
|
24
23
|
var streamdown = require('streamdown');
|
|
25
24
|
var code = require('@streamdown/code');
|
|
25
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
26
26
|
var reactSlot = require('@radix-ui/react-slot');
|
|
27
27
|
var classVarianceAuthority = require('class-variance-authority');
|
|
28
28
|
var useStickToBottom = require('use-stick-to-bottom');
|
|
@@ -54,284 +54,6 @@ var React19__namespace = /*#__PURE__*/_interopNamespace(React19);
|
|
|
54
54
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
55
55
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
56
56
|
|
|
57
|
-
function cn(...inputs) {
|
|
58
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
59
|
-
}
|
|
60
|
-
function DotsLoader({
|
|
61
|
-
className,
|
|
62
|
-
size = "md"
|
|
63
|
-
}) {
|
|
64
|
-
const dotSizes = {
|
|
65
|
-
sm: "h-1 w-1",
|
|
66
|
-
md: "h-1.5 w-1.5",
|
|
67
|
-
lg: "h-2 w-2"
|
|
68
|
-
};
|
|
69
|
-
const containerSizes = {
|
|
70
|
-
sm: "h-4",
|
|
71
|
-
md: "h-5",
|
|
72
|
-
lg: "h-6"
|
|
73
|
-
};
|
|
74
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
75
|
-
"div",
|
|
76
|
-
{
|
|
77
|
-
className: cn(
|
|
78
|
-
"flex items-center translate-y-[-2px] space-x-1",
|
|
79
|
-
containerSizes[size],
|
|
80
|
-
className
|
|
81
|
-
),
|
|
82
|
-
children: [
|
|
83
|
-
[...Array(3)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
className: cn(
|
|
87
|
-
"bg-primary csdk-loader-bounce-dots rounded-full",
|
|
88
|
-
dotSizes[size]
|
|
89
|
-
),
|
|
90
|
-
style: {
|
|
91
|
-
animationDelay: `${i * 160}ms`
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
i
|
|
95
|
-
)),
|
|
96
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
function TypingLoader({
|
|
102
|
-
className,
|
|
103
|
-
size = "md"
|
|
104
|
-
}) {
|
|
105
|
-
const dotSizes = {
|
|
106
|
-
sm: "h-1 w-1",
|
|
107
|
-
md: "h-1.5 w-1.5",
|
|
108
|
-
lg: "h-2 w-2"
|
|
109
|
-
};
|
|
110
|
-
const containerSizes = {
|
|
111
|
-
sm: "h-4",
|
|
112
|
-
md: "h-5",
|
|
113
|
-
lg: "h-6"
|
|
114
|
-
};
|
|
115
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
116
|
-
"div",
|
|
117
|
-
{
|
|
118
|
-
className: cn(
|
|
119
|
-
"flex items-center space-x-1",
|
|
120
|
-
containerSizes[size],
|
|
121
|
-
className
|
|
122
|
-
),
|
|
123
|
-
children: [
|
|
124
|
-
[...Array(3)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
-
"div",
|
|
126
|
-
{
|
|
127
|
-
className: cn(
|
|
128
|
-
"bg-primary csdk-loader-typing rounded-full",
|
|
129
|
-
dotSizes[size]
|
|
130
|
-
),
|
|
131
|
-
style: {
|
|
132
|
-
animationDelay: `${i * 250}ms`
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
i
|
|
136
|
-
)),
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
function WaveLoader({
|
|
143
|
-
className,
|
|
144
|
-
size = "md"
|
|
145
|
-
}) {
|
|
146
|
-
const barWidths = {
|
|
147
|
-
sm: "w-0.5",
|
|
148
|
-
md: "w-0.5",
|
|
149
|
-
lg: "w-1"
|
|
150
|
-
};
|
|
151
|
-
const containerSizes = {
|
|
152
|
-
sm: "h-4",
|
|
153
|
-
md: "h-5",
|
|
154
|
-
lg: "h-6"
|
|
155
|
-
};
|
|
156
|
-
const heights = {
|
|
157
|
-
sm: ["6px", "9px", "12px", "9px", "6px"],
|
|
158
|
-
md: ["8px", "12px", "16px", "12px", "8px"],
|
|
159
|
-
lg: ["10px", "15px", "20px", "15px", "10px"]
|
|
160
|
-
};
|
|
161
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
162
|
-
"div",
|
|
163
|
-
{
|
|
164
|
-
className: cn(
|
|
165
|
-
"flex items-center gap-0.5",
|
|
166
|
-
containerSizes[size],
|
|
167
|
-
className
|
|
168
|
-
),
|
|
169
|
-
children: [
|
|
170
|
-
[...Array(5)].map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
171
|
-
"div",
|
|
172
|
-
{
|
|
173
|
-
className: cn(
|
|
174
|
-
"bg-primary csdk-loader-wave rounded-full",
|
|
175
|
-
barWidths[size]
|
|
176
|
-
),
|
|
177
|
-
style: {
|
|
178
|
-
animationDelay: `${i * 100}ms`,
|
|
179
|
-
height: heights[size][i]
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
i
|
|
183
|
-
)),
|
|
184
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
function TerminalLoader({
|
|
190
|
-
className,
|
|
191
|
-
size = "md"
|
|
192
|
-
}) {
|
|
193
|
-
const cursorSizes = {
|
|
194
|
-
sm: "h-3 w-1.5",
|
|
195
|
-
md: "h-4 w-2",
|
|
196
|
-
lg: "h-5 w-2.5"
|
|
197
|
-
};
|
|
198
|
-
const textSizes = {
|
|
199
|
-
sm: "text-xs",
|
|
200
|
-
md: "text-sm",
|
|
201
|
-
lg: "text-base"
|
|
202
|
-
};
|
|
203
|
-
const containerSizes = {
|
|
204
|
-
sm: "h-4",
|
|
205
|
-
md: "h-5",
|
|
206
|
-
lg: "h-6"
|
|
207
|
-
};
|
|
208
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
209
|
-
"div",
|
|
210
|
-
{
|
|
211
|
-
className: cn(
|
|
212
|
-
"flex items-center space-x-1",
|
|
213
|
-
containerSizes[size],
|
|
214
|
-
className
|
|
215
|
-
),
|
|
216
|
-
children: [
|
|
217
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-primary font-mono", textSizes[size]), children: ">" }),
|
|
218
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("bg-primary csdk-loader-blink", cursorSizes[size]) }),
|
|
219
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading" })
|
|
220
|
-
]
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
function TextBlinkLoader({
|
|
225
|
-
text = "Thinking",
|
|
226
|
-
className,
|
|
227
|
-
size = "md"
|
|
228
|
-
}) {
|
|
229
|
-
const textSizes = {
|
|
230
|
-
sm: "text-xs",
|
|
231
|
-
md: "text-sm",
|
|
232
|
-
lg: "text-base"
|
|
233
|
-
};
|
|
234
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
235
|
-
"div",
|
|
236
|
-
{
|
|
237
|
-
className: cn(
|
|
238
|
-
"csdk-loader-text-blink font-medium",
|
|
239
|
-
textSizes[size],
|
|
240
|
-
className
|
|
241
|
-
),
|
|
242
|
-
children: text
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
function TextShimmerLoader({
|
|
247
|
-
text = "Thinking",
|
|
248
|
-
className,
|
|
249
|
-
size = "md"
|
|
250
|
-
}) {
|
|
251
|
-
const textSizes = {
|
|
252
|
-
sm: "text-xs",
|
|
253
|
-
md: "text-sm",
|
|
254
|
-
lg: "text-base"
|
|
255
|
-
};
|
|
256
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
257
|
-
"div",
|
|
258
|
-
{
|
|
259
|
-
className: cn(
|
|
260
|
-
"bg-[linear-gradient(to_right,var(--muted-foreground)_40%,var(--foreground)_60%,var(--muted-foreground)_80%)]",
|
|
261
|
-
"bg-[length:200%_auto] bg-clip-text font-medium text-transparent",
|
|
262
|
-
"csdk-loader-shimmer",
|
|
263
|
-
textSizes[size],
|
|
264
|
-
className
|
|
265
|
-
),
|
|
266
|
-
children: text
|
|
267
|
-
}
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
function TextDotsLoader({
|
|
271
|
-
className,
|
|
272
|
-
text = "Thinking",
|
|
273
|
-
size = "md"
|
|
274
|
-
}) {
|
|
275
|
-
const textSizes = {
|
|
276
|
-
sm: "text-xs",
|
|
277
|
-
md: "text-sm",
|
|
278
|
-
lg: "text-base"
|
|
279
|
-
};
|
|
280
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("inline-flex items-center", className), children: [
|
|
281
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-primary font-medium", textSizes[size]), children: text }),
|
|
282
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex", children: [
|
|
283
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
284
|
-
"span",
|
|
285
|
-
{
|
|
286
|
-
className: "text-primary csdk-loader-loading-dots",
|
|
287
|
-
style: { animationDelay: "0.2s" },
|
|
288
|
-
children: "."
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
292
|
-
"span",
|
|
293
|
-
{
|
|
294
|
-
className: "text-primary csdk-loader-loading-dots",
|
|
295
|
-
style: { animationDelay: "0.4s" },
|
|
296
|
-
children: "."
|
|
297
|
-
}
|
|
298
|
-
),
|
|
299
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
300
|
-
"span",
|
|
301
|
-
{
|
|
302
|
-
className: "text-primary csdk-loader-loading-dots",
|
|
303
|
-
style: { animationDelay: "0.6s" },
|
|
304
|
-
children: "."
|
|
305
|
-
}
|
|
306
|
-
)
|
|
307
|
-
] })
|
|
308
|
-
] });
|
|
309
|
-
}
|
|
310
|
-
function Loader({
|
|
311
|
-
variant = "typing",
|
|
312
|
-
size = "md",
|
|
313
|
-
text,
|
|
314
|
-
className
|
|
315
|
-
}) {
|
|
316
|
-
switch (variant) {
|
|
317
|
-
case "dots":
|
|
318
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DotsLoader, { size, className });
|
|
319
|
-
case "typing":
|
|
320
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TypingLoader, { size, className });
|
|
321
|
-
case "wave":
|
|
322
|
-
return /* @__PURE__ */ jsxRuntime.jsx(WaveLoader, { size, className });
|
|
323
|
-
case "terminal":
|
|
324
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TerminalLoader, { size, className });
|
|
325
|
-
case "text-blink":
|
|
326
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TextBlinkLoader, { text, size, className });
|
|
327
|
-
case "text-shimmer":
|
|
328
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TextShimmerLoader, { text, size, className });
|
|
329
|
-
case "loading-dots":
|
|
330
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TextDotsLoader, { text, size, className });
|
|
331
|
-
default:
|
|
332
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TypingLoader, { size, className });
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
57
|
var createHeading = (Tag) => {
|
|
336
58
|
const HeadingComponent = ({
|
|
337
59
|
children,
|
|
@@ -372,7 +94,7 @@ function CodeBlock({ children, className, ...props }) {
|
|
|
372
94
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
373
95
|
"div",
|
|
374
96
|
{
|
|
375
|
-
className: cn(
|
|
97
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
376
98
|
"not-prose flex w-full flex-col overflow-clip border",
|
|
377
99
|
"border-border bg-card text-card-foreground rounded-xl",
|
|
378
100
|
className
|
|
@@ -413,7 +135,7 @@ var Button = React19__namespace.forwardRef(
|
|
|
413
135
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
414
136
|
Comp,
|
|
415
137
|
{
|
|
416
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
138
|
+
className: chunk5EGBIQYS_cjs.cn(buttonVariants({ variant, size, className })),
|
|
417
139
|
ref,
|
|
418
140
|
...props
|
|
419
141
|
}
|
|
@@ -489,7 +211,7 @@ function FeedbackBar({
|
|
|
489
211
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
490
212
|
"div",
|
|
491
213
|
{
|
|
492
|
-
className: cn(
|
|
214
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
493
215
|
"bg-background border-border inline-flex rounded-[12px] border text-sm",
|
|
494
216
|
className
|
|
495
217
|
),
|
|
@@ -550,7 +272,7 @@ function ChatContainerRoot({
|
|
|
550
272
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
551
273
|
StickToBottom,
|
|
552
274
|
{
|
|
553
|
-
className: cn("min-h-0", className),
|
|
275
|
+
className: chunk5EGBIQYS_cjs.cn("min-h-0", className),
|
|
554
276
|
resize: "smooth",
|
|
555
277
|
initial: "instant",
|
|
556
278
|
role: "log",
|
|
@@ -567,7 +289,7 @@ function ChatContainerContent({
|
|
|
567
289
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
568
290
|
StickToBottom.Content,
|
|
569
291
|
{
|
|
570
|
-
className: cn("flex w-full flex-col", className),
|
|
292
|
+
className: chunk5EGBIQYS_cjs.cn("flex w-full flex-col", className),
|
|
571
293
|
...props,
|
|
572
294
|
children
|
|
573
295
|
}
|
|
@@ -580,7 +302,7 @@ function ChatContainerScrollAnchor({
|
|
|
580
302
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
581
303
|
"div",
|
|
582
304
|
{
|
|
583
|
-
className: cn("h-px w-full shrink-0 scroll-mt-4", className),
|
|
305
|
+
className: chunk5EGBIQYS_cjs.cn("h-px w-full shrink-0 scroll-mt-4", className),
|
|
584
306
|
"aria-hidden": "true",
|
|
585
307
|
...props
|
|
586
308
|
}
|
|
@@ -614,7 +336,7 @@ function ScrollButton({
|
|
|
614
336
|
{
|
|
615
337
|
variant,
|
|
616
338
|
size,
|
|
617
|
-
className: cn(
|
|
339
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
618
340
|
"h-10 w-10 rounded-full transition-all duration-150 ease-out shadow-md bg-background",
|
|
619
341
|
!isAtBottom ? "translate-y-0 scale-100 opacity-100" : "pointer-events-none translate-y-4 scale-95 opacity-0",
|
|
620
342
|
className
|
|
@@ -664,7 +386,7 @@ function TooltipContent({
|
|
|
664
386
|
return /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip.Positioner, { side, align, sideOffset, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
665
387
|
tooltip.Tooltip.Popup,
|
|
666
388
|
{
|
|
667
|
-
className: cn(
|
|
389
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
668
390
|
"z-50 rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-md",
|
|
669
391
|
"animate-in fade-in-0 zoom-in-95",
|
|
670
392
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
@@ -681,7 +403,7 @@ var Avatar = React19__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
681
403
|
AvatarPrimitive__namespace.Root,
|
|
682
404
|
{
|
|
683
405
|
ref,
|
|
684
|
-
className: cn(
|
|
406
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
685
407
|
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
686
408
|
className
|
|
687
409
|
),
|
|
@@ -693,7 +415,7 @@ var AvatarImage = React19__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
693
415
|
AvatarPrimitive__namespace.Image,
|
|
694
416
|
{
|
|
695
417
|
ref,
|
|
696
|
-
className: cn("aspect-square h-full w-full object-cover", className),
|
|
418
|
+
className: chunk5EGBIQYS_cjs.cn("aspect-square h-full w-full object-cover", className),
|
|
697
419
|
...props
|
|
698
420
|
}
|
|
699
421
|
));
|
|
@@ -702,7 +424,7 @@ var AvatarFallback = React19__namespace.forwardRef(({ className, ...props }, ref
|
|
|
702
424
|
AvatarPrimitive__namespace.Fallback,
|
|
703
425
|
{
|
|
704
426
|
ref,
|
|
705
|
-
className: cn(
|
|
427
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
706
428
|
"csdk-avatar-fallback flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
707
429
|
className
|
|
708
430
|
),
|
|
@@ -710,7 +432,7 @@ var AvatarFallback = React19__namespace.forwardRef(({ className, ...props }, ref
|
|
|
710
432
|
}
|
|
711
433
|
));
|
|
712
434
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
713
|
-
var Message = ({ children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("csdk-message flex gap-3", className), ...props, children });
|
|
435
|
+
var Message = ({ children, className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("csdk-message flex gap-3", className), ...props, children });
|
|
714
436
|
var MessageAvatar = ({
|
|
715
437
|
src,
|
|
716
438
|
alt = "Avatar",
|
|
@@ -721,9 +443,9 @@ var MessageAvatar = ({
|
|
|
721
443
|
className
|
|
722
444
|
}) => {
|
|
723
445
|
if (children) {
|
|
724
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("csdk-avatar flex shrink-0 size-7", className), children });
|
|
446
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk5EGBIQYS_cjs.cn("csdk-avatar flex shrink-0 size-7", className), children });
|
|
725
447
|
}
|
|
726
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: cn("csdk-avatar size-7 shrink-0", className), children: [
|
|
448
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: chunk5EGBIQYS_cjs.cn("csdk-avatar size-7 shrink-0", className), children: [
|
|
727
449
|
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src, alt }),
|
|
728
450
|
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { delayMs, children: fallbackIcon || fallback })
|
|
729
451
|
] });
|
|
@@ -740,10 +462,10 @@ var MessageContent = ({
|
|
|
740
462
|
size = "sm",
|
|
741
463
|
...props
|
|
742
464
|
}) => {
|
|
743
|
-
const classNames = cn(
|
|
744
|
-
"csdk-message-content rounded-lg p-2 break-words whitespace-normal max-w-full
|
|
465
|
+
const classNames = chunk5EGBIQYS_cjs.cn(
|
|
466
|
+
"csdk-message-content rounded-lg p-2 break-words whitespace-normal max-w-full overflow-x-auto overflow-y-hidden",
|
|
745
467
|
// Typography - simple Tailwind utilities (no prose)
|
|
746
|
-
"[&_p]:my-1
|
|
468
|
+
"[&_p]:my-1 ",
|
|
747
469
|
"[&_ul]:my-1 [&_ul]:pl-4 [&_ul]:list-disc [&_ul]:list-outside",
|
|
748
470
|
"[&_ol]:my-1 [&_ol]:pl-4 [&_ol]:list-decimal [&_ol]:list-outside",
|
|
749
471
|
"[&_li]:my-0.5 [&_li]:pl-0",
|
|
@@ -765,7 +487,7 @@ var MessageActions = ({
|
|
|
765
487
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
766
488
|
"div",
|
|
767
489
|
{
|
|
768
|
-
className: cn(
|
|
490
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
769
491
|
"csdk-message-actions text-muted-foreground flex items-center gap-2",
|
|
770
492
|
className
|
|
771
493
|
),
|
|
@@ -789,7 +511,7 @@ var Textarea = React19__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
|
789
511
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
790
512
|
"textarea",
|
|
791
513
|
{
|
|
792
|
-
className: cn(
|
|
514
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
793
515
|
"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",
|
|
794
516
|
className
|
|
795
517
|
),
|
|
@@ -850,7 +572,7 @@ function PromptInput({
|
|
|
850
572
|
"div",
|
|
851
573
|
{
|
|
852
574
|
onClick: handleClick,
|
|
853
|
-
className: cn(
|
|
575
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
854
576
|
"csdk-input border-input bg-background cursor-text rounded-3xl border p-2 shadow-xs",
|
|
855
577
|
disabled && "cursor-not-allowed opacity-60",
|
|
856
578
|
className
|
|
@@ -910,7 +632,7 @@ function PromptInputTextarea({
|
|
|
910
632
|
value,
|
|
911
633
|
onChange: handleChange,
|
|
912
634
|
onKeyDown: handleKeyDown,
|
|
913
|
-
className: cn(
|
|
635
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
914
636
|
"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",
|
|
915
637
|
className
|
|
916
638
|
),
|
|
@@ -925,7 +647,7 @@ function PromptInputActions({
|
|
|
925
647
|
className,
|
|
926
648
|
...props
|
|
927
649
|
}) {
|
|
928
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-2", className), ...props, children });
|
|
650
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("flex items-center gap-2", className), ...props, children });
|
|
929
651
|
}
|
|
930
652
|
function PromptInputAction({
|
|
931
653
|
tooltip,
|
|
@@ -955,7 +677,7 @@ var HoverCardContent = React19__namespace.forwardRef(({ className, align = "cent
|
|
|
955
677
|
ref,
|
|
956
678
|
align,
|
|
957
679
|
sideOffset,
|
|
958
|
-
className: cn(
|
|
680
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
959
681
|
"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",
|
|
960
682
|
className
|
|
961
683
|
),
|
|
@@ -991,7 +713,7 @@ function SourceTrigger({
|
|
|
991
713
|
href,
|
|
992
714
|
target: "_blank",
|
|
993
715
|
rel: "noopener noreferrer",
|
|
994
|
-
className: cn(
|
|
716
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
995
717
|
"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",
|
|
996
718
|
"hover:bg-muted hover:border-border hover:shadow-md hover:text-foreground",
|
|
997
719
|
className
|
|
@@ -1023,7 +745,7 @@ function SourceContent({
|
|
|
1023
745
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
746
|
HoverCardContent,
|
|
1025
747
|
{
|
|
1026
|
-
className: cn("w-80 p-0 shadow-lg border border-border/50", className),
|
|
748
|
+
className: chunk5EGBIQYS_cjs.cn("w-80 p-0 shadow-lg border border-border/50", className),
|
|
1027
749
|
sideOffset: 8,
|
|
1028
750
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1029
751
|
"a",
|
|
@@ -1067,7 +789,7 @@ function SourceGroup({
|
|
|
1067
789
|
if (!sources || sources.length === 0) return null;
|
|
1068
790
|
const visibleSources = sources.slice(0, maxVisible);
|
|
1069
791
|
const hiddenCount = sources.length - maxVisible;
|
|
1070
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-wrap items-center gap-2", className), children: [
|
|
792
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("flex flex-wrap items-center gap-2", className), children: [
|
|
1071
793
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }),
|
|
1072
794
|
visibleSources.map((source, index) => /* @__PURE__ */ jsxRuntime.jsxs(Source, { href: source.href, children: [
|
|
1073
795
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1111,7 +833,7 @@ function SimpleSource({
|
|
|
1111
833
|
href,
|
|
1112
834
|
target: "_blank",
|
|
1113
835
|
rel: "noopener noreferrer",
|
|
1114
|
-
className: cn(
|
|
836
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1115
837
|
"bg-muted text-muted-foreground hover:bg-primary/20 hover:text-primary",
|
|
1116
838
|
"inline-flex h-5 items-center gap-1 rounded-full text-xs no-underline transition-colors",
|
|
1117
839
|
showFavicon ? "pr-2 pl-1" : "px-1.5",
|
|
@@ -1150,13 +872,13 @@ function SearchResults({
|
|
|
1150
872
|
}) {
|
|
1151
873
|
const displayResults = maxResults ? results.slice(0, maxResults) : results;
|
|
1152
874
|
if (displayResults.length === 0) {
|
|
1153
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-muted-foreground text-sm", className), children: "No results found" });
|
|
875
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("text-muted-foreground text-sm", className), children: "No results found" });
|
|
1154
876
|
}
|
|
1155
877
|
if (variant === "compact") {
|
|
1156
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(SearchResultCompact, { result, index: i + 1 }, i)) });
|
|
878
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("flex flex-wrap gap-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(SearchResultCompact, { result, index: i + 1 }, i)) });
|
|
1157
879
|
}
|
|
1158
880
|
if (variant === "list") {
|
|
1159
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
881
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("space-y-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
882
|
SearchResultList,
|
|
1161
883
|
{
|
|
1162
884
|
result,
|
|
@@ -1167,7 +889,7 @@ function SearchResults({
|
|
|
1167
889
|
i
|
|
1168
890
|
)) });
|
|
1169
891
|
}
|
|
1170
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
892
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("grid gap-2", className), children: displayResults.map((result, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1171
893
|
SearchResultCard,
|
|
1172
894
|
{
|
|
1173
895
|
result,
|
|
@@ -1290,7 +1012,7 @@ function SearchAnswer({ answer, className }) {
|
|
|
1290
1012
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1291
1013
|
"div",
|
|
1292
1014
|
{
|
|
1293
|
-
className: cn(
|
|
1015
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1294
1016
|
"p-3 bg-muted/50 rounded-lg border-l-2 border-primary/50",
|
|
1295
1017
|
className
|
|
1296
1018
|
),
|
|
@@ -1305,7 +1027,7 @@ function SearchResultsWithAnswer({
|
|
|
1305
1027
|
showAnswer = true,
|
|
1306
1028
|
maxResults
|
|
1307
1029
|
}) {
|
|
1308
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-3", className), children: [
|
|
1030
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("space-y-3", className), children: [
|
|
1309
1031
|
showAnswer && response.answer && /* @__PURE__ */ jsxRuntime.jsx(SearchAnswer, { answer: response.answer }),
|
|
1310
1032
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1311
1033
|
SearchResults,
|
|
@@ -1370,7 +1092,7 @@ function CitationBadge({
|
|
|
1370
1092
|
const badge = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1371
1093
|
"span",
|
|
1372
1094
|
{
|
|
1373
|
-
className: cn(
|
|
1095
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1374
1096
|
"inline-flex items-center justify-center rounded font-medium",
|
|
1375
1097
|
"bg-primary/10 text-primary hover:bg-primary/20",
|
|
1376
1098
|
"cursor-pointer transition-colors",
|
|
@@ -1405,7 +1127,7 @@ function CitationSuperscript({
|
|
|
1405
1127
|
const sup = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1406
1128
|
"sup",
|
|
1407
1129
|
{
|
|
1408
|
-
className: cn(
|
|
1130
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1409
1131
|
"text-[10px] text-primary hover:underline cursor-pointer ml-0.5",
|
|
1410
1132
|
className
|
|
1411
1133
|
),
|
|
@@ -1436,7 +1158,7 @@ function SourcePill({
|
|
|
1436
1158
|
target: "_blank",
|
|
1437
1159
|
rel: "noopener noreferrer",
|
|
1438
1160
|
title: citation.title,
|
|
1439
|
-
className: cn(
|
|
1161
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1440
1162
|
"inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded-full",
|
|
1441
1163
|
"bg-muted hover:bg-muted/80 transition-colors",
|
|
1442
1164
|
"text-muted-foreground hover:text-foreground",
|
|
@@ -1471,7 +1193,7 @@ function SourcesBar({
|
|
|
1471
1193
|
const visibleCitations = citations.slice(0, maxVisible);
|
|
1472
1194
|
const hiddenCount = citations.length - maxVisible;
|
|
1473
1195
|
if (citations.length === 0) return null;
|
|
1474
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
1196
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("flex items-center gap-2", className), children: [
|
|
1475
1197
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground flex items-center gap-1", children: [
|
|
1476
1198
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "w-3 h-3" }),
|
|
1477
1199
|
label
|
|
@@ -1494,7 +1216,7 @@ function SourcesCollapsible({
|
|
|
1494
1216
|
}) {
|
|
1495
1217
|
const [expanded, setExpanded] = React19__namespace.useState(defaultExpanded);
|
|
1496
1218
|
if (citations.length === 0) return null;
|
|
1497
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("border rounded-lg", className), children: [
|
|
1219
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("border rounded-lg", className), children: [
|
|
1498
1220
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1499
1221
|
"button",
|
|
1500
1222
|
{
|
|
@@ -1556,7 +1278,7 @@ function SourcesList({
|
|
|
1556
1278
|
}) {
|
|
1557
1279
|
if (citations.length === 0) return null;
|
|
1558
1280
|
if (compact) {
|
|
1559
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("text-xs text-muted-foreground", className), children: [
|
|
1281
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("text-xs text-muted-foreground", className), children: [
|
|
1560
1282
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Sources: " }),
|
|
1561
1283
|
citations.map((c, i) => /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
|
|
1562
1284
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1577,7 +1299,7 @@ function SourcesList({
|
|
|
1577
1299
|
] }, c.index))
|
|
1578
1300
|
] });
|
|
1579
1301
|
}
|
|
1580
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-1", className), children: citations.map((citation) => /* @__PURE__ */ jsxRuntime.jsx(SourceItem, { citation }, citation.index)) });
|
|
1302
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("space-y-1", className), children: citations.map((citation) => /* @__PURE__ */ jsxRuntime.jsx(SourceItem, { citation }, citation.index)) });
|
|
1581
1303
|
}
|
|
1582
1304
|
function MessageWithCitations({
|
|
1583
1305
|
children,
|
|
@@ -1589,7 +1311,7 @@ function MessageWithCitations({
|
|
|
1589
1311
|
if (!enabled || citations.length === 0) {
|
|
1590
1312
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children });
|
|
1591
1313
|
}
|
|
1592
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-3", className), children: [
|
|
1314
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("space-y-3", className), children: [
|
|
1593
1315
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children }),
|
|
1594
1316
|
sourcesPosition === "bottom" && /* @__PURE__ */ jsxRuntime.jsx(SourcesBar, { citations, maxVisible }),
|
|
1595
1317
|
sourcesPosition === "collapsible" && /* @__PURE__ */ jsxRuntime.jsx(SourcesCollapsible, { citations })
|
|
@@ -1679,7 +1401,7 @@ function Reasoning({
|
|
|
1679
1401
|
}
|
|
1680
1402
|
prevStreamingRef.current = isStreaming;
|
|
1681
1403
|
}, [isStreaming, setIsOpen]);
|
|
1682
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ReasoningContext.Provider, { value: { isOpen, setIsOpen, isStreaming }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("reasoning", className), children }) });
|
|
1404
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReasoningContext.Provider, { value: { isOpen, setIsOpen, isStreaming }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("reasoning", className), children }) });
|
|
1683
1405
|
}
|
|
1684
1406
|
function ReasoningTrigger({
|
|
1685
1407
|
children,
|
|
@@ -1691,7 +1413,7 @@ function ReasoningTrigger({
|
|
|
1691
1413
|
{
|
|
1692
1414
|
type: "button",
|
|
1693
1415
|
onClick: () => setIsOpen(!isOpen),
|
|
1694
|
-
className: cn(
|
|
1416
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1695
1417
|
"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",
|
|
1696
1418
|
"py-1 px-0 bg-transparent border-none cursor-pointer",
|
|
1697
1419
|
className
|
|
@@ -1701,7 +1423,7 @@ function ReasoningTrigger({
|
|
|
1701
1423
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1702
1424
|
"svg",
|
|
1703
1425
|
{
|
|
1704
|
-
className: cn(
|
|
1426
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1705
1427
|
"size-3 transition-transform duration-200",
|
|
1706
1428
|
isOpen && "rotate-90"
|
|
1707
1429
|
),
|
|
@@ -1743,7 +1465,7 @@ function ReasoningContent({
|
|
|
1743
1465
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
1466
|
"div",
|
|
1745
1467
|
{
|
|
1746
|
-
className: cn(
|
|
1468
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1747
1469
|
"overflow-hidden transition-[max-height] duration-200 ease-out",
|
|
1748
1470
|
isOpen ? "opacity-100" : "opacity-0"
|
|
1749
1471
|
),
|
|
@@ -1753,7 +1475,7 @@ function ReasoningContent({
|
|
|
1753
1475
|
"div",
|
|
1754
1476
|
{
|
|
1755
1477
|
ref: contentRef,
|
|
1756
|
-
className: cn(
|
|
1478
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1757
1479
|
"mt-1 pl-3 border-l-2 border-muted-foreground/20",
|
|
1758
1480
|
"text-xs text-muted-foreground",
|
|
1759
1481
|
className
|
|
@@ -1838,7 +1560,7 @@ function StatusIndicator({ status, className }) {
|
|
|
1838
1560
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1839
1561
|
"div",
|
|
1840
1562
|
{
|
|
1841
|
-
className: cn(
|
|
1563
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1842
1564
|
baseClasses,
|
|
1843
1565
|
"size-3 flex items-center justify-center",
|
|
1844
1566
|
className
|
|
@@ -1852,7 +1574,7 @@ function StatusIndicator({ status, className }) {
|
|
|
1852
1574
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1853
1575
|
"div",
|
|
1854
1576
|
{
|
|
1855
|
-
className: cn(
|
|
1577
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1856
1578
|
baseClasses,
|
|
1857
1579
|
"size-3 flex items-center justify-center",
|
|
1858
1580
|
className
|
|
@@ -1883,7 +1605,7 @@ function StatusIndicator({ status, className }) {
|
|
|
1883
1605
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1884
1606
|
"div",
|
|
1885
1607
|
{
|
|
1886
|
-
className: cn(
|
|
1608
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1887
1609
|
baseClasses,
|
|
1888
1610
|
"size-3 flex items-center justify-center",
|
|
1889
1611
|
className
|
|
@@ -1948,7 +1670,7 @@ function ToolStep({
|
|
|
1948
1670
|
const isExecuting = step.status === "executing";
|
|
1949
1671
|
const isCompleted = step.status === "completed";
|
|
1950
1672
|
const isError = step.status === "error" || step.status === "failed" || step.status === "rejected";
|
|
1951
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
1673
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("relative", className), children: [
|
|
1952
1674
|
showLine && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1953
1675
|
"div",
|
|
1954
1676
|
{
|
|
@@ -1965,16 +1687,16 @@ function ToolStep({
|
|
|
1965
1687
|
type: "button",
|
|
1966
1688
|
onClick: () => debug && hasDebugContent && setExpanded(!expanded),
|
|
1967
1689
|
disabled: !debug || !hasDebugContent,
|
|
1968
|
-
className: cn(
|
|
1690
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1969
1691
|
"flex items-center gap-2 text-left min-w-0 w-full",
|
|
1970
1692
|
debug && hasDebugContent && "cursor-pointer hover:text-foreground",
|
|
1971
1693
|
!debug && "cursor-default"
|
|
1972
1694
|
),
|
|
1973
1695
|
children: [
|
|
1974
|
-
isExecuting ? /* @__PURE__ */ jsxRuntime.jsx(TextShimmerLoader, { text: displayTitle, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1696
|
+
isExecuting ? /* @__PURE__ */ jsxRuntime.jsx(chunk5EGBIQYS_cjs.TextShimmerLoader, { text: displayTitle, size: "sm" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1975
1697
|
"span",
|
|
1976
1698
|
{
|
|
1977
|
-
className: cn(
|
|
1699
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1978
1700
|
"text-sm truncate",
|
|
1979
1701
|
isCompleted && "text-foreground",
|
|
1980
1702
|
isError && "text-red-500",
|
|
@@ -1986,7 +1708,7 @@ function ToolStep({
|
|
|
1986
1708
|
debug && hasDebugContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1987
1709
|
"svg",
|
|
1988
1710
|
{
|
|
1989
|
-
className: cn(
|
|
1711
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
1990
1712
|
"size-3 text-muted-foreground/40 transition-transform ml-auto flex-shrink-0",
|
|
1991
1713
|
expanded && "rotate-90"
|
|
1992
1714
|
),
|
|
@@ -2015,7 +1737,7 @@ function ToolStep({
|
|
|
2015
1737
|
step.result && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2016
1738
|
"div",
|
|
2017
1739
|
{
|
|
2018
|
-
className: cn(
|
|
1740
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2019
1741
|
"text-[10px] font-mono rounded px-2 py-1 overflow-x-auto whitespace-pre-wrap break-all",
|
|
2020
1742
|
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"
|
|
2021
1743
|
),
|
|
@@ -2046,7 +1768,7 @@ function ToolSteps({
|
|
|
2046
1768
|
className
|
|
2047
1769
|
}) {
|
|
2048
1770
|
if (steps.length === 0) return null;
|
|
2049
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-1.5", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1771
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("space-y-1.5", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2050
1772
|
ToolStep,
|
|
2051
1773
|
{
|
|
2052
1774
|
step,
|
|
@@ -2065,7 +1787,7 @@ function InlineToolSteps({
|
|
|
2065
1787
|
if (steps.length === 0) return null;
|
|
2066
1788
|
const visibleSteps = steps.slice(0, maxVisible);
|
|
2067
1789
|
const hiddenCount = steps.length - maxVisible;
|
|
2068
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-1", className), children: [
|
|
1790
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("flex items-center gap-1", className), children: [
|
|
2069
1791
|
visibleSteps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2070
1792
|
"div",
|
|
2071
1793
|
{
|
|
@@ -2446,8 +2168,11 @@ function Confirmation({
|
|
|
2446
2168
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2447
2169
|
"div",
|
|
2448
2170
|
{
|
|
2449
|
-
className: cn(
|
|
2450
|
-
"
|
|
2171
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2172
|
+
"csdk-confirm-card",
|
|
2173
|
+
"confirmation rounded-2xl overflow-hidden",
|
|
2174
|
+
"border border-border/60",
|
|
2175
|
+
"bg-card text-card-foreground shadow-sm",
|
|
2451
2176
|
className
|
|
2452
2177
|
),
|
|
2453
2178
|
children
|
|
@@ -2462,7 +2187,7 @@ function ConfirmationPending({
|
|
|
2462
2187
|
}) {
|
|
2463
2188
|
const { state } = useConfirmationContext();
|
|
2464
2189
|
if (state !== "pending") return null;
|
|
2465
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("
|
|
2190
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("pl-5 pr-4 pt-4 pb-3", className), children });
|
|
2466
2191
|
}
|
|
2467
2192
|
function ConfirmationApproved({
|
|
2468
2193
|
children,
|
|
@@ -2473,12 +2198,15 @@ function ConfirmationApproved({
|
|
|
2473
2198
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2474
2199
|
"div",
|
|
2475
2200
|
{
|
|
2476
|
-
className: cn(
|
|
2477
|
-
"
|
|
2201
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2202
|
+
"csdk-confirm-result",
|
|
2203
|
+
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2204
|
+
"rounded-2xl border border-green-200/60 dark:border-green-800/40",
|
|
2205
|
+
"bg-green-50/80 dark:bg-green-950/20 text-green-700 dark:text-green-400",
|
|
2478
2206
|
className
|
|
2479
2207
|
),
|
|
2480
2208
|
children: [
|
|
2481
|
-
/* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "h-
|
|
2209
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
2482
2210
|
children || /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Approved" })
|
|
2483
2211
|
]
|
|
2484
2212
|
}
|
|
@@ -2493,12 +2221,15 @@ function ConfirmationRejected({
|
|
|
2493
2221
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2494
2222
|
"div",
|
|
2495
2223
|
{
|
|
2496
|
-
className: cn(
|
|
2497
|
-
"
|
|
2224
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2225
|
+
"csdk-confirm-result",
|
|
2226
|
+
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2227
|
+
"rounded-2xl border border-red-200/60 dark:border-red-800/40",
|
|
2228
|
+
"bg-red-50/80 dark:bg-red-950/20 text-red-700 dark:text-red-400",
|
|
2498
2229
|
className
|
|
2499
2230
|
),
|
|
2500
2231
|
children: [
|
|
2501
|
-
/* @__PURE__ */ jsxRuntime.jsx(XIcon2, { className: "h-
|
|
2232
|
+
/* @__PURE__ */ jsxRuntime.jsx(XIcon2, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
2502
2233
|
children || /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Rejected" })
|
|
2503
2234
|
]
|
|
2504
2235
|
}
|
|
@@ -2509,9 +2240,9 @@ function ConfirmationMessage({
|
|
|
2509
2240
|
className
|
|
2510
2241
|
}) {
|
|
2511
2242
|
const { message } = useConfirmationContext();
|
|
2512
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-start gap-3", className), children: [
|
|
2513
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2514
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground", children: children || message || "This action requires your approval." })
|
|
2243
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("flex items-start gap-3", className), children: [
|
|
2244
|
+
/* @__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" }) }),
|
|
2245
|
+
/* @__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." })
|
|
2515
2246
|
] });
|
|
2516
2247
|
}
|
|
2517
2248
|
function ConfirmationActions({
|
|
@@ -2522,11 +2253,41 @@ function ConfirmationActions({
|
|
|
2522
2253
|
}) {
|
|
2523
2254
|
const { onApprove, onReject } = useConfirmationContext();
|
|
2524
2255
|
if (children) {
|
|
2525
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-3 flex justify-end gap-2", className), children });
|
|
2256
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("mt-3 flex justify-end gap-2", className), children });
|
|
2526
2257
|
}
|
|
2527
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2528
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2529
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2258
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2259
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0 border-t border-border/40 mt-3" }),
|
|
2260
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("flex justify-end gap-2 pt-3", className), children: [
|
|
2261
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2262
|
+
"button",
|
|
2263
|
+
{
|
|
2264
|
+
type: "button",
|
|
2265
|
+
onClick: onReject,
|
|
2266
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2267
|
+
"csdk-confirm-btn",
|
|
2268
|
+
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2269
|
+
"border border-border/80 bg-transparent text-muted-foreground",
|
|
2270
|
+
"hover:bg-muted/80 hover:text-foreground hover:border-border"
|
|
2271
|
+
),
|
|
2272
|
+
children: rejectLabel
|
|
2273
|
+
}
|
|
2274
|
+
),
|
|
2275
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2276
|
+
"button",
|
|
2277
|
+
{
|
|
2278
|
+
type: "button",
|
|
2279
|
+
onClick: onApprove,
|
|
2280
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2281
|
+
"csdk-confirm-btn",
|
|
2282
|
+
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2283
|
+
"bg-primary text-primary-foreground",
|
|
2284
|
+
"hover:bg-primary/90",
|
|
2285
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"
|
|
2286
|
+
),
|
|
2287
|
+
children: approveLabel
|
|
2288
|
+
}
|
|
2289
|
+
)
|
|
2290
|
+
] })
|
|
2530
2291
|
] });
|
|
2531
2292
|
}
|
|
2532
2293
|
function SimpleConfirmation({
|
|
@@ -2603,11 +2364,11 @@ function PermissionConfirmation({
|
|
|
2603
2364
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2604
2365
|
"div",
|
|
2605
2366
|
{
|
|
2606
|
-
className: cn(
|
|
2367
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2607
2368
|
"csdk-confirm-result",
|
|
2608
|
-
"inline-flex items-center gap-
|
|
2609
|
-
"rounded-2xl border border-green-200/
|
|
2610
|
-
"bg-green-50 dark:bg-green-950/20 text-green-700 dark:text-green-400",
|
|
2369
|
+
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2370
|
+
"rounded-2xl border border-green-200/60 dark:border-green-800/40",
|
|
2371
|
+
"bg-green-50/80 dark:bg-green-950/20 text-green-700 dark:text-green-400",
|
|
2611
2372
|
className
|
|
2612
2373
|
),
|
|
2613
2374
|
children: [
|
|
@@ -2621,11 +2382,11 @@ function PermissionConfirmation({
|
|
|
2621
2382
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2622
2383
|
"div",
|
|
2623
2384
|
{
|
|
2624
|
-
className: cn(
|
|
2385
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2625
2386
|
"csdk-confirm-result",
|
|
2626
|
-
"inline-flex items-center gap-
|
|
2627
|
-
"rounded-2xl border border-red-200/
|
|
2628
|
-
"bg-red-50 dark:bg-red-950/20 text-red-700 dark:text-red-400",
|
|
2387
|
+
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2388
|
+
"rounded-2xl border border-red-200/60 dark:border-red-800/40",
|
|
2389
|
+
"bg-red-50/80 dark:bg-red-950/20 text-red-700 dark:text-red-400",
|
|
2629
2390
|
className
|
|
2630
2391
|
),
|
|
2631
2392
|
children: [
|
|
@@ -2638,30 +2399,33 @@ function PermissionConfirmation({
|
|
|
2638
2399
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2639
2400
|
"div",
|
|
2640
2401
|
{
|
|
2641
|
-
className: cn(
|
|
2402
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2642
2403
|
"csdk-confirm-card",
|
|
2643
|
-
"w-full rounded-2xl
|
|
2404
|
+
"w-full rounded-2xl overflow-hidden",
|
|
2405
|
+
"border border-border/60",
|
|
2406
|
+
"bg-card text-card-foreground shadow-sm",
|
|
2644
2407
|
className
|
|
2645
2408
|
),
|
|
2646
2409
|
children: [
|
|
2647
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 p-4", children: [
|
|
2648
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-
|
|
2410
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 p-4 pb-3", children: [
|
|
2411
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-xl bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTriangleIcon, { className: "h-4 w-4 text-amber-600 dark:text-amber-400" }) }),
|
|
2649
2412
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 pt-0.5", children: [
|
|
2650
|
-
toolName && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-widest text-
|
|
2413
|
+
toolName && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-widest text-amber-600/80 dark:text-amber-400/70 mb-1", children: toolName }),
|
|
2651
2414
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground leading-snug", children: message || "This tool requires your approval to execute." })
|
|
2652
2415
|
] })
|
|
2653
2416
|
] }),
|
|
2654
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2417
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-4 border-t border-border/40" }),
|
|
2418
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2 px-4 py-3", children: [
|
|
2655
2419
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2656
2420
|
"button",
|
|
2657
2421
|
{
|
|
2658
2422
|
type: "button",
|
|
2659
2423
|
onClick: handleReject,
|
|
2660
|
-
className: cn(
|
|
2424
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2661
2425
|
"csdk-confirm-btn",
|
|
2662
2426
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2663
|
-
"border border-border bg-transparent text-muted-foreground",
|
|
2664
|
-
"hover:bg-muted/
|
|
2427
|
+
"border border-border/80 bg-transparent text-muted-foreground",
|
|
2428
|
+
"hover:bg-muted/80 hover:text-foreground hover:border-border"
|
|
2665
2429
|
),
|
|
2666
2430
|
children: "Deny"
|
|
2667
2431
|
}
|
|
@@ -2671,11 +2435,12 @@ function PermissionConfirmation({
|
|
|
2671
2435
|
{
|
|
2672
2436
|
type: "button",
|
|
2673
2437
|
onClick: handleApprove,
|
|
2674
|
-
className: cn(
|
|
2438
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2675
2439
|
"csdk-confirm-btn",
|
|
2676
2440
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2677
2441
|
"bg-primary text-primary-foreground",
|
|
2678
|
-
"hover:
|
|
2442
|
+
"hover:bg-primary/90",
|
|
2443
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"
|
|
2679
2444
|
),
|
|
2680
2445
|
children: "Allow"
|
|
2681
2446
|
}
|
|
@@ -2702,11 +2467,11 @@ function CompactPermissionConfirmation({
|
|
|
2702
2467
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2703
2468
|
"div",
|
|
2704
2469
|
{
|
|
2705
|
-
className: cn(
|
|
2470
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2706
2471
|
"csdk-confirm-result",
|
|
2707
|
-
"inline-flex items-center gap-
|
|
2708
|
-
"rounded-2xl border border-green-200/
|
|
2709
|
-
"bg-green-50 dark:bg-green-950/20 text-green-700 dark:text-green-400",
|
|
2472
|
+
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2473
|
+
"rounded-2xl border border-green-200/60 dark:border-green-800/40",
|
|
2474
|
+
"bg-green-50/80 dark:bg-green-950/20 text-green-700 dark:text-green-400",
|
|
2710
2475
|
className
|
|
2711
2476
|
),
|
|
2712
2477
|
children: [
|
|
@@ -2720,11 +2485,11 @@ function CompactPermissionConfirmation({
|
|
|
2720
2485
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2721
2486
|
"div",
|
|
2722
2487
|
{
|
|
2723
|
-
className: cn(
|
|
2488
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2724
2489
|
"csdk-confirm-result",
|
|
2725
|
-
"inline-flex items-center gap-
|
|
2726
|
-
"rounded-2xl border border-red-200/
|
|
2727
|
-
"bg-red-50 dark:bg-red-950/20 text-red-700 dark:text-red-400",
|
|
2490
|
+
"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium",
|
|
2491
|
+
"rounded-2xl border border-red-200/60 dark:border-red-800/40",
|
|
2492
|
+
"bg-red-50/80 dark:bg-red-950/20 text-red-700 dark:text-red-400",
|
|
2728
2493
|
className
|
|
2729
2494
|
),
|
|
2730
2495
|
children: [
|
|
@@ -2737,27 +2502,30 @@ function CompactPermissionConfirmation({
|
|
|
2737
2502
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2738
2503
|
"div",
|
|
2739
2504
|
{
|
|
2740
|
-
className: cn(
|
|
2505
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2741
2506
|
"csdk-confirm-card",
|
|
2742
|
-
"w-full rounded-2xl
|
|
2507
|
+
"w-full rounded-2xl overflow-hidden",
|
|
2508
|
+
"border border-border/60",
|
|
2509
|
+
"bg-card text-card-foreground shadow-sm",
|
|
2743
2510
|
className
|
|
2744
2511
|
),
|
|
2745
2512
|
children: [
|
|
2746
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 p-4", children: [
|
|
2747
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-
|
|
2513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 p-4 pb-3", children: [
|
|
2514
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-xl bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(AlertTriangleIcon, { className: "h-4 w-4 text-amber-600 dark:text-amber-400" }) }),
|
|
2748
2515
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "flex-1 min-w-0 pt-0.5 text-sm text-foreground leading-snug", children: message || "This action requires your approval." })
|
|
2749
2516
|
] }),
|
|
2750
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2517
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-4 border-t border-border/40" }),
|
|
2518
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2 px-4 py-3", children: [
|
|
2751
2519
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2752
2520
|
"button",
|
|
2753
2521
|
{
|
|
2754
2522
|
type: "button",
|
|
2755
2523
|
onClick: handleReject,
|
|
2756
|
-
className: cn(
|
|
2524
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2757
2525
|
"csdk-confirm-btn",
|
|
2758
2526
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2759
|
-
"border border-border bg-transparent text-muted-foreground",
|
|
2760
|
-
"hover:bg-muted/
|
|
2527
|
+
"border border-border/80 bg-transparent text-muted-foreground",
|
|
2528
|
+
"hover:bg-muted/80 hover:text-foreground hover:border-border"
|
|
2761
2529
|
),
|
|
2762
2530
|
children: "Deny"
|
|
2763
2531
|
}
|
|
@@ -2767,11 +2535,12 @@ function CompactPermissionConfirmation({
|
|
|
2767
2535
|
{
|
|
2768
2536
|
type: "button",
|
|
2769
2537
|
onClick: handleApprove,
|
|
2770
|
-
className: cn(
|
|
2538
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2771
2539
|
"csdk-confirm-btn",
|
|
2772
2540
|
"px-4 py-1.5 text-sm font-medium rounded-xl",
|
|
2773
2541
|
"bg-primary text-primary-foreground",
|
|
2774
|
-
"hover:
|
|
2542
|
+
"hover:bg-primary/90",
|
|
2543
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"
|
|
2775
2544
|
),
|
|
2776
2545
|
children: "Allow"
|
|
2777
2546
|
}
|
|
@@ -2805,11 +2574,11 @@ function FollowUpQuestions({
|
|
|
2805
2574
|
if (!questions || questions.length === 0) {
|
|
2806
2575
|
return null;
|
|
2807
2576
|
}
|
|
2808
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("csdk-followup flex flex-wrap gap-2 mt-2", className), children: questions.map((question, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2577
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("csdk-followup flex flex-wrap gap-2 mt-2", className), children: questions.map((question, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2809
2578
|
"button",
|
|
2810
2579
|
{
|
|
2811
2580
|
onClick: () => onSelect(question),
|
|
2812
|
-
className: cn(
|
|
2581
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2813
2582
|
"csdk-followup-button px-3 py-1.5 text-sm rounded-full",
|
|
2814
2583
|
"bg-primary/10 hover:bg-primary/20 text-primary",
|
|
2815
2584
|
"border border-primary/20 hover:border-primary/40",
|
|
@@ -2834,7 +2603,7 @@ function BranchNavigator({
|
|
|
2834
2603
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2835
2604
|
"div",
|
|
2836
2605
|
{
|
|
2837
|
-
className: cn(
|
|
2606
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2838
2607
|
"csdk-branch-navigator flex items-center gap-1 text-xs text-muted-foreground select-none",
|
|
2839
2608
|
className
|
|
2840
2609
|
),
|
|
@@ -2846,7 +2615,7 @@ function BranchNavigator({
|
|
|
2846
2615
|
onClick: onPrevious,
|
|
2847
2616
|
disabled: !hasPrevious,
|
|
2848
2617
|
"aria-label": "Previous version",
|
|
2849
|
-
className: cn(
|
|
2618
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2850
2619
|
"p-0.5 rounded transition-colors",
|
|
2851
2620
|
hasPrevious ? "hover:text-foreground hover:bg-muted cursor-pointer" : "opacity-30 cursor-default"
|
|
2852
2621
|
),
|
|
@@ -2878,7 +2647,7 @@ function BranchNavigator({
|
|
|
2878
2647
|
onClick: onNext,
|
|
2879
2648
|
disabled: !hasNext,
|
|
2880
2649
|
"aria-label": "Next version",
|
|
2881
|
-
className: cn(
|
|
2650
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2882
2651
|
"p-0.5 rounded transition-colors",
|
|
2883
2652
|
hasNext ? "hover:text-foreground hover:bg-muted cursor-pointer" : "opacity-30 cursor-default"
|
|
2884
2653
|
),
|
|
@@ -2921,7 +2690,7 @@ function DevLogger({
|
|
|
2921
2690
|
{
|
|
2922
2691
|
type: "button",
|
|
2923
2692
|
onClick: () => setIsOpen(true),
|
|
2924
|
-
className: cn(
|
|
2693
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
2925
2694
|
"fixed z-[9999] flex items-center justify-center",
|
|
2926
2695
|
"w-12 h-12 rounded-full shadow-lg",
|
|
2927
2696
|
"bg-orange-500 hover:bg-orange-600 text-white",
|
|
@@ -2953,12 +2722,12 @@ function DevLogger({
|
|
|
2953
2722
|
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2954
2723
|
"div",
|
|
2955
2724
|
{
|
|
2956
|
-
className: "fixed inset-0 z-[10000] flex items-center justify-center bg-black/50",
|
|
2725
|
+
className: "csdk-devlogger-backdrop fixed inset-0 z-[10000] flex items-center justify-center bg-black/50",
|
|
2957
2726
|
onClick: () => setIsOpen(false),
|
|
2958
2727
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2959
2728
|
"div",
|
|
2960
2729
|
{
|
|
2961
|
-
className: "bg-background border rounded-lg shadow-xl w-[600px] max-h-[80vh] overflow-hidden",
|
|
2730
|
+
className: "csdk-devlogger-modal bg-background border rounded-lg shadow-xl w-[600px] max-h-[80vh] overflow-hidden",
|
|
2962
2731
|
onClick: (e) => e.stopPropagation(),
|
|
2963
2732
|
children: [
|
|
2964
2733
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b bg-muted/50", children: [
|
|
@@ -2998,7 +2767,7 @@ function DevLogger({
|
|
|
2998
2767
|
{
|
|
2999
2768
|
type: "button",
|
|
3000
2769
|
onClick: () => setActiveTab(tab),
|
|
3001
|
-
className: cn(
|
|
2770
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3002
2771
|
"px-4 py-2 text-sm font-medium capitalize",
|
|
3003
2772
|
activeTab === tab ? "border-b-2 border-primary text-primary" : "text-muted-foreground hover:text-foreground"
|
|
3004
2773
|
),
|
|
@@ -3157,7 +2926,7 @@ function Row({
|
|
|
3157
2926
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3158
2927
|
"span",
|
|
3159
2928
|
{
|
|
3160
|
-
className: cn(
|
|
2929
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3161
2930
|
mono && "font-mono text-xs bg-muted px-1.5 py-0.5 rounded",
|
|
3162
2931
|
valueClass
|
|
3163
2932
|
),
|
|
@@ -3176,7 +2945,7 @@ function Badge({ level }) {
|
|
|
3176
2945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3177
2946
|
"span",
|
|
3178
2947
|
{
|
|
3179
|
-
className: cn(
|
|
2948
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3180
2949
|
"px-1.5 py-0.5 rounded text-xs font-medium",
|
|
3181
2950
|
colors[level] || colors.ask
|
|
3182
2951
|
),
|
|
@@ -3194,7 +2963,7 @@ function StatusBadge({ status }) {
|
|
|
3194
2963
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3195
2964
|
"span",
|
|
3196
2965
|
{
|
|
3197
|
-
className: cn(
|
|
2966
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3198
2967
|
"px-1.5 py-0.5 rounded text-xs font-medium",
|
|
3199
2968
|
colors[status] || "bg-gray-100 text-gray-800"
|
|
3200
2969
|
),
|
|
@@ -3277,7 +3046,7 @@ function CapabilityBadge({
|
|
|
3277
3046
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3278
3047
|
"div",
|
|
3279
3048
|
{
|
|
3280
|
-
className: cn(
|
|
3049
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3281
3050
|
"inline-flex items-center gap-1 rounded-full font-medium transition-colors",
|
|
3282
3051
|
sizeClasses[size],
|
|
3283
3052
|
supported ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground opacity-50",
|
|
@@ -3285,7 +3054,7 @@ function CapabilityBadge({
|
|
|
3285
3054
|
),
|
|
3286
3055
|
title: `${labels[type]}: ${descriptions[type]}`,
|
|
3287
3056
|
children: [
|
|
3288
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", iconSizes[size]), children: icons[type] }),
|
|
3057
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk5EGBIQYS_cjs.cn("flex-shrink-0", iconSizes[size]), children: icons[type] }),
|
|
3289
3058
|
showLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { children: labels[type] })
|
|
3290
3059
|
]
|
|
3291
3060
|
}
|
|
@@ -3310,7 +3079,7 @@ function CapabilityList({
|
|
|
3310
3079
|
];
|
|
3311
3080
|
const filteredItems = onlySupported ? items.filter((item) => item.supported) : items;
|
|
3312
3081
|
if (filteredItems.length === 0) return null;
|
|
3313
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-1", className), children: filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3082
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("flex flex-wrap gap-1", className), children: filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3314
3083
|
CapabilityBadge,
|
|
3315
3084
|
{
|
|
3316
3085
|
type: item.type,
|
|
@@ -3366,14 +3135,14 @@ function ModelSelector({
|
|
|
3366
3135
|
onChange?.(modelId, provider);
|
|
3367
3136
|
setIsOpen(false);
|
|
3368
3137
|
};
|
|
3369
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative", className), children: [
|
|
3138
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: chunk5EGBIQYS_cjs.cn("relative", className), children: [
|
|
3370
3139
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3371
3140
|
"button",
|
|
3372
3141
|
{
|
|
3373
3142
|
type: "button",
|
|
3374
3143
|
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
3375
3144
|
disabled,
|
|
3376
|
-
className: cn(
|
|
3145
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3377
3146
|
"flex items-center justify-between gap-2 w-full rounded-md border bg-background",
|
|
3378
3147
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3379
3148
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -3388,7 +3157,7 @@ function ModelSelector({
|
|
|
3388
3157
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3389
3158
|
"svg",
|
|
3390
3159
|
{
|
|
3391
|
-
className: cn(
|
|
3160
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3392
3161
|
"w-4 h-4 flex-shrink-0 text-muted-foreground transition-transform",
|
|
3393
3162
|
isOpen && "rotate-180"
|
|
3394
3163
|
),
|
|
@@ -3420,8 +3189,8 @@ function ModelSelector({
|
|
|
3420
3189
|
isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3421
3190
|
"div",
|
|
3422
3191
|
{
|
|
3423
|
-
className: cn(
|
|
3424
|
-
"absolute z-50 top-full left-0 right-0 mt-1",
|
|
3192
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3193
|
+
"csdk-model-dropdown absolute z-50 top-full left-0 right-0 mt-1",
|
|
3425
3194
|
"max-h-[300px] overflow-auto",
|
|
3426
3195
|
"rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
3427
3196
|
"animate-in fade-in-0 zoom-in-95"
|
|
@@ -3434,7 +3203,7 @@ function ModelSelector({
|
|
|
3434
3203
|
{
|
|
3435
3204
|
type: "button",
|
|
3436
3205
|
onClick: () => handleSelect(model.id, provider.name),
|
|
3437
|
-
className: cn(
|
|
3206
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3438
3207
|
"flex flex-col gap-0.5 w-full px-3 py-2 text-left",
|
|
3439
3208
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3440
3209
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
@@ -3480,7 +3249,7 @@ function ModelSelector({
|
|
|
3480
3249
|
{
|
|
3481
3250
|
type: "button",
|
|
3482
3251
|
onClick: () => handleSelect(model.id, model.provider),
|
|
3483
|
-
className: cn(
|
|
3252
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3484
3253
|
"flex flex-col gap-0.5 w-full px-3 py-2 text-left",
|
|
3485
3254
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3486
3255
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
@@ -3540,7 +3309,7 @@ function SimpleModelSelector({
|
|
|
3540
3309
|
value: value || "",
|
|
3541
3310
|
onChange: (e) => onChange?.(e.target.value),
|
|
3542
3311
|
disabled,
|
|
3543
|
-
className: cn(
|
|
3312
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3544
3313
|
"h-9 px-3 rounded-md border bg-background text-sm",
|
|
3545
3314
|
"focus:outline-none focus:ring-2 focus:ring-ring",
|
|
3546
3315
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -3585,7 +3354,7 @@ function PopoverContent({
|
|
|
3585
3354
|
return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Positioner, { side, align, sideOffset, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3586
3355
|
popover.Popover.Popup,
|
|
3587
3356
|
{
|
|
3588
|
-
className: cn(
|
|
3357
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3589
3358
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3590
3359
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3591
3360
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -3622,7 +3391,7 @@ function ChevronIcon({ className }) {
|
|
|
3622
3391
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3623
3392
|
"svg",
|
|
3624
3393
|
{
|
|
3625
|
-
className: cn("w-4 h-4", className),
|
|
3394
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3626
3395
|
fill: "none",
|
|
3627
3396
|
viewBox: "0 0 24 24",
|
|
3628
3397
|
stroke: "currentColor",
|
|
@@ -3635,7 +3404,7 @@ function PlusIcon2({ className }) {
|
|
|
3635
3404
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3636
3405
|
"svg",
|
|
3637
3406
|
{
|
|
3638
|
-
className: cn("w-4 h-4", className),
|
|
3407
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3639
3408
|
fill: "none",
|
|
3640
3409
|
viewBox: "0 0 24 24",
|
|
3641
3410
|
stroke: "currentColor",
|
|
@@ -3648,7 +3417,7 @@ function CheckIcon2({ className }) {
|
|
|
3648
3417
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3649
3418
|
"svg",
|
|
3650
3419
|
{
|
|
3651
|
-
className: cn("w-4 h-4", className),
|
|
3420
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3652
3421
|
fill: "none",
|
|
3653
3422
|
viewBox: "0 0 24 24",
|
|
3654
3423
|
stroke: "currentColor",
|
|
@@ -3661,7 +3430,7 @@ function TrashIcon({ className }) {
|
|
|
3661
3430
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3662
3431
|
"svg",
|
|
3663
3432
|
{
|
|
3664
|
-
className: cn("w-4 h-4", className),
|
|
3433
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3665
3434
|
fill: "none",
|
|
3666
3435
|
viewBox: "0 0 24 24",
|
|
3667
3436
|
stroke: "currentColor",
|
|
@@ -3723,7 +3492,7 @@ function ThreadPicker({
|
|
|
3723
3492
|
PopoverTrigger,
|
|
3724
3493
|
{
|
|
3725
3494
|
disabled: disabled || loading,
|
|
3726
|
-
className: cn(
|
|
3495
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3727
3496
|
"flex items-center gap-1 w-full",
|
|
3728
3497
|
disabled && "opacity-50 cursor-not-allowed",
|
|
3729
3498
|
className,
|
|
@@ -3734,7 +3503,7 @@ function ThreadPicker({
|
|
|
3734
3503
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3735
3504
|
ChevronIcon,
|
|
3736
3505
|
{
|
|
3737
|
-
className: cn(
|
|
3506
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3738
3507
|
"flex-shrink-0 size-3 text-muted-foreground transition-transform",
|
|
3739
3508
|
isOpen && "rotate-180"
|
|
3740
3509
|
)
|
|
@@ -3747,7 +3516,7 @@ function ThreadPicker({
|
|
|
3747
3516
|
PopoverContent,
|
|
3748
3517
|
{
|
|
3749
3518
|
align: "start",
|
|
3750
|
-
className: cn(
|
|
3519
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3751
3520
|
"w-[var(--anchor-width)] min-w-[250px] p-0 max-h-[300px] overflow-auto",
|
|
3752
3521
|
dropdownClassName
|
|
3753
3522
|
),
|
|
@@ -3757,7 +3526,7 @@ function ThreadPicker({
|
|
|
3757
3526
|
{
|
|
3758
3527
|
type: "button",
|
|
3759
3528
|
onClick: handleNewThread,
|
|
3760
|
-
className: cn(
|
|
3529
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3761
3530
|
"flex items-center gap-2 w-full px-2.5 py-1.5 text-left",
|
|
3762
3531
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3763
3532
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
@@ -3773,7 +3542,7 @@ function ThreadPicker({
|
|
|
3773
3542
|
threads.length > 0 ? threads.map((thread) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3774
3543
|
"div",
|
|
3775
3544
|
{
|
|
3776
|
-
className: cn(
|
|
3545
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3777
3546
|
"group flex items-center gap-1 w-full px-2.5 py-1.5",
|
|
3778
3547
|
"hover:bg-accent hover:text-accent-foreground",
|
|
3779
3548
|
"focus-within:bg-accent focus-within:text-accent-foreground",
|
|
@@ -3846,7 +3615,7 @@ function TrashIcon2({ className }) {
|
|
|
3846
3615
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3847
3616
|
"svg",
|
|
3848
3617
|
{
|
|
3849
|
-
className: cn("w-4 h-4", className),
|
|
3618
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3850
3619
|
fill: "none",
|
|
3851
3620
|
viewBox: "0 0 24 24",
|
|
3852
3621
|
stroke: "currentColor",
|
|
@@ -3866,7 +3635,7 @@ function PlusIcon3({ className }) {
|
|
|
3866
3635
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3867
3636
|
"svg",
|
|
3868
3637
|
{
|
|
3869
|
-
className: cn("w-4 h-4", className),
|
|
3638
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3870
3639
|
fill: "none",
|
|
3871
3640
|
viewBox: "0 0 24 24",
|
|
3872
3641
|
stroke: "currentColor",
|
|
@@ -3879,7 +3648,7 @@ function MessageIcon({ className }) {
|
|
|
3879
3648
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3880
3649
|
"svg",
|
|
3881
3650
|
{
|
|
3882
|
-
className: cn("w-4 h-4", className),
|
|
3651
|
+
className: chunk5EGBIQYS_cjs.cn("w-4 h-4", className),
|
|
3883
3652
|
fill: "none",
|
|
3884
3653
|
viewBox: "0 0 24 24",
|
|
3885
3654
|
stroke: "currentColor",
|
|
@@ -3924,7 +3693,7 @@ function ThreadCard({
|
|
|
3924
3693
|
onClick,
|
|
3925
3694
|
onMouseEnter: () => setIsHovered(true),
|
|
3926
3695
|
onMouseLeave: () => setIsHovered(false),
|
|
3927
|
-
className: cn(
|
|
3696
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3928
3697
|
"w-full p-3 rounded-lg border bg-card text-left transition-colors",
|
|
3929
3698
|
"hover:bg-accent hover:border-accent-foreground/20",
|
|
3930
3699
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -3935,7 +3704,7 @@ function ThreadCard({
|
|
|
3935
3704
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3936
3705
|
"div",
|
|
3937
3706
|
{
|
|
3938
|
-
className: cn(
|
|
3707
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3939
3708
|
"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center",
|
|
3940
3709
|
selected ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
3941
3710
|
),
|
|
@@ -3950,7 +3719,7 @@ function ThreadCard({
|
|
|
3950
3719
|
{
|
|
3951
3720
|
type: "button",
|
|
3952
3721
|
onClick: handleDelete,
|
|
3953
|
-
className: cn(
|
|
3722
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3954
3723
|
"flex-shrink-0 p-1 rounded",
|
|
3955
3724
|
"hover:bg-destructive/10 hover:text-destructive",
|
|
3956
3725
|
"focus:outline-none focus:ring-2 focus:ring-destructive"
|
|
@@ -3986,13 +3755,13 @@ function ThreadList({
|
|
|
3986
3755
|
showDelete = true,
|
|
3987
3756
|
className
|
|
3988
3757
|
}) {
|
|
3989
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
3758
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("flex flex-col gap-2", className), children: [
|
|
3990
3759
|
onNewThread && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3991
3760
|
"button",
|
|
3992
3761
|
{
|
|
3993
3762
|
type: "button",
|
|
3994
3763
|
onClick: onNewThread,
|
|
3995
|
-
className: cn(
|
|
3764
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
3996
3765
|
"flex items-center gap-2 p-3 rounded-lg border border-dashed",
|
|
3997
3766
|
"hover:bg-accent hover:border-accent-foreground/20",
|
|
3998
3767
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -4032,7 +3801,7 @@ var CopilotSDKLogo = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
4032
3801
|
fill: "none",
|
|
4033
3802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4034
3803
|
...props,
|
|
4035
|
-
className: cn("w-auto h-[30px]", props.className),
|
|
3804
|
+
className: chunk5EGBIQYS_cjs.cn("w-auto h-[30px]", props.className),
|
|
4036
3805
|
children: [
|
|
4037
3806
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4038
3807
|
"path",
|
|
@@ -4091,7 +3860,7 @@ function ChatHeader({
|
|
|
4091
3860
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4092
3861
|
"div",
|
|
4093
3862
|
{
|
|
4094
|
-
className: cn(
|
|
3863
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4095
3864
|
"flex flex-col border-b border-border bg-background",
|
|
4096
3865
|
className
|
|
4097
3866
|
),
|
|
@@ -4131,7 +3900,7 @@ function Suggestions({
|
|
|
4131
3900
|
className
|
|
4132
3901
|
}) {
|
|
4133
3902
|
if (!suggestions.length) return null;
|
|
4134
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-2 px-4 py-2", className), children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3903
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("flex flex-wrap gap-2 px-4 py-2", className), children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4135
3904
|
"button",
|
|
4136
3905
|
{
|
|
4137
3906
|
type: "button",
|
|
@@ -4244,7 +4013,7 @@ function MCPUIFrame({
|
|
|
4244
4013
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4245
4014
|
"div",
|
|
4246
4015
|
{
|
|
4247
|
-
className: cn(
|
|
4016
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4248
4017
|
"flex items-center justify-center rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive",
|
|
4249
4018
|
className
|
|
4250
4019
|
),
|
|
@@ -4277,11 +4046,11 @@ function MCPUIFrame({
|
|
|
4277
4046
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4278
4047
|
"div",
|
|
4279
4048
|
{
|
|
4280
|
-
className: cn("relative overflow-hidden rounded-lg border", className),
|
|
4049
|
+
className: chunk5EGBIQYS_cjs.cn("relative overflow-hidden rounded-lg border", className),
|
|
4281
4050
|
"data-testid": testId,
|
|
4282
4051
|
children: [
|
|
4283
4052
|
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 }),
|
|
4284
|
-
showLoading && isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-background/80", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "md" }) }),
|
|
4053
|
+
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(chunk5EGBIQYS_cjs.Loader, { variant: "dots", size: "md" }) }),
|
|
4285
4054
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4286
4055
|
"iframe",
|
|
4287
4056
|
{
|
|
@@ -4317,7 +4086,7 @@ function MCPUIFrameList({
|
|
|
4317
4086
|
md: "space-y-2",
|
|
4318
4087
|
lg: "space-y-4"
|
|
4319
4088
|
};
|
|
4320
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(gapClasses[gap], className), children: resources.map((resource, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4089
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn(gapClasses[gap], className), children: resources.map((resource, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4321
4090
|
MCPUIFrame,
|
|
4322
4091
|
{
|
|
4323
4092
|
resource,
|
|
@@ -4355,13 +4124,11 @@ function MessageActionsProvider({
|
|
|
4355
4124
|
(role) => registry[role] ?? [],
|
|
4356
4125
|
[registry]
|
|
4357
4126
|
);
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
value: { getActions, registerActions, clearActions },
|
|
4362
|
-
children
|
|
4363
|
-
}
|
|
4127
|
+
const contextValue = React19.useMemo(
|
|
4128
|
+
() => ({ getActions, registerActions, clearActions }),
|
|
4129
|
+
[getActions, registerActions, clearActions]
|
|
4364
4130
|
);
|
|
4131
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MessageActionsContext.Provider, { value: contextValue, children });
|
|
4365
4132
|
}
|
|
4366
4133
|
function useMessageActionsContext() {
|
|
4367
4134
|
return React19.useContext(MessageActionsContext);
|
|
@@ -4487,6 +4254,8 @@ function Action({
|
|
|
4487
4254
|
Action.displayName = "Action";
|
|
4488
4255
|
function MessageActions2({ role, children }) {
|
|
4489
4256
|
const ctx = useMessageActionsContext();
|
|
4257
|
+
const ctxRef = React19.useRef(ctx);
|
|
4258
|
+
ctxRef.current = ctx;
|
|
4490
4259
|
const actions = React19.useMemo(() => {
|
|
4491
4260
|
const result = [];
|
|
4492
4261
|
React19__namespace.default.Children.forEach(children, (child) => {
|
|
@@ -4545,10 +4314,11 @@ function MessageActions2({ role, children }) {
|
|
|
4545
4314
|
return result;
|
|
4546
4315
|
}, [children]);
|
|
4547
4316
|
React19.useLayoutEffect(() => {
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4317
|
+
const c = ctxRef.current;
|
|
4318
|
+
if (!c) return;
|
|
4319
|
+
c.registerActions(role, actions);
|
|
4320
|
+
return () => c.clearActions(role);
|
|
4321
|
+
}, [role, actions]);
|
|
4552
4322
|
return null;
|
|
4553
4323
|
}
|
|
4554
4324
|
function FloatingActions({
|
|
@@ -4565,7 +4335,7 @@ function FloatingActions({
|
|
|
4565
4335
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4566
4336
|
"div",
|
|
4567
4337
|
{
|
|
4568
|
-
className: cn(
|
|
4338
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4569
4339
|
"flex items-center gap-0.5 mt-1",
|
|
4570
4340
|
"opacity-0 group-hover/message:opacity-100 transition-opacity duration-150",
|
|
4571
4341
|
align === "right" ? "justify-end" : "justify-start"
|
|
@@ -4580,7 +4350,7 @@ function FloatingActions({
|
|
|
4580
4350
|
type: "button",
|
|
4581
4351
|
title: action.tooltip,
|
|
4582
4352
|
"aria-label": action.tooltip,
|
|
4583
|
-
className: cn(
|
|
4353
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4584
4354
|
"flex items-center justify-center size-6 rounded-md",
|
|
4585
4355
|
"text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
4586
4356
|
"transition-colors",
|
|
@@ -4764,7 +4534,9 @@ function DefaultMessage({
|
|
|
4764
4534
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4765
4535
|
Message,
|
|
4766
4536
|
{
|
|
4767
|
-
className: cn(
|
|
4537
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4538
|
+
"csdk-message csdk-user-message flex gap-2 group/user-msg group/message justify-end"
|
|
4539
|
+
),
|
|
4768
4540
|
children: [
|
|
4769
4541
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-end max-w-[80%] min-w-0", children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 w-full min-w-[200px]", children: [
|
|
4770
4542
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4775,7 +4547,7 @@ function DefaultMessage({
|
|
|
4775
4547
|
onChange: (e) => setEditValue(e.target.value),
|
|
4776
4548
|
onKeyDown: handleEditKeyDown,
|
|
4777
4549
|
rows: Math.max(2, (editValue.match(/\n/g) || []).length + 1),
|
|
4778
|
-
className: cn(
|
|
4550
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4779
4551
|
"csdk-edit-textarea w-full rounded-lg px-3 py-2 text-sm resize-none",
|
|
4780
4552
|
"bg-primary text-primary-foreground placeholder:text-primary-foreground/50",
|
|
4781
4553
|
"focus:outline-none focus:ring-2 focus:ring-primary-foreground/30",
|
|
@@ -4809,7 +4581,7 @@ function DefaultMessage({
|
|
|
4809
4581
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4810
4582
|
MessageContent,
|
|
4811
4583
|
{
|
|
4812
|
-
className: cn(
|
|
4584
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4813
4585
|
"csdk-message-user rounded-lg px-4 py-2 bg-primary text-primary-foreground",
|
|
4814
4586
|
userMessageClassName
|
|
4815
4587
|
),
|
|
@@ -4824,7 +4596,7 @@ function DefaultMessage({
|
|
|
4824
4596
|
type: "button",
|
|
4825
4597
|
onClick: startEdit,
|
|
4826
4598
|
"aria-label": "Edit message",
|
|
4827
|
-
className: cn(
|
|
4599
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4828
4600
|
"csdk-edit-btn absolute -left-7 top-1/2 -translate-y-1/2",
|
|
4829
4601
|
"size-6 flex items-center justify-center rounded-full",
|
|
4830
4602
|
"text-muted-foreground bg-background border border-border shadow-sm",
|
|
@@ -4927,7 +4699,7 @@ function DefaultMessage({
|
|
|
4927
4699
|
result: exec.result,
|
|
4928
4700
|
error: exec.error
|
|
4929
4701
|
}));
|
|
4930
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Message, { className: "flex gap-2 group/message", children: [
|
|
4702
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Message, { className: "csdk-message csdk-assistant-message flex gap-2 group/message", children: [
|
|
4931
4703
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4932
4704
|
MessageAvatar,
|
|
4933
4705
|
{
|
|
@@ -4935,7 +4707,7 @@ function DefaultMessage({
|
|
|
4935
4707
|
alt: "Assistant",
|
|
4936
4708
|
fallback: assistantAvatar.fallback,
|
|
4937
4709
|
fallbackIcon: !assistantAvatar.src && !assistantAvatar.fallback && !assistantAvatar.component ? /* @__PURE__ */ jsxRuntime.jsx(copilot_sdk_logo_default, { className: "size-5" }) : void 0,
|
|
4938
|
-
className: cn("bg-muted", assistantAvatar.className),
|
|
4710
|
+
className: chunk5EGBIQYS_cjs.cn("bg-muted", assistantAvatar.className),
|
|
4939
4711
|
children: assistantAvatar.component
|
|
4940
4712
|
}
|
|
4941
4713
|
),
|
|
@@ -4948,13 +4720,13 @@ function DefaultMessage({
|
|
|
4948
4720
|
className: "mb-2"
|
|
4949
4721
|
}
|
|
4950
4722
|
),
|
|
4951
|
-
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" }) }) : (
|
|
4723
|
+
isLastMessage && isProcessing && !completedTools?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunk5EGBIQYS_cjs.Loader, { variant: "dots", size: "sm" }) }) : (
|
|
4952
4724
|
/* Show streaming loader when loading with no content and no tools */
|
|
4953
|
-
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: [
|
|
4725
|
+
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(chunk5EGBIQYS_cjs.Loader, { variant: loaderVariant, size: "sm" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4954
4726
|
cleanContent?.trim() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4955
4727
|
MessageContent,
|
|
4956
4728
|
{
|
|
4957
|
-
className: cn(
|
|
4729
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
4958
4730
|
"csdk-message-assistant rounded-lg px-4 py-2 bg-muted",
|
|
4959
4731
|
assistantMessageClassName
|
|
4960
4732
|
),
|
|
@@ -4963,7 +4735,7 @@ function DefaultMessage({
|
|
|
4963
4735
|
children: cleanContent
|
|
4964
4736
|
}
|
|
4965
4737
|
),
|
|
4966
|
-
toolsWithCustomRender && toolsWithCustomRender.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", cleanContent?.trim() && "mt-2"), children: toolsWithCustomRender.map((exec) => {
|
|
4738
|
+
toolsWithCustomRender && toolsWithCustomRender.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("space-y-2", cleanContent?.trim() && "mt-2"), children: toolsWithCustomRender.map((exec) => {
|
|
4967
4739
|
const toolDef = registeredTools?.find(
|
|
4968
4740
|
(t) => t.name === exec.name
|
|
4969
4741
|
);
|
|
@@ -5006,10 +4778,10 @@ function DefaultMessage({
|
|
|
5006
4778
|
exec.id
|
|
5007
4779
|
);
|
|
5008
4780
|
}
|
|
5009
|
-
|
|
5010
|
-
|
|
4781
|
+
const Renderer = toolRenderers?.[exec.name];
|
|
4782
|
+
if (Renderer) {
|
|
5011
4783
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5012
|
-
|
|
4784
|
+
Renderer,
|
|
5013
4785
|
{
|
|
5014
4786
|
execution: {
|
|
5015
4787
|
id: exec.id,
|
|
@@ -5018,16 +4790,17 @@ function DefaultMessage({
|
|
|
5018
4790
|
status: exec.status,
|
|
5019
4791
|
result: exec.result,
|
|
5020
4792
|
error: exec.error,
|
|
4793
|
+
approvalStatus: exec.approvalStatus,
|
|
5021
4794
|
source: exec.source
|
|
5022
4795
|
}
|
|
5023
4796
|
},
|
|
5024
4797
|
exec.id
|
|
5025
4798
|
);
|
|
5026
4799
|
}
|
|
5027
|
-
|
|
5028
|
-
|
|
4800
|
+
if (fallbackToolRenderer) {
|
|
4801
|
+
const FallbackRenderer = fallbackToolRenderer;
|
|
5029
4802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5030
|
-
|
|
4803
|
+
FallbackRenderer,
|
|
5031
4804
|
{
|
|
5032
4805
|
execution: {
|
|
5033
4806
|
id: exec.id,
|
|
@@ -5036,7 +4809,6 @@ function DefaultMessage({
|
|
|
5036
4809
|
status: exec.status,
|
|
5037
4810
|
result: exec.result,
|
|
5038
4811
|
error: exec.error,
|
|
5039
|
-
approvalStatus: exec.approvalStatus,
|
|
5040
4812
|
source: exec.source
|
|
5041
4813
|
}
|
|
5042
4814
|
},
|
|
@@ -5048,7 +4820,7 @@ function DefaultMessage({
|
|
|
5048
4820
|
toolSteps && toolSteps.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5049
4821
|
"div",
|
|
5050
4822
|
{
|
|
5051
|
-
className: cn(
|
|
4823
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5052
4824
|
"rounded-lg bg-muted/50 px-3 py-2",
|
|
5053
4825
|
cleanContent?.trim() && "mt-2"
|
|
5054
4826
|
),
|
|
@@ -5067,7 +4839,7 @@ function DefaultMessage({
|
|
|
5067
4839
|
`${exec.id}-ui`
|
|
5068
4840
|
);
|
|
5069
4841
|
}),
|
|
5070
|
-
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" }) }),
|
|
4842
|
+
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(chunk5EGBIQYS_cjs.Loader, { variant: "dots", size: "sm" }) }),
|
|
5071
4843
|
pendingApprovalTools && pendingApprovalTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 space-y-2", children: pendingApprovalTools.map((tool) => {
|
|
5072
4844
|
const approvalCallbacks = {
|
|
5073
4845
|
onApprove: (extraData) => onApproveToolExecution?.(tool.id, extraData),
|
|
@@ -5132,7 +4904,7 @@ function DefaultMessage({
|
|
|
5132
4904
|
showFavicon: citations.showFavicon ?? true,
|
|
5133
4905
|
numbered: citations.numbered ?? false,
|
|
5134
4906
|
maxVisible: citations.maxVisible ?? 6,
|
|
5135
|
-
className: cn("mt-2", citations.className)
|
|
4907
|
+
className: chunk5EGBIQYS_cjs.cn("mt-2", citations.className)
|
|
5136
4908
|
}
|
|
5137
4909
|
),
|
|
5138
4910
|
shouldShowFollowUps && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5186,7 +4958,7 @@ function AttachmentPreview({ attachment }) {
|
|
|
5186
4958
|
expanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5187
4959
|
"div",
|
|
5188
4960
|
{
|
|
5189
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80",
|
|
4961
|
+
className: "csdk-image-backdrop fixed inset-0 z-50 flex items-center justify-center bg-black/80",
|
|
5190
4962
|
onClick: () => setExpanded(false),
|
|
5191
4963
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-[90vw] max-h-[90vh]", children: [
|
|
5192
4964
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5201,7 +4973,7 @@ function AttachmentPreview({ attachment }) {
|
|
|
5201
4973
|
"button",
|
|
5202
4974
|
{
|
|
5203
4975
|
type: "button",
|
|
5204
|
-
className: "absolute top-2 right-2 bg-white/90 rounded-full p-2 hover:bg-white transition-colors",
|
|
4976
|
+
className: "csdk-image-close absolute top-2 right-2 bg-white/90 rounded-full p-2 hover:bg-white transition-colors",
|
|
5205
4977
|
onClick: (e) => {
|
|
5206
4978
|
e.stopPropagation();
|
|
5207
4979
|
setExpanded(false);
|
|
@@ -5411,7 +5183,7 @@ function ChatWelcome({
|
|
|
5411
5183
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5412
5184
|
"div",
|
|
5413
5185
|
{
|
|
5414
|
-
className: cn(
|
|
5186
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5415
5187
|
"flex flex-1 flex-col items-center justify-center px-4 py-8 overflow-auto",
|
|
5416
5188
|
classNames.root
|
|
5417
5189
|
),
|
|
@@ -5419,7 +5191,7 @@ function ChatWelcome({
|
|
|
5419
5191
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5420
5192
|
"div",
|
|
5421
5193
|
{
|
|
5422
|
-
className: cn(
|
|
5194
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5423
5195
|
"flex flex-col items-center text-center mb-8",
|
|
5424
5196
|
classNames.hero
|
|
5425
5197
|
),
|
|
@@ -5437,7 +5209,7 @@ function ChatWelcome({
|
|
|
5437
5209
|
]
|
|
5438
5210
|
}
|
|
5439
5211
|
),
|
|
5440
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full max-w-lg mb-6", classNames.input), children: [
|
|
5212
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("w-full max-w-lg mb-6", classNames.input), children: [
|
|
5441
5213
|
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: [
|
|
5442
5214
|
att.attachment.type === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5443
5215
|
"img",
|
|
@@ -5467,8 +5239,8 @@ function ChatWelcome({
|
|
|
5467
5239
|
),
|
|
5468
5240
|
/* @__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 })
|
|
5469
5241
|
] }),
|
|
5470
|
-
att.status === "processing" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-background/80 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "sm" }) }),
|
|
5471
|
-
att.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "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" }) }),
|
|
5242
|
+
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(chunk5EGBIQYS_cjs.Loader, { variant: "dots", size: "sm" }) }),
|
|
5243
|
+
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" }) }),
|
|
5472
5244
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5473
5245
|
"button",
|
|
5474
5246
|
{
|
|
@@ -5497,7 +5269,7 @@ function ChatWelcome({
|
|
|
5497
5269
|
"label",
|
|
5498
5270
|
{
|
|
5499
5271
|
htmlFor: fileInputId,
|
|
5500
|
-
className: cn(
|
|
5272
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5501
5273
|
"flex h-8 w-8 items-center justify-center rounded-2xl",
|
|
5502
5274
|
attachmentsEnabled ? "hover:bg-secondary-foreground/10 cursor-pointer" : "opacity-50 cursor-not-allowed"
|
|
5503
5275
|
),
|
|
@@ -5548,7 +5320,7 @@ function ChatWelcome({
|
|
|
5548
5320
|
suggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5549
5321
|
"div",
|
|
5550
5322
|
{
|
|
5551
|
-
className: cn("w-full max-w-lg mb-6 px-3", classNames.suggestions),
|
|
5323
|
+
className: chunk5EGBIQYS_cjs.cn("w-full max-w-lg mb-6 px-3", classNames.suggestions),
|
|
5552
5324
|
children: [
|
|
5553
5325
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-2", children: suggestionsLabel }),
|
|
5554
5326
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5589,7 +5361,7 @@ function HomeView({ children, className }) {
|
|
|
5589
5361
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5590
5362
|
"div",
|
|
5591
5363
|
{
|
|
5592
|
-
className: cn(
|
|
5364
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5593
5365
|
"csdk-chat-home-view flex flex-1 flex-col overflow-auto",
|
|
5594
5366
|
className
|
|
5595
5367
|
),
|
|
@@ -5602,7 +5374,7 @@ function ChatView({ children, className }) {
|
|
|
5602
5374
|
const { view } = useCopilotChatContext();
|
|
5603
5375
|
if (view !== "chat") return null;
|
|
5604
5376
|
if (children) {
|
|
5605
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("csdk-chat-view flex flex-col", className), children });
|
|
5377
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("csdk-chat-view flex flex-col", className), children });
|
|
5606
5378
|
}
|
|
5607
5379
|
return null;
|
|
5608
5380
|
}
|
|
@@ -5616,10 +5388,10 @@ function chatViewHasOnlyLayoutChildren(chatViewElement) {
|
|
|
5616
5388
|
);
|
|
5617
5389
|
}
|
|
5618
5390
|
function Header({ children, className }) {
|
|
5619
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("csdk-chat-header", className), children });
|
|
5391
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("csdk-chat-header", className), children });
|
|
5620
5392
|
}
|
|
5621
5393
|
function Footer({ children, className }) {
|
|
5622
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("csdk-chat-footer", className), children });
|
|
5394
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk5EGBIQYS_cjs.cn("csdk-chat-footer", className), children });
|
|
5623
5395
|
}
|
|
5624
5396
|
function Input({ placeholder: placeholderProp, className }) {
|
|
5625
5397
|
const {
|
|
@@ -5642,7 +5414,7 @@ function Input({ placeholder: placeholderProp, className }) {
|
|
|
5642
5414
|
onValueChange: setValue,
|
|
5643
5415
|
isLoading,
|
|
5644
5416
|
onSubmit: handleSubmit,
|
|
5645
|
-
className: cn("csdk-compound-input", className),
|
|
5417
|
+
className: chunk5EGBIQYS_cjs.cn("csdk-compound-input", className),
|
|
5646
5418
|
children: [
|
|
5647
5419
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5648
5420
|
PromptInputTextarea,
|
|
@@ -5681,13 +5453,13 @@ function SuggestionsCompound({
|
|
|
5681
5453
|
}) {
|
|
5682
5454
|
const { send } = useCopilotChatContext();
|
|
5683
5455
|
if (items.length === 0) return null;
|
|
5684
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("csdk-compound-suggestions", className), children: [
|
|
5456
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("csdk-compound-suggestions", className), children: [
|
|
5685
5457
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground mb-2 block", children: label }),
|
|
5686
5458
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5687
5459
|
"button",
|
|
5688
5460
|
{
|
|
5689
5461
|
onClick: () => send(item),
|
|
5690
|
-
className: cn(
|
|
5462
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5691
5463
|
"csdk-followup-button px-3 py-1.5 text-sm rounded-full border",
|
|
5692
5464
|
"bg-background hover:bg-accent transition-colors",
|
|
5693
5465
|
buttonClassName
|
|
@@ -5713,7 +5485,7 @@ function BackButton({
|
|
|
5713
5485
|
onClick: onNewChat,
|
|
5714
5486
|
disabled: disabled || isThreadBusy,
|
|
5715
5487
|
"aria-label": ariaLabel,
|
|
5716
|
-
className: cn(
|
|
5488
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
5717
5489
|
"csdk-back-button flex items-center gap-1 text-sm",
|
|
5718
5490
|
"hover:bg-accent rounded px-2 py-1",
|
|
5719
5491
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -5848,6 +5620,7 @@ function ChatComponent({
|
|
|
5848
5620
|
// Custom rendering
|
|
5849
5621
|
messageView,
|
|
5850
5622
|
renderMessage,
|
|
5623
|
+
wrapMessage,
|
|
5851
5624
|
renderInput,
|
|
5852
5625
|
renderHeader,
|
|
5853
5626
|
// Avatar grouping
|
|
@@ -6029,6 +5802,11 @@ function ChatComponent({
|
|
|
6029
5802
|
Home,
|
|
6030
5803
|
ChatView
|
|
6031
5804
|
);
|
|
5805
|
+
const layoutTypes = [HomeView, Home, ChatView, Header, Footer];
|
|
5806
|
+
const behaviorChildren = React19__namespace.default.Children.toArray(children).filter(
|
|
5807
|
+
(child) => React19__namespace.default.isValidElement(child) && // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5808
|
+
!layoutTypes.includes(child.type)
|
|
5809
|
+
);
|
|
6032
5810
|
const chatViewElement = findCompoundChild(children, ChatView);
|
|
6033
5811
|
const chatViewNeedsDefault = chatViewElement && (!chatViewElement.props.children || chatViewHasOnlyLayoutChildren(chatViewElement));
|
|
6034
5812
|
const showDefaultWelcome = view === "home" && !hasCustomHome && welcome !== false;
|
|
@@ -6078,7 +5856,7 @@ function ChatComponent({
|
|
|
6078
5856
|
return /* @__PURE__ */ jsxRuntime.jsx(MessageActionsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(CopilotChatContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6079
5857
|
"div",
|
|
6080
5858
|
{
|
|
6081
|
-
className: cn(
|
|
5859
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
6082
5860
|
"flex h-full flex-col bg-background relative",
|
|
6083
5861
|
className,
|
|
6084
5862
|
classNames.root
|
|
@@ -6087,7 +5865,7 @@ function ChatComponent({
|
|
|
6087
5865
|
onDragLeave: handleDragLeave,
|
|
6088
5866
|
onDrop: handleDrop,
|
|
6089
5867
|
children: [
|
|
6090
|
-
isDragging && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-50 bg-primary/10 border-2 border-dashed border-primary flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-primary font-medium text-lg", children: "Drop files here" }) }),
|
|
5868
|
+
isDragging && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-dropzone-overlay absolute inset-0 z-50 bg-primary/10 border-2 border-dashed border-primary flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-primary font-medium text-lg", children: "Drop files here" }) }),
|
|
6091
5869
|
showHeader && (renderHeader ? renderHeader() : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6092
5870
|
ChatHeader,
|
|
6093
5871
|
{
|
|
@@ -6100,6 +5878,7 @@ function ChatComponent({
|
|
|
6100
5878
|
}
|
|
6101
5879
|
)),
|
|
6102
5880
|
rootHeader,
|
|
5881
|
+
behaviorChildren.length > 0 && behaviorChildren,
|
|
6103
5882
|
hasCustomLayout && viewChildren,
|
|
6104
5883
|
showDefaultWelcome ? (
|
|
6105
5884
|
/* Default Welcome Screen (centered input) */
|
|
@@ -6128,12 +5907,12 @@ function ChatComponent({
|
|
|
6128
5907
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6129
5908
|
ChatContainerRoot,
|
|
6130
5909
|
{
|
|
6131
|
-
className: cn("flex-1 relative", classNames.container),
|
|
5910
|
+
className: chunk5EGBIQYS_cjs.cn("flex-1 relative", classNames.container),
|
|
6132
5911
|
children: [
|
|
6133
5912
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6134
5913
|
ChatContainerContent,
|
|
6135
5914
|
{
|
|
6136
|
-
className: cn("gap-4 p-4", classNames.messageList),
|
|
5915
|
+
className: chunk5EGBIQYS_cjs.cn("gap-4 p-4", classNames.messageList),
|
|
6137
5916
|
children: [
|
|
6138
5917
|
messages.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-8 text-center text-muted-foreground", children: welcomeMessage || "Send a message to start the conversation" }),
|
|
6139
5918
|
(() => {
|
|
@@ -6186,7 +5965,10 @@ function ChatComponent({
|
|
|
6186
5965
|
onSendMessage?.(question);
|
|
6187
5966
|
}
|
|
6188
5967
|
};
|
|
6189
|
-
|
|
5968
|
+
if (renderMessage) {
|
|
5969
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React19__namespace.default.Fragment, { children: renderMessage(messageWithExecutions, index) }, message.id);
|
|
5970
|
+
}
|
|
5971
|
+
const defaultMsg = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6190
5972
|
DefaultMessage,
|
|
6191
5973
|
{
|
|
6192
5974
|
message: messageWithExecutions,
|
|
@@ -6217,6 +5999,11 @@ function ChatComponent({
|
|
|
6217
5999
|
},
|
|
6218
6000
|
message.id
|
|
6219
6001
|
);
|
|
6002
|
+
return wrapMessage ? /* @__PURE__ */ jsxRuntime.jsx(React19__namespace.default.Fragment, { children: wrapMessage(
|
|
6003
|
+
defaultMsg,
|
|
6004
|
+
messageWithExecutions,
|
|
6005
|
+
index
|
|
6006
|
+
) }, message.id) : defaultMsg;
|
|
6220
6007
|
});
|
|
6221
6008
|
return messageView?.children ? messageView.children({ messages, messageElements }) : messageElements;
|
|
6222
6009
|
})(),
|
|
@@ -6242,7 +6029,7 @@ function ChatComponent({
|
|
|
6242
6029
|
]
|
|
6243
6030
|
}
|
|
6244
6031
|
),
|
|
6245
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none z-10 flex items-end justify-end p-4", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollButton, { className: "shadow-md pointer-events-auto" }) })
|
|
6032
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "csdk-scroll-btn-layer absolute inset-0 pointer-events-none z-10 flex items-end justify-end p-4", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollButton, { className: "shadow-md pointer-events-auto" }) })
|
|
6246
6033
|
]
|
|
6247
6034
|
}
|
|
6248
6035
|
) }),
|
|
@@ -6254,7 +6041,7 @@ function ChatComponent({
|
|
|
6254
6041
|
className: classNames.suggestions
|
|
6255
6042
|
}
|
|
6256
6043
|
),
|
|
6257
|
-
renderInput ? renderInput() : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("p-2 pt-0", classNames.input), children: [
|
|
6044
|
+
renderInput ? renderInput() : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk5EGBIQYS_cjs.cn("p-2 pt-0", classNames.input), children: [
|
|
6258
6045
|
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: [
|
|
6259
6046
|
att.attachment.type === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6260
6047
|
"img",
|
|
@@ -6284,8 +6071,8 @@ function ChatComponent({
|
|
|
6284
6071
|
),
|
|
6285
6072
|
/* @__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 })
|
|
6286
6073
|
] }),
|
|
6287
|
-
att.status === "processing" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-background/80 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Loader, { variant: "dots", size: "sm" }) }),
|
|
6288
|
-
att.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "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" }) }),
|
|
6074
|
+
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(chunk5EGBIQYS_cjs.Loader, { variant: "dots", size: "sm" }) }),
|
|
6075
|
+
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" }) }),
|
|
6289
6076
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6290
6077
|
"button",
|
|
6291
6078
|
{
|
|
@@ -6315,7 +6102,7 @@ function ChatComponent({
|
|
|
6315
6102
|
"label",
|
|
6316
6103
|
{
|
|
6317
6104
|
htmlFor: fileInputId,
|
|
6318
|
-
className: cn(
|
|
6105
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
6319
6106
|
"csdk-button-attach flex h-8 w-8 items-center justify-center rounded-2xl",
|
|
6320
6107
|
attachmentsEnabled ? "hover:bg-secondary-foreground/10 cursor-pointer" : "opacity-50 cursor-not-allowed"
|
|
6321
6108
|
),
|
|
@@ -6442,7 +6229,7 @@ function ToolExecutionMessage({
|
|
|
6442
6229
|
const allCompleted = executions.every(
|
|
6443
6230
|
(exec) => exec.status === "completed" || exec.status === "error"
|
|
6444
6231
|
);
|
|
6445
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Message, { className: cn("flex gap-2", className), children: [
|
|
6232
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Message, { className: chunk5EGBIQYS_cjs.cn("flex gap-2", className), children: [
|
|
6446
6233
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6447
6234
|
MessageAvatar,
|
|
6448
6235
|
{
|
|
@@ -6564,7 +6351,7 @@ function useInternalThreadManager(config = {}) {
|
|
|
6564
6351
|
saveDebounce,
|
|
6565
6352
|
autoRestoreLastThread
|
|
6566
6353
|
};
|
|
6567
|
-
const threadManager =
|
|
6354
|
+
const threadManager = chunk5UGWLGFS_cjs.useThreadManager(threadManagerConfig);
|
|
6568
6355
|
const {
|
|
6569
6356
|
currentThread,
|
|
6570
6357
|
currentThreadId,
|
|
@@ -6574,7 +6361,14 @@ function useInternalThreadManager(config = {}) {
|
|
|
6574
6361
|
clearCurrentThread,
|
|
6575
6362
|
refreshThreads
|
|
6576
6363
|
} = threadManager;
|
|
6577
|
-
const {
|
|
6364
|
+
const {
|
|
6365
|
+
messages,
|
|
6366
|
+
setMessages,
|
|
6367
|
+
status,
|
|
6368
|
+
isLoading,
|
|
6369
|
+
getAllMessages,
|
|
6370
|
+
switchBranch
|
|
6371
|
+
} = chunkLHLVTGIP_cjs.useCopilot();
|
|
6578
6372
|
const isLoadingMessagesRef = React19.useRef(false);
|
|
6579
6373
|
const savingToThreadRef = React19.useRef(null);
|
|
6580
6374
|
const lastSavedSnapshotRef = React19.useRef("");
|
|
@@ -6617,11 +6411,17 @@ function useInternalThreadManager(config = {}) {
|
|
|
6617
6411
|
toolCallId: m.tool_call_id,
|
|
6618
6412
|
parentId: m.parent_id,
|
|
6619
6413
|
childrenIds: m.children_ids,
|
|
6620
|
-
attachments: m.metadata?.attachments
|
|
6414
|
+
attachments: m.metadata?.attachments,
|
|
6415
|
+
thinking: m.metadata?.thinking,
|
|
6416
|
+
// Preserve full metadata including citations, toolCallsHidden, toolExecutions, etc.
|
|
6417
|
+
metadata: m.metadata
|
|
6621
6418
|
}));
|
|
6622
6419
|
lastSavedSnapshotRef.current = getMessageSnapshot(uiMessages);
|
|
6623
6420
|
savingToThreadRef.current = threadId;
|
|
6624
6421
|
setMessages(uiMessages);
|
|
6422
|
+
if (thread.activeLeafId) {
|
|
6423
|
+
switchBranch(thread.activeLeafId);
|
|
6424
|
+
}
|
|
6625
6425
|
} else {
|
|
6626
6426
|
lastSavedSnapshotRef.current = "";
|
|
6627
6427
|
savingToThreadRef.current = threadId;
|
|
@@ -6632,7 +6432,13 @@ function useInternalThreadManager(config = {}) {
|
|
|
6632
6432
|
isLoadingMessagesRef.current = false;
|
|
6633
6433
|
});
|
|
6634
6434
|
},
|
|
6635
|
-
[
|
|
6435
|
+
[
|
|
6436
|
+
switchThread,
|
|
6437
|
+
setMessages,
|
|
6438
|
+
switchBranch,
|
|
6439
|
+
getMessageSnapshot,
|
|
6440
|
+
onThreadChange
|
|
6441
|
+
]
|
|
6636
6442
|
);
|
|
6637
6443
|
const handleNewThread = React19.useCallback(async () => {
|
|
6638
6444
|
isLoadingMessagesRef.current = true;
|
|
@@ -6670,6 +6476,9 @@ function useInternalThreadManager(config = {}) {
|
|
|
6670
6476
|
lastSavedSnapshotRef.current = getMessageSnapshot(uiMessages);
|
|
6671
6477
|
savingToThreadRef.current = currentThread.id;
|
|
6672
6478
|
setMessages(uiMessages);
|
|
6479
|
+
if (currentThread.activeLeafId) {
|
|
6480
|
+
switchBranch(currentThread.activeLeafId);
|
|
6481
|
+
}
|
|
6673
6482
|
} else {
|
|
6674
6483
|
lastSavedSnapshotRef.current = "";
|
|
6675
6484
|
savingToThreadRef.current = currentThread.id;
|
|
@@ -6678,7 +6487,15 @@ function useInternalThreadManager(config = {}) {
|
|
|
6678
6487
|
requestAnimationFrame(() => {
|
|
6679
6488
|
isLoadingMessagesRef.current = false;
|
|
6680
6489
|
});
|
|
6681
|
-
}, [
|
|
6490
|
+
}, [
|
|
6491
|
+
enabled,
|
|
6492
|
+
adapter,
|
|
6493
|
+
currentThread,
|
|
6494
|
+
setMessages,
|
|
6495
|
+
switchBranch,
|
|
6496
|
+
getMessageSnapshot,
|
|
6497
|
+
onThreadChange
|
|
6498
|
+
]);
|
|
6682
6499
|
React19.useEffect(() => {
|
|
6683
6500
|
if (!enabled) return;
|
|
6684
6501
|
if (isLoadingMessagesRef.current) {
|
|
@@ -6698,9 +6515,10 @@ function useInternalThreadManager(config = {}) {
|
|
|
6698
6515
|
const coreMessages = convertToCore(
|
|
6699
6516
|
allUIMessages.length > 0 ? allUIMessages : messages
|
|
6700
6517
|
);
|
|
6518
|
+
const activeLeafId = messages[messages.length - 1]?.id;
|
|
6701
6519
|
if (!currentThreadId && !savingToThreadRef.current) {
|
|
6702
6520
|
savingToThreadRef.current = "creating";
|
|
6703
|
-
createThread({ messages: coreMessages }).then((thread) => {
|
|
6521
|
+
createThread({ messages: coreMessages, activeLeafId }).then((thread) => {
|
|
6704
6522
|
lastSavedSnapshotRef.current = currentSnapshot;
|
|
6705
6523
|
savingToThreadRef.current = thread.id;
|
|
6706
6524
|
onThreadChange?.(thread.id);
|
|
@@ -6710,7 +6528,7 @@ function useInternalThreadManager(config = {}) {
|
|
|
6710
6528
|
if (savingToThreadRef.current && savingToThreadRef.current !== currentThreadId) {
|
|
6711
6529
|
return;
|
|
6712
6530
|
}
|
|
6713
|
-
updateCurrentThread({ messages: coreMessages });
|
|
6531
|
+
updateCurrentThread({ messages: coreMessages, activeLeafId });
|
|
6714
6532
|
lastSavedSnapshotRef.current = currentSnapshot;
|
|
6715
6533
|
}, [
|
|
6716
6534
|
enabled,
|
|
@@ -6754,7 +6572,7 @@ function parsePersistenceConfig(persistence, onThreadChange) {
|
|
|
6754
6572
|
};
|
|
6755
6573
|
case "server":
|
|
6756
6574
|
return {
|
|
6757
|
-
adapter:
|
|
6575
|
+
adapter: chunkKGYDGK3U_cjs.createServerAdapter({
|
|
6758
6576
|
endpoint: persistence.endpoint,
|
|
6759
6577
|
headers: persistence.headers
|
|
6760
6578
|
}),
|
|
@@ -6788,6 +6606,7 @@ function CopilotChatBase(props) {
|
|
|
6788
6606
|
classNames,
|
|
6789
6607
|
header,
|
|
6790
6608
|
children,
|
|
6609
|
+
allowEdit = false,
|
|
6791
6610
|
...chatProps
|
|
6792
6611
|
} = props;
|
|
6793
6612
|
const persistenceConfig = parsePersistenceConfig(persistence, onThreadChange);
|
|
@@ -6807,7 +6626,7 @@ function CopilotChatBase(props) {
|
|
|
6807
6626
|
switchBranch,
|
|
6808
6627
|
getBranchInfo,
|
|
6809
6628
|
editMessage
|
|
6810
|
-
} =
|
|
6629
|
+
} = chunkLHLVTGIP_cjs.useCopilot();
|
|
6811
6630
|
const toolExecutions = rawToolExecutions.map(
|
|
6812
6631
|
(exec) => ({
|
|
6813
6632
|
id: exec.id,
|
|
@@ -6848,7 +6667,7 @@ function CopilotChatBase(props) {
|
|
|
6848
6667
|
} catch {
|
|
6849
6668
|
return {
|
|
6850
6669
|
...exec,
|
|
6851
|
-
result: { success:
|
|
6670
|
+
result: { success: false, message: resultContent }
|
|
6852
6671
|
};
|
|
6853
6672
|
}
|
|
6854
6673
|
}
|
|
@@ -6865,7 +6684,7 @@ function CopilotChatBase(props) {
|
|
|
6865
6684
|
try {
|
|
6866
6685
|
result = JSON.parse(resultContent);
|
|
6867
6686
|
} catch {
|
|
6868
|
-
result = { success:
|
|
6687
|
+
result = { success: false, message: resultContent };
|
|
6869
6688
|
}
|
|
6870
6689
|
}
|
|
6871
6690
|
let args = {};
|
|
@@ -6886,8 +6705,7 @@ function CopilotChatBase(props) {
|
|
|
6886
6705
|
args,
|
|
6887
6706
|
status: result ? "completed" : "pending",
|
|
6888
6707
|
result,
|
|
6889
|
-
timestamp: Date.now(),
|
|
6890
|
-
// Historical - use current time
|
|
6708
|
+
timestamp: m.createdAt instanceof Date ? m.createdAt.getTime() : Date.now(),
|
|
6891
6709
|
hidden
|
|
6892
6710
|
};
|
|
6893
6711
|
}
|
|
@@ -7020,7 +6838,7 @@ function CopilotChatBase(props) {
|
|
|
7020
6838
|
isThreadBusy: isBusy,
|
|
7021
6839
|
getBranchInfo,
|
|
7022
6840
|
onSwitchBranch: switchBranch,
|
|
7023
|
-
onEditMessage: editMessage,
|
|
6841
|
+
onEditMessage: allowEdit ? editMessage : void 0,
|
|
7024
6842
|
children
|
|
7025
6843
|
}
|
|
7026
6844
|
);
|
|
@@ -7039,8 +6857,14 @@ var CopilotChat = Object.assign(CopilotChatBase, {
|
|
|
7039
6857
|
Suggestions: Chat.Suggestions,
|
|
7040
6858
|
BackButton: Chat.BackButton,
|
|
7041
6859
|
// Navigation: start new chat
|
|
7042
|
-
ThreadPicker: Chat.ThreadPicker
|
|
6860
|
+
ThreadPicker: Chat.ThreadPicker,
|
|
7043
6861
|
// Thread switching
|
|
6862
|
+
// Message actions compound components (alpha)
|
|
6863
|
+
MessageActions: Chat.MessageActions,
|
|
6864
|
+
CopyAction: Chat.CopyAction,
|
|
6865
|
+
EditAction: Chat.EditAction,
|
|
6866
|
+
FeedbackAction: Chat.FeedbackAction,
|
|
6867
|
+
Action: Chat.Action
|
|
7044
6868
|
});
|
|
7045
6869
|
var ConnectedChat = CopilotChat;
|
|
7046
6870
|
function YourGPTLogo({ className }) {
|
|
@@ -7067,7 +6891,7 @@ function PoweredBy({ className, showLogo = true }) {
|
|
|
7067
6891
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7068
6892
|
"div",
|
|
7069
6893
|
{
|
|
7070
|
-
className: cn(
|
|
6894
|
+
className: chunk5EGBIQYS_cjs.cn(
|
|
7071
6895
|
"flex items-center justify-center gap-1.5 py-2 text-xs text-muted-foreground",
|
|
7072
6896
|
className
|
|
7073
6897
|
),
|
|
@@ -7118,9 +6942,17 @@ var ChatPrimitives = {
|
|
|
7118
6942
|
ScrollAnchor: ChatContainerScrollAnchor,
|
|
7119
6943
|
// ── Indicators ────────────────────────────────────────
|
|
7120
6944
|
/** Loading / streaming indicator (dots, wave, typing variants) */
|
|
7121
|
-
Loader
|
|
6945
|
+
Loader: chunk5EGBIQYS_cjs.Loader
|
|
7122
6946
|
};
|
|
7123
6947
|
|
|
6948
|
+
Object.defineProperty(exports, "Loader", {
|
|
6949
|
+
enumerable: true,
|
|
6950
|
+
get: function () { return chunk5EGBIQYS_cjs.Loader; }
|
|
6951
|
+
});
|
|
6952
|
+
Object.defineProperty(exports, "cn", {
|
|
6953
|
+
enumerable: true,
|
|
6954
|
+
get: function () { return chunk5EGBIQYS_cjs.cn; }
|
|
6955
|
+
});
|
|
7124
6956
|
exports.AlertTriangleIcon = AlertTriangleIcon;
|
|
7125
6957
|
exports.BotIcon = BotIcon;
|
|
7126
6958
|
exports.BranchNavigator = BranchNavigator;
|
|
@@ -7157,7 +6989,6 @@ exports.DevLogger = DevLogger;
|
|
|
7157
6989
|
exports.FeedbackBar = FeedbackBar;
|
|
7158
6990
|
exports.FollowUpQuestions = FollowUpQuestions;
|
|
7159
6991
|
exports.InlineToolSteps = InlineToolSteps;
|
|
7160
|
-
exports.Loader = Loader;
|
|
7161
6992
|
exports.MCPUIFrame = MCPUIFrame;
|
|
7162
6993
|
exports.MCPUIFrameList = MCPUIFrameList;
|
|
7163
6994
|
exports.Markdown = Markdown;
|
|
@@ -7209,7 +7040,6 @@ exports.TooltipTrigger = TooltipTrigger;
|
|
|
7209
7040
|
exports.UserIcon = UserIcon;
|
|
7210
7041
|
exports.XIcon = XIcon2;
|
|
7211
7042
|
exports.annotationsToCitations = annotationsToCitations;
|
|
7212
|
-
exports.cn = cn;
|
|
7213
7043
|
exports.parseFollowUps = parseFollowUps;
|
|
7214
7044
|
exports.resultsToCitations = resultsToCitations;
|
|
7215
7045
|
exports.useChatContainer = useChatContainer;
|