@pstdio/ui 0.45.0-nightly.20261021143541 → 0.45.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/{EquationComponent-DDd5UoIP.js → EquationComponent-BtOgXA3g.js} +3 -5
- package/dist/{EquationComponent-DDd5UoIP.js.map → EquationComponent-BtOgXA3g.js.map} +1 -1
- package/dist/{MermaidComponent-vdQK_rlu.js → MermaidComponent--W7gDFCk.js} +4 -5
- package/dist/{MermaidComponent-vdQK_rlu.js.map → MermaidComponent--W7gDFCk.js.map} +1 -1
- package/dist/{activity-timeline-DOMBQZfl.js → activity-timeline-D-IDENMg.js} +2 -3
- package/dist/{activity-timeline-DOMBQZfl.js.map → activity-timeline-D-IDENMg.js.map} +1 -1
- package/dist/{apply-theme-preference-B0vCu8zY.d.ts → apply-theme-preference-Wdm8bz5f.d.ts} +0 -2
- package/dist/{browser-storage-C_ipoNwP.js → browser-storage-CIj_9R9x.js} +2 -3
- package/dist/{browser-storage-C_ipoNwP.js.map → browser-storage-CIj_9R9x.js.map} +1 -1
- package/dist/chat-ui.d.ts +12 -50
- package/dist/chat-ui.js +51 -111
- package/dist/chat-ui.js.map +1 -1
- package/dist/{collection-view-fields-tMtZmuhS.d.ts → collection-view-fields-CBlYAPxD.d.ts} +1 -9
- package/dist/{collection-view-grouping-BQMfKdQG.js → collection-view-grouping-BHuFPVAV.js} +3 -4
- package/dist/{collection-view-grouping-BQMfKdQG.js.map → collection-view-grouping-BHuFPVAV.js.map} +1 -1
- package/dist/{collection-view-search-DS9U9WAl.js → collection-view-search-CLvyY0cg.js} +21 -35
- package/dist/{collection-view-search-DS9U9WAl.js.map → collection-view-search-CLvyY0cg.js.map} +1 -1
- package/dist/collection-view.d.ts +1 -15
- package/dist/collection-view.js +3 -4
- package/dist/collection-view.js.map +1 -1
- package/dist/{data-table-stat-chart-content-waJAm_nt.js → data-table-stat-chart-content-CJVgiHlL.js} +2 -3
- package/dist/{data-table-stat-chart-content-waJAm_nt.js.map → data-table-stat-chart-content-CJVgiHlL.js.map} +1 -1
- package/dist/data-table.d.ts +2 -14
- package/dist/data-table.js +16 -22
- package/dist/data-table.js.map +1 -1
- package/dist/{diff-bubble-DewUd_2w.js → diff-bubble-DietCcSc.js} +2 -3
- package/dist/{diff-bubble-DewUd_2w.js.map → diff-bubble-DietCcSc.js.map} +1 -1
- package/dist/{diff-drawer-ByJsQg8F.js → diff-drawer-COlghuX8.js} +11 -25
- package/dist/{diff-drawer-ByJsQg8F.js.map → diff-drawer-COlghuX8.js.map} +1 -1
- package/dist/{diff-editor-CGpeyoCE.js → diff-editor-BMBk4KXR.js} +3 -4
- package/dist/{diff-editor-CGpeyoCE.js.map → diff-editor-BMBk4KXR.js.map} +1 -1
- package/dist/{diff-size-Dydn_Uw5.js → diff-size-BR8D-bcL.js} +2 -3
- package/dist/{diff-size-Dydn_Uw5.js.map → diff-size-BR8D-bcL.js.map} +1 -1
- package/dist/{diff-viewer-ChEyTNpa.js → diff-viewer-nCYtig03.js} +10 -15
- package/dist/{diff-viewer-ChEyTNpa.js.map → diff-viewer-nCYtig03.js.map} +1 -1
- package/dist/diff.d.ts +0 -22
- package/dist/diff.js +8 -9
- package/dist/{display-sort-control-BUMkmlIu.js → display-sort-control-DXXkOgUC.js} +6 -7
- package/dist/{display-sort-control-BUMkmlIu.js.map → display-sort-control-DXXkOgUC.js.map} +1 -1
- package/dist/{drop-indicator-HjlBSIeV.js → drop-indicator-66rhST1K.js} +2 -3
- package/dist/{drop-indicator-HjlBSIeV.js.map → drop-indicator-66rhST1K.js.map} +1 -1
- package/dist/{edit-mode-data-table-CzCMSUqv.js → edit-mode-data-table-lvGsQ1Da.js} +17 -27
- package/dist/{edit-mode-data-table-CzCMSUqv.js.map → edit-mode-data-table-lvGsQ1Da.js.map} +1 -1
- package/dist/{empty-state-3mVV_pV-.js → empty-state-J96iLli9.js} +2 -3
- package/dist/{empty-state-3mVV_pV-.js.map → empty-state-J96iLli9.js.map} +1 -1
- package/dist/{file-change-badge-0QFNv82B.js → file-change-badge-5_T5hnWQ.js} +2 -3
- package/dist/{file-change-badge-0QFNv82B.js.map → file-change-badge-5_T5hnWQ.js.map} +1 -1
- package/dist/{host-storage-28AkEy1N.js → host-storage-CtscVB4w.js} +3 -4
- package/dist/{host-storage-28AkEy1N.js.map → host-storage-CtscVB4w.js.map} +1 -1
- package/dist/{host-storage-J0089Hyk.d.ts → host-storage-SnBKPpbc.d.ts} +0 -2
- package/dist/{icon-options-DpzDAnlu.js → icon-options-DJmsp8bw.js} +2 -4
- package/dist/{icon-options-DpzDAnlu.js.map → icon-options-DJmsp8bw.js.map} +1 -1
- package/dist/{index-3H4B61XK.d.ts → index-B0bZ__Yf.d.ts} +1 -5
- package/dist/{index-CbtbcvKm.d.ts → index-CYiWcIGu.d.ts} +1 -19
- package/dist/{index-C0PaeiBy.d.ts → index-DYCXgPCg.d.ts} +2 -34
- package/dist/{index-C_ctB_DT.d.ts → index-DzVOXj8n.d.ts} +1 -37
- package/dist/index.d.ts +24 -174
- package/dist/index.js +39 -113
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +2 -2
- package/dist/kanban-renderer.js +24 -44
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{list-row-BDDAVuVd.js → list-row-Dqb5Xfjf.js} +12 -39
- package/dist/{list-row-BDDAVuVd.js.map → list-row-Dqb5Xfjf.js.map} +1 -1
- package/dist/{markdown-editor-zGkAdDzD.js → markdown-editor-D419iTD2.js} +65 -159
- package/dist/markdown-editor-D419iTD2.js.map +1 -0
- package/dist/{mermaid-renderer-BtW_13Sz.js → mermaid-renderer-B8LpF3rD.js} +6 -12
- package/dist/{mermaid-renderer-BtW_13Sz.js.map → mermaid-renderer-B8LpF3rD.js.map} +1 -1
- package/dist/mermaid.d.ts +0 -2
- package/dist/mermaid.js +1 -2
- package/dist/{monaco-browser-CLRPSE4-.js → monaco-browser-BBIyiPtL.js} +2 -3
- package/dist/{monaco-browser-CLRPSE4-.js.map → monaco-browser-BBIyiPtL.js.map} +1 -1
- package/dist/{number-input-QDqWYzTR.js → number-input-DzRvKj64.js} +3 -4
- package/dist/{number-input-QDqWYzTR.js.map → number-input-DzRvKj64.js.map} +1 -1
- package/dist/{param-editor-DGkeaE-L.js → param-editor-DyIO1rSf.js} +8 -14
- package/dist/{param-editor-DGkeaE-L.js.map → param-editor-DyIO1rSf.js.map} +1 -1
- package/dist/{param-editor-field-Dwm94sf2.js → param-editor-field-Bt7NP9OH.js} +15 -27
- package/dist/{param-editor-field-Dwm94sf2.js.map → param-editor-field-Bt7NP9OH.js.map} +1 -1
- package/dist/param-editor.d.ts +0 -66
- package/dist/param-editor.js +3 -3
- package/dist/{prism-BeBL3a5W.js → prism-CQBZiF5P.js} +3 -4
- package/dist/{prism-BeBL3a5W.js.map → prism-CQBZiF5P.js.map} +1 -1
- package/dist/{queued-follow-up-Bj_vtMgd.js → queued-follow-up-Bl8TC36-.js} +2 -3
- package/dist/{queued-follow-up-Bj_vtMgd.js.map → queued-follow-up-Bl8TC36-.js.map} +1 -1
- package/dist/{radio-CiFrDN6O.js → radio-BPnviQ4h.js} +2 -3
- package/dist/{radio-CiFrDN6O.js.map → radio-BPnviQ4h.js.map} +1 -1
- package/dist/{resolve-icon-component-Dy0pOuj5.js → resolve-icon-component-BrIOFsnC.js} +3 -4
- package/dist/{resolve-icon-component-Dy0pOuj5.js.map → resolve-icon-component-BrIOFsnC.js.map} +1 -1
- package/dist/{resource-badge-DGwekS-G.d.ts → resource-badge-C73K0Vg9.d.ts} +0 -4
- package/dist/{rich-text-DgUaZYHr.js → rich-text-DBpBdWtn.js} +31 -61
- package/dist/{rich-text-DgUaZYHr.js.map → rich-text-DBpBdWtn.js.map} +1 -1
- package/dist/rich-text.d.ts +1 -1
- package/dist/rich-text.js +3 -3
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{scroll-area-IeoRS73V.js → scroll-area-BfAlvhjh.js} +3 -5
- package/dist/{scroll-area-IeoRS73V.js.map → scroll-area-BfAlvhjh.js.map} +1 -1
- package/dist/split-panel-motion-context-B8QvAyTv.js +6 -0
- package/dist/{split-panel-motion-context-YB0sduVv.js.map → split-panel-motion-context-B8QvAyTv.js.map} +1 -1
- package/dist/terminal.d.ts +1 -11
- package/dist/terminal.js +7 -15
- package/dist/terminal.js.map +1 -1
- package/dist/{theme-kKuLN2jb.js → theme-BMHkV5Ry.js} +2 -3
- package/dist/{theme-kKuLN2jb.js.map → theme-BMHkV5Ry.js.map} +1 -1
- package/dist/{theme-preference-BV4cbJNB.js → theme-preference-Bdi0s7vE.js} +10 -19
- package/dist/{theme-preference-BV4cbJNB.js.map → theme-preference-Bdi0s7vE.js.map} +1 -1
- package/dist/{theme-DxwT31KJ.js → theme-rmCwx-aG.js} +5 -5
- package/dist/theme-rmCwx-aG.js.map +1 -0
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +2 -2
- package/dist/{tree-list-aNC_UTGS.js → tree-list-Bg8U7ZYc.js} +31 -65
- package/dist/{tree-list-aNC_UTGS.js.map → tree-list-Bg8U7ZYc.js.map} +1 -1
- package/dist/{use-virtualizer-CqDYJolY.js → use-virtualizer-B6ABIiNI.js} +2 -3
- package/dist/{use-virtualizer-CqDYJolY.js.map → use-virtualizer-B6ABIiNI.js.map} +1 -1
- package/dist/{workspace-badge-BMjS8ii4.d.ts → workspace-badge-DI6ZpW9Z.d.ts} +0 -6
- package/dist/{workspace-badge-DqQKSUJw.js → workspace-badge-Dqi-Sh_Q.js} +3 -4
- package/dist/{workspace-badge-DqQKSUJw.js.map → workspace-badge-Dqi-Sh_Q.js.map} +1 -1
- package/dist-monaco/assets/{css.worker-DFdt6_zu.js → css.worker-D55UB6Ki.js} +7 -7
- package/dist-monaco/assets/editor.worker-C3R1XRkp.js +26 -0
- package/dist-monaco/assets/{html.worker-JUzsMP-j.js → html.worker-CFLR1M2C.js} +7 -7
- package/dist-monaco/assets/json.worker-DJ19GkSR.js +58 -0
- package/dist-monaco/assets/{ts.worker-CmEKzkmF.js → ts.worker-DJNYEI7I.js} +32 -32
- package/dist-monaco/monaco.js +188 -188
- package/package.json +2 -2
- package/dist/markdown-editor-zGkAdDzD.js.map +0 -1
- package/dist/split-panel-motion-context-YB0sduVv.js +0 -7
- package/dist/theme-DxwT31KJ.js.map +0 -1
- package/dist-monaco/assets/editor.worker-O-CH8JUO.js +0 -26
- package/dist-monaco/assets/json.worker-B4dEhy0e.js +0 -58
package/dist/chat-ui.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { n as e, t } from "./scroll-area-
|
|
2
|
-
import { t as n } from "./list-row-
|
|
3
|
-
import { t as r } from "./use-virtualizer-
|
|
4
|
-
import { c as i, i as a } from "./prism-
|
|
5
|
-
import { a as o } from "./host-storage-
|
|
6
|
-
import { t as s } from "./drop-indicator-
|
|
7
|
-
import { t as c } from "./empty-state-
|
|
8
|
-
import { t as l } from "./icon-options-
|
|
9
|
-
import { n as u, t as d } from "./radio-
|
|
10
|
-
import { n as f, t as p } from "./queued-follow-up-
|
|
11
|
-
import { B as m, C as h, E as g, F as _, L as v, P as y, S as b, T as x, w as S, z as C } from "./markdown-editor-
|
|
12
|
-
import { c as w, l as T, o as E, s as D } from "./rich-text-
|
|
13
|
-
import { t as O } from "./diff-bubble-
|
|
1
|
+
import { n as e, t } from "./scroll-area-BfAlvhjh.js";
|
|
2
|
+
import { t as n } from "./list-row-Dqb5Xfjf.js";
|
|
3
|
+
import { t as r } from "./use-virtualizer-B6ABIiNI.js";
|
|
4
|
+
import { c as i, i as a } from "./prism-CQBZiF5P.js";
|
|
5
|
+
import { a as o } from "./host-storage-CtscVB4w.js";
|
|
6
|
+
import { t as s } from "./drop-indicator-66rhST1K.js";
|
|
7
|
+
import { t as c } from "./empty-state-J96iLli9.js";
|
|
8
|
+
import { t as l } from "./icon-options-DJmsp8bw.js";
|
|
9
|
+
import { n as u, t as d } from "./radio-BPnviQ4h.js";
|
|
10
|
+
import { n as f, t as p } from "./queued-follow-up-Bl8TC36-.js";
|
|
11
|
+
import { B as m, C as h, E as g, F as _, L as v, P as y, S as b, T as x, w as S, z as C } from "./markdown-editor-D419iTD2.js";
|
|
12
|
+
import { c as w, l as T, o as E, s as D } from "./rich-text-DBpBdWtn.js";
|
|
13
|
+
import { t as O } from "./diff-bubble-DietCcSc.js";
|
|
14
14
|
import { AbsoluteCenter as k, Avatar as A, Box as j, Button as M, Card as N, Code as P, Field as F, Flex as I, HStack as L, Icon as ee, IconButton as R, Image as z, Input as te, Kbd as B, Link as ne, Menu as re, Popover as V, Portal as ie, Skeleton as H, Span as U, Spinner as ae, Stack as W, Tag as oe, Text as G, Textarea as se, Timeline as ce, Tooltip as le, chakra as K, createSlotRecipeContext as ue, defineSlotRecipe as de, useRecipe as fe, useSlotRecipe as pe } from "@chakra-ui/react";
|
|
15
15
|
import { c as q } from "react/compiler-runtime";
|
|
16
16
|
import { Fragment as me, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
@@ -19,7 +19,7 @@ import { AlertTriangle as xe, ArrowDownIcon as Se, ArrowRight as Ce, ArrowUp as
|
|
|
19
19
|
import { defaultRangeExtractor as Je } from "@tanstack/react-virtual";
|
|
20
20
|
import { DndContext as Ye, KeyboardSensor as Xe, PointerSensor as Ze, pointerWithin as Qe, rectIntersection as $e, useDraggable as et, useDroppable as tt, useSensor as nt, useSensors as rt } from "@dnd-kit/core";
|
|
21
21
|
import { StickToBottom as it, useStickToBottomContext as at } from "use-stick-to-bottom";
|
|
22
|
-
|
|
22
|
+
// src/components/chat-ui/components/use-conversation-visibility.ts
|
|
23
23
|
var ot = () => {
|
|
24
24
|
let e = q(5), { scrollRef: t, stopScroll: n, scrollToBottom: r } = at(), i, a;
|
|
25
25
|
e[0] !== t || e[1] !== r || e[2] !== n ? (i = () => {
|
|
@@ -352,8 +352,7 @@ function Ct(e) {
|
|
|
352
352
|
i
|
|
353
353
|
], t[3] = n, t[4] = i, t[5] = r, t[6] = c, t[7] = l) : (c = t[6], l = t[7]), X(c, l), null;
|
|
354
354
|
}
|
|
355
|
-
|
|
356
|
-
//#region src/theme/recipes/chat-composer.ts
|
|
355
|
+
// src/theme/recipes/chat-composer.ts
|
|
357
356
|
var wt = de({
|
|
358
357
|
className: "ps-chat-composer",
|
|
359
358
|
slots: ["input", "workspace"],
|
|
@@ -937,8 +936,7 @@ function Pn(e, t) {
|
|
|
937
936
|
})
|
|
938
937
|
}, `${e.label}-${t}`);
|
|
939
938
|
}
|
|
940
|
-
|
|
941
|
-
//#region src/components/chat-ui/components/chat-input-question-prompt.tsx
|
|
939
|
+
// src/components/chat-ui/components/chat-input-question-prompt.tsx
|
|
942
940
|
var Fn = (e) => e.questions.map((e, t) => ({
|
|
943
941
|
id: Rt(e, t),
|
|
944
942
|
question: e.question,
|
|
@@ -1276,8 +1274,7 @@ var Fn = (e) => e.questions.map((e, t) => ({
|
|
|
1276
1274
|
function Jn(e) {
|
|
1277
1275
|
return e + 1;
|
|
1278
1276
|
}
|
|
1279
|
-
|
|
1280
|
-
//#region src/components/chat-ui/components/composer-request.ts
|
|
1277
|
+
// src/components/chat-ui/components/composer-request.ts
|
|
1281
1278
|
var Yn = (e, t, n) => {
|
|
1282
1279
|
let r = [];
|
|
1283
1280
|
return e && r.push({
|
|
@@ -1621,8 +1618,7 @@ var Yn = (e, t, n) => {
|
|
|
1621
1618
|
default: return n === "todowrite" || n === "todo" ? "todo" : mr;
|
|
1622
1619
|
}
|
|
1623
1620
|
};
|
|
1624
|
-
|
|
1625
|
-
//#region src/components/chat-ui/utils/diff.ts
|
|
1621
|
+
// src/components/chat-ui/utils/diff.ts
|
|
1626
1622
|
function vr(e) {
|
|
1627
1623
|
let t = e.lastIndexOf("/");
|
|
1628
1624
|
return t >= 0 ? e.slice(t + 1) : e;
|
|
@@ -1694,13 +1690,7 @@ var Mr = (e) => br(e) || e.startsWith("diff --git "), Nr = (e) => e.startsWith("
|
|
|
1694
1690
|
if (e.startsWith(" ")) {
|
|
1695
1691
|
let r = e.slice(1);
|
|
1696
1692
|
t.push(r), n.push(r);
|
|
1697
|
-
|
|
1698
|
-
}
|
|
1699
|
-
if (e.startsWith("-")) {
|
|
1700
|
-
t.push(e.slice(1));
|
|
1701
|
-
return;
|
|
1702
|
-
}
|
|
1703
|
-
e.startsWith("+") && n.push(e.slice(1));
|
|
1693
|
+
} else e.startsWith("-") ? t.push(e.slice(1)) : e.startsWith("+") && n.push(e.slice(1));
|
|
1704
1694
|
}, Fr = (e, t, n, r) => {
|
|
1705
1695
|
let i = t;
|
|
1706
1696
|
for (; i < e.length;) {
|
|
@@ -1716,11 +1706,7 @@ var Mr = (e) => br(e) || e.startsWith("diff --git "), Nr = (e) => e.startsWith("
|
|
|
1716
1706
|
for (; s < e.length;) {
|
|
1717
1707
|
let t = e[s] || "";
|
|
1718
1708
|
if (Mr(t)) break;
|
|
1719
|
-
|
|
1720
|
-
s += 1;
|
|
1721
|
-
continue;
|
|
1722
|
-
}
|
|
1723
|
-
s = Fr(e, s + 1, a, o);
|
|
1709
|
+
Sr(t) ? s = Fr(e, s + 1, a, o) : s += 1;
|
|
1724
1710
|
}
|
|
1725
1711
|
return {
|
|
1726
1712
|
nextIndex: s,
|
|
@@ -1744,8 +1730,7 @@ function Lr(e) {
|
|
|
1744
1730
|
}
|
|
1745
1731
|
return n;
|
|
1746
1732
|
}
|
|
1747
|
-
|
|
1748
|
-
//#region src/components/chat-ui/tool-rendering/shared.ts
|
|
1733
|
+
// src/components/chat-ui/tool-rendering/shared.ts
|
|
1749
1734
|
var Rr = {
|
|
1750
1735
|
apply_patch: "Apply patch",
|
|
1751
1736
|
bash: "Run command",
|
|
@@ -2136,17 +2121,13 @@ var Rr = {
|
|
|
2136
2121
|
if (i === "image") {
|
|
2137
2122
|
let e = qi(r, t);
|
|
2138
2123
|
e && n.push(e);
|
|
2139
|
-
|
|
2140
|
-
}
|
|
2141
|
-
if (i === "text") {
|
|
2124
|
+
} else if (i === "text") {
|
|
2142
2125
|
let t = Ui(e?.text);
|
|
2143
2126
|
t && n.push({
|
|
2144
2127
|
type: "text",
|
|
2145
2128
|
text: t
|
|
2146
2129
|
});
|
|
2147
|
-
|
|
2148
|
-
}
|
|
2149
|
-
n.push(...ta(r, t));
|
|
2130
|
+
} else n.push(...ta(r, t));
|
|
2150
2131
|
}
|
|
2151
2132
|
return n;
|
|
2152
2133
|
}, $i = (e) => {
|
|
@@ -2239,15 +2220,14 @@ var Rr = {
|
|
|
2239
2220
|
}, ua = (e, t) => {
|
|
2240
2221
|
let n = sa(t?.toolRenderers);
|
|
2241
2222
|
return { items: e.map((e) => la(e, n, t)).filter(oa) };
|
|
2242
|
-
}, da = ve(() => import("./diff-editor-
|
|
2223
|
+
}, da = ve(() => import("./diff-editor-BMBk4KXR.js").then((e) => e.n).then((e) => ({ default: e.DiffEditor }))), fa = (e) => {
|
|
2243
2224
|
let t = q(2), n;
|
|
2244
2225
|
return t[0] === e ? n = t[1] : (n = /* @__PURE__ */ J(ge, {
|
|
2245
2226
|
fallback: null,
|
|
2246
2227
|
children: /* @__PURE__ */ J(da, { ...e })
|
|
2247
2228
|
}), t[0] = e, t[1] = n), n;
|
|
2248
2229
|
};
|
|
2249
|
-
|
|
2250
|
-
//#region src/components/chat-ui/components/timeline-indicator.tsx
|
|
2230
|
+
// src/components/chat-ui/components/timeline-indicator.tsx
|
|
2251
2231
|
function pa(e) {
|
|
2252
2232
|
let t = q(10), { ind: n } = e;
|
|
2253
2233
|
if (!n || n.type === "none") return null;
|
|
@@ -2286,8 +2266,7 @@ function pa(e) {
|
|
|
2286
2266
|
children: [r, i]
|
|
2287
2267
|
}) }), t[8] = r, t[9] = a), a;
|
|
2288
2268
|
}
|
|
2289
|
-
|
|
2290
|
-
//#region src/components/chat-ui/components/timeline-title.tsx
|
|
2269
|
+
// src/components/chat-ui/components/timeline-title.tsx
|
|
2291
2270
|
var ma = (e, t, n, r = !1) => {
|
|
2292
2271
|
r && e.stopPropagation(), t.href || e.preventDefault(), t.filePath && n?.(t.filePath);
|
|
2293
2272
|
};
|
|
@@ -2437,8 +2416,7 @@ function ba(e) {
|
|
|
2437
2416
|
default: return null;
|
|
2438
2417
|
}
|
|
2439
2418
|
}
|
|
2440
|
-
|
|
2441
|
-
//#region src/components/chat-ui/components/timeline.tsx
|
|
2419
|
+
// src/components/chat-ui/components/timeline.tsx
|
|
2442
2420
|
var xa = ce;
|
|
2443
2421
|
function Sa(e) {
|
|
2444
2422
|
let n = q(5), { code: r, language: i } = e, a = i ? `${i} code block` : "code block", o;
|
|
@@ -2719,8 +2697,7 @@ function Da(e) {
|
|
|
2719
2697
|
function Oa(e, t) {
|
|
2720
2698
|
return e.id ? `id:${e.id}` : `idx:${t}`;
|
|
2721
2699
|
}
|
|
2722
|
-
|
|
2723
|
-
//#region src/components/chat-ui/components/tool-invocation-timeline.tsx
|
|
2700
|
+
// src/components/chat-ui/components/tool-invocation-timeline.tsx
|
|
2724
2701
|
var ka = (e) => ur(e.tool ?? "").replace(/_/g, "") === "question", Aa = (e) => {
|
|
2725
2702
|
let t = e.state?.output;
|
|
2726
2703
|
return typeof t == "string" ? t.trim().length > 0 : Array.isArray(t) ? t.length > 0 : t && typeof t == "object" ? Object.keys(t).length > 0 : t != null;
|
|
@@ -2749,8 +2726,7 @@ function ja(e) {
|
|
|
2749
2726
|
function Ma(e) {
|
|
2750
2727
|
return !ka(e) || Aa(e);
|
|
2751
2728
|
}
|
|
2752
|
-
|
|
2753
|
-
//#region src/components/chat-ui/components/message-parts-renderer.tsx
|
|
2729
|
+
// src/components/chat-ui/components/message-parts-renderer.tsx
|
|
2754
2730
|
var Na = (e) => e.type === "tool", Pa = (e) => e.filename ?? e.url.split("/").pop() ?? "attachment", Fa = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Ia = (e) => e.mediaType?.startsWith("image/") || Fa.test(Pa(e)), La = (e) => Ia(e) ? /* @__PURE__ */ J(z, {
|
|
2755
2731
|
src: e.url,
|
|
2756
2732
|
alt: `${Pa(e)} preview thumbnail`,
|
|
@@ -2758,14 +2734,10 @@ var Na = (e) => e.type === "tool", Pa = (e) => e.filename ?? e.url.split("/").po
|
|
|
2758
2734
|
borderRadius: "xs",
|
|
2759
2735
|
objectFit: "cover"
|
|
2760
2736
|
}) : void 0, Ra = (e, t) => {
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
});
|
|
2766
|
-
return;
|
|
2767
|
-
}
|
|
2768
|
-
typeof window < "u" && window.open(e.url, "_blank", "noopener,noreferrer");
|
|
2737
|
+
t ? t.open({
|
|
2738
|
+
source: e.url,
|
|
2739
|
+
origin: "reference"
|
|
2740
|
+
}) : typeof window < "u" && window.open(e.url, "_blank", "noopener,noreferrer");
|
|
2769
2741
|
}, za = (e) => {
|
|
2770
2742
|
if (e.message && e.message.trim().length > 0) return e.message;
|
|
2771
2743
|
let { errorType: t } = e;
|
|
@@ -2898,8 +2870,7 @@ function Ua(e) {
|
|
|
2898
2870
|
} else f = t[6];
|
|
2899
2871
|
return f;
|
|
2900
2872
|
}
|
|
2901
|
-
|
|
2902
|
-
//#region src/components/chat-ui/components/message-types.ts
|
|
2873
|
+
// src/components/chat-ui/components/message-types.ts
|
|
2903
2874
|
var Wa = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "assistant", Ga = (e) => e.text.trim().length > 0, Ka = (e) => e.title.trim().length > 0 || !!e.message?.trim(), qa = (e) => {
|
|
2904
2875
|
switch (e.type) {
|
|
2905
2876
|
case "text":
|
|
@@ -2931,22 +2902,10 @@ var Wa = (e) => e === "user" || e === "assistant" || e === "developer" ? e : "as
|
|
|
2931
2902
|
...t,
|
|
2932
2903
|
parts: e
|
|
2933
2904
|
};
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
}
|
|
2938
|
-
if (Ya(a)) {
|
|
2939
|
-
r.push(a);
|
|
2940
|
-
continue;
|
|
2941
|
-
}
|
|
2942
|
-
if (r.length > 0) {
|
|
2943
|
-
n.push({
|
|
2944
|
-
...a,
|
|
2945
|
-
parts: [...r.flatMap((e) => e.parts), ...a.parts]
|
|
2946
|
-
}), i();
|
|
2947
|
-
continue;
|
|
2948
|
-
}
|
|
2949
|
-
n.push(a);
|
|
2905
|
+
a.role === "user" ? (i(), n.push(a)) : Ya(a) ? r.push(a) : r.length > 0 ? (n.push({
|
|
2906
|
+
...a,
|
|
2907
|
+
parts: [...r.flatMap((e) => e.parts), ...a.parts]
|
|
2908
|
+
}), i()) : n.push(a);
|
|
2950
2909
|
}
|
|
2951
2910
|
if (t.streaming && r.length > 0) {
|
|
2952
2911
|
let e = Xa(r);
|
|
@@ -3129,8 +3088,7 @@ function co(e) {
|
|
|
3129
3088
|
children: I
|
|
3130
3089
|
}), n[42] = D, n[43] = O, n[44] = I, n[45] = L) : L = n[45], L;
|
|
3131
3090
|
}
|
|
3132
|
-
|
|
3133
|
-
//#region src/components/chat-ui/components/use-chat-tail-ready.ts
|
|
3091
|
+
// src/components/chat-ui/components/use-chat-tail-ready.ts
|
|
3134
3092
|
var lo = 3, uo = 20, fo = 1, po = (e, t) => Math.abs(e.scrollTop - t.scrollTop) <= fo && Math.abs(e.totalSize - t.totalSize) <= fo, mo = (e) => !!e && e.scrollHeight <= e.clientHeight, ho = (e) => ({
|
|
3135
3093
|
scrollTop: e?.scrollTop ?? 0,
|
|
3136
3094
|
totalSize: e?.scrollHeight ?? 0
|
|
@@ -3148,11 +3106,7 @@ var lo = 3, uo = 20, fo = 1, po = (e, t) => Math.abs(e.scrollTop - t.scrollTop)
|
|
|
3148
3106
|
let e = 0, t = 0, n = 0, a = null, o = () => {
|
|
3149
3107
|
t += 1;
|
|
3150
3108
|
let s = ho(r.current);
|
|
3151
|
-
|
|
3152
|
-
i.current?.();
|
|
3153
|
-
return;
|
|
3154
|
-
}
|
|
3155
|
-
e = requestAnimationFrame(o);
|
|
3109
|
+
n = a && po(s, a) ? n + 1 : 0, a = s, n >= lo || t >= uo ? i.current?.() : e = requestAnimationFrame(o);
|
|
3156
3110
|
};
|
|
3157
3111
|
return e = requestAnimationFrame(o), () => cancelAnimationFrame(e);
|
|
3158
3112
|
}, c = [r], t[3] = r, t[4] = s, t[5] = c), be(s, c);
|
|
@@ -3266,32 +3220,24 @@ var lo = 3, uo = 20, fo = 1, po = (e, t) => Math.abs(e.scrollTop - t.scrollTop)
|
|
|
3266
3220
|
u
|
|
3267
3221
|
]);
|
|
3268
3222
|
let L = (e) => {
|
|
3269
|
-
|
|
3270
|
-
e !== n && k(null), r?.(e);
|
|
3271
|
-
return;
|
|
3272
|
-
}
|
|
3273
|
-
h((t) => ({
|
|
3223
|
+
f ? h((t) => ({
|
|
3274
3224
|
...t,
|
|
3275
3225
|
[f.id]: {
|
|
3276
3226
|
text: e,
|
|
3277
3227
|
state: Tt(e)
|
|
3278
3228
|
}
|
|
3279
|
-
}));
|
|
3229
|
+
})) : (e !== n && k(null), r?.(e));
|
|
3280
3230
|
}, ee = (e, t) => {
|
|
3281
|
-
|
|
3282
|
-
_({
|
|
3283
|
-
text: e,
|
|
3284
|
-
state: t
|
|
3285
|
-
});
|
|
3286
|
-
return;
|
|
3287
|
-
}
|
|
3288
|
-
h((n) => ({
|
|
3231
|
+
f ? h((n) => ({
|
|
3289
3232
|
...n,
|
|
3290
3233
|
[f.id]: {
|
|
3291
3234
|
text: e,
|
|
3292
3235
|
state: t
|
|
3293
3236
|
}
|
|
3294
|
-
}))
|
|
3237
|
+
})) : _({
|
|
3238
|
+
text: e,
|
|
3239
|
+
state: t
|
|
3240
|
+
});
|
|
3295
3241
|
}, R = () => {
|
|
3296
3242
|
f && (d?.(f.id), h((e) => {
|
|
3297
3243
|
let t = { ...e };
|
|
@@ -3636,9 +3582,7 @@ var lo = 3, uo = 20, fo = 1, po = (e, t) => Math.abs(e.scrollTop - t.scrollTop)
|
|
|
3636
3582
|
if (t.kind === "steer") {
|
|
3637
3583
|
if (!B) return m?.(e);
|
|
3638
3584
|
I(B);
|
|
3639
|
-
|
|
3640
|
-
}
|
|
3641
|
-
if (t.item) return t.kind === "combine" ? V(t.item) ? void 0 : h?.(e, t.item) : H(e, t.item, t.kind);
|
|
3585
|
+
} else if (t.item) return t.kind === "combine" ? V(t.item) ? void 0 : h?.(e, t.item) : H(e, t.item, t.kind);
|
|
3642
3586
|
}, n[22] = V, n[23] = h, n[24] = m, n[25] = H, n[26] = B, n[27] = U) : U = n[27];
|
|
3643
3587
|
let ae = U, W;
|
|
3644
3588
|
n[28] === S ? W = n[29] : (W = (e) => {
|
|
@@ -3742,8 +3686,7 @@ var lo = 3, uo = 20, fo = 1, po = (e, t) => Math.abs(e.scrollTop - t.scrollTop)
|
|
|
3742
3686
|
function Mo(e) {
|
|
3743
3687
|
return !e.sending && !e.steeringDelivery;
|
|
3744
3688
|
}
|
|
3745
|
-
|
|
3746
|
-
//#region src/components/chat-ui/components/chat-panel-composer.tsx
|
|
3689
|
+
// src/components/chat-ui/components/chat-panel-composer.tsx
|
|
3747
3690
|
var No = (e) => {
|
|
3748
3691
|
let t = q(40), { composerHeader: n, composerFallback: r, chatInputQuestionPrompt: i, composerDecision: a, hasWorkspaceHub: o, onQueuedFollowUpMove: s, onQueuedFollowUpRemove: c, onQueuedFollowUpUpdate: l, onQueuedFollowUpSteer: u, onQueuedFollowUpCombine: d, queueSteeringUnavailableReason: f, unsavedQueueItemIds: m, queuedComposer: h, queuedFollowUps: g, workspaceHub: _ } = e, v;
|
|
3749
3692
|
t[0] === m ? v = t[1] : (v = m === void 0 ? [] : m, t[0] = m, t[1] = v);
|
|
@@ -3991,8 +3934,7 @@ function Lo(e, t) {
|
|
|
3991
3934
|
function Ro() {
|
|
3992
3935
|
return /* @__PURE__ */ new Set();
|
|
3993
3936
|
}
|
|
3994
|
-
|
|
3995
|
-
//#region src/components/chat-ui/components/chat-skeleton.tsx
|
|
3937
|
+
// src/components/chat-ui/components/chat-skeleton.tsx
|
|
3996
3938
|
var zo = (e) => {
|
|
3997
3939
|
let t = q(4), { widths: n } = e, r;
|
|
3998
3940
|
t[0] === n ? r = t[1] : (r = n.map(Vo), t[0] = n, t[1] = r);
|
|
@@ -4036,8 +3978,7 @@ function Vo(e, t) {
|
|
|
4036
3978
|
borderRadius: "xs"
|
|
4037
3979
|
}, `${e}-${t}`);
|
|
4038
3980
|
}
|
|
4039
|
-
|
|
4040
|
-
//#region src/components/chat-ui/components/conversation-browse.tsx
|
|
3981
|
+
// src/components/chat-ui/components/conversation-browse.tsx
|
|
4041
3982
|
var Ho = 3, Uo = 10, Wo = 4, Go = (e, t) => {
|
|
4042
3983
|
if (t === null) return 0;
|
|
4043
3984
|
let n = Math.abs(e - t);
|
|
@@ -4445,7 +4386,6 @@ var Ho = 3, Uo = 10, Wo = 4, Go = (e, t) => {
|
|
|
4445
4386
|
children: [u, d]
|
|
4446
4387
|
}), t[10] = u, t[11] = d, t[12] = f) : f = t[12], f;
|
|
4447
4388
|
};
|
|
4448
|
-
//#endregion
|
|
4449
4389
|
export { gt as ApprovalPrompt, yt as AttachmentList, Ct as AutoScroll, Qn as ChatInput, mt as ChatMessage, Io as ChatPanel, ut as ChatPrimitives, Bo as ChatSkeleton, $o as ChatWorkspaceHub, Jo as ConversationBrowse, Zo as HarnessControls, Ln as QuestionPromptControls, jt as SendButton, Tt as createSerializedPromptState, C as isGuessedChatLink, m as parseChatLink, zn as useQuestionPromptState };
|
|
4450
4390
|
|
|
4451
4391
|
//# sourceMappingURL=chat-ui.js.map
|