@pstdio/ui 0.42.0 → 0.43.0-nightly.20261011212112
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/{MermaidComponent-D7vhkpka.js → MermaidComponent-Ck8YZ-eC.js} +3 -3
- package/dist/{MermaidComponent-D7vhkpka.js.map → MermaidComponent-Ck8YZ-eC.js.map} +1 -1
- package/dist/chat-ui.d.ts +4 -2
- package/dist/chat-ui.js +186 -182
- package/dist/chat-ui.js.map +1 -1
- package/dist/{collection-view-fields-D3cysHNT.d.ts → collection-view-fields-CajuwtKF.d.ts} +3 -0
- package/dist/{collection-view-grouping-D4nZk8-3.js → collection-view-grouping-DmjlnPQj.js} +2 -2
- package/dist/{collection-view-grouping-D4nZk8-3.js.map → collection-view-grouping-DmjlnPQj.js.map} +1 -1
- package/dist/{collection-view-search-CpjJy76w.js → collection-view-search-CW7B2YP1.js} +33 -48
- package/dist/collection-view-search-CW7B2YP1.js.map +1 -0
- package/dist/collection-view.d.ts +2 -2
- package/dist/collection-view.js +1 -1
- package/dist/{data-table-stats-row-64magT2g.js → data-table-stats-row-B2MYAoHu.js} +2 -2
- package/dist/{data-table-stats-row-64magT2g.js.map → data-table-stats-row-B2MYAoHu.js.map} +1 -1
- package/dist/data-table.d.ts +3 -3
- package/dist/data-table.js +8 -8
- package/dist/{diff-drawer-IYpQ-QQK.js → diff-drawer-BGQhxyOh.js} +3 -3
- package/dist/{diff-drawer-IYpQ-QQK.js.map → diff-drawer-BGQhxyOh.js.map} +1 -1
- package/dist/{diff-viewer-C-0VAt9P.js → diff-viewer-DYcswG6O.js} +5 -5
- package/dist/{diff-viewer-C-0VAt9P.js.map → diff-viewer-DYcswG6O.js.map} +1 -1
- package/dist/diff.js +2 -2
- package/dist/{display-sort-control-f3rbILsV.js → display-sort-control-CmFg-wcP.js} +4 -4
- package/dist/{display-sort-control-f3rbILsV.js.map → display-sort-control-CmFg-wcP.js.map} +1 -1
- package/dist/{edit-mode-data-table-DnMB2jiy.js → edit-mode-data-table-oEYutEBB.js} +269 -263
- package/dist/edit-mode-data-table-oEYutEBB.js.map +1 -0
- package/dist/{index-B79hwNcB.d.ts → index-5Lw7YMKy.d.ts} +1 -0
- package/dist/{index-ICoad2I_.d.ts → index-DNurZJZ3.d.ts} +4 -2
- package/dist/{index-CKsd23jv.d.ts → index-DgwJmKVC.d.ts} +1 -1
- package/dist/index.js +932 -919
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -2
- package/dist/kanban-renderer.js +596 -430
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{list-row-Z4SHkseA.js → list-row-CmFG_jCC.js} +304 -277
- package/dist/list-row-CmFG_jCC.js.map +1 -0
- package/dist/{markdown-editor-Dd4mor7l.js → markdown-editor-oklbG4fY.js} +1016 -973
- package/dist/markdown-editor-oklbG4fY.js.map +1 -0
- package/dist/{mermaid-renderer-0PmNkOXI.js → mermaid-renderer-DybQ_2Cp.js} +2 -2
- package/dist/{mermaid-renderer-0PmNkOXI.js.map → mermaid-renderer-DybQ_2Cp.js.map} +1 -1
- package/dist/mermaid.js +1 -1
- package/dist/{number-input-7K66wnSC.js → number-input-CyrMrDxB.js} +2 -2
- package/dist/{number-input-7K66wnSC.js.map → number-input-CyrMrDxB.js.map} +1 -1
- package/dist/{param-editor-Dnix-fJo.js → param-editor-Br3Qm5B4.js} +2 -2
- package/dist/{param-editor-Dnix-fJo.js.map → param-editor-Br3Qm5B4.js.map} +1 -1
- package/dist/{param-editor-field-B3vLST-B.js → param-editor-field-Cg-C40tt.js} +5 -5
- package/dist/{param-editor-field-B3vLST-B.js.map → param-editor-field-Cg-C40tt.js.map} +1 -1
- package/dist/param-editor.js +3 -3
- package/dist/{prism-OG4H7Hu4.js → prism-CnkSh-ZG.js} +2 -2
- package/dist/{prism-OG4H7Hu4.js.map → prism-CnkSh-ZG.js.map} +1 -1
- package/dist/{rich-text-BgEnAHr2.js → rich-text-DSZ23B46.js} +487 -421
- package/dist/rich-text-DSZ23B46.js.map +1 -0
- package/dist/rich-text.d.ts +1 -1
- package/dist/rich-text.js +3 -3
- package/dist/{scroll-area-Cr1lNXAr.js → scroll-area-crJfiiuF.js} +27 -21
- package/dist/scroll-area-crJfiiuF.js.map +1 -0
- package/dist/split-panel-motion-context-YB0sduVv.js +7 -0
- package/dist/split-panel-motion-context-YB0sduVv.js.map +1 -0
- package/dist/terminal.js +110 -101
- package/dist/terminal.js.map +1 -1
- package/dist/{theme-CMJdH59Z.js → theme-Bd_a7sU8.js} +390 -207
- package/dist/theme-Bd_a7sU8.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-B_qqiIoM.js +1744 -0
- package/dist/tree-list-B_qqiIoM.js.map +1 -0
- package/dist/use-virtualizer-CfDHoDer.js +21 -0
- package/dist/use-virtualizer-CfDHoDer.js.map +1 -0
- package/dist/{workspace-badge-DrvH8WKV.js → workspace-badge-BfSkiGP_.js} +2 -2
- package/dist/{workspace-badge-DrvH8WKV.js.map → workspace-badge-BfSkiGP_.js.map} +1 -1
- package/package.json +2 -2
- package/dist/collection-view-search-CpjJy76w.js.map +0 -1
- package/dist/edit-mode-data-table-DnMB2jiy.js.map +0 -1
- package/dist/list-row-Z4SHkseA.js.map +0 -1
- package/dist/markdown-editor-Dd4mor7l.js.map +0 -1
- package/dist/rich-text-BgEnAHr2.js.map +0 -1
- package/dist/scroll-area-Cr1lNXAr.js.map +0 -1
- package/dist/theme-CMJdH59Z.js.map +0 -1
- package/dist/tree-list-jarhD31R.js +0 -1652
- package/dist/tree-list-jarhD31R.js.map +0 -1
- package/dist/use-virtualizer-uj43XjBp.js +0 -10
- package/dist/use-virtualizer-uj43XjBp.js.map +0 -1
package/dist/chat-ui.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as e } from "./alert-MQ47wy7f.js";
|
|
2
|
-
import { n as t, t as n } from "./scroll-area-
|
|
3
|
-
import { a as r, t as i } from "./list-row-
|
|
4
|
-
import { t as a } from "./use-virtualizer-
|
|
5
|
-
import { i as o } from "./prism-
|
|
2
|
+
import { n as t, t as n } from "./scroll-area-crJfiiuF.js";
|
|
3
|
+
import { a as r, t as i } from "./list-row-CmFG_jCC.js";
|
|
4
|
+
import { t as a } from "./use-virtualizer-CfDHoDer.js";
|
|
5
|
+
import { i as o } from "./prism-CnkSh-ZG.js";
|
|
6
6
|
import { t as s } from "./drop-indicator-HjlBSIeV.js";
|
|
7
7
|
import { t as c } from "./empty-state-3mVV_pV-.js";
|
|
8
8
|
import { t as l } from "./icon-options-Tt6Wzhtv.js";
|
|
9
9
|
import { n as u, t as d } from "./radio-CiFrDN6O.js";
|
|
10
10
|
import { n as f, t as p } from "./queued-follow-up-Bj_vtMgd.js";
|
|
11
|
-
import {
|
|
12
|
-
import { c as C, l as w, o as T, s as E } from "./rich-text-
|
|
11
|
+
import { A as m, C as h, E as g, M as _, S as v, T as y, j as b, k as x, w as S } from "./markdown-editor-oklbG4fY.js";
|
|
12
|
+
import { c as C, l as w, o as T, s as E } from "./rich-text-DSZ23B46.js";
|
|
13
13
|
import { t as D } from "./diff-bubble-DewUd_2w.js";
|
|
14
14
|
import { AbsoluteCenter as O, Avatar as k, Box as A, Button as j, Card as M, Code as N, Field as P, Flex as F, HStack as I, Icon as L, IconButton as R, Image as z, Input as B, Kbd as V, Link as H, Menu as U, Popover as ee, Portal as te, Skeleton as ne, Span as re, Spinner as W, Stack as G, Tag as ie, Text as K, Textarea as ae, Timeline as oe, Tooltip as q, chakra as se, createSlotRecipeContext as ce, defineSlotRecipe as le, useRecipe as ue, useSlotRecipe as de } from "@chakra-ui/react";
|
|
15
15
|
import { c as J } from "react/compiler-runtime";
|
|
@@ -1504,19 +1504,20 @@ var qn = (e, t, n) => {
|
|
|
1504
1504
|
pointerEvents: "auto"
|
|
1505
1505
|
}
|
|
1506
1506
|
}, sr = (e) => {
|
|
1507
|
-
let t = J(
|
|
1508
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({children: n, linkHandler: r, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1509
|
-
let
|
|
1510
|
-
t[
|
|
1507
|
+
let t = J(12), n, r, i, a;
|
|
1508
|
+
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({children: n, linkHandler: r, streaming: a, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
1509
|
+
let o;
|
|
1510
|
+
t[5] !== n || t[6] !== r || t[7] !== a ? (o = /* @__PURE__ */ Y(T, {
|
|
1511
1511
|
defaultState: n,
|
|
1512
1512
|
linkHandler: r,
|
|
1513
|
+
streaming: a,
|
|
1513
1514
|
fullWidth: !0
|
|
1514
|
-
}), t[
|
|
1515
|
-
let
|
|
1516
|
-
return t[
|
|
1515
|
+
}), t[5] = n, t[6] = r, t[7] = a, t[8] = o) : o = t[8];
|
|
1516
|
+
let s;
|
|
1517
|
+
return t[9] !== i || t[10] !== o ? (s = /* @__PURE__ */ Y(A, {
|
|
1517
1518
|
...i,
|
|
1518
|
-
children:
|
|
1519
|
-
}), t[
|
|
1519
|
+
children: o
|
|
1520
|
+
}), t[9] = i, t[10] = o, t[11] = s) : s = t[11], s;
|
|
1520
1521
|
}, cr = (e) => {
|
|
1521
1522
|
let t = J(12), { part: n } = e, r = ln(n.state?.input), i = yn(), a;
|
|
1522
1523
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = { recipe: f }, t[0] = a) : a = t[0];
|
|
@@ -2367,7 +2368,7 @@ function va(e) {
|
|
|
2367
2368
|
}
|
|
2368
2369
|
function ya(e) {
|
|
2369
2370
|
let t = J(22), { seg: n, isClickable: r, onOpenFile: i } = e;
|
|
2370
|
-
if (
|
|
2371
|
+
if (b() && (n.kind === "link" || n.kind === "diff") && (n.filePath || n.kind === "diff")) {
|
|
2371
2372
|
let e = n.filePath ?? (n.kind === "diff" ? n.fileName : n.text), r;
|
|
2372
2373
|
t[0] === e ? r = t[1] : (r = {
|
|
2373
2374
|
source: e,
|
|
@@ -2380,7 +2381,7 @@ function ya(e) {
|
|
|
2380
2381
|
deletions: n.deletions ?? 0
|
|
2381
2382
|
}) : n.text, t[2] = n.additions, t[3] = n.deletions, t[4] = n.fileName, t[5] = n.kind, t[6] = n.text, t[7] = i) : i = t[7];
|
|
2382
2383
|
let a;
|
|
2383
|
-
return t[8] !== r || t[9] !== i ? (a = /* @__PURE__ */ Y(
|
|
2384
|
+
return t[8] !== r || t[9] !== i ? (a = /* @__PURE__ */ Y(x, {
|
|
2384
2385
|
candidate: r,
|
|
2385
2386
|
children: i
|
|
2386
2387
|
}), t[8] = r, t[9] = i, t[10] = a) : a = t[10], a;
|
|
@@ -2565,7 +2566,7 @@ function Sa(e) {
|
|
|
2565
2566
|
}
|
|
2566
2567
|
}
|
|
2567
2568
|
function Ca(e) {
|
|
2568
|
-
return /* @__PURE__ */ Y(
|
|
2569
|
+
return /* @__PURE__ */ Y(x, {
|
|
2569
2570
|
candidate: {
|
|
2570
2571
|
source: e,
|
|
2571
2572
|
origin: "tool"
|
|
@@ -2649,16 +2650,16 @@ function wa(e) {
|
|
|
2649
2650
|
}, r), t[19] = r, t[20] = u, t[21] = m, t[22] = h) : h = t[22], h;
|
|
2650
2651
|
}
|
|
2651
2652
|
function Ta(e) {
|
|
2652
|
-
let t = J(5), n =
|
|
2653
|
+
let t = J(5), n = b(), r = e.linkHandler ?? n, i;
|
|
2653
2654
|
t[0] === e ? i = t[1] : (i = /* @__PURE__ */ Y(Ea, { ...e }), t[0] = e, t[1] = i);
|
|
2654
2655
|
let a;
|
|
2655
|
-
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ Y(
|
|
2656
|
+
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ Y(m, {
|
|
2656
2657
|
handler: r,
|
|
2657
2658
|
children: i
|
|
2658
2659
|
}), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
|
|
2659
2660
|
}
|
|
2660
2661
|
function Ea(e) {
|
|
2661
|
-
let t = J(14), { data: n, onOpenFile: r } = e, i =
|
|
2662
|
+
let t = J(14), { data: n, onOpenFile: r } = e, i = b(), a;
|
|
2662
2663
|
t[0] !== i || t[1] !== r ? (a = i ? (e) => {
|
|
2663
2664
|
i.open({
|
|
2664
2665
|
source: e,
|
|
@@ -2772,31 +2773,34 @@ var Ma = (e) => e.type === "tool", Na = (e) => e.filename ?? e.url.split("/").po
|
|
|
2772
2773
|
};
|
|
2773
2774
|
};
|
|
2774
2775
|
function Va(e) {
|
|
2775
|
-
let t = J(5), n =
|
|
2776
|
+
let t = J(5), n = b(), r = e.linkHandler ?? n, i;
|
|
2776
2777
|
t[0] === e ? i = t[1] : (i = /* @__PURE__ */ Y(Ha, { ...e }), t[0] = e, t[1] = i);
|
|
2777
2778
|
let a;
|
|
2778
|
-
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ Y(
|
|
2779
|
+
return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ Y(m, {
|
|
2779
2780
|
handler: r,
|
|
2780
2781
|
children: i
|
|
2781
2782
|
}), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
|
|
2782
2783
|
}
|
|
2783
2784
|
function Ha(t) {
|
|
2784
|
-
let n = J(
|
|
2785
|
-
if (n[0] !==
|
|
2786
|
-
let t =
|
|
2787
|
-
n[
|
|
2788
|
-
let
|
|
2789
|
-
for (let n = 0; n <
|
|
2790
|
-
let
|
|
2791
|
-
bb0: switch (
|
|
2785
|
+
let n = J(10), { message: r, streaming: i, hideQuestionForms: a, onOpenFile: s, toolInvocationTimeline: c } = t, l = i !== void 0 && i, u = a !== void 0 && a, d = b(), f = g(), p;
|
|
2786
|
+
if (n[0] !== u || n[1] !== f || n[2] !== d || n[3] !== r || n[4] !== s || n[5] !== l || n[6] !== c) {
|
|
2787
|
+
let t = y([r], d), i = c ?? Aa, a;
|
|
2788
|
+
n[8] === r.parts ? a = n[9] : (a = r.parts ?? [], n[8] = r.parts, n[9] = a);
|
|
2789
|
+
let m = a, g = [];
|
|
2790
|
+
for (let n = 0; n < m.length; n += 1) {
|
|
2791
|
+
let a = m[n], c = `${r.id}-${n}`;
|
|
2792
|
+
bb0: switch (a.type) {
|
|
2792
2793
|
case "text":
|
|
2793
|
-
|
|
2794
|
-
value:
|
|
2795
|
-
children: /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(sr, {
|
|
2796
|
-
|
|
2794
|
+
g.push(/* @__PURE__ */ Y(h, {
|
|
2795
|
+
value: f.get(a) ?? t.get(a) ?? S,
|
|
2796
|
+
children: /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(sr, {
|
|
2797
|
+
streaming: l,
|
|
2798
|
+
children: a.text
|
|
2799
|
+
}) })
|
|
2800
|
+
}, c));
|
|
2797
2801
|
break bb0;
|
|
2798
2802
|
case "reasoning":
|
|
2799
|
-
|
|
2803
|
+
g.push(/* @__PURE__ */ Y(A, {
|
|
2800
2804
|
padding: "0",
|
|
2801
2805
|
css: { "& .rich-text, & .rich-text *": {
|
|
2802
2806
|
color: "fg.subtle !important",
|
|
@@ -2804,75 +2808,75 @@ function Ha(t) {
|
|
|
2804
2808
|
fontWeight: "normal !important"
|
|
2805
2809
|
} },
|
|
2806
2810
|
children: /* @__PURE__ */ Y(T, {
|
|
2807
|
-
defaultState:
|
|
2811
|
+
defaultState: a.text,
|
|
2808
2812
|
fullWidth: !0
|
|
2809
2813
|
})
|
|
2810
|
-
},
|
|
2814
|
+
}, c));
|
|
2811
2815
|
break bb0;
|
|
2812
2816
|
case "tool": {
|
|
2813
|
-
if (
|
|
2814
|
-
|
|
2817
|
+
if (a.tool === "question" && ln(a.state?.input)) {
|
|
2818
|
+
g.push(/* @__PURE__ */ Y(cr, { part: a }, c));
|
|
2815
2819
|
break bb0;
|
|
2816
2820
|
}
|
|
2817
|
-
let { invocations: e, nextIndex: t } = Ba(
|
|
2818
|
-
n = t,
|
|
2821
|
+
let { invocations: e, nextIndex: t } = Ba(m, n);
|
|
2822
|
+
n = t, g.push(/* @__PURE__ */ Y(A, {
|
|
2819
2823
|
width: "full",
|
|
2820
2824
|
children: /* @__PURE__ */ Y(i, {
|
|
2821
2825
|
invocations: e,
|
|
2822
|
-
linkHandler:
|
|
2826
|
+
linkHandler: d,
|
|
2823
2827
|
labeledBlocks: !0,
|
|
2824
|
-
hideQuestionForms:
|
|
2825
|
-
onOpenFile:
|
|
2828
|
+
hideQuestionForms: u,
|
|
2829
|
+
onOpenFile: s
|
|
2826
2830
|
})
|
|
2827
|
-
},
|
|
2831
|
+
}, c));
|
|
2828
2832
|
break bb0;
|
|
2829
2833
|
}
|
|
2830
2834
|
case "file":
|
|
2831
|
-
|
|
2835
|
+
g.push(/* @__PURE__ */ Y(A, {
|
|
2832
2836
|
width: "fit-content",
|
|
2833
2837
|
children: /* @__PURE__ */ Y(o, {
|
|
2834
|
-
fileName: Na(
|
|
2838
|
+
fileName: Na(a),
|
|
2835
2839
|
size: "sm",
|
|
2836
2840
|
tone: "neutral",
|
|
2837
|
-
icon: Ia(
|
|
2838
|
-
onSelect: () => La(
|
|
2841
|
+
icon: Ia(a),
|
|
2842
|
+
onSelect: () => La(a, s)
|
|
2839
2843
|
})
|
|
2840
|
-
},
|
|
2844
|
+
}, c));
|
|
2841
2845
|
break bb0;
|
|
2842
2846
|
case "error":
|
|
2843
|
-
|
|
2847
|
+
g.push(/* @__PURE__ */ Y(A, {
|
|
2844
2848
|
py: "2",
|
|
2845
2849
|
width: "full",
|
|
2846
2850
|
children: /* @__PURE__ */ Y(e, {
|
|
2847
2851
|
borderRadius: "xs",
|
|
2848
2852
|
status: "error",
|
|
2849
2853
|
colorPalette: "red",
|
|
2850
|
-
title: Ra(
|
|
2854
|
+
title: Ra(a),
|
|
2851
2855
|
size: "sm"
|
|
2852
2856
|
})
|
|
2853
|
-
},
|
|
2857
|
+
}, c));
|
|
2854
2858
|
break bb0;
|
|
2855
2859
|
case "token_usage": break bb0;
|
|
2856
2860
|
case "alert":
|
|
2857
|
-
|
|
2861
|
+
g.push(/* @__PURE__ */ Y(A, {
|
|
2858
2862
|
width: "full",
|
|
2859
2863
|
children: /* @__PURE__ */ Y(e, {
|
|
2860
2864
|
borderRadius: "xs",
|
|
2861
|
-
status:
|
|
2862
|
-
colorPalette: za[
|
|
2863
|
-
title:
|
|
2864
|
-
icon:
|
|
2865
|
+
status: a.status === "loading" ? "info" : a.status,
|
|
2866
|
+
colorPalette: za[a.status],
|
|
2867
|
+
title: a.title,
|
|
2868
|
+
icon: a.status === "loading" ? /* @__PURE__ */ Y(W, { size: "sm" }) : void 0,
|
|
2865
2869
|
size: "sm",
|
|
2866
|
-
children:
|
|
2870
|
+
children: a.message
|
|
2867
2871
|
})
|
|
2868
|
-
},
|
|
2872
|
+
}, c));
|
|
2869
2873
|
break bb0;
|
|
2870
|
-
default:
|
|
2874
|
+
default: g.push(null);
|
|
2871
2875
|
}
|
|
2872
2876
|
}
|
|
2873
|
-
|
|
2874
|
-
} else
|
|
2875
|
-
return
|
|
2877
|
+
p = /* @__PURE__ */ Y(fe, { children: g }), n[0] = u, n[1] = f, n[2] = d, n[3] = r, n[4] = s, n[5] = l, n[6] = c, n[7] = p;
|
|
2878
|
+
} else p = n[7];
|
|
2879
|
+
return p;
|
|
2876
2880
|
}
|
|
2877
2881
|
//#endregion
|
|
2878
2882
|
//#region src/components/chat-ui/components/message-types.ts
|
|
@@ -2945,29 +2949,29 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
2945
2949
|
}, $a = (e) => {
|
|
2946
2950
|
let t = J(18), { message: n, streaming: r, hideQuestionForms: i, animate: a, showAssistantActions: o } = e, s = i !== void 0 && i, c = a !== void 0 && a, l;
|
|
2947
2951
|
t[0] === n.role ? l = t[1] : (l = Ua(n.role), t[0] = n.role, t[1] = l);
|
|
2948
|
-
let u = l, d = u === "user" || u === "assistant" && o, f = c ? Qn : void 0, p;
|
|
2949
|
-
t[2] !== s || t[3] !== n || t[4] !==
|
|
2952
|
+
let u = l, d = u === "user" || u === "assistant" && o, f = c ? Qn : void 0, p = r && u === "assistant", m;
|
|
2953
|
+
t[2] !== s || t[3] !== n || t[4] !== p ? (m = /* @__PURE__ */ Y(Va, {
|
|
2950
2954
|
message: n,
|
|
2951
|
-
streaming:
|
|
2955
|
+
streaming: p,
|
|
2952
2956
|
hideQuestionForms: s
|
|
2953
|
-
}), t[2] = s, t[3] = n, t[4] =
|
|
2954
|
-
let
|
|
2955
|
-
t[6] !== u || t[7] !== n || t[8] !== d ? (
|
|
2957
|
+
}), t[2] = s, t[3] = n, t[4] = p, t[5] = m) : m = t[5];
|
|
2958
|
+
let h;
|
|
2959
|
+
t[6] !== u || t[7] !== n || t[8] !== d ? (h = d ? /* @__PURE__ */ Y(ar, {
|
|
2956
2960
|
message: n,
|
|
2957
2961
|
alwaysVisible: u === "user",
|
|
2958
2962
|
copyAlwaysVisible: u !== "user"
|
|
2959
|
-
}) : null, t[6] = u, t[7] = n, t[8] = d, t[9] =
|
|
2960
|
-
let h;
|
|
2961
|
-
t[10] !== u || t[11] !== p || t[12] !== m ? (h = /* @__PURE__ */ X(dt.Content, {
|
|
2962
|
-
from: u,
|
|
2963
|
-
children: [p, m]
|
|
2964
|
-
}), t[10] = u, t[11] = p, t[12] = m, t[13] = h) : h = t[13];
|
|
2963
|
+
}) : null, t[6] = u, t[7] = n, t[8] = d, t[9] = h) : h = t[9];
|
|
2965
2964
|
let g;
|
|
2966
|
-
|
|
2965
|
+
t[10] !== u || t[11] !== m || t[12] !== h ? (g = /* @__PURE__ */ X(dt.Content, {
|
|
2966
|
+
from: u,
|
|
2967
|
+
children: [m, h]
|
|
2968
|
+
}), t[10] = u, t[11] = m, t[12] = h, t[13] = g) : g = t[13];
|
|
2969
|
+
let _;
|
|
2970
|
+
return t[14] !== u || t[15] !== f || t[16] !== g ? (_ = /* @__PURE__ */ Y(dt.Root, {
|
|
2967
2971
|
from: u,
|
|
2968
2972
|
...f,
|
|
2969
|
-
children:
|
|
2970
|
-
}), t[14] = u, t[15] = f, t[16] =
|
|
2973
|
+
children: g
|
|
2974
|
+
}), t[14] = u, t[15] = f, t[16] = g, t[17] = _) : _ = t[17], _;
|
|
2971
2975
|
}, eo = (e) => {
|
|
2972
2976
|
let t = J(6), { message: n, streaming: r, hideQuestionForms: i, animate: a, showAssistantActions: o } = e, s;
|
|
2973
2977
|
return t[0] !== a || t[1] !== i || t[2] !== n || t[3] !== o || t[4] !== r ? (s = /* @__PURE__ */ Y(A, { children: /* @__PURE__ */ Y($a, {
|
|
@@ -3017,41 +3021,24 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3017
3021
|
}, so = (e, t) => {
|
|
3018
3022
|
let n = Math.max(0, e.scrollHeight - e.clientHeight);
|
|
3019
3023
|
return t === 0 || n <= io ? !1 : t < 0 ? e.scrollTop > io : e.scrollTop < n - io;
|
|
3020
|
-
}, co =
|
|
3021
|
-
let n = Za(e);
|
|
3022
|
-
return [...e.map((e) => ({
|
|
3023
|
-
type: "leading-response",
|
|
3024
|
-
key: e.id,
|
|
3025
|
-
message: e,
|
|
3026
|
-
showAssistantActions: e.id === n
|
|
3027
|
-
})), ...t.map((e, t) => ({
|
|
3028
|
-
type: "group",
|
|
3029
|
-
key: e.userMessage.id,
|
|
3030
|
-
group: e,
|
|
3031
|
-
groupIndex: t
|
|
3032
|
-
}))];
|
|
3033
|
-
}, _o = (e, t) => {
|
|
3034
|
-
if (e === 0) return 0;
|
|
3035
|
-
let n = e * co + (e - 1) * ho;
|
|
3036
|
-
return Math.max(n - t, 0);
|
|
3037
|
-
}, vo = (e) => e?.clientHeight || lo, yo = (e, t) => Math.abs(e.scrollTop - t.scrollTop) <= po && Math.abs(e.totalSize - t.totalSize) <= po, bo = (e, t) => !!e && Math.max(e.scrollHeight, t) <= e.clientHeight, xo = (e, t) => ({
|
|
3024
|
+
}, co = 3, lo = 20, uo = 1, fo = (e, t) => Math.abs(e.scrollTop - t.scrollTop) <= uo && Math.abs(e.totalSize - t.totalSize) <= uo, po = (e, t) => !!e && Math.max(e.scrollHeight, t) <= e.clientHeight, mo = (e, t) => ({
|
|
3038
3025
|
scrollTop: e?.scrollTop ?? 0,
|
|
3039
3026
|
totalSize: t
|
|
3040
|
-
}),
|
|
3027
|
+
}), ho = (e) => {
|
|
3041
3028
|
let t = J(8), { itemCount: n, onReady: r, scrollRef: i, totalSize: a } = e, o = ye(r), s, c;
|
|
3042
3029
|
t[0] === r ? (s = t[1], c = t[2]) : (s = () => {
|
|
3043
3030
|
o.current = r;
|
|
3044
3031
|
}, c = [r], t[0] = r, t[1] = s, t[2] = c), Z(s, c);
|
|
3045
3032
|
let l, u;
|
|
3046
3033
|
t[3] !== n || t[4] !== i || t[5] !== a ? (l = () => {
|
|
3047
|
-
if (n === 0 || typeof requestAnimationFrame > "u" ||
|
|
3034
|
+
if (n === 0 || typeof requestAnimationFrame > "u" || po(i.current, a)) {
|
|
3048
3035
|
o.current?.();
|
|
3049
3036
|
return;
|
|
3050
3037
|
}
|
|
3051
3038
|
let e = 0, t = 0, r = 0, s = null, c = () => {
|
|
3052
3039
|
t += 1;
|
|
3053
|
-
let n =
|
|
3054
|
-
if (r = s &&
|
|
3040
|
+
let n = mo(i.current, a);
|
|
3041
|
+
if (r = s && fo(n, s) ? r + 1 : 0, s = n, r >= co || t >= lo) {
|
|
3055
3042
|
o.current?.();
|
|
3056
3043
|
return;
|
|
3057
3044
|
}
|
|
@@ -3063,7 +3050,24 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3063
3050
|
i,
|
|
3064
3051
|
a
|
|
3065
3052
|
], t[3] = n, t[4] = i, t[5] = a, t[6] = l, t[7] = u) : (l = t[6], u = t[7]), ve(l, u);
|
|
3066
|
-
},
|
|
3053
|
+
}, go = 720, _o = 1, vo = 4, yo = 8, bo = (e, t) => {
|
|
3054
|
+
let n = Za(e);
|
|
3055
|
+
return [...e.map((e) => ({
|
|
3056
|
+
type: "leading-response",
|
|
3057
|
+
key: e.id,
|
|
3058
|
+
message: e,
|
|
3059
|
+
showAssistantActions: e.id === n
|
|
3060
|
+
})), ...t.map((e, t) => ({
|
|
3061
|
+
type: "group",
|
|
3062
|
+
key: e.userMessage.id,
|
|
3063
|
+
group: e,
|
|
3064
|
+
groupIndex: t
|
|
3065
|
+
}))];
|
|
3066
|
+
}, xo = (e, t) => {
|
|
3067
|
+
if (e === 0) return 0;
|
|
3068
|
+
let n = e * go + (e - 1) * yo;
|
|
3069
|
+
return Math.max(n - t, 0);
|
|
3070
|
+
}, So = (e) => e?.clientHeight || _o, Co = (e) => {
|
|
3067
3071
|
so(e.currentTarget, e.deltaY) && e.stopPropagation();
|
|
3068
3072
|
}, wo = (e, t) => {
|
|
3069
3073
|
if (e) return t ? ro : no;
|
|
@@ -3072,7 +3076,7 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3072
3076
|
}, Eo = (e, t) => {
|
|
3073
3077
|
if (e) return t ? "expanded" : "collapsed";
|
|
3074
3078
|
}, Do = (e) => {
|
|
3075
|
-
let t = J(
|
|
3079
|
+
let t = J(84), { group: n, streaming: r, hideQuestionForms: i, isExpanded: a, animate: o, onToggleStickyMessage: s } = e, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O;
|
|
3076
3080
|
if (t[0] !== o || t[1] !== n.responses || t[2] !== n.userMessage || t[3] !== a || t[4] !== s) {
|
|
3077
3081
|
m = oo(n.userMessage), h = m && a;
|
|
3078
3082
|
let e = wo(m, a), r;
|
|
@@ -3083,12 +3087,9 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3083
3087
|
let k;
|
|
3084
3088
|
t[31] === h ? k = t[32] : (k = To(h), t[31] = h, t[32] = k);
|
|
3085
3089
|
let j = h ? "auto" : "visible", M = m ? "xs" : void 0, N = m ? "xs" : void 0, P = h ? "3rem" : void 0, F = h ? Co : void 0, I;
|
|
3086
|
-
t[33]
|
|
3087
|
-
message: n.userMessage,
|
|
3088
|
-
streaming: r
|
|
3089
|
-
}), t[33] = n.userMessage, t[34] = r, t[35] = I) : I = t[35];
|
|
3090
|
+
t[33] === n.userMessage ? I = t[34] : (I = /* @__PURE__ */ Y(Va, { message: n.userMessage }), t[33] = n.userMessage, t[34] = I);
|
|
3090
3091
|
let L;
|
|
3091
|
-
t[
|
|
3092
|
+
t[35] !== c || t[36] !== g || t[37] !== k || t[38] !== j || t[39] !== M || t[40] !== N || t[41] !== P || t[42] !== F || t[43] !== I ? (L = /* @__PURE__ */ Y(c, {
|
|
3092
3093
|
"data-sticky-user-message-content": g,
|
|
3093
3094
|
display: "flex",
|
|
3094
3095
|
flexDirection: "column",
|
|
@@ -3101,9 +3102,9 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3101
3102
|
pb: P,
|
|
3102
3103
|
onWheel: F,
|
|
3103
3104
|
children: I
|
|
3104
|
-
}), t[
|
|
3105
|
+
}), t[35] = c, t[36] = g, t[37] = k, t[38] = j, t[39] = M, t[40] = N, t[41] = P, t[42] = F, t[43] = I, t[44] = L) : L = t[44];
|
|
3105
3106
|
let R;
|
|
3106
|
-
t[
|
|
3107
|
+
t[45] !== n.userMessage || t[46] !== m || t[47] !== a || t[48] !== O ? (R = m ? /* @__PURE__ */ Y(to, {
|
|
3107
3108
|
label: a ? "Show less" : "Show more",
|
|
3108
3109
|
onClick: O,
|
|
3109
3110
|
actionPanel: /* @__PURE__ */ Y(ar, {
|
|
@@ -3115,80 +3116,80 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3115
3116
|
message: n.userMessage,
|
|
3116
3117
|
alwaysVisible: !0,
|
|
3117
3118
|
copyAlwaysVisible: !1
|
|
3118
|
-
}), t[
|
|
3119
|
+
}), t[45] = n.userMessage, t[46] = m, t[47] = a, t[48] = O, t[49] = R) : R = t[49];
|
|
3119
3120
|
let z;
|
|
3120
|
-
t[
|
|
3121
|
+
t[50] !== l || t[51] !== _ || t[52] !== L || t[53] !== b || t[54] !== R || t[55] !== x || t[56] !== S || t[57] !== C ? (z = /* @__PURE__ */ X(l, {
|
|
3121
3122
|
from: _,
|
|
3122
3123
|
maxH: b,
|
|
3123
3124
|
overflow: x,
|
|
3124
3125
|
p: S,
|
|
3125
3126
|
position: C,
|
|
3126
3127
|
children: [L, R]
|
|
3127
|
-
}), t[
|
|
3128
|
+
}), t[50] = l, t[51] = _, t[52] = L, t[53] = b, t[54] = R, t[55] = x, t[56] = S, t[57] = C, t[58] = z) : z = t[58];
|
|
3128
3129
|
let B;
|
|
3129
|
-
t[
|
|
3130
|
+
t[59] !== u || t[60] !== z || t[61] !== w || t[62] !== T || t[63] !== E ? (B = /* @__PURE__ */ Y(u, {
|
|
3130
3131
|
from: w,
|
|
3131
3132
|
delivery: T,
|
|
3132
3133
|
...E,
|
|
3133
3134
|
children: z
|
|
3134
|
-
}), t[
|
|
3135
|
+
}), t[59] = u, t[60] = z, t[61] = w, t[62] = T, t[63] = E, t[64] = B) : B = t[64];
|
|
3135
3136
|
let V;
|
|
3136
|
-
t[
|
|
3137
|
+
t[65] !== d || t[66] !== v || t[67] !== y || t[68] !== B || t[69] !== D ? (V = /* @__PURE__ */ Y(d, {
|
|
3137
3138
|
position: D,
|
|
3138
3139
|
top: v,
|
|
3139
3140
|
zIndex: y,
|
|
3140
3141
|
children: B
|
|
3141
|
-
}), t[
|
|
3142
|
+
}), t[65] = d, t[66] = v, t[67] = y, t[68] = B, t[69] = D, t[70] = V) : V = t[70];
|
|
3142
3143
|
let H;
|
|
3143
|
-
if (t[
|
|
3144
|
+
if (t[71] !== p || t[72] !== n.responses || t[73] !== i || t[74] !== r) {
|
|
3144
3145
|
let e;
|
|
3145
|
-
t[
|
|
3146
|
+
t[76] !== p || t[77] !== i || t[78] !== r ? (e = (e) => /* @__PURE__ */ Y(eo, {
|
|
3146
3147
|
message: e,
|
|
3147
|
-
streaming: r,
|
|
3148
|
+
streaming: r && e.id === p,
|
|
3148
3149
|
hideQuestionForms: i,
|
|
3149
3150
|
showAssistantActions: e.id === p
|
|
3150
|
-
}, e.id), t[
|
|
3151
|
-
} else H = t[
|
|
3151
|
+
}, e.id), t[76] = p, t[77] = i, t[78] = r, t[79] = e) : e = t[79], H = n.responses.map(e), t[71] = p, t[72] = n.responses, t[73] = i, t[74] = r, t[75] = H;
|
|
3152
|
+
} else H = t[75];
|
|
3152
3153
|
let U;
|
|
3153
|
-
return t[
|
|
3154
|
+
return t[80] !== f || t[81] !== V || t[82] !== H ? (U = /* @__PURE__ */ X(f, { children: [V, H] }), t[80] = f, t[81] = V, t[82] = H, t[83] = U) : U = t[83], U;
|
|
3154
3155
|
}, Oo = (e) => {
|
|
3155
3156
|
let t = J(16), { item: n, groupCount: r, streaming: i, hideActiveQuestionForms: a, expandedStickyMessageIds: o, animate: s, onToggleStickyMessage: c } = e;
|
|
3156
3157
|
if (n.type === "leading-response") {
|
|
3157
|
-
let e = r > 0 || a,
|
|
3158
|
-
return t[0] !== s || t[1] !== n.message || t[2] !== n.showAssistantActions || t[3] !==
|
|
3158
|
+
let e = i && r === 0 && n.showAssistantActions, o = r > 0 || a, c;
|
|
3159
|
+
return t[0] !== s || t[1] !== n.message || t[2] !== n.showAssistantActions || t[3] !== e || t[4] !== o ? (c = /* @__PURE__ */ Y($a, {
|
|
3159
3160
|
message: n.message,
|
|
3160
|
-
streaming:
|
|
3161
|
-
hideQuestionForms:
|
|
3161
|
+
streaming: e,
|
|
3162
|
+
hideQuestionForms: o,
|
|
3162
3163
|
animate: s,
|
|
3163
3164
|
showAssistantActions: n.showAssistantActions
|
|
3164
|
-
}), t[0] = s, t[1] = n.message, t[2] = n.showAssistantActions, t[3] =
|
|
3165
|
+
}), t[0] = s, t[1] = n.message, t[2] = n.showAssistantActions, t[3] = e, t[4] = o, t[5] = c) : c = t[5], c;
|
|
3165
3166
|
}
|
|
3166
|
-
let l = n.group, u = n.groupIndex < r - 1 || a,
|
|
3167
|
-
t[6] !== o || t[7] !== n.group.userMessage.id ? (
|
|
3168
|
-
let
|
|
3169
|
-
return t[9] !== s || t[10] !== n.group || t[11] !== c || t[12] !==
|
|
3167
|
+
let l = n.group, u = i && n.groupIndex === r - 1, d = n.groupIndex < r - 1 || a, f;
|
|
3168
|
+
t[6] !== o || t[7] !== n.group.userMessage.id ? (f = o.has(n.group.userMessage.id), t[6] = o, t[7] = n.group.userMessage.id, t[8] = f) : f = t[8];
|
|
3169
|
+
let p;
|
|
3170
|
+
return t[9] !== s || t[10] !== n.group || t[11] !== c || t[12] !== u || t[13] !== d || t[14] !== f ? (p = /* @__PURE__ */ Y(Do, {
|
|
3170
3171
|
group: l,
|
|
3171
|
-
streaming:
|
|
3172
|
-
hideQuestionForms:
|
|
3173
|
-
isExpanded:
|
|
3172
|
+
streaming: u,
|
|
3173
|
+
hideQuestionForms: d,
|
|
3174
|
+
isExpanded: f,
|
|
3174
3175
|
animate: s,
|
|
3175
3176
|
onToggleStickyMessage: c
|
|
3176
|
-
}), t[9] = s, t[10] = n.group, t[11] = c, t[12] =
|
|
3177
|
+
}), t[9] = s, t[10] = n.group, t[11] = c, t[12] = u, t[13] = d, t[14] = f, t[15] = p) : p = t[15], p;
|
|
3177
3178
|
}, ko = (e) => {
|
|
3178
|
-
let { leadingResponses: t, groups: n, streaming: r, hideActiveQuestionForms: i, expandedStickyMessageIds: o, onToggleStickyMessage: s, onReady: c } = e, { scrollRef: l } = rt(), u =
|
|
3179
|
+
let { leadingResponses: t, groups: n, streaming: r, hideActiveQuestionForms: i, expandedStickyMessageIds: o, onToggleStickyMessage: s, onReady: c } = e, { scrollRef: l } = rt(), u = bo(t, n), d = tr(u.map((e) => e.key)), f = So(l.current), p = a({
|
|
3179
3180
|
count: u.length,
|
|
3180
3181
|
getScrollElement: () => l.current,
|
|
3181
|
-
estimateSize: () =>
|
|
3182
|
+
estimateSize: () => go,
|
|
3182
3183
|
getItemKey: (e) => u[e]?.key ?? e,
|
|
3183
|
-
overscan:
|
|
3184
|
-
gap:
|
|
3184
|
+
overscan: vo,
|
|
3185
|
+
gap: yo,
|
|
3185
3186
|
initialRect: {
|
|
3186
3187
|
width: 0,
|
|
3187
3188
|
height: f
|
|
3188
3189
|
},
|
|
3189
|
-
initialOffset: () =>
|
|
3190
|
+
initialOffset: () => xo(u.length, f)
|
|
3190
3191
|
}), m = p.getTotalSize();
|
|
3191
|
-
return
|
|
3192
|
+
return ho({
|
|
3192
3193
|
itemCount: u.length,
|
|
3193
3194
|
onReady: c,
|
|
3194
3195
|
scrollRef: l,
|
|
@@ -3423,7 +3424,7 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3423
3424
|
}, Po = (e) => {
|
|
3424
3425
|
let { item: t, index: n, kind: r } = e, i = $e({
|
|
3425
3426
|
id: `${t.id}:${r}`,
|
|
3426
|
-
disabled: !!t.steeringDelivery,
|
|
3427
|
+
disabled: !!(t.sending || t.steeringDelivery),
|
|
3427
3428
|
data: {
|
|
3428
3429
|
item: t,
|
|
3429
3430
|
kind: r,
|
|
@@ -3477,50 +3478,51 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3477
3478
|
})
|
|
3478
3479
|
}) : null;
|
|
3479
3480
|
}, Io = (e) => {
|
|
3480
|
-
let { item: t, index: n, editor: r, source: i, destination: a, unavailableReason: o, editing: c, onEdit: l, onRemove: u } = e, d = Qe({
|
|
3481
|
+
let { item: t, index: n, editor: r, source: i, destination: a, unavailableReason: o, editing: c, onEdit: l, onRemove: u } = e, d = !!(t.sending || t.steeringDelivery), f = Qe({
|
|
3481
3482
|
id: t.id,
|
|
3482
3483
|
data: { item: t },
|
|
3483
|
-
disabled:
|
|
3484
|
-
}),
|
|
3485
|
-
Z(() => () => clearTimeout(
|
|
3486
|
-
c &&
|
|
3484
|
+
disabled: d
|
|
3485
|
+
}), m = de({ recipe: p })(), [h, g] = Q(!1), [_, v] = Q(!1), y = ye(void 0), b = ye(null);
|
|
3486
|
+
Z(() => () => clearTimeout(y.current), []), Z(() => {
|
|
3487
|
+
c && b.current?.scrollIntoView({ block: "nearest" });
|
|
3487
3488
|
}, [c]);
|
|
3488
|
-
let
|
|
3489
|
-
clearTimeout(
|
|
3490
|
-
},
|
|
3489
|
+
let x = () => {
|
|
3490
|
+
clearTimeout(y.current), g(!0);
|
|
3491
|
+
}, S = !r;
|
|
3491
3492
|
return /* @__PURE__ */ X(A, {
|
|
3492
3493
|
className: "group",
|
|
3493
3494
|
ref: (e) => {
|
|
3494
|
-
|
|
3495
|
+
f.setNodeRef(e), b.current = e;
|
|
3495
3496
|
},
|
|
3496
|
-
css:
|
|
3497
|
+
css: m.row,
|
|
3497
3498
|
"data-drag-source": i,
|
|
3498
3499
|
"data-combine-target": a === "combine" && !o,
|
|
3499
3500
|
"data-queued-follow-up-id": t.id,
|
|
3500
|
-
|
|
3501
|
+
"aria-busy": t.sending || void 0,
|
|
3502
|
+
onPointerEnter: x,
|
|
3501
3503
|
onPointerLeave: () => {
|
|
3502
|
-
|
|
3504
|
+
y.current = setTimeout(() => g(!1), 150);
|
|
3503
3505
|
},
|
|
3504
3506
|
onPointerDown: (e) => {
|
|
3505
|
-
e.pointerType === "touch" &&
|
|
3507
|
+
e.pointerType === "touch" && x();
|
|
3506
3508
|
},
|
|
3507
|
-
onFocusCapture: () =>
|
|
3509
|
+
onFocusCapture: () => v(!0),
|
|
3508
3510
|
onBlurCapture: (e) => {
|
|
3509
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
3511
|
+
e.currentTarget.contains(e.relatedTarget) || v(!1);
|
|
3510
3512
|
},
|
|
3511
3513
|
onClick: (e) => {
|
|
3512
|
-
|
|
3514
|
+
!t.sending && S && !e.target.closest("button") && l?.(t);
|
|
3513
3515
|
},
|
|
3514
3516
|
children: [
|
|
3515
3517
|
/* @__PURE__ */ Y(R, {
|
|
3516
|
-
ref:
|
|
3517
|
-
...
|
|
3518
|
-
...
|
|
3518
|
+
ref: f.setActivatorNodeRef,
|
|
3519
|
+
...f.listeners,
|
|
3520
|
+
...f.attributes,
|
|
3519
3521
|
"aria-label": `Drag queued follow-up ${n + 1}`,
|
|
3520
3522
|
size: "2xs",
|
|
3521
3523
|
variant: "ghost",
|
|
3522
|
-
css:
|
|
3523
|
-
disabled:
|
|
3524
|
+
css: m.handle,
|
|
3525
|
+
disabled: d,
|
|
3524
3526
|
onClick: (e) => e.stopPropagation(),
|
|
3525
3527
|
children: /* @__PURE__ */ Y(Ie, { size: 14 })
|
|
3526
3528
|
}),
|
|
@@ -3530,9 +3532,10 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3530
3532
|
gap: "2xs",
|
|
3531
3533
|
children: [r ?? /* @__PURE__ */ Y(A, {
|
|
3532
3534
|
asChild: !0,
|
|
3533
|
-
css:
|
|
3535
|
+
css: m.content,
|
|
3534
3536
|
children: /* @__PURE__ */ X("button", {
|
|
3535
3537
|
type: "button",
|
|
3538
|
+
disabled: t.sending,
|
|
3536
3539
|
"aria-label": `Edit queued message: ${t.prompt}`,
|
|
3537
3540
|
onClick: () => l?.(t),
|
|
3538
3541
|
children: [/* @__PURE__ */ Y(K, {
|
|
@@ -3543,6 +3546,7 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3543
3546
|
textStyle: "label/XS",
|
|
3544
3547
|
lineClamp: 1,
|
|
3545
3548
|
children: a === "combine" ? o ?? "Release to combine" : [
|
|
3549
|
+
t.sending ? "Sending…" : null,
|
|
3546
3550
|
t.model,
|
|
3547
3551
|
...Object.values(t.params ?? {}).map(String),
|
|
3548
3552
|
...t.attachments?.map((e) => e.name) ?? []
|
|
@@ -3550,13 +3554,13 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3550
3554
|
})]
|
|
3551
3555
|
})
|
|
3552
3556
|
}), t.steeringDelivery ? /* @__PURE__ */ Y(K, {
|
|
3553
|
-
css:
|
|
3557
|
+
css: m.notice,
|
|
3554
3558
|
children: "Delivery is unconfirmed. Saved input is kept and will not be replayed."
|
|
3555
3559
|
}) : null]
|
|
3556
3560
|
}),
|
|
3557
|
-
u && !r && !
|
|
3558
|
-
css:
|
|
3559
|
-
"data-visible":
|
|
3561
|
+
u && !r && !d ? /* @__PURE__ */ Y(I, {
|
|
3562
|
+
css: m.actions,
|
|
3563
|
+
"data-visible": h || _ || c,
|
|
3560
3564
|
children: /* @__PURE__ */ Y(R, {
|
|
3561
3565
|
"aria-label": "Remove queued follow-up",
|
|
3562
3566
|
size: "2xs",
|
|
@@ -3726,7 +3730,7 @@ var Ua = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
3726
3730
|
}), t[5] = o.row, t[6] = s, t[7] = c) : c = t[7], c;
|
|
3727
3731
|
};
|
|
3728
3732
|
function Vo(e) {
|
|
3729
|
-
return !e.steeringDelivery;
|
|
3733
|
+
return !e.sending && !e.steeringDelivery;
|
|
3730
3734
|
}
|
|
3731
3735
|
//#endregion
|
|
3732
3736
|
//#region src/components/chat-ui/components/chat-panel-composer.tsx
|
|
@@ -3825,7 +3829,7 @@ var Ho = (e) => {
|
|
|
3825
3829
|
})]
|
|
3826
3830
|
}), t[6] = f, t[7] = p), p;
|
|
3827
3831
|
}, Go = (e) => {
|
|
3828
|
-
let t = J(110), { conversationKey: n, linkHandler: r, messages: i, loading: a, streaming: o, streamingStartedAt: s, emptyStateTitle: l, emptyStateDescription: u, emptyStateContent: d, loaderComponent: f, chatInputPlaceholder: p, chatInputDefaultValue:
|
|
3832
|
+
let t = J(110), { conversationKey: n, linkHandler: r, messages: i, loading: a, streaming: o, streamingStartedAt: s, emptyStateTitle: l, emptyStateDescription: u, emptyStateContent: d, loaderComponent: f, chatInputPlaceholder: p, chatInputDefaultValue: h, onSubmitMessage: g, onInterrupt: _, onAttachFiles: b, onAttachText: x, onChatInputChange: S, actions: C, attachmentActions: w, composerHeader: T, attachedResources: E, onClearAttachments: D, attachmentList: O, approvalPrompt: k, conversationNotices: A, workspaceHub: j, workspaceInitializing: M, inputDisabled: N, submitDisabled: P, chatInputQuestionPrompt: I, composerDecision: L, chatInputAutoFocus: R, queuedFollowUps: z, onQueuedFollowUpUpdate: B, onQueuedFollowUpCreate: V, onQueuedFollowUpRestoreDraft: H, canRestoreQueuedEditToDraft: U, onQueuedFollowUpSelect: ee, onQueuedFollowUpDiscard: te, onQueuedFollowUpSteer: ne, onQueuedFollowUpCombine: re, queueSteeringUnavailableReason: W, unsavedQueueItemIds: G, onQueuedFollowUpRemove: ie, onQueuedFollowUpMove: K, chatInputCommands: ae } = e, oe = a !== void 0 && a, q = o !== void 0 && o, se = h === void 0 ? "" : h, ce = M !== void 0 && M, le = N !== void 0 && N, ue = P !== void 0 && P, de = R !== void 0 && R, pe;
|
|
3829
3833
|
t[0] === z ? pe = t[1] : (pe = z === void 0 ? [] : z, t[0] = z, t[1] = pe);
|
|
3830
3834
|
let me = pe, he;
|
|
3831
3835
|
t[2] === ae ? he = t[3] : (he = ae === void 0 ? [] : ae, t[2] = ae, t[3] = he);
|
|
@@ -3848,11 +3852,11 @@ var Ho = (e) => {
|
|
|
3848
3852
|
let Ae = De ? f : d ?? ke, je = !!j, Me = bn(i, n ?? i[0]?.id), Ne;
|
|
3849
3853
|
t[16] !== I || t[17] !== i || t[18] !== Me.prompt ? (Ne = Me.prompt ?? I ?? gn(i), t[16] = I, t[17] = i, t[18] = Me.prompt, t[19] = Ne) : Ne = t[19];
|
|
3850
3854
|
let Pe = Ne, Fe = !!Pe, Ie = q && _e && !ce && !Pe, Le = !Z || Te === Z, Re;
|
|
3851
|
-
t[20] !== U || t[21] !== se || t[22] !== le || t[23] !== S || t[24] !== V || t[25] !== te || t[26] !== H || t[27] !== ee || t[28] !== B || t[29] !==
|
|
3855
|
+
t[20] !== U || t[21] !== se || t[22] !== le || t[23] !== S || t[24] !== V || t[25] !== te || t[26] !== H || t[27] !== ee || t[28] !== B || t[29] !== g || t[30] !== me ? (Re = {
|
|
3852
3856
|
queuedFollowUps: me,
|
|
3853
3857
|
defaultValue: se,
|
|
3854
3858
|
onChange: S,
|
|
3855
|
-
onSubmit:
|
|
3859
|
+
onSubmit: g,
|
|
3856
3860
|
onUpdate: B,
|
|
3857
3861
|
onCreate: V,
|
|
3858
3862
|
onRestoreDraft: H,
|
|
@@ -3860,7 +3864,7 @@ var Ho = (e) => {
|
|
|
3860
3864
|
disabled: le,
|
|
3861
3865
|
onSelect: ee,
|
|
3862
3866
|
onDiscard: te
|
|
3863
|
-
}, t[20] = U, t[21] = se, t[22] = le, t[23] = S, t[24] = V, t[25] = te, t[26] = H, t[27] = ee, t[28] = B, t[29] =
|
|
3867
|
+
}, t[20] = U, t[21] = se, t[22] = le, t[23] = S, t[24] = V, t[25] = te, t[26] = H, t[27] = ee, t[28] = B, t[29] = g, t[30] = me, t[31] = Re) : Re = t[31];
|
|
3864
3868
|
let Be = Ao(Re), Ve;
|
|
3865
3869
|
t[32] === Symbol.for("react.memo_cache_sentinel") ? (Ve = (e) => {
|
|
3866
3870
|
we((t) => {
|
|
@@ -3869,7 +3873,7 @@ var Ho = (e) => {
|
|
|
3869
3873
|
});
|
|
3870
3874
|
}, t[32] = Ve) : Ve = t[32];
|
|
3871
3875
|
let He = Ve, Ue;
|
|
3872
|
-
t[33] !== r || t[34] !== i ? (Ue =
|
|
3876
|
+
t[33] !== r || t[34] !== i ? (Ue = y(i, r), t[33] = r, t[34] = i, t[35] = Ue) : Ue = t[35];
|
|
3873
3877
|
let We = Me.value, Ge = ve ?? null, Ke;
|
|
3874
3878
|
t[36] !== Ge || t[37] !== be ? (Ke = /* @__PURE__ */ Y(bt, {
|
|
3875
3879
|
conversationKey: Ge,
|
|
@@ -3906,7 +3910,7 @@ var Ho = (e) => {
|
|
|
3906
3910
|
let $e = n ?? i[0]?.id, et;
|
|
3907
3911
|
t[63] === i ? et = t[64] : (et = Hn(i), t[63] = i, t[64] = et);
|
|
3908
3912
|
let tt = Me.prompt ? void 0 : L, nt;
|
|
3909
|
-
t[65] !== C || t[66] !== Pe || t[67] !== E || t[68] !== w || t[69] !== O || t[70] !== de || t[71] !== ge || t[72] !== p || t[73] !== T || t[74] !== je || t[75] !== le || t[76] !== b || t[77] !== x || t[78] !== D || t[79] !==
|
|
3913
|
+
t[65] !== C || t[66] !== Pe || t[67] !== E || t[68] !== w || t[69] !== O || t[70] !== de || t[71] !== ge || t[72] !== p || t[73] !== T || t[74] !== je || t[75] !== le || t[76] !== b || t[77] !== x || t[78] !== D || t[79] !== _ || t[80] !== re || t[81] !== K || t[82] !== ie || t[83] !== ne || t[84] !== B || t[85] !== W || t[86] !== Be || t[87] !== me || t[88] !== q || t[89] !== ue || t[90] !== $e || t[91] !== et || t[92] !== tt || t[93] !== G || t[94] !== j ? (nt = /* @__PURE__ */ Y(Ho, {
|
|
3910
3914
|
conversationKey: $e,
|
|
3911
3915
|
recentUserMessages: et,
|
|
3912
3916
|
actions: C,
|
|
@@ -3925,7 +3929,7 @@ var Ho = (e) => {
|
|
|
3925
3929
|
onAttachFiles: b,
|
|
3926
3930
|
onAttachText: x,
|
|
3927
3931
|
onClearAttachments: D,
|
|
3928
|
-
onInterrupt:
|
|
3932
|
+
onInterrupt: _,
|
|
3929
3933
|
onQueuedFollowUpMove: K,
|
|
3930
3934
|
onQueuedFollowUpRemove: ie,
|
|
3931
3935
|
onQueuedFollowUpUpdate: B,
|
|
@@ -3937,7 +3941,7 @@ var Ho = (e) => {
|
|
|
3937
3941
|
queuedFollowUps: me,
|
|
3938
3942
|
streaming: q,
|
|
3939
3943
|
workspaceHub: j
|
|
3940
|
-
}), t[65] = C, t[66] = Pe, t[67] = E, t[68] = w, t[69] = O, t[70] = de, t[71] = ge, t[72] = p, t[73] = T, t[74] = je, t[75] = le, t[76] = b, t[77] = x, t[78] = D, t[79] =
|
|
3944
|
+
}), t[65] = C, t[66] = Pe, t[67] = E, t[68] = w, t[69] = O, t[70] = de, t[71] = ge, t[72] = p, t[73] = T, t[74] = je, t[75] = le, t[76] = b, t[77] = x, t[78] = D, t[79] = _, t[80] = re, t[81] = K, t[82] = ie, t[83] = ne, t[84] = B, t[85] = W, t[86] = Be, t[87] = me, t[88] = q, t[89] = ue, t[90] = $e, t[91] = et, t[92] = tt, t[93] = G, t[94] = j, t[95] = nt) : nt = t[95];
|
|
3941
3945
|
let rt;
|
|
3942
3946
|
t[96] !== k || t[97] !== Ze || t[98] !== Qe || t[99] !== nt ? (rt = /* @__PURE__ */ X(F, {
|
|
3943
3947
|
position: "relative",
|
|
@@ -3958,12 +3962,12 @@ var Ho = (e) => {
|
|
|
3958
3962
|
children: rt
|
|
3959
3963
|
}), t[101] = Me.value, t[102] = rt, t[103] = it) : it = t[103];
|
|
3960
3964
|
let at;
|
|
3961
|
-
t[104] !== r || t[105] !== it ? (at = /* @__PURE__ */ Y(
|
|
3965
|
+
t[104] !== r || t[105] !== it ? (at = /* @__PURE__ */ Y(m, {
|
|
3962
3966
|
handler: r,
|
|
3963
3967
|
children: it
|
|
3964
3968
|
}), t[104] = r, t[105] = it, t[106] = at) : at = t[106];
|
|
3965
3969
|
let ot;
|
|
3966
|
-
return t[107] !== Ue || t[108] !== at ? (ot = /* @__PURE__ */ Y(
|
|
3970
|
+
return t[107] !== Ue || t[108] !== at ? (ot = /* @__PURE__ */ Y(v, {
|
|
3967
3971
|
value: Ue,
|
|
3968
3972
|
children: at
|
|
3969
3973
|
}), t[107] = Ue, t[108] = at, t[109] = ot) : ot = t[109], ot;
|
|
@@ -4429,6 +4433,6 @@ var Zo = 3, Qo = 10, $o = 4, es = (e, t) => {
|
|
|
4429
4433
|
}), t[10] = u, t[11] = d, t[12] = f) : f = t[12], f;
|
|
4430
4434
|
};
|
|
4431
4435
|
//#endregion
|
|
4432
|
-
export { pt as ApprovalPrompt, gt as AttachmentList, bt as AutoScroll, Zn as ChatInput, dt as ChatMessage, Go as ChatPanel, st as ChatPrimitives, Yo as ChatSkeleton, cs as ChatWorkspaceHub, rs as ConversationBrowse, os as HarnessControls, Dt as SendButton, xt as createSerializedPromptState,
|
|
4436
|
+
export { pt as ApprovalPrompt, gt as AttachmentList, bt as AutoScroll, Zn as ChatInput, dt as ChatMessage, Go as ChatPanel, st as ChatPrimitives, Yo as ChatSkeleton, cs as ChatWorkspaceHub, rs as ConversationBrowse, os as HarnessControls, Dt as SendButton, xt as createSerializedPromptState, _ as parseChatLink };
|
|
4433
4437
|
|
|
4434
4438
|
//# sourceMappingURL=chat-ui.js.map
|