@pstdio/ui 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-ui.js +189 -189
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/delete-confirmation-modal.d.ts +3 -0
- package/dist/components/list-row/list-row-chrome.d.ts +11 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4313 -4101
- package/dist/index.js.map +1 -1
- package/dist/theme/custom/vscode-theme.d.ts +4 -4
- package/dist/theme/recipes/button.d.ts +1 -1
- package/dist/theme/recipes/progress-circle.d.ts +3 -3
- package/dist/theme/tokens/colors.d.ts +24 -0
- package/dist/{theme-VzNS1MAk.js → theme-D2LYEa0j.js} +148 -122
- package/dist/theme-D2LYEa0j.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/utils/apply-file-icon-theme-preference.d.ts +35 -0
- package/dist/utils/file-icon-theme-preference.d.ts +15 -0
- package/dist/utils/resolve-file-icon-element.d.ts +8 -0
- package/dist/utils/theme-preference.d.ts +1 -1
- package/package.json +1 -1
- package/dist/theme-VzNS1MAk.js.map +0 -1
package/dist/chat-ui.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { chakra as
|
|
1
|
+
import { jsx as l, jsxs as T, Fragment as Lt } from "react/jsx-runtime";
|
|
2
|
+
import { c as k } from "react/compiler-runtime";
|
|
3
|
+
import { chakra as Pn, AbsoluteCenter as Ln, IconButton as vt, defineSlotRecipe as vn, createSlotRecipeContext as $n, Text as q, Code as Qt, Button as Ke, HStack as Ee, Box as I, Flex as Ce, Stack as Z, Textarea as On, Tooltip as it, Portal as Dn, Kbd as Fn, Spacer as zn, Timeline as qn, Span as Ue, Avatar as qe, Card as le, Link as Zt, Spinner as $t, Skeleton as Qn } from "@chakra-ui/react";
|
|
4
4
|
import { ArrowDownIcon as Hn, ShieldX as Wn, ShieldCheck as Nn, Check as en, Square as Vn, ArrowUp as jn, Copy as Un, Move as Kn, FileDown as Gn, FileUp as Xn, FileDiff as Yn, Trash2 as Jn, FilePen as Zn, FileText as es, ListTree as ts, Terminal as tn, ListTodo as ns, CircleQuestionMark as ss, File as os, Globe as rs, Search as is, AlertTriangle as nn, DotIcon as ls, ChevronUpIcon as as, MessageCircleIcon as cs } from "lucide-react";
|
|
5
5
|
import { StickToBottom as us, useStickToBottomContext as ct } from "use-stick-to-bottom";
|
|
6
6
|
import { S as ut, T as sn } from "./get-file-type-icon-ufFb0IkR.js";
|
|
7
|
-
import { useRef as Qe, useEffect as
|
|
7
|
+
import { useRef as Qe, useEffect as Te, useState as G } from "react";
|
|
8
8
|
import { i as At, P as ds, h as fs, R as on, j as ps } from "./rich-message-CEOSsdR2.js";
|
|
9
9
|
import "@lexical/react/LexicalCollaborationContext";
|
|
10
10
|
import "@lexical/react/LexicalCollaborationPlugin";
|
|
@@ -40,7 +40,7 @@ const xs = {
|
|
|
40
40
|
initial: "instant",
|
|
41
41
|
resize: "instant",
|
|
42
42
|
role: "log"
|
|
43
|
-
}, Ss =
|
|
43
|
+
}, Ss = Pn(us, {
|
|
44
44
|
base: {
|
|
45
45
|
position: "relative",
|
|
46
46
|
flex: 1,
|
|
@@ -50,8 +50,8 @@ const xs = {
|
|
|
50
50
|
}, {
|
|
51
51
|
forwardProps: ["initial", "resize"],
|
|
52
52
|
defaultProps: xs
|
|
53
|
-
}),
|
|
54
|
-
const e =
|
|
53
|
+
}), ks = (t) => {
|
|
54
|
+
const e = k(10);
|
|
55
55
|
let n, o;
|
|
56
56
|
e[0] !== t ? ({
|
|
57
57
|
children: n,
|
|
@@ -71,21 +71,21 @@ const xs = {
|
|
|
71
71
|
}, e[3] = c, e[4] = u) : (c = e[3], u = e[4]);
|
|
72
72
|
let d;
|
|
73
73
|
return e[5] !== n || e[6] !== o || e[7] !== i || e[8] !== a ? (d = /* @__PURE__ */ l(ut, { ...o, height: "full", width: "full", showHorizontalScrollbar: !1, viewportRef: i, contentRef: a, verticalScrollbarProps: c, contentProps: u, children: n }), e[5] = n, e[6] = o, e[7] = i, e[8] = a, e[9] = d) : d = e[9], d;
|
|
74
|
-
},
|
|
74
|
+
}, Ts = {
|
|
75
75
|
axis: "horizontal",
|
|
76
76
|
bottom: "md",
|
|
77
77
|
zIndex: 2
|
|
78
|
-
},
|
|
79
|
-
const e =
|
|
78
|
+
}, ws = (t) => {
|
|
79
|
+
const e = k(4), {
|
|
80
80
|
isAtBottom: n,
|
|
81
81
|
scrollToBottom: o
|
|
82
82
|
} = ct();
|
|
83
83
|
let s;
|
|
84
|
-
return e[0] !== n || e[1] !== t || e[2] !== o ? (s = !n && /* @__PURE__ */ l(Ln, { ...
|
|
84
|
+
return e[0] !== n || e[1] !== t || e[2] !== o ? (s = !n && /* @__PURE__ */ l(Ln, { ...Ts, children: /* @__PURE__ */ l(vt, { rounded: "full", onClick: () => o(), variant: "outline", size: "xs", ...t, children: /* @__PURE__ */ l(Hn, { size: 16 }) }) }), e[0] = n, e[1] = t, e[2] = o, e[3] = s) : s = e[3], s;
|
|
85
85
|
}, Rt = {
|
|
86
86
|
Root: Ss,
|
|
87
|
-
Viewport:
|
|
88
|
-
ScrollToBottom:
|
|
87
|
+
Viewport: ks,
|
|
88
|
+
ScrollToBottom: ws
|
|
89
89
|
}, Cs = vn({
|
|
90
90
|
className: "ai-message",
|
|
91
91
|
slots: ["root", "content"],
|
|
@@ -200,7 +200,7 @@ const xs = {
|
|
|
200
200
|
withContext: As
|
|
201
201
|
} = $n({
|
|
202
202
|
recipe: Cs
|
|
203
|
-
}), Rs = _s("div", "root"), Is = As("div", "content"),
|
|
203
|
+
}), Rs = _s("div", "root"), Is = As("div", "content"), we = {
|
|
204
204
|
Root: Rs,
|
|
205
205
|
Content: Is
|
|
206
206
|
}, Ms = (t) => {
|
|
@@ -208,7 +208,7 @@ const xs = {
|
|
|
208
208
|
const e = typeof t == "string" ? t : JSON.stringify(t, null, 2);
|
|
209
209
|
return e.length === 0 ? null : e.length > 200 ? `${e.slice(0, 200)}...` : e;
|
|
210
210
|
}, ji = (t) => {
|
|
211
|
-
const e =
|
|
211
|
+
const e = k(19), {
|
|
212
212
|
toolName: n,
|
|
213
213
|
toolInput: o,
|
|
214
214
|
onApprove: s,
|
|
@@ -218,7 +218,7 @@ const xs = {
|
|
|
218
218
|
e[0] !== o ? (i = Ms(o), e[0] = o, e[1] = i) : i = e[1];
|
|
219
219
|
const a = i;
|
|
220
220
|
let c;
|
|
221
|
-
e[2] !== n ? (c = /* @__PURE__ */
|
|
221
|
+
e[2] !== n ? (c = /* @__PURE__ */ T(q, { textStyle: "label/S/medium", color: "fg", children: [
|
|
222
222
|
"Allow ",
|
|
223
223
|
/* @__PURE__ */ l(Qt, { size: "sm", children: n }),
|
|
224
224
|
"?"
|
|
@@ -228,24 +228,24 @@ const xs = {
|
|
|
228
228
|
let d;
|
|
229
229
|
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ l(Wn, { size: 14 }), e[6] = d) : d = e[6];
|
|
230
230
|
let p;
|
|
231
|
-
e[7] !== r ? (p = /* @__PURE__ */
|
|
231
|
+
e[7] !== r ? (p = /* @__PURE__ */ T(Ke, { size: "xs", variant: "outline", onClick: r, children: [
|
|
232
232
|
d,
|
|
233
233
|
"Deny"
|
|
234
234
|
] }), e[7] = r, e[8] = p) : p = e[8];
|
|
235
235
|
let m;
|
|
236
236
|
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ l(Nn, { size: 14 }), e[9] = m) : m = e[9];
|
|
237
237
|
let f;
|
|
238
|
-
e[10] !== s ? (f = /* @__PURE__ */
|
|
238
|
+
e[10] !== s ? (f = /* @__PURE__ */ T(Ke, { size: "xs", colorPalette: "green", onClick: s, children: [
|
|
239
239
|
m,
|
|
240
240
|
"Allow"
|
|
241
241
|
] }), e[10] = s, e[11] = f) : f = e[11];
|
|
242
242
|
let h;
|
|
243
|
-
e[12] !== p || e[13] !== f ? (h = /* @__PURE__ */
|
|
243
|
+
e[12] !== p || e[13] !== f ? (h = /* @__PURE__ */ T(Ee, { gap: "xs", justifyContent: "flex-end", children: [
|
|
244
244
|
p,
|
|
245
245
|
f
|
|
246
246
|
] }), e[12] = p, e[13] = f, e[14] = h) : h = e[14];
|
|
247
247
|
let g;
|
|
248
|
-
return e[15] !== c || e[16] !== u || e[17] !== h ? (g = /* @__PURE__ */ l(I, { px: "sm", py: "xs", mx: "sm", borderWidth: "1px", borderColor: "border.warning", borderRadius: "lg", bg: "bg.warning", children: /* @__PURE__ */
|
|
248
|
+
return e[15] !== c || e[16] !== u || e[17] !== h ? (g = /* @__PURE__ */ l(I, { px: "sm", py: "xs", mx: "sm", borderWidth: "1px", borderColor: "border.warning", borderRadius: "lg", bg: "bg.warning", children: /* @__PURE__ */ T(Ce, { direction: "column", gap: "xs", children: [
|
|
249
249
|
c,
|
|
250
250
|
u,
|
|
251
251
|
h
|
|
@@ -257,8 +257,8 @@ const xs = {
|
|
|
257
257
|
} = t;
|
|
258
258
|
return e === 0 ? !1 : n > e;
|
|
259
259
|
};
|
|
260
|
-
function
|
|
261
|
-
const e =
|
|
260
|
+
function Bs(t) {
|
|
261
|
+
const e = k(4), {
|
|
262
262
|
userMessageCount: n
|
|
263
263
|
} = t, {
|
|
264
264
|
scrollToBottom: o
|
|
@@ -269,9 +269,9 @@ function Ps(t) {
|
|
|
269
269
|
previousUserMessageCount: s.current,
|
|
270
270
|
userMessageCount: n
|
|
271
271
|
}) && o(), s.current = n;
|
|
272
|
-
}, i = [n, o], e[0] = o, e[1] = n, e[2] = r, e[3] = i) : (r = e[2], i = e[3]),
|
|
272
|
+
}, i = [n, o], e[0] = o, e[1] = n, e[2] = r, e[3] = i) : (r = e[2], i = e[3]), Te(r, i), null;
|
|
273
273
|
}
|
|
274
|
-
const an = (t) => t.trim().length > 0,
|
|
274
|
+
const an = (t) => t.trim().length > 0, Ps = (t) => {
|
|
275
275
|
const {
|
|
276
276
|
isDisabled: e,
|
|
277
277
|
streaming: n,
|
|
@@ -289,7 +289,7 @@ const an = (t) => t.trim().length > 0, Bs = (t) => {
|
|
|
289
289
|
}, vs = (t) => {
|
|
290
290
|
t.preventDefault();
|
|
291
291
|
}, cn = (t) => {
|
|
292
|
-
const e =
|
|
292
|
+
const e = k(7), {
|
|
293
293
|
option: n
|
|
294
294
|
} = t;
|
|
295
295
|
let o;
|
|
@@ -297,12 +297,12 @@ const an = (t) => t.trim().length > 0, Bs = (t) => {
|
|
|
297
297
|
let s;
|
|
298
298
|
e[2] !== n.description ? (s = n.description ? /* @__PURE__ */ l(q, { textStyle: "label/XS/regular", color: "fg.muted", children: n.description }) : null, e[2] = n.description, e[3] = s) : s = e[3];
|
|
299
299
|
let r;
|
|
300
|
-
return e[4] !== o || e[5] !== s ? (r = /* @__PURE__ */
|
|
300
|
+
return e[4] !== o || e[5] !== s ? (r = /* @__PURE__ */ T(Z, { gap: "0", minWidth: "0", children: [
|
|
301
301
|
o,
|
|
302
302
|
s
|
|
303
303
|
] }), e[4] = o, e[5] = s, e[6] = r) : r = e[6], r;
|
|
304
304
|
}, $s = (t) => {
|
|
305
|
-
const e =
|
|
305
|
+
const e = k(12), {
|
|
306
306
|
option: n,
|
|
307
307
|
name: o,
|
|
308
308
|
checked: s,
|
|
@@ -319,7 +319,7 @@ const an = (t) => t.trim().length > 0, Bs = (t) => {
|
|
|
319
319
|
let m;
|
|
320
320
|
return e[4] !== s || e[5] !== o || e[6] !== a || e[7] !== c || e[8] !== u || e[9] !== d || e[10] !== p ? (m = /* @__PURE__ */ l(rn, { name: o, checked: s, readOnly: a, "aria-readonly": c, inputProps: u, alignItems: "flex-start", onCheckedChange: d, children: p }), e[4] = s, e[5] = o, e[6] = a, e[7] = c, e[8] = u, e[9] = d, e[10] = p, e[11] = m) : m = e[11], m;
|
|
321
321
|
}, Os = (t) => {
|
|
322
|
-
const e =
|
|
322
|
+
const e = k(17), {
|
|
323
323
|
question: n,
|
|
324
324
|
questionIndex: o,
|
|
325
325
|
name: s,
|
|
@@ -342,7 +342,7 @@ const an = (t) => t.trim().length > 0, Bs = (t) => {
|
|
|
342
342
|
let f;
|
|
343
343
|
return e[10] !== s || e[11] !== c || e[12] !== u || e[13] !== d || e[14] !== p || e[15] !== m ? (f = /* @__PURE__ */ l(hs, { name: s, value: c, readOnly: u, "aria-readonly": d, display: "flex", flexDirection: "column", gap: "xs", onValueChange: p, children: m }), e[10] = s, e[11] = c, e[12] = u, e[13] = d, e[14] = p, e[15] = m, e[16] = f) : f = e[16], f;
|
|
344
344
|
}, Ds = (t) => {
|
|
345
|
-
const e =
|
|
345
|
+
const e = k(4), {
|
|
346
346
|
items: n
|
|
347
347
|
} = t;
|
|
348
348
|
let o;
|
|
@@ -350,7 +350,7 @@ const an = (t) => t.trim().length > 0, Bs = (t) => {
|
|
|
350
350
|
let s;
|
|
351
351
|
return e[2] !== o ? (s = /* @__PURE__ */ l(Z, { as: "ul", gap: "0", listStyleType: "none", margin: "0", padding: "0", children: o }), e[2] = o, e[3] = s) : s = e[3], s;
|
|
352
352
|
}, un = (t) => {
|
|
353
|
-
const e =
|
|
353
|
+
const e = k(19), {
|
|
354
354
|
questions: n,
|
|
355
355
|
editable: o,
|
|
356
356
|
selectedOptionsByQuestion: s,
|
|
@@ -369,10 +369,10 @@ const an = (t) => t.trim().length > 0, Bs = (t) => {
|
|
|
369
369
|
let g;
|
|
370
370
|
e[11] !== m || e[12] !== c || e[13] !== a || e[14] !== i || e[15] !== d ? (g = (b, y) => {
|
|
371
371
|
const x = b.id ?? `question-${y}`, _ = b.multiple ? "checkbox" : "radio", C = d[x] ?? [];
|
|
372
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ T(Z, { as: "fieldset", gap: "xs", borderWidth: "1px", borderColor: "border.muted", borderRadius: "sm", padding: "sm", minWidth: "0", children: [
|
|
373
373
|
/* @__PURE__ */ l(q, { as: "legend", textStyle: "label/S/medium", color: "fg", paddingX: "2xs", children: b.question }),
|
|
374
|
-
_ === "radio" ? /* @__PURE__ */ l(Os, { question: b, questionIndex: y, name: x, selectedOption: C[0], editable: c, onToggleOption: i }) : b.options.map((
|
|
375
|
-
b.allowCustomAnswer ? /* @__PURE__ */ l(On, { readOnly: !c, "aria-readonly": c ? void 0 : "true", value: m[x] ?? "", placeholder: c ? "Answer..." : "Custom answer", "aria-label": b.question, rows: 2, borderWidth: "1px", borderColor: "border.muted", borderRadius: "sm", padding: "xs", resize: c ? "vertical" : "none", color: "fg", onChange: (
|
|
374
|
+
_ === "radio" ? /* @__PURE__ */ l(Os, { question: b, questionIndex: y, name: x, selectedOption: C[0], editable: c, onToggleOption: i }) : b.options.map((w) => /* @__PURE__ */ l($s, { option: w, name: x, checked: C.includes(w.label), editable: c, onToggle: () => i?.(b, y, w.label) }, w.label)),
|
|
375
|
+
b.allowCustomAnswer ? /* @__PURE__ */ l(On, { readOnly: !c, "aria-readonly": c ? void 0 : "true", value: m[x] ?? "", placeholder: c ? "Answer..." : "Custom answer", "aria-label": b.question, rows: 2, borderWidth: "1px", borderColor: "border.muted", borderRadius: "sm", padding: "xs", resize: c ? "vertical" : "none", color: "fg", onChange: (w) => a?.(b, y, w.currentTarget.value) }) : null
|
|
376
376
|
] }, x);
|
|
377
377
|
}, e[11] = m, e[12] = c, e[13] = a, e[14] = i, e[15] = d, e[16] = g) : g = e[16], f = n.map(g), e[4] = m, e[5] = c, e[6] = a, e[7] = i, e[8] = n, e[9] = d, e[10] = f;
|
|
378
378
|
} else
|
|
@@ -385,7 +385,7 @@ function Fs(t, e) {
|
|
|
385
385
|
tabIndex: -1
|
|
386
386
|
}, size: "xs", children: /* @__PURE__ */ l(q, { textStyle: "label/XS/regular", color: "fg", children: t.label }) }) }, `${t.label}-${e}`);
|
|
387
387
|
}
|
|
388
|
-
const ae = (t, e) => t.id ?? `question-${e}`,
|
|
388
|
+
const ae = (t, e) => t.id ?? `question-${e}`, Bt = (t) => t ? JSON.stringify(t.questions.map((e, n) => ({
|
|
389
389
|
id: ae(e, n),
|
|
390
390
|
question: e.question,
|
|
391
391
|
multiple: !!e.multiple,
|
|
@@ -445,7 +445,7 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
445
445
|
const s = ae(t, e);
|
|
446
446
|
return (n[s] ?? []).length > 0 || !!o[s]?.trim();
|
|
447
447
|
}, js = (t) => {
|
|
448
|
-
const e =
|
|
448
|
+
const e = k(22), {
|
|
449
449
|
question: n,
|
|
450
450
|
sourceQuestion: o,
|
|
451
451
|
questionIndex: s,
|
|
@@ -466,7 +466,7 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
466
466
|
let _;
|
|
467
467
|
return e[19] !== n.question || e[20] !== x ? (_ = /* @__PURE__ */ l(sn, { content: n.question, showArrow: !0, children: x }), e[19] = n.question, e[20] = x, e[21] = _) : _ = e[21], _;
|
|
468
468
|
}, Us = (t) => {
|
|
469
|
-
const e =
|
|
469
|
+
const e = k(31), {
|
|
470
470
|
questionPrompt: n,
|
|
471
471
|
selectedOptionsByQuestion: o,
|
|
472
472
|
customAnswersByQuestion: s,
|
|
@@ -476,41 +476,41 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
476
476
|
questions: a
|
|
477
477
|
} = t, [c, u] = G(0), d = Math.min(c, a.length - 1), p = a[d], m = a.length > 1;
|
|
478
478
|
let f;
|
|
479
|
-
e[0] !== s || e[1] !== m || e[2] !== n.questions || e[3] !== a || e[4] !== d || e[5] !== o ? (f = m ? /* @__PURE__ */ l(Ee, { role: "tablist", "aria-label": "Question steps", gap: "1", minWidth: "0", children: a.map((
|
|
479
|
+
e[0] !== s || e[1] !== m || e[2] !== n.questions || e[3] !== a || e[4] !== d || e[5] !== o ? (f = m ? /* @__PURE__ */ l(Ee, { role: "tablist", "aria-label": "Question steps", gap: "1", minWidth: "0", children: a.map((B, M) => /* @__PURE__ */ l(js, { question: B, sourceQuestion: n.questions[M], questionIndex: M, isActive: M === d, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onSelectStep: u }, B.id)) }) : null, e[0] = s, e[1] = m, e[2] = n.questions, e[3] = a, e[4] = d, e[5] = o, e[6] = f) : f = e[6];
|
|
480
480
|
const h = `question-step-panel-${p.id}`, g = m ? "tabpanel" : void 0, b = m ? `question-step-tab-${p.id}` : void 0;
|
|
481
481
|
let y;
|
|
482
482
|
e[7] !== p ? (y = [p], e[7] = p, e[8] = y) : y = e[8];
|
|
483
483
|
let x;
|
|
484
|
-
e[9] !== r || e[10] !== n.questions || e[11] !== d ? (x = (
|
|
485
|
-
r(n.questions[d], d,
|
|
484
|
+
e[9] !== r || e[10] !== n.questions || e[11] !== d ? (x = (B, M, P) => {
|
|
485
|
+
r(n.questions[d], d, P);
|
|
486
486
|
}, e[9] = r, e[10] = n.questions, e[11] = d, e[12] = x) : x = e[12];
|
|
487
487
|
let _;
|
|
488
|
-
e[13] !== i || e[14] !== n.questions || e[15] !== d ? (_ = (
|
|
489
|
-
i(n.questions[d], d,
|
|
488
|
+
e[13] !== i || e[14] !== n.questions || e[15] !== d ? (_ = (B, M, P) => {
|
|
489
|
+
i(n.questions[d], d, P);
|
|
490
490
|
}, e[13] = i, e[14] = n.questions, e[15] = d, e[16] = _) : _ = e[16];
|
|
491
491
|
let C;
|
|
492
492
|
e[17] !== s || e[18] !== o || e[19] !== y || e[20] !== x || e[21] !== _ ? (C = /* @__PURE__ */ l(un, { questions: y, editable: !0, selectedOptionsByQuestion: o, customAnswersByQuestion: s, onToggleOption: x, onCustomAnswerChange: _ }), e[17] = s, e[18] = o, e[19] = y, e[20] = x, e[21] = _, e[22] = C) : C = e[22];
|
|
493
|
-
let
|
|
494
|
-
e[23] !== h || e[24] !== g || e[25] !== b || e[26] !== C ? (
|
|
493
|
+
let w;
|
|
494
|
+
e[23] !== h || e[24] !== g || e[25] !== b || e[26] !== C ? (w = /* @__PURE__ */ l(Z, { id: h, role: g, "aria-labelledby": b, gap: "0", children: C }), e[23] = h, e[24] = g, e[25] = b, e[26] = C, e[27] = w) : w = e[27];
|
|
495
495
|
let R;
|
|
496
|
-
return e[28] !== f || e[29] !==
|
|
496
|
+
return e[28] !== f || e[29] !== w ? (R = /* @__PURE__ */ T(Z, { gap: "xs", pb: "sm", children: [
|
|
497
497
|
f,
|
|
498
|
-
|
|
499
|
-
] }), e[28] = f, e[29] =
|
|
498
|
+
w
|
|
499
|
+
] }), e[28] = f, e[29] = w, e[30] = R) : R = e[30], R;
|
|
500
500
|
}, Ks = (t) => {
|
|
501
|
-
const e =
|
|
501
|
+
const e = k(8), {
|
|
502
502
|
questionPrompt: n
|
|
503
503
|
} = t;
|
|
504
504
|
let o;
|
|
505
505
|
e[0] !== n ? (o = Ns(n), e[0] = n, e[1] = o) : o = e[1];
|
|
506
506
|
const s = o;
|
|
507
507
|
let r;
|
|
508
|
-
e[2] !== n ? (r =
|
|
508
|
+
e[2] !== n ? (r = Bt(n), e[2] = n, e[3] = r) : r = e[3];
|
|
509
509
|
const i = r;
|
|
510
510
|
let a;
|
|
511
511
|
return e[4] !== t || e[5] !== i || e[6] !== s ? (a = /* @__PURE__ */ l(Us, { ...t, questions: s }, i), e[4] = t, e[5] = i, e[6] = s, e[7] = a) : a = e[7], a;
|
|
512
512
|
}, Gs = (t) => {
|
|
513
|
-
const e =
|
|
513
|
+
const e = k(22);
|
|
514
514
|
let n, o, s, r;
|
|
515
515
|
e[0] !== t ? ({
|
|
516
516
|
title: r,
|
|
@@ -523,11 +523,11 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
523
523
|
e[5] !== n ? (a = n ? /* @__PURE__ */ l(Vn, { size: 16, strokeWidth: 2, fill: "currentColor" }) : /* @__PURE__ */ l(jn, { size: 16, strokeWidth: 2 }), e[5] = n, e[6] = a) : a = e[6];
|
|
524
524
|
const c = a;
|
|
525
525
|
let u;
|
|
526
|
-
e[7] !== i || e[8] !== c || e[9] !== o || e[10] !== r ? (u = /* @__PURE__ */ l(vt, { "data-testid": "send-message-button", size: "sm", variant: "
|
|
526
|
+
e[7] !== i || e[8] !== c || e[9] !== o || e[10] !== r ? (u = /* @__PURE__ */ l(vt, { "data-testid": "send-message-button", size: "sm", variant: "primary", borderRadius: "full", "aria-label": i, title: r, ...o, children: c }), e[7] = i, e[8] = c, e[9] = o, e[10] = r, e[11] = u) : u = e[11];
|
|
527
527
|
const d = u;
|
|
528
528
|
if (r) {
|
|
529
529
|
let p;
|
|
530
|
-
e[12] !== s || e[13] !== r ? (p = s ? /* @__PURE__ */
|
|
530
|
+
e[12] !== s || e[13] !== r ? (p = s ? /* @__PURE__ */ T(Lt, { children: [
|
|
531
531
|
r,
|
|
532
532
|
" ",
|
|
533
533
|
/* @__PURE__ */ l(Fn, { fontSize: "xs", children: s })
|
|
@@ -538,14 +538,14 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
538
538
|
let h;
|
|
539
539
|
e[17] !== m ? (h = /* @__PURE__ */ l(Dn, { children: /* @__PURE__ */ l(it.Positioner, { children: /* @__PURE__ */ l(it.Content, { children: m }) }) }), e[17] = m, e[18] = h) : h = e[18];
|
|
540
540
|
let g;
|
|
541
|
-
return e[19] !== f || e[20] !== h ? (g = /* @__PURE__ */
|
|
541
|
+
return e[19] !== f || e[20] !== h ? (g = /* @__PURE__ */ T(it.Root, { closeDelay: 50, openDelay: 100, children: [
|
|
542
542
|
f,
|
|
543
543
|
h
|
|
544
544
|
] }), e[19] = f, e[20] = h, e[21] = g) : g = e[21], g;
|
|
545
545
|
}
|
|
546
546
|
return d;
|
|
547
547
|
}, Xs = (t) => {
|
|
548
|
-
const e =
|
|
548
|
+
const e = k(94), {
|
|
549
549
|
defaultState: n,
|
|
550
550
|
onSubmit: o,
|
|
551
551
|
onInterrupt: s,
|
|
@@ -563,7 +563,7 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
563
563
|
} = t, b = o === void 0 ? Ys : o, y = r === void 0 ? !1 : r;
|
|
564
564
|
let x;
|
|
565
565
|
e[0] !== i ? (x = i === void 0 ? [] : i, e[0] = i, e[1] = x) : x = e[1];
|
|
566
|
-
const _ = x, C = c === void 0 ? !1 : c,
|
|
566
|
+
const _ = x, C = c === void 0 ? !1 : c, w = f === void 0 ? !1 : f, R = g === void 0 ? !1 : g, [B, M] = G(!1), [P, Q] = G(n), [L, H] = G(0);
|
|
567
567
|
let ee;
|
|
568
568
|
e[2] !== n ? (ee = () => At(n), e[2] = n, e[3] = ee) : ee = e[3];
|
|
569
569
|
const [_e, Ae] = G(ee);
|
|
@@ -573,25 +573,25 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
573
573
|
let W;
|
|
574
574
|
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = {}, e[5] = W) : W = e[5];
|
|
575
575
|
const [O, fe] = G(W), Re = Qe(null), We = Qe(u);
|
|
576
|
-
let
|
|
577
|
-
e[6] !== h ? (
|
|
578
|
-
const Ye = Qe(
|
|
576
|
+
let Pe;
|
|
577
|
+
e[6] !== h ? (Pe = Bt(h), e[6] = h, e[7] = Pe) : Pe = e[7];
|
|
578
|
+
const Ye = Qe(Pe);
|
|
579
579
|
let Le, ne;
|
|
580
580
|
e[8] !== u ? (Le = () => {
|
|
581
581
|
We.current = u;
|
|
582
|
-
}, ne = [u], e[8] = u, e[9] = Le, e[10] = ne) : (Le = e[9], ne = e[10]),
|
|
582
|
+
}, ne = [u], e[8] = u, e[9] = Le, e[10] = ne) : (Le = e[9], ne = e[10]), Te(Le, ne);
|
|
583
583
|
let se, Ne;
|
|
584
584
|
e[11] !== n ? (se = () => {
|
|
585
585
|
const A = At(n);
|
|
586
586
|
Q(n), H(Js), Ae(A), te({}), fe({}), We.current?.(A);
|
|
587
|
-
}, Ne = [n], e[11] = n, e[12] = se, e[13] = Ne) : (se = e[12], Ne = e[13]),
|
|
587
|
+
}, Ne = [n], e[11] = n, e[12] = se, e[13] = Ne) : (se = e[12], Ne = e[13]), Te(se, Ne);
|
|
588
588
|
let pe;
|
|
589
|
-
e[14] !== h ? (pe =
|
|
589
|
+
e[14] !== h ? (pe = Bt(h), e[14] = h, e[15] = pe) : pe = e[15];
|
|
590
590
|
const X = pe;
|
|
591
591
|
let me, he;
|
|
592
592
|
e[16] !== X ? (me = () => {
|
|
593
593
|
Ye.current !== X && (Ye.current = X, te({}), fe({}));
|
|
594
|
-
}, he = [X], e[16] = X, e[17] = me, e[18] = he) : (me = e[17], he = e[18]),
|
|
594
|
+
}, he = [X], e[16] = X, e[17] = me, e[18] = he) : (me = e[17], he = e[18]), Te(me, he);
|
|
595
595
|
let oe;
|
|
596
596
|
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (oe = () => {
|
|
597
597
|
const A = Re.current?.querySelector('[contenteditable="true"]');
|
|
@@ -607,7 +607,7 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
607
607
|
Se instanceof HTMLElement && Se.focus(), M(!0);
|
|
608
608
|
});
|
|
609
609
|
return () => cancelAnimationFrame(A);
|
|
610
|
-
}, N = [R], e[20] = R, e[21] = ve, e[22] = N) : (ve = e[21], N = e[22]),
|
|
610
|
+
}, N = [R], e[20] = R, e[21] = ve, e[22] = N) : (ve = e[21], N = e[22]), Te(ve, N);
|
|
611
611
|
let ge;
|
|
612
612
|
e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ge = () => {
|
|
613
613
|
M(!0), Ie();
|
|
@@ -657,7 +657,7 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
657
657
|
const v = re;
|
|
658
658
|
let ye;
|
|
659
659
|
e[48] !== F || e[49] !== v ? (ye = () => {
|
|
660
|
-
v(
|
|
660
|
+
v(Ps(F));
|
|
661
661
|
}, e[48] = F, e[49] = v, e[50] = ye) : ye = e[50];
|
|
662
662
|
const xe = ye;
|
|
663
663
|
let Je;
|
|
@@ -672,7 +672,7 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
672
672
|
const _t = je[Ve] ?? [], qt = _t.includes(ie);
|
|
673
673
|
return A.multiple ? {
|
|
674
674
|
...je,
|
|
675
|
-
[Ve]: qt ? _t.filter((
|
|
675
|
+
[Ve]: qt ? _t.filter((Bn) => Bn !== ie) : [..._t, ie]
|
|
676
676
|
} : {
|
|
677
677
|
...je,
|
|
678
678
|
[Ve]: qt ? [] : [ie]
|
|
@@ -691,13 +691,13 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
691
691
|
const En = et;
|
|
692
692
|
let tt;
|
|
693
693
|
e[56] !== d ? (tt = d ? /* @__PURE__ */ l(q, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: d }) : void 0, e[56] = d, e[57] = tt) : tt = e[57];
|
|
694
|
-
const ht = tt, gt =
|
|
694
|
+
const ht = tt, gt = w ? "-1px" : void 0, bt = w ? "0" : void 0, yt = B ? "blue.border" : "border.muted", xt = B ? "mid" : "low", St = B ? 1 : 0, kt = B ? "blue.border" : "border";
|
|
695
695
|
let $e;
|
|
696
|
-
e[58] !==
|
|
697
|
-
borderColor:
|
|
696
|
+
e[58] !== kt ? ($e = {
|
|
697
|
+
borderColor: kt,
|
|
698
698
|
boxShadow: "mid",
|
|
699
699
|
zIndex: 1
|
|
700
|
-
}, e[58] =
|
|
700
|
+
}, e[58] = kt, e[59] = $e) : $e = e[59];
|
|
701
701
|
let nt;
|
|
702
702
|
e[60] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (nt = {
|
|
703
703
|
borderColor: "blue.border",
|
|
@@ -707,24 +707,24 @@ const ae = (t, e) => t.id ?? `question-${e}`, Pt = (t) => t ? JSON.stringify(t.q
|
|
|
707
707
|
let st;
|
|
708
708
|
e[61] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (st = () => M(!1), e[61] = st) : st = e[61];
|
|
709
709
|
let Oe;
|
|
710
|
-
e[62] !== O || e[63] !== L || e[64] !==
|
|
710
|
+
e[62] !== O || e[63] !== L || e[64] !== P || e[65] !== xe || e[66] !== C || e[67] !== u || e[68] !== ht || e[69] !== h || e[70] !== E ? (Oe = h ? /* @__PURE__ */ l(Ks, { questionPrompt: h, selectedOptionsByQuestion: E, customAnswersByQuestion: O, onToggleOption: Mn, onCustomAnswerChange: En }) : /* @__PURE__ */ l(ut, { maxH: "10rem", showHorizontalScrollbar: !1, contentProps: {
|
|
711
711
|
pr: "2xs"
|
|
712
|
-
}, children: /* @__PURE__ */ l(ds, { defaultState:
|
|
712
|
+
}, children: /* @__PURE__ */ l(ds, { defaultState: P, isEditable: !C, placeholder: ht, onChange: (A) => {
|
|
713
713
|
Ae(A), u?.(A);
|
|
714
|
-
}, onSubmit: xe }, L) }), e[62] = O, e[63] = L, e[64] =
|
|
714
|
+
}, onSubmit: xe }, L) }), e[62] = O, e[63] = L, e[64] = P, e[65] = xe, e[66] = C, e[67] = u, e[68] = ht, e[69] = h, e[70] = E, e[71] = Oe) : Oe = e[71];
|
|
715
715
|
let ot;
|
|
716
716
|
e[72] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ot = /* @__PURE__ */ l(zn, {}), e[72] = ot) : ot = e[72];
|
|
717
|
-
const
|
|
717
|
+
const Tt = D ? "Stop Response" : "Message Sending", wt = y ? void 0 : "Enter", Ct = U === "none";
|
|
718
718
|
let De;
|
|
719
|
-
e[73] !== D || e[74] !== mt || e[75] !==
|
|
719
|
+
e[73] !== D || e[74] !== mt || e[75] !== Tt || e[76] !== wt || e[77] !== Ct ? (De = /* @__PURE__ */ l(Gs, { canInterrupt: D, title: Tt, shortcut: wt, onClick: mt, disabled: Ct }), e[73] = D, e[74] = mt, e[75] = Tt, e[76] = wt, e[77] = Ct, e[78] = De) : De = e[78];
|
|
720
720
|
let Fe;
|
|
721
|
-
e[79] !== m || e[80] !== De ? (Fe = /* @__PURE__ */
|
|
721
|
+
e[79] !== m || e[80] !== De ? (Fe = /* @__PURE__ */ T(Ee, { gap: "1", mt: "md", children: [
|
|
722
722
|
m,
|
|
723
723
|
ot,
|
|
724
724
|
De
|
|
725
725
|
] }), e[79] = m, e[80] = De, e[81] = Fe) : Fe = e[81];
|
|
726
726
|
let ze;
|
|
727
|
-
e[82] !== p || e[83] !== Oe || e[84] !== Fe ? (ze = /* @__PURE__ */
|
|
727
|
+
e[82] !== p || e[83] !== Oe || e[84] !== Fe ? (ze = /* @__PURE__ */ T(Ce, { direction: "column", color: "fg", children: [
|
|
728
728
|
p,
|
|
729
729
|
Oe,
|
|
730
730
|
Fe
|
|
@@ -762,8 +762,8 @@ const eo = (t = "") => JSON.stringify(fs(t)), to = 360, no = 4, so = "min(10vh,
|
|
|
762
762
|
hour: "numeric",
|
|
763
763
|
minute: "2-digit",
|
|
764
764
|
timeZone: n
|
|
765
|
-
}).format(new Date(t.createdAt)) : "",
|
|
766
|
-
const e =
|
|
765
|
+
}).format(new Date(t.createdAt)) : "", Pt = (t) => {
|
|
766
|
+
const e = k(20), {
|
|
767
767
|
message: n,
|
|
768
768
|
alwaysVisible: o,
|
|
769
769
|
copyAlwaysVisible: s
|
|
@@ -777,7 +777,7 @@ const eo = (t = "") => JSON.stringify(fs(t)), to = 360, no = 4, so = "min(10vh,
|
|
|
777
777
|
let h, g;
|
|
778
778
|
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = () => () => {
|
|
779
779
|
u.current !== null && window.clearTimeout(u.current);
|
|
780
|
-
}, g = [], e[4] = h, e[5] = g) : (h = e[4], g = e[5]),
|
|
780
|
+
}, g = [], e[4] = h, e[5] = g) : (h = e[4], g = e[5]), Te(h, g);
|
|
781
781
|
let b;
|
|
782
782
|
e[6] !== p ? (b = async () => {
|
|
783
783
|
if (p)
|
|
@@ -793,13 +793,13 @@ const eo = (t = "") => JSON.stringify(fs(t)), to = 360, no = 4, so = "min(10vh,
|
|
|
793
793
|
const x = r ? "1" : "0", _ = r ? "auto" : "none";
|
|
794
794
|
let C;
|
|
795
795
|
e[8] !== f ? (C = f ? /* @__PURE__ */ l(q, { textStyle: "label/XS/regular", color: "fg.muted", children: f }) : null, e[8] = f, e[9] = C) : C = e[9];
|
|
796
|
-
let
|
|
797
|
-
e[10] !== i || e[11] !== y || e[12] !== p || e[13] !== a ? (
|
|
796
|
+
let w;
|
|
797
|
+
e[10] !== i || e[11] !== y || e[12] !== p || e[13] !== a ? (w = p ? /* @__PURE__ */ l(I, { opacity: i ? "1" : "0", pointerEvents: i ? "auto" : "none", transition: "opacity 120ms ease", css: Wt, children: /* @__PURE__ */ l(sn, { content: a ? "Copied" : "Copy message", children: /* @__PURE__ */ l(vt, { "aria-label": a ? "Copied" : "Copy message", variant: "ghost", size: "2xs", onClick: y, children: a ? /* @__PURE__ */ l(en, { size: 12 }) : /* @__PURE__ */ l(Un, { size: 12 }) }) }) }) : null, e[10] = i, e[11] = y, e[12] = p, e[13] = a, e[14] = w) : w = e[14];
|
|
798
798
|
let R;
|
|
799
|
-
return e[15] !==
|
|
799
|
+
return e[15] !== w || e[16] !== x || e[17] !== _ || e[18] !== C ? (R = /* @__PURE__ */ T(Ee, { "data-chat-message-action-panel": "true", gap: "2xs", minH: "6", opacity: x, pointerEvents: _, transition: "opacity 120ms ease", css: Wt, children: [
|
|
800
800
|
C,
|
|
801
|
-
|
|
802
|
-
] }), e[15] =
|
|
801
|
+
w
|
|
802
|
+
] }), e[15] = w, e[16] = x, e[17] = _, e[18] = C, e[19] = R) : R = e[19], R;
|
|
803
803
|
}, Wt = {
|
|
804
804
|
"[data-chat-message-with-actions]:hover &, [data-chat-message-with-actions]:focus-within &": {
|
|
805
805
|
opacity: 1,
|
|
@@ -814,7 +814,7 @@ const eo = (t = "") => JSON.stringify(fs(t)), to = 360, no = 4, so = "min(10vh,
|
|
|
814
814
|
pointerEvents: "auto"
|
|
815
815
|
}
|
|
816
816
|
}, uo = (t) => {
|
|
817
|
-
const e =
|
|
817
|
+
const e = k(8);
|
|
818
818
|
let n, o;
|
|
819
819
|
e[0] !== t ? ({
|
|
820
820
|
children: n,
|
|
@@ -899,10 +899,10 @@ const ft = (t) => t.startsWith("--- "), Ft = (t) => t.startsWith("+++ "), zt = (
|
|
|
899
899
|
}, So = (t, e) => {
|
|
900
900
|
const n = t.get(e);
|
|
901
901
|
n && (n.additions += 1);
|
|
902
|
-
},
|
|
902
|
+
}, ko = (t, e) => {
|
|
903
903
|
const n = t.get(e);
|
|
904
904
|
n && (n.deletions += 1);
|
|
905
|
-
},
|
|
905
|
+
}, To = (t, e, n) => {
|
|
906
906
|
if (ft(t))
|
|
907
907
|
return {
|
|
908
908
|
...e,
|
|
@@ -920,7 +920,7 @@ const ft = (t) => t.startsWith("--- "), Ft = (t) => t.startsWith("+++ "), zt = (
|
|
|
920
920
|
return e.currentPath ? zt(t) ? {
|
|
921
921
|
...e,
|
|
922
922
|
inHunk: !0
|
|
923
|
-
} : e.inHunk ? bo(t) ? (So(n, e.currentPath), e) : (yo(t) &&
|
|
923
|
+
} : e.inHunk ? bo(t) ? (So(n, e.currentPath), e) : (yo(t) && ko(n, e.currentPath), e) : e : e;
|
|
924
924
|
};
|
|
925
925
|
function mn(t) {
|
|
926
926
|
if (!t || typeof t != "string") return [];
|
|
@@ -932,7 +932,7 @@ function mn(t) {
|
|
|
932
932
|
};
|
|
933
933
|
const o = t.split(/\r?\n/);
|
|
934
934
|
for (const s of o)
|
|
935
|
-
n =
|
|
935
|
+
n = To(s, n, e);
|
|
936
936
|
return Array.from(e.entries()).map(([s, {
|
|
937
937
|
additions: r,
|
|
938
938
|
deletions: i
|
|
@@ -942,7 +942,7 @@ function mn(t) {
|
|
|
942
942
|
deletions: i
|
|
943
943
|
}));
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function wo(t) {
|
|
946
946
|
return mn(t).map((e) => ({
|
|
947
947
|
kind: "diff",
|
|
948
948
|
fileName: Dt(e.filePath),
|
|
@@ -1037,9 +1037,9 @@ const Eo = {
|
|
|
1037
1037
|
running: "running",
|
|
1038
1038
|
completed: "completed",
|
|
1039
1039
|
failed: "failed"
|
|
1040
|
-
}, gn = (t) => t.replace(/^tool-/, "").toLowerCase(),
|
|
1040
|
+
}, gn = (t) => t.replace(/^tool-/, "").toLowerCase(), Bo = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), Po = (t) => gn(t.tool ?? "tool"), Lo = (t) => {
|
|
1041
1041
|
const e = gn(t);
|
|
1042
|
-
return Eo[e] ??
|
|
1042
|
+
return Eo[e] ?? Bo(e.replace(/_/g, " "));
|
|
1043
1043
|
}, vo = (t) => {
|
|
1044
1044
|
const e = t.state?.status ?? t.status;
|
|
1045
1045
|
if (!e || typeof e != "string") return null;
|
|
@@ -1053,7 +1053,7 @@ const Eo = {
|
|
|
1053
1053
|
icon: "danger"
|
|
1054
1054
|
} : {
|
|
1055
1055
|
type: "icon",
|
|
1056
|
-
icon: pn(
|
|
1056
|
+
icon: pn(Po(t))
|
|
1057
1057
|
}, ue = (t, e, n) => {
|
|
1058
1058
|
const s = [{
|
|
1059
1059
|
kind: "text",
|
|
@@ -1071,7 +1071,7 @@ const Eo = {
|
|
|
1071
1071
|
text: r,
|
|
1072
1072
|
muted: !0
|
|
1073
1073
|
}), s;
|
|
1074
|
-
},
|
|
1074
|
+
}, Be = (t) => {
|
|
1075
1075
|
const e = t.state?.input;
|
|
1076
1076
|
return !e || typeof e != "object" || Array.isArray(e) ? null : e;
|
|
1077
1077
|
}, Ge = (t) => {
|
|
@@ -1106,7 +1106,7 @@ const Eo = {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
return e;
|
|
1108
1108
|
}, zo = (t) => {
|
|
1109
|
-
const e =
|
|
1109
|
+
const e = Be(t), n = S(e?.diff);
|
|
1110
1110
|
if (n) return n;
|
|
1111
1111
|
for (const r of yn(t)) {
|
|
1112
1112
|
const i = S(r.diff);
|
|
@@ -1138,7 +1138,7 @@ const Eo = {
|
|
|
1138
1138
|
content: S(e[2]) ?? ""
|
|
1139
1139
|
} : null;
|
|
1140
1140
|
}, Wo = (t) => {
|
|
1141
|
-
const e =
|
|
1141
|
+
const e = Be(t);
|
|
1142
1142
|
return S(e?.name) ?? S(e?.skillName) ?? S(e?.skill) ?? S(e?.skill_name) ?? void 0;
|
|
1143
1143
|
}, Sn = (t) => ({
|
|
1144
1144
|
kind: "link",
|
|
@@ -1147,16 +1147,16 @@ const Eo = {
|
|
|
1147
1147
|
}), de = (t, e) => !bn(t) || !t.state?.errorText ? e : [{
|
|
1148
1148
|
type: "comment",
|
|
1149
1149
|
text: t.state.errorText
|
|
1150
|
-
}, ...e],
|
|
1150
|
+
}, ...e], kn = (t) => Mo(t ?? void 0).map((e) => ({
|
|
1151
1151
|
type: "diff",
|
|
1152
1152
|
language: "diff",
|
|
1153
1153
|
original: e.original,
|
|
1154
1154
|
modified: e.modified,
|
|
1155
1155
|
sideBySide: !1
|
|
1156
|
-
})), No = (t) =>
|
|
1156
|
+
})), No = (t) => wo(t ?? void 0), Vo = (t) => Co(t ?? void 0), jo = (t) => {
|
|
1157
1157
|
const e = zo(t), n = xn(t), o = ue(t, void 0, "Apply patch"), s = No(e);
|
|
1158
1158
|
s.length > 0 ? o.push(...s) : o.push(...qo(n));
|
|
1159
|
-
const r = [...
|
|
1159
|
+
const r = [...kn(e)];
|
|
1160
1160
|
if (r.length === 0)
|
|
1161
1161
|
for (const i of n)
|
|
1162
1162
|
!i.before && !i.after || r.push({
|
|
@@ -1185,9 +1185,9 @@ const Eo = {
|
|
|
1185
1185
|
modified: e,
|
|
1186
1186
|
sideBySide: !1
|
|
1187
1187
|
}], Ko = (t) => {
|
|
1188
|
-
const e =
|
|
1188
|
+
const e = Be(t), n = Ge(t), o = S(e?.filePath) ?? S(e?.file_path) ?? S(n?.filePath) ?? void 0, s = S(n?.oldString) ?? S(e?.old_string) ?? void 0, r = S(n?.newString) ?? S(e?.new_string) ?? void 0, i = ue(t, void 0, "Edit file");
|
|
1189
1189
|
o && i.push(Sn(o));
|
|
1190
|
-
const a = s !== void 0 && r !== void 0 ? Uo(s, r) :
|
|
1190
|
+
const a = s !== void 0 && r !== void 0 ? Uo(s, r) : kn(S(n?.diff));
|
|
1191
1191
|
return {
|
|
1192
1192
|
indicator: ce(t),
|
|
1193
1193
|
title: i,
|
|
@@ -1260,14 +1260,14 @@ const Eo = {
|
|
|
1260
1260
|
};
|
|
1261
1261
|
};
|
|
1262
1262
|
}, tr = (t) => {
|
|
1263
|
-
const e =
|
|
1263
|
+
const e = Be(t), n = Ge(t), o = S(e?.filePath) ?? S(e?.file_path) ?? S(e?.file) ?? S(n?.filePath) ?? S(n?.file) ?? S(n?.path) ?? void 0, s = ue(t, void 0, "Read file");
|
|
1264
1264
|
return o && s.push(Sn(o)), {
|
|
1265
1265
|
indicator: ce(t),
|
|
1266
1266
|
title: s,
|
|
1267
1267
|
blocks: de(t, [])
|
|
1268
1268
|
};
|
|
1269
1269
|
}, nr = (t) => {
|
|
1270
|
-
const e =
|
|
1270
|
+
const e = Be(t), n = Ge(t), o = S(e?.command) ?? void 0, s = ue(t, o, "Run command"), r = [], i = pt(t);
|
|
1271
1271
|
i && r.push({
|
|
1272
1272
|
type: "code",
|
|
1273
1273
|
language: "text",
|
|
@@ -1287,7 +1287,7 @@ const Eo = {
|
|
|
1287
1287
|
blocks: de(t, r)
|
|
1288
1288
|
};
|
|
1289
1289
|
}, sr = (t) => {
|
|
1290
|
-
const e =
|
|
1290
|
+
const e = Be(t), n = pt(t), o = S(e?.pattern) ?? void 0, s = ue(t, o, "Search files"), r = n ? [{
|
|
1291
1291
|
type: "code",
|
|
1292
1292
|
language: "text",
|
|
1293
1293
|
code: n
|
|
@@ -1298,7 +1298,7 @@ const Eo = {
|
|
|
1298
1298
|
blocks: de(t, r)
|
|
1299
1299
|
};
|
|
1300
1300
|
}, or = (t) => {
|
|
1301
|
-
const e =
|
|
1301
|
+
const e = Be(t), n = pt(t), o = S(e?.pattern) ?? void 0, s = ue(t, o, "Find files"), r = [];
|
|
1302
1302
|
if (n) {
|
|
1303
1303
|
const i = n.split(/\r?\n/).map((a) => a.trim()).filter((a) => a.length > 0);
|
|
1304
1304
|
i.length > 0 && r.push({
|
|
@@ -1322,8 +1322,8 @@ const Eo = {
|
|
|
1322
1322
|
title: s,
|
|
1323
1323
|
blocks: de(t, i)
|
|
1324
1324
|
};
|
|
1325
|
-
}, Mt = (t) => typeof t == "string" && t.trim().length > 0 ? t : null,
|
|
1326
|
-
const e =
|
|
1325
|
+
}, Mt = (t) => typeof t == "string" && t.trim().length > 0 ? t : null, Tn = (t) => !t || typeof t != "object" || Array.isArray(t) ? null : t, ir = (t) => {
|
|
1326
|
+
const e = Tn(t);
|
|
1327
1327
|
if (!e) return null;
|
|
1328
1328
|
const n = Mt(e.content) ?? Mt(e.title);
|
|
1329
1329
|
if (!n) return null;
|
|
@@ -1339,7 +1339,7 @@ const Eo = {
|
|
|
1339
1339
|
};
|
|
1340
1340
|
const e = (() => {
|
|
1341
1341
|
if (Array.isArray(t)) return t;
|
|
1342
|
-
const n =
|
|
1342
|
+
const n = Tn(t);
|
|
1343
1343
|
return !n || !Array.isArray(n.todos) ? null : n.todos;
|
|
1344
1344
|
})();
|
|
1345
1345
|
return e ? {
|
|
@@ -1406,7 +1406,7 @@ const Eo = {
|
|
|
1406
1406
|
}, cr = (t) => t.split(" ").filter((e) => e.length > 0).map((e) => e[0].toUpperCase() + e.slice(1)).join(" "), ur = (t) => {
|
|
1407
1407
|
const e = dt(t ?? "tool").replace(/_/g, " ");
|
|
1408
1408
|
return cr(e);
|
|
1409
|
-
},
|
|
1409
|
+
}, wn = (t) => t === "error" || t === "output-error", dr = (t) => wn(t.state?.status) ? {
|
|
1410
1410
|
type: "icon",
|
|
1411
1411
|
icon: "danger"
|
|
1412
1412
|
} : {
|
|
@@ -1422,7 +1422,7 @@ const Eo = {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
}, pr = (t) => {
|
|
1424
1424
|
const e = [];
|
|
1425
|
-
|
|
1425
|
+
wn(t.state?.status) && t.state?.errorText && e.push({
|
|
1426
1426
|
type: "comment",
|
|
1427
1427
|
text: t.state.errorText
|
|
1428
1428
|
});
|
|
@@ -1474,25 +1474,25 @@ const Eo = {
|
|
|
1474
1474
|
return {
|
|
1475
1475
|
items: t.map((s) => br(s, n, e))
|
|
1476
1476
|
};
|
|
1477
|
-
},
|
|
1477
|
+
}, ke = qn, Cn = (t, e, n, o = !1) => {
|
|
1478
1478
|
o && t.stopPropagation(), e.href || t.preventDefault(), e.filePath && n?.(e.filePath);
|
|
1479
1479
|
};
|
|
1480
1480
|
function xr(t) {
|
|
1481
|
-
const e =
|
|
1481
|
+
const e = k(6), {
|
|
1482
1482
|
seg: n
|
|
1483
1483
|
} = t;
|
|
1484
1484
|
let o;
|
|
1485
1485
|
e[0] !== n.alt || e[1] !== n.src ? (o = /* @__PURE__ */ l(qe.Image, { src: n.src, alt: n.alt }), e[0] = n.alt, e[1] = n.src, e[2] = o) : o = e[2];
|
|
1486
1486
|
let s;
|
|
1487
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l(qe.Fallback, {}), e[3] = s) : s = e[3];
|
|
1487
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l(qe.Fallback, { background: "bg.muted", color: "fg.muted" }), e[3] = s) : s = e[3];
|
|
1488
1488
|
let r;
|
|
1489
|
-
return e[4] !== o ? (r = /* @__PURE__ */
|
|
1489
|
+
return e[4] !== o ? (r = /* @__PURE__ */ T(qe.Root, { width: "1.5rem", height: "1.5rem", children: [
|
|
1490
1490
|
o,
|
|
1491
1491
|
s
|
|
1492
1492
|
] }), e[4] = o, e[5] = r) : r = e[5], r;
|
|
1493
1493
|
}
|
|
1494
1494
|
function Sr(t) {
|
|
1495
|
-
const e =
|
|
1495
|
+
const e = k(9), {
|
|
1496
1496
|
seg: n,
|
|
1497
1497
|
onOpenFile: o
|
|
1498
1498
|
} = t, s = n.additions ?? 0, r = n.deletions ?? 0;
|
|
@@ -1504,8 +1504,8 @@ function Sr(t) {
|
|
|
1504
1504
|
let a;
|
|
1505
1505
|
return e[4] !== n.fileName || e[5] !== s || e[6] !== r || e[7] !== i ? (a = /* @__PURE__ */ l(ln, { fileName: n.fileName, additions: s, deletions: r, onClickFileLink: i }), e[4] = n.fileName, e[5] = s, e[6] = r, e[7] = i, e[8] = a) : a = e[8], a;
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1508
|
-
const e =
|
|
1507
|
+
function kr(t) {
|
|
1508
|
+
const e = k(13), {
|
|
1509
1509
|
seg: n,
|
|
1510
1510
|
onOpenFile: o
|
|
1511
1511
|
} = t, s = n.bold ? "medium" : void 0, r = !!(n.href || n.filePath), i = n.href ?? "#", a = (n.muted, "fg.muted"), c = r ? "pointer" : "default";
|
|
@@ -1520,8 +1520,8 @@ function Tr(t) {
|
|
|
1520
1520
|
let m;
|
|
1521
1521
|
return e[5] !== s || e[6] !== n.text || e[7] !== i || e[8] !== a || e[9] !== c || e[10] !== u || e[11] !== p ? (m = /* @__PURE__ */ l(Zt, { href: i, fontWeight: s, color: a, textDecoration: "none", cursor: c, onClick: u, _hover: p, children: n.text }), e[5] = s, e[6] = n.text, e[7] = i, e[8] = a, e[9] = c, e[10] = u, e[11] = p, e[12] = m) : m = e[12], m;
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1524
|
-
const e =
|
|
1523
|
+
function Tr(t) {
|
|
1524
|
+
const e = k(12), {
|
|
1525
1525
|
seg: n,
|
|
1526
1526
|
onOpenFile: o
|
|
1527
1527
|
} = t, s = n.bold ? "medium" : void 0, r = n.href ?? "#", i = n.muted ? "fg.muted" : "accent.primary";
|
|
@@ -1536,8 +1536,8 @@ function wr(t) {
|
|
|
1536
1536
|
let d;
|
|
1537
1537
|
return e[5] !== s || e[6] !== n.text || e[7] !== r || e[8] !== i || e[9] !== a || e[10] !== u ? (d = /* @__PURE__ */ l(Zt, { href: r, fontWeight: s, color: i, textDecoration: "underline", onClick: a, _hover: u, children: n.text }), e[5] = s, e[6] = n.text, e[7] = r, e[8] = i, e[9] = a, e[10] = u, e[11] = d) : d = e[11], d;
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1540
|
-
const e =
|
|
1539
|
+
function wr(t) {
|
|
1540
|
+
const e = k(6), {
|
|
1541
1541
|
seg: n,
|
|
1542
1542
|
isClickable: o
|
|
1543
1543
|
} = t, s = n.bold ? "medium" : void 0, r = o && !n.muted ? "fg" : "fg.muted";
|
|
@@ -1549,7 +1549,7 @@ function kr(t) {
|
|
|
1549
1549
|
return e[2] !== n.text || e[3] !== s || e[4] !== i ? (a = /* @__PURE__ */ l(Ue, { fontWeight: s, color: "fg.muted", _groupHover: i, children: n.text }), e[2] = n.text, e[3] = s, e[4] = i, e[5] = a) : a = e[5], a;
|
|
1550
1550
|
}
|
|
1551
1551
|
function Cr(t) {
|
|
1552
|
-
const e =
|
|
1552
|
+
const e = k(11), {
|
|
1553
1553
|
seg: n,
|
|
1554
1554
|
isClickable: o,
|
|
1555
1555
|
onOpenFile: s
|
|
@@ -1565,18 +1565,18 @@ function Cr(t) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
case "link": {
|
|
1567
1567
|
let r;
|
|
1568
|
-
return e[5] !== s || e[6] !== n ? (r = n.variant === "bubble" ? /* @__PURE__ */ l(
|
|
1568
|
+
return e[5] !== s || e[6] !== n ? (r = n.variant === "bubble" ? /* @__PURE__ */ l(kr, { seg: n, onOpenFile: s }) : /* @__PURE__ */ l(Tr, { seg: n, onOpenFile: s }), e[5] = s, e[6] = n, e[7] = r) : r = e[7], r;
|
|
1569
1569
|
}
|
|
1570
1570
|
case "text": {
|
|
1571
1571
|
let r;
|
|
1572
|
-
return e[8] !== o || e[9] !== n ? (r = /* @__PURE__ */ l(
|
|
1572
|
+
return e[8] !== o || e[9] !== n ? (r = /* @__PURE__ */ l(wr, { seg: n, isClickable: o }), e[8] = o, e[9] = n, e[10] = r) : r = e[10], r;
|
|
1573
1573
|
}
|
|
1574
1574
|
default:
|
|
1575
1575
|
return null;
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
function _r(t) {
|
|
1579
|
-
const e =
|
|
1579
|
+
const e = k(10), {
|
|
1580
1580
|
ind: n
|
|
1581
1581
|
} = t;
|
|
1582
1582
|
if (!n || n.type === "none")
|
|
@@ -1586,20 +1586,20 @@ function _r(t) {
|
|
|
1586
1586
|
e[0] !== n.icon ? (i = go(n.icon), e[0] = n.icon, e[1] = i) : i = e[1];
|
|
1587
1587
|
const a = i;
|
|
1588
1588
|
let c;
|
|
1589
|
-
return e[2] !== a ? (c = /* @__PURE__ */ l(
|
|
1589
|
+
return e[2] !== a ? (c = /* @__PURE__ */ l(ke.Indicator, { outline: "none", shadow: "none", border: "none", background: "bg", color: "fg", children: /* @__PURE__ */ l(Ue, { display: "inline-flex", alignItems: "center", children: /* @__PURE__ */ l(a, { size: 14, strokeWidth: 1 }) }) }), e[2] = a, e[3] = c) : c = e[3], c;
|
|
1590
1590
|
}
|
|
1591
1591
|
let o;
|
|
1592
1592
|
e[4] !== n.alt || e[5] !== n.src ? (o = /* @__PURE__ */ l(qe.Image, { src: n.src, alt: n.alt }), e[4] = n.alt, e[5] = n.src, e[6] = o) : o = e[6];
|
|
1593
1593
|
let s;
|
|
1594
|
-
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l(qe.Fallback, {}), e[7] = s) : s = e[7];
|
|
1594
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ l(qe.Fallback, { background: "bg.muted", color: "fg.muted" }), e[7] = s) : s = e[7];
|
|
1595
1595
|
let r;
|
|
1596
|
-
return e[8] !== o ? (r = /* @__PURE__ */ l(
|
|
1596
|
+
return e[8] !== o ? (r = /* @__PURE__ */ l(ke.Indicator, { children: /* @__PURE__ */ T(qe.Root, { boxSize: "full", children: [
|
|
1597
1597
|
o,
|
|
1598
1598
|
s
|
|
1599
1599
|
] }) }), e[8] = o, e[9] = r) : r = e[9], r;
|
|
1600
1600
|
}
|
|
1601
1601
|
function Ar(t) {
|
|
1602
|
-
const e =
|
|
1602
|
+
const e = k(5), {
|
|
1603
1603
|
code: n,
|
|
1604
1604
|
language: o
|
|
1605
1605
|
} = t, s = o ? `${o} code block` : "code block";
|
|
@@ -1609,7 +1609,7 @@ function Ar(t) {
|
|
|
1609
1609
|
return e[2] !== s || e[3] !== r ? (i = /* @__PURE__ */ l(ut, { background: "bg.code", color: "fg", borderRadius: "md", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ l(I, { as: "pre", padding: "sm", fontFamily: "mono", fontSize: "xs", lineHeight: "shorter", whiteSpace: "pre", "aria-label": s, children: r }) }), e[2] = s, e[3] = r, e[4] = i) : i = e[4], i;
|
|
1610
1610
|
}
|
|
1611
1611
|
function Rr(t) {
|
|
1612
|
-
const e =
|
|
1612
|
+
const e = k(30), {
|
|
1613
1613
|
b: n,
|
|
1614
1614
|
onOpenFile: o
|
|
1615
1615
|
} = t;
|
|
@@ -1618,12 +1618,12 @@ function Rr(t) {
|
|
|
1618
1618
|
let s;
|
|
1619
1619
|
e[0] !== n.text ? (s = /* @__PURE__ */ l(le.Body, { children: n.text }), e[0] = n.text, e[1] = s) : s = e[1];
|
|
1620
1620
|
let r;
|
|
1621
|
-
e[2] !== n.reactions ? (r = n.reactions?.clap ? /* @__PURE__ */ l(le.Footer, { children: /* @__PURE__ */
|
|
1621
|
+
e[2] !== n.reactions ? (r = n.reactions?.clap ? /* @__PURE__ */ l(le.Footer, { children: /* @__PURE__ */ T(Ke, { children: [
|
|
1622
1622
|
"👏 ",
|
|
1623
1623
|
n.reactions.clap
|
|
1624
1624
|
] }) }) : null, e[2] = n.reactions, e[3] = r) : r = e[3];
|
|
1625
1625
|
let i;
|
|
1626
|
-
return e[4] !== s || e[5] !== r ? (i = /* @__PURE__ */
|
|
1626
|
+
return e[4] !== s || e[5] !== r ? (i = /* @__PURE__ */ T(le.Root, { children: [
|
|
1627
1627
|
s,
|
|
1628
1628
|
r
|
|
1629
1629
|
] }), e[4] = s, e[5] = r, e[6] = i) : i = e[6], i;
|
|
@@ -1669,7 +1669,7 @@ function Ir(t) {
|
|
|
1669
1669
|
return /* @__PURE__ */ l(ps, { fileName: t }, t);
|
|
1670
1670
|
}
|
|
1671
1671
|
function Mr(t) {
|
|
1672
|
-
const e =
|
|
1672
|
+
const e = k(23), {
|
|
1673
1673
|
item: n,
|
|
1674
1674
|
itemKey: o,
|
|
1675
1675
|
isOpen: s,
|
|
@@ -1679,15 +1679,15 @@ function Mr(t) {
|
|
|
1679
1679
|
onOpenFile: c
|
|
1680
1680
|
} = t;
|
|
1681
1681
|
let u;
|
|
1682
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ l(
|
|
1682
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ l(ke.Separator, {}), e[0] = u) : u = e[0];
|
|
1683
1683
|
let d;
|
|
1684
|
-
e[1] !== n.indicator ? (d = /* @__PURE__ */
|
|
1684
|
+
e[1] !== n.indicator ? (d = /* @__PURE__ */ T(ke.Connector, { children: [
|
|
1685
1685
|
u,
|
|
1686
1686
|
/* @__PURE__ */ l(_r, { ind: n.indicator })
|
|
1687
1687
|
] }), e[1] = n.indicator, e[2] = d) : d = e[2];
|
|
1688
1688
|
const p = s ? "auto" : "20px";
|
|
1689
1689
|
let m;
|
|
1690
|
-
e[3] !== r || e[4] !== s || e[5] !== n.title || e[6] !== o || e[7] !== c || e[8] !== a ? (m = n.title.length > 0 && /* @__PURE__ */ l(
|
|
1690
|
+
e[3] !== r || e[4] !== s || e[5] !== n.title || e[6] !== o || e[7] !== c || e[8] !== a ? (m = n.title.length > 0 && /* @__PURE__ */ l(ke.Title, { className: "group", fontWeight: "normal", display: "flex", alignItems: "center", justifyContent: "space-between", cursor: r ? "pointer" : "default", onClick: r ? () => a(o) : void 0, children: /* @__PURE__ */ T(Ue, { display: "inline-flex", alignItems: "center", gap: "sm", flexWrap: "wrap", children: [
|
|
1691
1691
|
/* @__PURE__ */ l(Ue, { display: "inline-flex", alignItems: "center", gap: "xs", flexWrap: "wrap", children: n.title.map((b, y) => /* @__PURE__ */ l(Cr, { seg: b, isClickable: r, onOpenFile: c }, y)) }),
|
|
1692
1692
|
r ? /* @__PURE__ */ l(Ue, { display: "inline-flex", alignItems: "center", transition: "transform 200ms ease, color 200ms ease", transform: s ? "rotate(0deg)" : "rotate(-180deg)", color: "transparent", _groupHover: {
|
|
1693
1693
|
color: "fg"
|
|
@@ -1696,24 +1696,24 @@ function Mr(t) {
|
|
|
1696
1696
|
let f;
|
|
1697
1697
|
e[10] !== i || e[11] !== s || e[12] !== n.blocks || e[13] !== c ? (f = i ? /* @__PURE__ */ l(I, { display: "grid", gridTemplateRows: s ? "1fr" : "0fr", transition: "grid-template-rows 220ms ease", children: s ? /* @__PURE__ */ l(I, { overflow: "hidden", opacity: 1, transform: "translateY(0)", transition: "opacity 200ms ease, transform 200ms ease", children: n.blocks.map((b, y) => /* @__PURE__ */ l(I, { children: /* @__PURE__ */ l(Rr, { b, onOpenFile: c }) }, y)) }) : null }) : null, e[10] = i, e[11] = s, e[12] = n.blocks, e[13] = c, e[14] = f) : f = e[14];
|
|
1698
1698
|
let h;
|
|
1699
|
-
e[15] !== p || e[16] !== m || e[17] !== f ? (h = /* @__PURE__ */
|
|
1699
|
+
e[15] !== p || e[16] !== m || e[17] !== f ? (h = /* @__PURE__ */ T(ke.Content, { pb: "xs", h: p, overflow: "hidden", children: [
|
|
1700
1700
|
m,
|
|
1701
1701
|
f
|
|
1702
1702
|
] }), e[15] = p, e[16] = m, e[17] = f, e[18] = h) : h = e[18];
|
|
1703
1703
|
let g;
|
|
1704
|
-
return e[19] !== o || e[20] !== d || e[21] !== h ? (g = /* @__PURE__ */
|
|
1704
|
+
return e[19] !== o || e[20] !== d || e[21] !== h ? (g = /* @__PURE__ */ T(ke.Item, { gap: "xs", children: [
|
|
1705
1705
|
d,
|
|
1706
1706
|
h
|
|
1707
1707
|
] }, o), e[19] = o, e[20] = d, e[21] = h, e[22] = g) : g = e[22], g;
|
|
1708
1708
|
}
|
|
1709
1709
|
function Er(t) {
|
|
1710
|
-
const e =
|
|
1710
|
+
const e = k(11), {
|
|
1711
1711
|
data: n,
|
|
1712
1712
|
onOpenFile: o
|
|
1713
1713
|
} = t;
|
|
1714
1714
|
let s;
|
|
1715
1715
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = {}, e[0] = s) : s = e[0];
|
|
1716
|
-
const [r, i] = G(s), a =
|
|
1716
|
+
const [r, i] = G(s), a = Br;
|
|
1717
1717
|
let c;
|
|
1718
1718
|
e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = (m) => {
|
|
1719
1719
|
i((f) => ({
|
|
@@ -1732,17 +1732,17 @@ function Er(t) {
|
|
|
1732
1732
|
} else
|
|
1733
1733
|
d = e[5];
|
|
1734
1734
|
let p;
|
|
1735
|
-
return e[9] !== d ? (p = /* @__PURE__ */ l(
|
|
1735
|
+
return e[9] !== d ? (p = /* @__PURE__ */ l(ke.Root, { children: d }), e[9] = d, e[10] = p) : p = e[10], p;
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function Br(t, e) {
|
|
1738
1738
|
return t.id ? `id:${t.id}` : `idx:${e}`;
|
|
1739
1739
|
}
|
|
1740
|
-
const
|
|
1740
|
+
const Pr = (t) => dt(t.tool ?? "").replace(/_/g, "") === "question", Lr = (t) => {
|
|
1741
1741
|
const e = t.state?.output;
|
|
1742
1742
|
return typeof e == "string" ? e.trim().length > 0 : Array.isArray(e) ? e.length > 0 : e && typeof e == "object" ? Object.keys(e).length > 0 : e != null;
|
|
1743
1743
|
};
|
|
1744
1744
|
function vr(t) {
|
|
1745
|
-
const e =
|
|
1745
|
+
const e = k(8), {
|
|
1746
1746
|
invocations: n,
|
|
1747
1747
|
labeledBlocks: o,
|
|
1748
1748
|
hideQuestionForms: s,
|
|
@@ -1771,7 +1771,7 @@ function vr(t) {
|
|
|
1771
1771
|
return e[5] !== u || e[6] !== r ? (d = /* @__PURE__ */ l(Er, { data: u, onOpenFile: r }), e[5] = u, e[6] = r, e[7] = d) : d = e[7], d;
|
|
1772
1772
|
}
|
|
1773
1773
|
function $r(t) {
|
|
1774
|
-
return !
|
|
1774
|
+
return !Pr(t) || Lr(t);
|
|
1775
1775
|
}
|
|
1776
1776
|
const Or = (t) => t.type === "tool", Et = (t) => t >= 1e3 ? `${(t / 1e3).toFixed(1)}k` : String(t), Dr = (t) => {
|
|
1777
1777
|
if (t.message && t.message.trim().length > 0)
|
|
@@ -1809,7 +1809,7 @@ const Or = (t) => t.type === "tool", Et = (t) => t >= 1e3 ? `${(t / 1e3).toFixed
|
|
|
1809
1809
|
};
|
|
1810
1810
|
};
|
|
1811
1811
|
function _n(t) {
|
|
1812
|
-
const e =
|
|
1812
|
+
const e = k(8), {
|
|
1813
1813
|
message: n,
|
|
1814
1814
|
hideQuestionForms: o,
|
|
1815
1815
|
onOpenFile: s,
|
|
@@ -1851,7 +1851,7 @@ function _n(t) {
|
|
|
1851
1851
|
break e;
|
|
1852
1852
|
}
|
|
1853
1853
|
case "token_usage": {
|
|
1854
|
-
p.push(/* @__PURE__ */ l(I, { children: /* @__PURE__ */
|
|
1854
|
+
p.push(/* @__PURE__ */ l(I, { children: /* @__PURE__ */ T(q, { fontSize: "xs", color: "fg.subtle", children: [
|
|
1855
1855
|
"Tokens: ",
|
|
1856
1856
|
Et(f.inputTokens),
|
|
1857
1857
|
" in / ",
|
|
@@ -1919,7 +1919,7 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1919
1919
|
scrollTop: t?.scrollTop ?? 0,
|
|
1920
1920
|
totalSize: e
|
|
1921
1921
|
}), Zr = (t) => {
|
|
1922
|
-
const e =
|
|
1922
|
+
const e = k(8), {
|
|
1923
1923
|
itemCount: n,
|
|
1924
1924
|
onReady: o,
|
|
1925
1925
|
scrollRef: s,
|
|
@@ -1928,7 +1928,7 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1928
1928
|
let a, c;
|
|
1929
1929
|
e[0] !== o ? (a = () => {
|
|
1930
1930
|
i.current = o;
|
|
1931
|
-
}, c = [o], e[0] = o, e[1] = a, e[2] = c) : (a = e[1], c = e[2]),
|
|
1931
|
+
}, c = [o], e[0] = o, e[1] = a, e[2] = c) : (a = e[1], c = e[2]), Te(a, c);
|
|
1932
1932
|
let u, d;
|
|
1933
1933
|
e[3] !== n || e[4] !== s || e[5] !== r ? (u = () => {
|
|
1934
1934
|
if (n === 0 || typeof requestAnimationFrame > "u") {
|
|
@@ -1946,9 +1946,9 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1946
1946
|
p = requestAnimationFrame(g);
|
|
1947
1947
|
};
|
|
1948
1948
|
return p = requestAnimationFrame(g), () => cancelAnimationFrame(p);
|
|
1949
|
-
}, d = [n, s, r], e[3] = n, e[4] = s, e[5] = r, e[6] = u, e[7] = d) : (u = e[6], d = e[7]),
|
|
1949
|
+
}, d = [n, s, r], e[3] = n, e[4] = s, e[5] = r, e[6] = u, e[7] = d) : (u = e[6], d = e[7]), Te(u, d);
|
|
1950
1950
|
}, ei = (t) => {
|
|
1951
|
-
const e =
|
|
1951
|
+
const e = k(7), {
|
|
1952
1952
|
label: n,
|
|
1953
1953
|
onClick: o,
|
|
1954
1954
|
actionPanel: s
|
|
@@ -1956,15 +1956,15 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1956
1956
|
let i;
|
|
1957
1957
|
e[0] !== n || e[1] !== o ? (i = /* @__PURE__ */ l(Ke, { size: "2xs", variant: "solid", pointerEvents: "auto", onClick: o, children: n }), e[0] = n, e[1] = o, e[2] = i) : i = e[2];
|
|
1958
1958
|
let a;
|
|
1959
|
-
return e[3] !== s || e[4] !== r || e[5] !== i ? (a = /* @__PURE__ */
|
|
1959
|
+
return e[3] !== s || e[4] !== r || e[5] !== i ? (a = /* @__PURE__ */ T(Ce, { position: "absolute", bottom: "0", left: "0", right: "0", justifyContent: r, alignItems: "flex-end", px: "xs", pb: "xs", pt: "lg", bgGradient: "to-t", gradientFrom: "bg.subtle", gradientTo: "transparent", borderBottomRadius: "xs", pointerEvents: "none", children: [
|
|
1960
1960
|
s,
|
|
1961
1961
|
i
|
|
1962
1962
|
] }), e[3] = s, e[4] = r, e[5] = i, e[6] = a) : a = e[6], a;
|
|
1963
1963
|
}, In = (t, e, n = !1) => {
|
|
1964
1964
|
const o = qr(t.role);
|
|
1965
|
-
return /* @__PURE__ */ l(
|
|
1965
|
+
return /* @__PURE__ */ l(we.Root, { from: o, children: /* @__PURE__ */ T(we.Content, { from: o, children: [
|
|
1966
1966
|
/* @__PURE__ */ l(_n, { message: t, streaming: e, hideQuestionForms: n }),
|
|
1967
|
-
o === "assistant" || o === "user" ? /* @__PURE__ */ l(
|
|
1967
|
+
o === "assistant" || o === "user" ? /* @__PURE__ */ l(Pt, { message: t, alwaysVisible: o === "user", copyAlwaysVisible: o !== "user" }) : null
|
|
1968
1968
|
] }) });
|
|
1969
1969
|
}, ti = (t) => {
|
|
1970
1970
|
io(t.currentTarget, t.deltaY) && t.stopPropagation();
|
|
@@ -1975,7 +1975,7 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1975
1975
|
if (t)
|
|
1976
1976
|
return dn;
|
|
1977
1977
|
}, oi = (t) => {
|
|
1978
|
-
const e =
|
|
1978
|
+
const e = k(43), {
|
|
1979
1979
|
group: n,
|
|
1980
1980
|
streaming: o,
|
|
1981
1981
|
hideQuestionForms: s,
|
|
@@ -1990,18 +1990,18 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
1990
1990
|
const m = p, f = a ? "0" : void 0, h = a ? "relative" : void 0, g = a ? r ? "expanded" : "collapsed" : void 0;
|
|
1991
1991
|
let b;
|
|
1992
1992
|
e[8] !== c ? (b = si(c), e[8] = c, e[9] = b) : b = e[9];
|
|
1993
|
-
const y = c ? "auto" : "visible", x = a ? "xs" : void 0, _ = a ? "xs" : void 0, C = c ? "3rem" : void 0,
|
|
1993
|
+
const y = c ? "auto" : "visible", x = a ? "xs" : void 0, _ = a ? "xs" : void 0, C = c ? "3rem" : void 0, w = c ? ti : void 0;
|
|
1994
1994
|
let R;
|
|
1995
1995
|
e[10] !== n.userMessage || e[11] !== o ? (R = /* @__PURE__ */ l(_n, { message: n.userMessage, streaming: o }), e[10] = n.userMessage, e[11] = o, e[12] = R) : R = e[12];
|
|
1996
|
-
let P;
|
|
1997
|
-
e[13] !== k || e[14] !== R || e[15] !== g || e[16] !== b || e[17] !== y || e[18] !== x || e[19] !== _ || e[20] !== C ? (P = /* @__PURE__ */ l(I, { "data-sticky-user-message-content": g, display: "flex", flexDirection: "column", gap: "sm", maxH: b, minH: "0", overflowY: y, px: x, py: _, pb: C, onWheel: k, children: R }), e[13] = k, e[14] = R, e[15] = g, e[16] = b, e[17] = y, e[18] = x, e[19] = _, e[20] = C, e[21] = P) : P = e[21];
|
|
1998
|
-
let M;
|
|
1999
|
-
e[22] !== n.userMessage || e[23] !== a || e[24] !== r || e[25] !== m ? (M = a ? /* @__PURE__ */ l(ei, { label: r ? "Show less" : "Show more", onClick: m, actionPanel: /* @__PURE__ */ l(Bt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }) }) : /* @__PURE__ */ l(Bt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }), e[22] = n.userMessage, e[23] = a, e[24] = r, e[25] = m, e[26] = M) : M = e[26];
|
|
2000
1996
|
let B;
|
|
2001
|
-
e[
|
|
2002
|
-
|
|
1997
|
+
e[13] !== w || e[14] !== R || e[15] !== g || e[16] !== b || e[17] !== y || e[18] !== x || e[19] !== _ || e[20] !== C ? (B = /* @__PURE__ */ l(I, { "data-sticky-user-message-content": g, display: "flex", flexDirection: "column", gap: "sm", maxH: b, minH: "0", overflowY: y, px: x, py: _, pb: C, onWheel: w, children: R }), e[13] = w, e[14] = R, e[15] = g, e[16] = b, e[17] = y, e[18] = x, e[19] = _, e[20] = C, e[21] = B) : B = e[21];
|
|
1998
|
+
let M;
|
|
1999
|
+
e[22] !== n.userMessage || e[23] !== a || e[24] !== r || e[25] !== m ? (M = a ? /* @__PURE__ */ l(ei, { label: r ? "Show less" : "Show more", onClick: m, actionPanel: /* @__PURE__ */ l(Pt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }) }) : /* @__PURE__ */ l(Pt, { message: n.userMessage, alwaysVisible: !0, copyAlwaysVisible: !1 }), e[22] = n.userMessage, e[23] = a, e[24] = r, e[25] = m, e[26] = M) : M = e[26];
|
|
2000
|
+
let P;
|
|
2001
|
+
e[27] !== d || e[28] !== B || e[29] !== M || e[30] !== f || e[31] !== h ? (P = /* @__PURE__ */ l(I, { position: "sticky", top: "0", zIndex: 1, children: /* @__PURE__ */ l(we.Root, { from: "user", children: /* @__PURE__ */ T(we.Content, { from: "user", maxH: d, overflow: "hidden", p: f, position: h, children: [
|
|
2002
|
+
B,
|
|
2003
2003
|
M
|
|
2004
|
-
] }) }) }), e[27] = d, e[28] =
|
|
2004
|
+
] }) }) }), e[27] = d, e[28] = B, e[29] = M, e[30] = f, e[31] = h, e[32] = P) : P = e[32];
|
|
2005
2005
|
let Q;
|
|
2006
2006
|
if (e[33] !== n.responses || e[34] !== s || e[35] !== o) {
|
|
2007
2007
|
let H;
|
|
@@ -2009,10 +2009,10 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2009
2009
|
} else
|
|
2010
2010
|
Q = e[36];
|
|
2011
2011
|
let L;
|
|
2012
|
-
return e[40] !==
|
|
2013
|
-
|
|
2012
|
+
return e[40] !== P || e[41] !== Q ? (L = /* @__PURE__ */ T(I, { children: [
|
|
2013
|
+
P,
|
|
2014
2014
|
Q
|
|
2015
|
-
] }), e[40] =
|
|
2015
|
+
] }), e[40] = P, e[41] = Q, e[42] = L) : L = e[42], L;
|
|
2016
2016
|
}, ri = (t, e) => {
|
|
2017
2017
|
const {
|
|
2018
2018
|
groups: n,
|
|
@@ -2066,7 +2066,7 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2066
2066
|
}) }, f.key) : null;
|
|
2067
2067
|
}) }) });
|
|
2068
2068
|
}, Ui = (t) => {
|
|
2069
|
-
const e =
|
|
2069
|
+
const e = k(62), {
|
|
2070
2070
|
conversationKey: n,
|
|
2071
2071
|
messages: o,
|
|
2072
2072
|
loading: s,
|
|
@@ -2086,12 +2086,12 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2086
2086
|
onClearAttachments: x,
|
|
2087
2087
|
attachmentList: _,
|
|
2088
2088
|
approvalPrompt: C,
|
|
2089
|
-
workspaceHub:
|
|
2089
|
+
workspaceHub: w,
|
|
2090
2090
|
workspaceInitializing: R,
|
|
2091
|
-
inputDisabled:
|
|
2091
|
+
inputDisabled: B,
|
|
2092
2092
|
chatInputQuestionPrompt: M,
|
|
2093
|
-
chatInputAutoFocus:
|
|
2094
|
-
} = t, Q = s === void 0 ? !1 : s, L = r === void 0 ? !1 : r, H = p === void 0 ? "" : p, ee = R === void 0 ? !1 : R, _e =
|
|
2093
|
+
chatInputAutoFocus: P
|
|
2094
|
+
} = t, Q = s === void 0 ? !1 : s, L = r === void 0 ? !1 : r, H = p === void 0 ? "" : p, ee = R === void 0 ? !1 : R, _e = B === void 0 ? !1 : B, Ae = P === void 0 ? !1 : P;
|
|
2095
2095
|
let $, E, te, W;
|
|
2096
2096
|
if (e[0] !== n || e[1] !== o) {
|
|
2097
2097
|
const v = Hr(o);
|
|
@@ -2103,12 +2103,12 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2103
2103
|
const {
|
|
2104
2104
|
groups: O,
|
|
2105
2105
|
leadingResponses: fe
|
|
2106
|
-
} = te, [Re, We] = G(ai), [
|
|
2106
|
+
} = te, [Re, We] = G(ai), [Pe, Ye] = G(null), Le = !$ && Q;
|
|
2107
2107
|
let ne;
|
|
2108
2108
|
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ne = /* @__PURE__ */ l(cs, { size: 48, strokeWidth: 1.5 }), e[6] = ne) : ne = e[6];
|
|
2109
2109
|
let se;
|
|
2110
2110
|
e[7] !== a || e[8] !== i ? (se = /* @__PURE__ */ l(bs, { icon: ne, title: i, description: a }), e[7] = a, e[8] = i, e[9] = se) : se = e[9];
|
|
2111
|
-
const pe = Le ? u : c ?? se, X = !!
|
|
2111
|
+
const pe = Le ? u : c ?? se, X = !!w, me = !!M, he = L && $ && !ee, oe = !E || Pe === E;
|
|
2112
2112
|
let Ie;
|
|
2113
2113
|
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ie = (v) => {
|
|
2114
2114
|
We((ye) => {
|
|
@@ -2118,7 +2118,7 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2118
2118
|
}, e[10] = Ie) : Ie = e[10];
|
|
2119
2119
|
const ve = Ie;
|
|
2120
2120
|
let N;
|
|
2121
|
-
e[11] !== W ? (N = /* @__PURE__ */ l(
|
|
2121
|
+
e[11] !== W ? (N = /* @__PURE__ */ l(Bs, { userMessageCount: W }), e[11] = W, e[12] = N) : N = e[12];
|
|
2122
2122
|
const ge = oe ? "visible" : "hidden";
|
|
2123
2123
|
let be;
|
|
2124
2124
|
e[13] !== pe || e[14] !== Re || e[15] !== O || e[16] !== $ || e[17] !== me || e[18] !== fe || e[19] !== E || e[20] !== L ? (be = $ ? /* @__PURE__ */ l(ii, { leadingResponses: fe, groups: O, streaming: L, hideActiveQuestionForms: me, expandedStickyMessageIds: Re, onToggleStickyMessage: ve, onReady: () => Ye(E) }, E) : pe, e[13] = pe, e[14] = Re, e[15] = O, e[16] = $, e[17] = me, e[18] = fe, e[19] = E, e[20] = L, e[21] = be) : be = e[21];
|
|
@@ -2127,13 +2127,13 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2127
2127
|
let Y;
|
|
2128
2128
|
e[25] !== oe ? (Y = oe ? /* @__PURE__ */ l(Rt.ScrollToBottom, { "aria-label": "Scroll to latest message" }) : null, e[25] = oe, e[26] = Y) : Y = e[26];
|
|
2129
2129
|
let D;
|
|
2130
|
-
e[27] !== N || e[28] !== V || e[29] !== Y ? (D = /* @__PURE__ */
|
|
2130
|
+
e[27] !== N || e[28] !== V || e[29] !== Y ? (D = /* @__PURE__ */ T(Rt.Root, { children: [
|
|
2131
2131
|
N,
|
|
2132
2132
|
V,
|
|
2133
2133
|
Y
|
|
2134
2134
|
] }), e[27] = N, e[28] = V, e[29] = Y, e[30] = D) : D = e[30];
|
|
2135
2135
|
let F;
|
|
2136
|
-
e[31] !== he ? (F = he ? /* @__PURE__ */
|
|
2136
|
+
e[31] !== he ? (F = he ? /* @__PURE__ */ T(Ee, { gap: "xs", px: "sm", py: "2xs", children: [
|
|
2137
2137
|
/* @__PURE__ */ l($t, { size: "xs", color: "fg.muted" }),
|
|
2138
2138
|
/* @__PURE__ */ l(q, { textStyle: "label/XS/regular", color: "fg.muted", children: "Working..." })
|
|
2139
2139
|
] }) : null, e[31] = he, e[32] = F) : F = e[32];
|
|
@@ -2143,14 +2143,14 @@ const qr = (t) => t === "user" || t === "assistant" || t === "developer" ? t : "
|
|
|
2143
2143
|
let U;
|
|
2144
2144
|
e[35] !== g || e[36] !== y || e[37] !== _ || e[38] !== Ae || e[39] !== d || e[40] !== M || e[41] !== X || e[42] !== _e || e[43] !== h || e[44] !== x || e[45] !== f || e[46] !== m || e[47] !== L || e[48] !== j ? (U = /* @__PURE__ */ l(Xs, { placeholder: d, defaultState: j, streaming: L, onSubmit: m, onInterrupt: f, onChange: h, actions: g, attachedResources: y, onClearAttachments: x, attachmentList: _, isDisabled: _e, attachedToTop: X, questionPrompt: M, autoFocus: Ae }), e[35] = g, e[36] = y, e[37] = _, e[38] = Ae, e[39] = d, e[40] = M, e[41] = X, e[42] = _e, e[43] = h, e[44] = x, e[45] = f, e[46] = m, e[47] = L, e[48] = j, e[49] = U) : U = e[49];
|
|
2145
2145
|
let K;
|
|
2146
|
-
e[50] !== z || e[51] !== U || e[52] !==
|
|
2147
|
-
|
|
2146
|
+
e[50] !== z || e[51] !== U || e[52] !== w ? (K = /* @__PURE__ */ T(Z, { px: "xs", gap: z, children: [
|
|
2147
|
+
w,
|
|
2148
2148
|
U
|
|
2149
|
-
] }), e[50] = z, e[51] = U, e[52] =
|
|
2149
|
+
] }), e[50] = z, e[51] = U, e[52] = w, e[53] = K) : K = e[53];
|
|
2150
2150
|
let J;
|
|
2151
2151
|
e[54] !== b ? (J = /* @__PURE__ */ l(Ce, { p: "2xs", justifyContent: "flex-end", children: b }), e[54] = b, e[55] = J) : J = e[55];
|
|
2152
2152
|
let re;
|
|
2153
|
-
return e[56] !== C || e[57] !== D || e[58] !== F || e[59] !== K || e[60] !== J ? (re = /* @__PURE__ */
|
|
2153
|
+
return e[56] !== C || e[57] !== D || e[58] !== F || e[59] !== K || e[60] !== J ? (re = /* @__PURE__ */ T(Ce, { position: "relative", direction: "column", w: "full", h: "full", overflow: "hidden", children: [
|
|
2154
2154
|
D,
|
|
2155
2155
|
C,
|
|
2156
2156
|
F,
|
|
@@ -2165,16 +2165,16 @@ function ai() {
|
|
|
2165
2165
|
return /* @__PURE__ */ new Set();
|
|
2166
2166
|
}
|
|
2167
2167
|
const Jt = (t) => /* @__PURE__ */ l(Z, { gap: "xs", w: "full", children: t.map((e, n) => /* @__PURE__ */ l(Qn, { height: "3", width: e, borderRadius: "xs" }, `${e}-${n}`)) }), Ki = () => {
|
|
2168
|
-
const t =
|
|
2168
|
+
const t = k(2);
|
|
2169
2169
|
let e;
|
|
2170
|
-
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ l(
|
|
2170
|
+
t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ l(we.Root, { from: "user", children: /* @__PURE__ */ l(we.Content, { from: "user", children: Jt(["72%", "46%"]) }) }), t[0] = e) : e = t[0];
|
|
2171
2171
|
let n;
|
|
2172
|
-
return t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
2172
|
+
return t[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ T(Z, { minH: "full", py: "xs", gap: "0", children: [
|
|
2173
2173
|
e,
|
|
2174
|
-
/* @__PURE__ */ l(
|
|
2174
|
+
/* @__PURE__ */ l(we.Root, { from: "assistant", children: /* @__PURE__ */ l(we.Content, { from: "assistant", children: Jt(["76%", "62%", "40%"]) }) })
|
|
2175
2175
|
] }), t[1] = n) : n = t[1], n;
|
|
2176
2176
|
}, Gi = (t) => {
|
|
2177
|
-
const e =
|
|
2177
|
+
const e = k(14), {
|
|
2178
2178
|
changesLabel: n,
|
|
2179
2179
|
additions: o,
|
|
2180
2180
|
deletions: s,
|
|
@@ -2183,10 +2183,10 @@ const Jt = (t) => /* @__PURE__ */ l(Z, { gap: "xs", w: "full", children: t.map((
|
|
|
2183
2183
|
statusLabel: a
|
|
2184
2184
|
} = t, c = i === void 0 ? "ready" : i, u = o > 0 || s > 0, d = c === "error" ? "border.error" : "border.muted", p = c === "error" ? "bg.error" : "bg.subtle";
|
|
2185
2185
|
let m;
|
|
2186
|
-
e[0] !== o || e[1] !== n || e[2] !== s || e[3] !== u || e[4] !== c || e[5] !== a ? (m = c === "loading" ? /* @__PURE__ */
|
|
2186
|
+
e[0] !== o || e[1] !== n || e[2] !== s || e[3] !== u || e[4] !== c || e[5] !== a ? (m = c === "loading" ? /* @__PURE__ */ T(Ee, { gap: "xs", minW: "0", children: [
|
|
2187
2187
|
/* @__PURE__ */ l($t, { size: "xs", color: "fg.muted" }),
|
|
2188
2188
|
/* @__PURE__ */ l(q, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: a ?? "Setting up workspace..." })
|
|
2189
|
-
] }) : c === "error" ? /* @__PURE__ */
|
|
2189
|
+
] }) : c === "error" ? /* @__PURE__ */ T(Ee, { gap: "xs", minW: "0", children: [
|
|
2190
2190
|
/* @__PURE__ */ l(nn, { size: 14, color: "var(--chakra-colors-fg-error)" }),
|
|
2191
2191
|
/* @__PURE__ */ l(q, { textStyle: "label/S/regular", color: "fg.error", truncate: !0, children: a ?? "Workspace setup failed" })
|
|
2192
2192
|
] }) : u ? /* @__PURE__ */ l(ln, { label: n, additions: o, deletions: s, variant: "ghost", size: "small", _hover: {
|
|
@@ -2195,16 +2195,16 @@ const Jt = (t) => /* @__PURE__ */ l(Z, { gap: "xs", w: "full", children: t.map((
|
|
|
2195
2195
|
let f;
|
|
2196
2196
|
e[7] !== r ? (f = r ? /* @__PURE__ */ l(Ce, { flexShrink: 0, ml: "auto", children: r }) : null, e[7] = r, e[8] = f) : f = e[8];
|
|
2197
2197
|
let h;
|
|
2198
|
-
return e[9] !== d || e[10] !== p || e[11] !== m || e[12] !== f ? (h = /* @__PURE__ */
|
|
2198
|
+
return e[9] !== d || e[10] !== p || e[11] !== m || e[12] !== f ? (h = /* @__PURE__ */ T(Ce, { align: "center", justify: "space-between", gap: "sm", minW: "0", px: "sm", py: "xs", borderWidth: "1px", borderColor: d, borderRadius: "xs", borderBottomRadius: "0", bg: p, children: [
|
|
2199
2199
|
m,
|
|
2200
2200
|
f
|
|
2201
2201
|
] }), e[9] = d, e[10] = p, e[11] = m, e[12] = f, e[13] = h) : h = e[13], h;
|
|
2202
2202
|
};
|
|
2203
2203
|
export {
|
|
2204
2204
|
ji as ApprovalPrompt,
|
|
2205
|
-
|
|
2205
|
+
Bs as AutoScroll,
|
|
2206
2206
|
Xs as ChatInput,
|
|
2207
|
-
|
|
2207
|
+
we as ChatMessage,
|
|
2208
2208
|
Ui as ChatPanel,
|
|
2209
2209
|
Rt as ChatPrimitives,
|
|
2210
2210
|
Ki as ChatSkeleton,
|