@qredence/fleet 0.7.4 → 0.8.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/CHANGELOG.md +17 -0
- package/README.md +5 -4
- package/bin/fleet-prime.mjs +33 -6
- package/bin/prime-runtime.mjs +79 -0
- package/dist/runtime-manifest.json +32 -0
- package/dist/web/client/assets/DialogTitle-RY2UDuCY.js +1 -0
- package/dist/web/client/assets/FloatingPortal-XC0MCNnD.js +1 -0
- package/dist/web/client/assets/action-swap-BWRUNKQA.js +1 -0
- package/dist/web/client/assets/{alert-dialog-DtXvVhsF.js → alert-dialog-DGNvg0B1.js} +1 -1
- package/dist/web/client/assets/arrow-up-right-CG9RNk4p.js +1 -0
- package/dist/web/client/assets/{artifacts-panel-Bseg97yQ.js → artifacts-panel-BGXpKRJ7.js} +1 -1
- package/dist/web/client/assets/{badge-C--lf3bb.js → badge-DM06QVqB.js} +6 -6
- package/dist/web/client/assets/button-CWYjn8Zk.js +1 -0
- package/dist/web/client/assets/{card-Hngi3HGC.js → card-Dj1SnGUU.js} +1 -1
- package/dist/web/client/assets/{chat-command-palette-D_rm1r9d.js → chat-command-palette-PenyaZBw.js} +1 -1
- package/dist/web/client/assets/code-block-pKKmFZ5w.js +3 -0
- package/dist/web/client/assets/collapsible-Bk6zCsRX.js +1 -0
- package/dist/web/client/assets/{command-CmtCIDdH.js → command-imgUMV3r.js} +1 -1
- package/dist/web/client/assets/{create-project-dialog-m-9aoobN.js → create-project-dialog-C00d5yCq.js} +1 -1
- package/dist/web/client/assets/createBaseUIEventDetails-DIxvaz-Y.js +1 -0
- package/dist/web/client/assets/{dialog-Ddouieuu.js → dialog-zCNOQI63.js} +1 -1
- package/dist/web/client/assets/eye-iNSvs0UA.js +1 -0
- package/dist/web/client/assets/file-code-corner-BkDULqko.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-DfGlB17w.js → fork-picker-dialog-Cgi48NnT.js} +1 -1
- package/dist/web/client/assets/globals-BuMuB_ea.css +2 -0
- package/dist/web/client/assets/{index-Bz5W4EOn.js → index-BqBdQGWs.js} +3 -3
- package/dist/web/client/assets/input-7g8_nw-Z.js +1 -0
- package/dist/web/client/assets/{input-group-EPMGh55u.js → input-group-Nq03Qums.js} +1 -1
- package/dist/web/client/assets/{ipython-tool-CMhnRVrC.js → ipython-tool-bieUhw9K.js} +1 -1
- package/dist/web/client/assets/markdown-CvBfbPCn.js +2 -0
- package/dist/web/client/assets/markdown-code-rFOkzN5N.js +4 -0
- package/dist/web/client/assets/{message-queue-Bg2MiJHM.js → message-queue-sSljtjYz.js} +1 -1
- package/dist/web/client/assets/{model-selector-list-BiU_7ivt.js → model-selector-list-Cp687pdm.js} +1 -1
- package/dist/web/client/assets/{notify-DhtmUPfE.js → notify-Cqdu6EV8.js} +1 -1
- package/dist/web/client/assets/{openui-renderer-MIB3JKYa.js → openui-renderer-BdYTcn-_.js} +50 -50
- package/dist/web/client/assets/{prompt-input-Dy-DSPqF.js → prompt-input-CoV1gTUQ.js} +1 -1
- package/dist/web/client/assets/{prompt-suggestions-CrpAiKeB.js → prompt-suggestions-CAY5JI-C.js} +1 -1
- package/dist/web/client/assets/provider-label-QrVOwKBO.js +1 -0
- package/dist/web/client/assets/reasoning-line-DGdPUMwT.js +1 -0
- package/dist/web/client/assets/rehype-katex-DITkIpVl.js +259 -0
- package/dist/web/client/assets/{repl-panel-DN5kZAcB.js → repl-panel-5xgkDXO5.js} +1 -1
- package/dist/web/client/assets/{resources-panel-DD6iWOF3.js → resources-panel-aJCKt9eF.js} +1 -1
- package/dist/web/client/assets/right-panel-registry-BaLZiKny.js +2 -0
- package/dist/web/client/assets/routes-BkFkhfO3.js +16 -0
- package/dist/web/client/assets/select-BhV4ikeN.js +1 -0
- package/dist/web/client/assets/session-activity-panel-Bc4-HSfb.js +1 -0
- package/dist/web/client/assets/session-reasoning-panel-CjJJK_bq.js +1 -0
- package/dist/web/client/assets/session-tool-renderer-C7mYeUOs.js +166 -0
- package/dist/web/client/assets/{session-tree-panel-BBwP_EK2.js → session-tree-panel-By9m9tGB.js} +1 -1
- package/dist/web/client/assets/settings-dialog-Dpt4Ha_m.js +2 -0
- package/dist/web/client/assets/shield-check-7HDd-2Fn.js +1 -0
- package/dist/web/client/assets/{skeleton-DNAr5ULI.js → skeleton-B_Lq2XFl.js} +1 -1
- package/dist/web/client/assets/{skeleton-loaders-B28mF4tJ.js → skeleton-loaders-DWc1eDL3.js} +1 -1
- package/dist/web/client/assets/sparkles-BwVa9zQJ.js +1 -0
- package/dist/web/client/assets/{spinner-CSBXk3Lo.js → spinner-B5TaKP7k.js} +1 -1
- package/dist/web/client/assets/{subagent-chat-panel-DhvBO4dQ.js → subagent-chat-panel-DsPmLZSf.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-CNQ9wGk2.js +1 -0
- package/dist/web/client/assets/{subagents-panel-DRo8Xs6j.js → subagents-panel-gQ9BLfV3.js} +1 -1
- package/dist/web/client/assets/surfaces-BUjUJTyD.js +1 -0
- package/dist/web/client/assets/switch-C7Myu-Dt.js +1 -0
- package/dist/web/client/assets/toast-DlbKi6K-.js +1 -0
- package/dist/web/client/assets/tool-output-normalizer-CADgEiI4.js +4 -0
- package/dist/web/client/assets/tool-part-normalizer-CYK62WZM.js +4 -0
- package/dist/web/client/assets/tool-result-bjAGZ2qm.js +5 -0
- package/dist/web/client/assets/tool-timeline-eNqH1zj7.js +2 -0
- package/dist/web/client/assets/trace-IsV5RRvM.js +1 -0
- package/dist/web/client/assets/ui-preferences-B-PNDkyY.js +1 -0
- package/dist/web/client/assets/use-hover-capable-CLq8BADD.js +1 -0
- package/dist/web/client/assets/useBaseUiId-lKfDDIcw.js +1 -0
- package/dist/web/client/assets/useButton-CvcmqA2s.js +1 -0
- package/dist/web/client/assets/useRender-Bbk_fl72.js +1 -0
- package/dist/web/client/assets/{utils-CFDGLzf6.js → utils-oBThwhjm.js} +1 -1
- package/dist/web/client/assets/{workspace-panel-DdZutYnd.js → workspace-panel-Da5I4p_t.js} +1 -1
- package/dist/web/client/assets/workspace-path-nav-D-77sJ_A.js +2 -0
- package/dist/web/client/assets/wrench-BXX_Ah2s.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/{_tanstack-start-manifest_v-YlngJGUa-YTWBGR7L.js → _tanstack-start-manifest_v-BiNPG4xt-BZTMSM2I.js} +33 -28
- package/dist/web/server/{artifacts-panel-COSC8o7j-GKW2HH2G.js → artifacts-panel-CqGBNU4q-UHNMC7PK.js} +23 -27
- package/dist/web/server/{chat-command-palette-CuOWdzkk-PKZQ5EZP.js → chat-command-palette-B94-zIEz-ES2ZB4ZF.js} +8 -10
- package/dist/web/server/{chunk-GLSR4ZI2.js → chunk-2FHYWKDN.js} +669 -833
- package/dist/web/server/{chunk-EBC7QORX.js → chunk-5GUEYYYO.js} +3680 -2098
- package/dist/web/server/{chunk-GLH2GWMG.js → chunk-7L5PCCYR.js} +411 -306
- package/dist/web/server/{chunk-KHHXJZK7.js → chunk-ABMGW6QH.js} +2784 -1662
- package/dist/web/server/{chunk-36CAMOVG.js → chunk-BAHZXA4D.js} +6 -6
- package/dist/web/server/{chunk-IN2ATSEG.js → chunk-CZLGB3NE.js} +2 -2
- package/dist/web/server/{chunk-WCKKN5BR.js → chunk-E6T36NM5.js} +347 -583
- package/dist/web/server/{chunk-ORCOCCER.js → chunk-EAKPTSWR.js} +4 -4
- package/dist/web/server/chunk-EL2JCDAM.js +270 -0
- package/dist/web/server/{chunk-6GTTTYSE.js → chunk-FB2QLQTN.js} +67 -73
- package/dist/web/server/{chunk-LLO4MNGE.js → chunk-K67IDUAI.js} +24 -26
- package/dist/web/server/{chunk-YU6RHHK6.js → chunk-LQM6QR7S.js} +10 -12
- package/dist/web/server/chunk-LTTBT3J7.js +129 -0
- package/dist/web/server/{chunk-TMQ3MT3D.js → chunk-OAYEN3JV.js} +2 -0
- package/dist/web/server/{chunk-ZUZPJNLY.js → chunk-OSPDNT7S.js} +829 -642
- package/dist/web/server/{chunk-XA7EOCHM.js → chunk-SGAQVAYL.js} +2 -2
- package/dist/web/server/chunk-SI5IQSG4.js +206 -0
- package/dist/web/server/{chunk-AKSDWYJY.js → chunk-SYS5FDNA.js} +5 -5
- package/dist/web/server/{chunk-QSM3BRMA.js → chunk-WSK55TKE.js} +169 -156
- package/dist/web/server/{chunk-BUKOEXE7.js → chunk-YQO36OP6.js} +2 -2
- package/dist/web/server/{create-project-dialog-0-arQpsX-ZELQKHS5.js → create-project-dialog-CFPX6Ihl-EO4XTINS.js} +12 -14
- package/dist/web/server/{dist-7G2NZPF4.js → dist-GQUZLXN5.js} +2 -2
- package/dist/web/server/{dist-E5637ZAY.js → dist-MN5NWCX6.js} +1 -1
- package/dist/web/server/{fork-picker-dialog-fj9p33Mq-I5SA3GLJ.js → fork-picker-dialog-B2RBFzoZ-R6GXPSPL.js} +6 -8
- package/dist/web/server/{markdown-CShfYRVO-RBTK7TRB.js → markdown-BvCfOB26-VDH4YOQD.js} +9 -6
- package/dist/web/server/{markdown-code-BDV_2b2T-6JYA5FWZ.js → markdown-code-SYc-BQvp-MR4FXT5C.js} +48 -9
- package/dist/web/server/{message-queue-BBC843IU-GY4ZIMM4.js → message-queue-D32rLiJo-HEBRGH5B.js} +6 -8
- package/dist/web/server/{model-selector-list-DE6aLNXt-LJZMCYOI.js → model-selector-list-DKzt_xEN-5ZPU6XDY.js} +8 -10
- package/dist/web/server/{openui-renderer-C3aqSKuS-PWLWJFYO.js → openui-renderer-CeVtOdYl-PY37PCJI.js} +12 -14
- package/dist/web/server/{prompt-suggestions-CpTK_fHV-UKJDTLVM.js → prompt-suggestions-CpTK_fHV-Q4ILLZKC.js} +1 -1
- package/dist/web/server/{rehype-katex-IDPYWU6M.js → rehype-katex-CYHGKI6Q.js} +490 -843
- package/dist/web/server/{repl-panel-1kSS1UGd-U64BPA7X.js → repl-panel-1kSS1UGd-DDM5ADGZ.js} +3 -3
- package/dist/web/server/{resources-panel-DWb0eGKa-K4EM3H7Y.js → resources-panel-S4NHlpz7-NF7WYYSR.js} +7 -9
- package/dist/web/server/{router-DZYr-9uT-AEXHEFXF.js → router-DVKxZik_-254GZAJW.js} +5 -6
- package/dist/web/server/{routes-vYxWRhis-AAZ73SNP.js → routes-BTxAklRp-UM7ZTLLP.js} +50 -30
- package/dist/web/server/server.js +2 -2
- package/dist/web/server/session-activity-panel-Bz2GrdMk-PCOXG46X.js +173 -0
- package/dist/web/server/session-reasoning-panel-CpiTdyQz-O3B5CDKS.js +62 -0
- package/dist/web/server/{session-tool-renderer-Dtt74Mts-7YYNSWRV.js → session-tool-renderer-BZiOxtt1-T3ZGAQKX.js} +10 -13
- package/dist/web/server/{session-tree-panel-HNl6R9VZ-4JUF34M7.js → session-tree-panel-CzkE0RFB-P4KWA7S2.js} +7 -9
- package/dist/web/server/{settings-dialog-DGZBA5Z_-6HYFMPNZ.js → settings-dialog-BUgVNpr1-THSYIOZL.js} +18 -21
- package/dist/web/server/{subagent-chat-panel-DuB4hqUk-LDCAJOCL.js → subagent-chat-panel-mw3kEFfK-CDYX7LST.js} +13 -16
- package/dist/web/server/{subagents-panel-wAvx3-Rs-L6UTDFUX.js → subagents-panel-2ZJfYrXG-NDJKHJHD.js} +15 -18
- package/dist/web/server/{workspace-panel-CPzJZwgv-YS7PTI5C.js → workspace-panel-xznrPDLt-QCJRZOF3.js} +7 -9
- package/package.json +2 -2
- package/dist/web/client/assets/DialogTitle-D-zqaHvF.js +0 -1
- package/dist/web/client/assets/FloatingPortal-73ZRZeD9.js +0 -1
- package/dist/web/client/assets/action-swap-BcFwS6is.js +0 -1
- package/dist/web/client/assets/button-BJZe4vNJ.js +0 -1
- package/dist/web/client/assets/chevron-up-CqeJYyZO.js +0 -1
- package/dist/web/client/assets/collapsible-DauSnbYp.js +0 -1
- package/dist/web/client/assets/createBaseUIEventDetails-DklXWq23.js +0 -1
- package/dist/web/client/assets/eye-Cs0lNChA.js +0 -1
- package/dist/web/client/assets/globals-C961mr-b.css +0 -2
- package/dist/web/client/assets/input-Def1xOZz.js +0 -1
- package/dist/web/client/assets/markdown-Big27m-v.js +0 -2
- package/dist/web/client/assets/markdown-code-7L4RiS50.js +0 -3
- package/dist/web/client/assets/provider-label-B_vy60P0.js +0 -1
- package/dist/web/client/assets/rehype-katex-A4PtQgTX.js +0 -259
- package/dist/web/client/assets/right-panel-registry-hKJN__3l.js +0 -2
- package/dist/web/client/assets/routes-C3h32Lj_.js +0 -16
- package/dist/web/client/assets/select-Buvv1tIo.js +0 -1
- package/dist/web/client/assets/session-reasoning-panel-DmEbXOrR.js +0 -1
- package/dist/web/client/assets/session-tool-renderer-Daol5fJw.js +0 -169
- package/dist/web/client/assets/settings-dialog-DYbx3xuq.js +0 -2
- package/dist/web/client/assets/sparkles-D_ANe-HY.js +0 -1
- package/dist/web/client/assets/subagent-transcript-Bx-rHni-.js +0 -1
- package/dist/web/client/assets/surfaces-B8xTOFeK.js +0 -1
- package/dist/web/client/assets/switch-CDfAwEvs.js +0 -1
- package/dist/web/client/assets/terminal-Ceucj7us.js +0 -1
- package/dist/web/client/assets/toast-9zXN-yVk.js +0 -1
- package/dist/web/client/assets/tool-part-normalizer-NbPs9kd1.js +0 -4
- package/dist/web/client/assets/tool-result-BccnO34D.js +0 -4
- package/dist/web/client/assets/tool-timeline-DlBZyd4j.js +0 -1
- package/dist/web/client/assets/ui-preferences-1YaENqef.js +0 -1
- package/dist/web/client/assets/use-hover-capable-MwFjBLZQ.js +0 -1
- package/dist/web/client/assets/workspace-path-nav-BRwuLsFl.js +0 -2
- package/dist/web/client/assets/wrench-BYnD147U.js +0 -1
- package/dist/web/server/chunk-CHSKEU3V.js +0 -166
- package/dist/web/server/chunk-OO7NBFQQ.js +0 -15
- package/dist/web/server/chunk-OXEAXEWD.js +0 -13
- package/dist/web/server/chunk-SIJVVYQT.js +0 -234
- package/dist/web/server/chunk-UQV2NU63.js +0 -163
- package/dist/web/server/chunk-VUBITQ5X.js +0 -653
- package/dist/web/server/session-reasoning-panel-XXU2yIOW-XXCKHISS.js +0 -192
- package/dist/web/server/tool-timeline-BKWsrZHK-3LGCOTPH.js +0 -12
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__exportAll
|
|
3
|
-
} from "./chunk-OO7NBFQQ.js";
|
|
4
|
-
import {
|
|
5
|
-
cn
|
|
6
|
-
} from "./chunk-TMQ3MT3D.js";
|
|
7
|
-
import {
|
|
8
|
-
Xi
|
|
9
|
-
} from "./chunk-O7L7SF5Q.js";
|
|
10
|
-
|
|
11
|
-
// web/app/dist/server/assets/markdown-CShfYRVO.js
|
|
12
|
-
import { Fragment, Suspense, isValidElement, lazy, useMemo } from "react";
|
|
13
|
-
import { jsx } from "react/jsx-runtime";
|
|
14
|
-
var markdown_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
-
Markdown: () => Markdown,
|
|
16
|
-
MarkdownFrame: () => MarkdownFrame,
|
|
17
|
-
fixNumberedListBreaks: () => fixNumberedListBreaks,
|
|
18
|
-
markdownComponents: () => markdownComponents,
|
|
19
|
-
normalizeCodeFenceLanguages: () => normalizeCodeFenceLanguages
|
|
20
|
-
});
|
|
21
|
-
var LazyHighlightedMarkdown = lazy(() => import("./markdown-code-BDV_2b2T-6JYA5FWZ.js").then(({ HighlightedMarkdown }) => ({ default: HighlightedMarkdown })));
|
|
22
|
-
function fixNumberedListBreaks(text) {
|
|
23
|
-
return text.replace(/^(\d+)\.\s*\n+\s*\n*/gm, "$1. ");
|
|
24
|
-
}
|
|
25
|
-
var CODE_FENCE_LANGS = /* @__PURE__ */ new Set([
|
|
26
|
-
"bash",
|
|
27
|
-
"diff",
|
|
28
|
-
"html",
|
|
29
|
-
"js",
|
|
30
|
-
"json",
|
|
31
|
-
"jsx",
|
|
32
|
-
"md",
|
|
33
|
-
"markdown",
|
|
34
|
-
"sh",
|
|
35
|
-
"shell",
|
|
36
|
-
"text",
|
|
37
|
-
"ts",
|
|
38
|
-
"tsx",
|
|
39
|
-
"yml",
|
|
40
|
-
"yaml"
|
|
41
|
-
]);
|
|
42
|
-
function normalizeCodeFenceLanguages(text) {
|
|
43
|
-
return text.replace(/```([^\n]*)/g, (_match, langRaw) => {
|
|
44
|
-
const lang = String(langRaw || "").trim().toLowerCase();
|
|
45
|
-
if (!lang) return "```";
|
|
46
|
-
const normalized = lang.split(/\s+/)[0];
|
|
47
|
-
return CODE_FENCE_LANGS.has(normalized) ? `\`\`\`${normalized}` : "```text";
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
var SAFE_HREF_PATTERN = /^(https?:|mailto:)/i;
|
|
51
|
-
function containsBlockMarkdownChild(value, imageIsSoleChild) {
|
|
52
|
-
if (!isValidElement(value)) return false;
|
|
53
|
-
const props = value.props;
|
|
54
|
-
if (typeof props !== "object" || props === null) return false;
|
|
55
|
-
const node = "node" in props ? props.node : void 0;
|
|
56
|
-
const tagName = typeof node === "object" && node !== null && "tagName" in node ? node.tagName : void 0;
|
|
57
|
-
if (tagName === "img") return imageIsSoleChild;
|
|
58
|
-
if (tagName === "code" && "data-block" in props) return true;
|
|
59
|
-
return "children" in props && containsBlockMarkdownChild(props.children, imageIsSoleChild);
|
|
60
|
-
}
|
|
61
|
-
var markdownComponents = {
|
|
62
|
-
h1: ({ children, ...props }) => /* @__PURE__ */ jsx("h1", {
|
|
63
|
-
...props,
|
|
64
|
-
children
|
|
65
|
-
}),
|
|
66
|
-
h2: ({ children, ...props }) => /* @__PURE__ */ jsx("h2", {
|
|
67
|
-
...props,
|
|
68
|
-
children
|
|
69
|
-
}),
|
|
70
|
-
h3: ({ children, ...props }) => /* @__PURE__ */ jsx("h3", {
|
|
71
|
-
...props,
|
|
72
|
-
children
|
|
73
|
-
}),
|
|
74
|
-
h4: ({ children, ...props }) => /* @__PURE__ */ jsx("h4", {
|
|
75
|
-
...props,
|
|
76
|
-
children
|
|
77
|
-
}),
|
|
78
|
-
p: ({ children, node, ...props }) => {
|
|
79
|
-
const child = (Array.isArray(children) ? children : [children]).filter((value) => value != null && value !== "");
|
|
80
|
-
if (child.some((value) => containsBlockMarkdownChild(value, child.length === 1))) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
81
|
-
return /* @__PURE__ */ jsx("p", {
|
|
82
|
-
...props,
|
|
83
|
-
children
|
|
84
|
-
});
|
|
85
|
-
},
|
|
86
|
-
ul: ({ children, ...props }) => /* @__PURE__ */ jsx("ul", {
|
|
87
|
-
...props,
|
|
88
|
-
children
|
|
89
|
-
}),
|
|
90
|
-
ol: ({ children, ...props }) => /* @__PURE__ */ jsx("ol", {
|
|
91
|
-
...props,
|
|
92
|
-
children
|
|
93
|
-
}),
|
|
94
|
-
li: ({ children, ...props }) => /* @__PURE__ */ jsx("li", {
|
|
95
|
-
...props,
|
|
96
|
-
children
|
|
97
|
-
}),
|
|
98
|
-
strong: ({ children, ...props }) => /* @__PURE__ */ jsx("strong", {
|
|
99
|
-
...props,
|
|
100
|
-
children
|
|
101
|
-
}),
|
|
102
|
-
a: ({ href, children, ...props }) => {
|
|
103
|
-
if (typeof href !== "string" || !SAFE_HREF_PATTERN.test(href)) return /* @__PURE__ */ jsx("span", { children });
|
|
104
|
-
const isExternal = href.startsWith("http");
|
|
105
|
-
return /* @__PURE__ */ jsx("a", {
|
|
106
|
-
...props,
|
|
107
|
-
href,
|
|
108
|
-
target: isExternal ? "_blank" : void 0,
|
|
109
|
-
rel: isExternal ? "noopener noreferrer" : void 0,
|
|
110
|
-
children
|
|
111
|
-
});
|
|
112
|
-
},
|
|
113
|
-
blockquote: ({ children, ...props }) => /* @__PURE__ */ jsx("blockquote", {
|
|
114
|
-
...props,
|
|
115
|
-
children
|
|
116
|
-
}),
|
|
117
|
-
hr: ({ ...props }) => /* @__PURE__ */ jsx("hr", { ...props }),
|
|
118
|
-
table: ({ children, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
119
|
-
className: "typeset-scroll",
|
|
120
|
-
children: /* @__PURE__ */ jsx("table", {
|
|
121
|
-
...props,
|
|
122
|
-
children
|
|
123
|
-
})
|
|
124
|
-
}),
|
|
125
|
-
th: ({ children, ...props }) => /* @__PURE__ */ jsx("th", {
|
|
126
|
-
...props,
|
|
127
|
-
children
|
|
128
|
-
}),
|
|
129
|
-
td: ({ children, ...props }) => /* @__PURE__ */ jsx("td", {
|
|
130
|
-
...props,
|
|
131
|
-
children
|
|
132
|
-
})
|
|
133
|
-
};
|
|
134
|
-
function MarkdownFrame({ children, className }) {
|
|
135
|
-
return /* @__PURE__ */ jsx("div", {
|
|
136
|
-
className: cn("typeset typeset-chat", "overflow-hidden wrap-break-word", className),
|
|
137
|
-
children
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
function PlainMarkdown({ content, className, codeControls }) {
|
|
141
|
-
const safeContent = useMemo(() => normalizeCodeFenceLanguages(fixNumberedListBreaks(content)), [content]);
|
|
142
|
-
return /* @__PURE__ */ jsx(MarkdownFrame, {
|
|
143
|
-
className,
|
|
144
|
-
children: /* @__PURE__ */ jsx(Xi, {
|
|
145
|
-
components: markdownComponents,
|
|
146
|
-
controls: { code: codeControls },
|
|
147
|
-
children: safeContent
|
|
148
|
-
})
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
function Markdown(props) {
|
|
152
|
-
if (props.isStreaming || !props.content.includes("```")) return /* @__PURE__ */ jsx(PlainMarkdown, { ...props });
|
|
153
|
-
return /* @__PURE__ */ jsx(Suspense, {
|
|
154
|
-
fallback: /* @__PURE__ */ jsx(PlainMarkdown, { ...props }),
|
|
155
|
-
children: /* @__PURE__ */ jsx(LazyHighlightedMarkdown, { ...props })
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export {
|
|
160
|
-
markdown_exports,
|
|
161
|
-
fixNumberedListBreaks,
|
|
162
|
-
normalizeCodeFenceLanguages,
|
|
163
|
-
markdownComponents,
|
|
164
|
-
MarkdownFrame,
|
|
165
|
-
Markdown
|
|
166
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// web/app/dist/server/assets/rolldown-runtime-D7D4PA-g.js
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __exportAll = (all, no_symbols) => {
|
|
4
|
-
let target = {};
|
|
5
|
-
for (var name in all) __defProp(target, name, {
|
|
6
|
-
get: all[name],
|
|
7
|
-
enumerable: true
|
|
8
|
-
});
|
|
9
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
-
return target;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
__exportAll
|
|
15
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// web/app/dist/server/assets/safe-external-url-Dd4WdO3j.js
|
|
2
|
-
function isSafeExternalUrl(value) {
|
|
3
|
-
try {
|
|
4
|
-
const url = new URL(value);
|
|
5
|
-
return url.protocol === "http:" || url.protocol === "https:";
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
isSafeExternalUrl
|
|
13
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AnimationFrame,
|
|
3
|
-
error,
|
|
4
|
-
useId,
|
|
5
|
-
useIsoLayoutEffect
|
|
6
|
-
} from "./chunk-GLSR4ZI2.js";
|
|
7
|
-
import {
|
|
8
|
-
cn
|
|
9
|
-
} from "./chunk-TMQ3MT3D.js";
|
|
10
|
-
|
|
11
|
-
// web/app/dist/server/assets/surfaces-De8PLN4C.js
|
|
12
|
-
import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
13
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
var SurfaceContext = createContext(1);
|
|
15
|
-
function useSurface() {
|
|
16
|
-
return useContext(SurfaceContext);
|
|
17
|
-
}
|
|
18
|
-
function SurfaceProvider({ value, children }) {
|
|
19
|
-
return /* @__PURE__ */ jsx(SurfaceContext.Provider, {
|
|
20
|
-
value: Math.max(1, Math.min(8, value)),
|
|
21
|
-
children
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
var SURFACE_BG = {
|
|
25
|
-
1: "bg-surface-1",
|
|
26
|
-
2: "bg-surface-2",
|
|
27
|
-
3: "bg-surface-3",
|
|
28
|
-
4: "bg-surface-4",
|
|
29
|
-
5: "bg-surface-5",
|
|
30
|
-
6: "bg-surface-6",
|
|
31
|
-
7: "bg-surface-7",
|
|
32
|
-
8: "bg-surface-8"
|
|
33
|
-
};
|
|
34
|
-
var SURFACE_SHADOW = {
|
|
35
|
-
1: "shadow-surface-1",
|
|
36
|
-
2: "shadow-surface-2",
|
|
37
|
-
3: "shadow-surface-3",
|
|
38
|
-
4: "shadow-surface-4",
|
|
39
|
-
5: "shadow-surface-5",
|
|
40
|
-
6: "shadow-surface-6",
|
|
41
|
-
7: "shadow-surface-7",
|
|
42
|
-
8: "shadow-surface-8"
|
|
43
|
-
};
|
|
44
|
-
function surfaceClasses(bgLevel, shadowLevel = bgLevel) {
|
|
45
|
-
const bg = Math.round(Math.max(1, Math.min(8, bgLevel)));
|
|
46
|
-
const shadow = Math.round(Math.max(1, Math.min(8, shadowLevel)));
|
|
47
|
-
return `${SURFACE_BG[bg]} ${SURFACE_SHADOW[shadow]}`;
|
|
48
|
-
}
|
|
49
|
-
var paper = "bg-background shadow-[0_1px_2px_rgba(0,0,0,0.04),0_12px_32px_-16px_rgba(0,0,0,0.12)] dark:bg-popover dark:shadow-none";
|
|
50
|
-
var elevatedMenu = "border border-border bg-popover text-popover-foreground shadow-lg";
|
|
51
|
-
var floating = "bg-background shadow-[0_2px_8px_rgba(0,0,0,0.05),0_20px_48px_-16px_rgba(0,0,0,0.18)] dark:bg-popover dark:shadow-[0_20px_48px_-16px_rgba(0,0,0,0.55)]";
|
|
52
|
-
var field = "bg-foreground/[0.04] dark:bg-foreground/[0.06]";
|
|
53
|
-
var labelSwap = "col-start-1 row-start-1 flex w-max items-center gap-1.5 leading-none transition-[opacity,filter] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none";
|
|
54
|
-
var labelSwapIn = "opacity-100 blur-none";
|
|
55
|
-
var labelSwapOut = "pointer-events-none select-none opacity-0 blur-[2px]";
|
|
56
|
-
var collapsePanel = "h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] data-[ending-style]:h-0 data-[starting-style]:h-0 motion-reduce:transition-none";
|
|
57
|
-
var mono = "font-mono text-caption tracking-tight";
|
|
58
|
-
function ShimmerLabel({ active = true, className, ...props }) {
|
|
59
|
-
return /* @__PURE__ */ jsx("span", {
|
|
60
|
-
className: cn(active && "shimmer motion-reduce:animate-none", className),
|
|
61
|
-
...props
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function SwapLabel({ active, children, className }) {
|
|
65
|
-
const firstLayerRef = useRef(null);
|
|
66
|
-
const secondLayerRef = useRef(null);
|
|
67
|
-
const [width, setWidth] = useState(null);
|
|
68
|
-
useLayoutEffect(() => {
|
|
69
|
-
const target = (active === 0 ? firstLayerRef : secondLayerRef).current;
|
|
70
|
-
if (!target) return void 0;
|
|
71
|
-
const measure = () => setWidth(Math.ceil(target.getBoundingClientRect().width));
|
|
72
|
-
measure();
|
|
73
|
-
const observer = new ResizeObserver(measure);
|
|
74
|
-
observer.observe(target);
|
|
75
|
-
return () => observer.disconnect();
|
|
76
|
-
}, [active]);
|
|
77
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
78
|
-
style: width === null ? void 0 : { width },
|
|
79
|
-
className: cn("grid overflow-x-clip transition-[width] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", className),
|
|
80
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
81
|
-
ref: firstLayerRef,
|
|
82
|
-
"aria-hidden": active !== 0,
|
|
83
|
-
className: cn(labelSwap, active === 0 ? labelSwapIn : labelSwapOut),
|
|
84
|
-
children: children[0]
|
|
85
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
86
|
-
ref: secondLayerRef,
|
|
87
|
-
"aria-hidden": active !== 1,
|
|
88
|
-
className: cn(labelSwap, active === 1 ? labelSwapIn : labelSwapOut),
|
|
89
|
-
children: children[1]
|
|
90
|
-
})]
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.5.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@base-ui/react/internals/useBaseUiId.mjs
|
|
95
|
-
function useBaseUiId(idOverride) {
|
|
96
|
-
return useId(idOverride, "base-ui");
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// node_modules/.pnpm/@base-ui+utils@0.4.0_@types+react@19.3.0_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@base-ui/utils/useControlled.mjs
|
|
100
|
-
import * as React from "react";
|
|
101
|
-
function useControlled({
|
|
102
|
-
controlled,
|
|
103
|
-
default: defaultProp,
|
|
104
|
-
name,
|
|
105
|
-
state = "value"
|
|
106
|
-
}) {
|
|
107
|
-
const {
|
|
108
|
-
current: isControlled
|
|
109
|
-
} = React.useRef(controlled !== void 0);
|
|
110
|
-
const [valueState, setValue] = React.useState(defaultProp);
|
|
111
|
-
const value = isControlled && controlled !== void 0 ? controlled : valueState;
|
|
112
|
-
if (process.env.NODE_ENV !== "production") {
|
|
113
|
-
React.useEffect(() => {
|
|
114
|
-
if (isControlled !== (controlled !== void 0)) {
|
|
115
|
-
error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
|
|
116
|
-
}
|
|
117
|
-
}, [state, name, controlled]);
|
|
118
|
-
const {
|
|
119
|
-
current: defaultValue
|
|
120
|
-
} = React.useRef(defaultProp);
|
|
121
|
-
React.useEffect(() => {
|
|
122
|
-
if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) {
|
|
123
|
-
error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join("\n"));
|
|
124
|
-
}
|
|
125
|
-
}, [defaultProp]);
|
|
126
|
-
}
|
|
127
|
-
const setValueIfUncontrolled = React.useCallback((newValue) => {
|
|
128
|
-
if (!isControlled) {
|
|
129
|
-
setValue(newValue);
|
|
130
|
-
}
|
|
131
|
-
}, []);
|
|
132
|
-
return [value, setValueIfUncontrolled];
|
|
133
|
-
}
|
|
134
|
-
function serializeToDevModeString(input) {
|
|
135
|
-
let nextId = 0;
|
|
136
|
-
const seen = /* @__PURE__ */ new WeakMap();
|
|
137
|
-
try {
|
|
138
|
-
const result = JSON.stringify(input, function replacer(key, value) {
|
|
139
|
-
if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) {
|
|
140
|
-
return void 0;
|
|
141
|
-
}
|
|
142
|
-
if (typeof value === "bigint") {
|
|
143
|
-
return `__bigint__:${value}`;
|
|
144
|
-
}
|
|
145
|
-
if (value !== null && typeof value === "object") {
|
|
146
|
-
const id = seen.get(value);
|
|
147
|
-
if (id !== void 0) {
|
|
148
|
-
return `__object__:${id}`;
|
|
149
|
-
}
|
|
150
|
-
seen.set(value, nextId);
|
|
151
|
-
nextId += 1;
|
|
152
|
-
}
|
|
153
|
-
return value;
|
|
154
|
-
});
|
|
155
|
-
return result ?? `__top__:${typeof input}`;
|
|
156
|
-
} catch {
|
|
157
|
-
return "__unserializable__";
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.5.0_@types+react@19.3.0_date-fns@4.4.0_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
162
|
-
import * as React2 from "react";
|
|
163
|
-
function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
|
|
164
|
-
const [transitionStatus, setTransitionStatus] = React2.useState(open && enableIdleState ? "idle" : void 0);
|
|
165
|
-
const [mounted, setMounted] = React2.useState(open && !animateInitialOpen);
|
|
166
|
-
if (open && !mounted) {
|
|
167
|
-
setMounted(true);
|
|
168
|
-
setTransitionStatus("starting");
|
|
169
|
-
}
|
|
170
|
-
if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
|
|
171
|
-
setTransitionStatus("ending");
|
|
172
|
-
}
|
|
173
|
-
if (!open && !mounted && transitionStatus === "ending") {
|
|
174
|
-
setTransitionStatus(void 0);
|
|
175
|
-
}
|
|
176
|
-
useIsoLayoutEffect(() => {
|
|
177
|
-
if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
|
|
178
|
-
const frame = AnimationFrame.request(() => {
|
|
179
|
-
setTransitionStatus("ending");
|
|
180
|
-
});
|
|
181
|
-
return () => {
|
|
182
|
-
AnimationFrame.cancel(frame);
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
return void 0;
|
|
186
|
-
}, [open, mounted, transitionStatus, deferEndingState]);
|
|
187
|
-
useIsoLayoutEffect(() => {
|
|
188
|
-
if (!open || enableIdleState) {
|
|
189
|
-
return void 0;
|
|
190
|
-
}
|
|
191
|
-
const frame = AnimationFrame.request(() => {
|
|
192
|
-
setTransitionStatus(void 0);
|
|
193
|
-
});
|
|
194
|
-
return () => {
|
|
195
|
-
AnimationFrame.cancel(frame);
|
|
196
|
-
};
|
|
197
|
-
}, [enableIdleState, open]);
|
|
198
|
-
useIsoLayoutEffect(() => {
|
|
199
|
-
if (!open || !enableIdleState) {
|
|
200
|
-
return void 0;
|
|
201
|
-
}
|
|
202
|
-
if (open && mounted && transitionStatus !== "idle") {
|
|
203
|
-
setTransitionStatus("starting");
|
|
204
|
-
}
|
|
205
|
-
const frame = AnimationFrame.request(() => {
|
|
206
|
-
setTransitionStatus("idle");
|
|
207
|
-
});
|
|
208
|
-
return () => {
|
|
209
|
-
AnimationFrame.cancel(frame);
|
|
210
|
-
};
|
|
211
|
-
}, [enableIdleState, open, mounted, transitionStatus]);
|
|
212
|
-
return {
|
|
213
|
-
mounted,
|
|
214
|
-
setMounted,
|
|
215
|
-
transitionStatus
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export {
|
|
220
|
-
useTransitionStatus,
|
|
221
|
-
useSurface,
|
|
222
|
-
SurfaceProvider,
|
|
223
|
-
surfaceClasses,
|
|
224
|
-
paper,
|
|
225
|
-
elevatedMenu,
|
|
226
|
-
floating,
|
|
227
|
-
field,
|
|
228
|
-
collapsePanel,
|
|
229
|
-
mono,
|
|
230
|
-
ShimmerLabel,
|
|
231
|
-
SwapLabel,
|
|
232
|
-
useBaseUiId,
|
|
233
|
-
useControlled
|
|
234
|
-
};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChevronDown,
|
|
3
|
-
FilePenLine,
|
|
4
|
-
FileSearch,
|
|
5
|
-
Terminal,
|
|
6
|
-
Wrench
|
|
7
|
-
} from "./chunk-GLH2GWMG.js";
|
|
8
|
-
import {
|
|
9
|
-
__exportAll
|
|
10
|
-
} from "./chunk-OO7NBFQQ.js";
|
|
11
|
-
import {
|
|
12
|
-
cn
|
|
13
|
-
} from "./chunk-TMQ3MT3D.js";
|
|
14
|
-
|
|
15
|
-
// web/app/dist/server/assets/tool-timeline-BKWsrZHK.js
|
|
16
|
-
import { useMemo, useState } from "react";
|
|
17
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
-
var tool_timeline_exports = /* @__PURE__ */ __exportAll({ ToolTimeline: () => ToolTimeline });
|
|
19
|
-
var NO_ARTIFACTS = [];
|
|
20
|
-
function artifactPanel(kind) {
|
|
21
|
-
return kind === "ipython" ? "repl" : "artifacts";
|
|
22
|
-
}
|
|
23
|
-
function withArtifact(step, artifact) {
|
|
24
|
-
if (!artifact) return step;
|
|
25
|
-
return {
|
|
26
|
-
...step,
|
|
27
|
-
artifactId: artifact.id,
|
|
28
|
-
artifactTitle: artifact.title,
|
|
29
|
-
artifactTarget: artifactPanel(artifact.kind)
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function record(value) {
|
|
33
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
34
|
-
}
|
|
35
|
-
function target(input, fallback) {
|
|
36
|
-
const source = record(input);
|
|
37
|
-
for (const key of [
|
|
38
|
-
"path",
|
|
39
|
-
"filePath",
|
|
40
|
-
"command",
|
|
41
|
-
"cmd",
|
|
42
|
-
"query",
|
|
43
|
-
"pattern",
|
|
44
|
-
"code"
|
|
45
|
-
]) if (typeof source?.[key] === "string" && source[key]) return source[key];
|
|
46
|
-
return fallback;
|
|
47
|
-
}
|
|
48
|
-
function status(part, streaming) {
|
|
49
|
-
const state = part.state;
|
|
50
|
-
if (state === "output-error" || state === "error") return "error";
|
|
51
|
-
if (state === "cancelled" || state === "canceled" || state === "aborted") return "cancelled";
|
|
52
|
-
if (state === "input-streaming" || state === "streaming") return streaming ? "running" : "cancelled";
|
|
53
|
-
return streaming && part.output === void 0 && part.result === void 0 ? "running" : "complete";
|
|
54
|
-
}
|
|
55
|
-
function toolStep(part, fallbackId, streaming) {
|
|
56
|
-
const type = part.type;
|
|
57
|
-
if (typeof type !== "string" || !type.startsWith("tool-") || type === "tool-FleetReasoning" || type === "tool-Thinking") return void 0;
|
|
58
|
-
const name = type.slice(5);
|
|
59
|
-
const lower = name.toLowerCase();
|
|
60
|
-
const icon = lower.includes("edit") || lower.includes("write") || lower.includes("patch") ? FilePenLine : lower.includes("read") || lower.includes("search") || lower.includes("grep") || lower.includes("glob") ? FileSearch : lower.includes("bash") || lower.includes("shell") || lower.includes("python") || lower.includes("ipython") ? Terminal : Wrench;
|
|
61
|
-
const verb = lower.includes("edit") || lower.includes("write") || lower.includes("patch") ? "Edited" : lower.includes("read") ? "Read" : lower.includes("search") || lower.includes("grep") || lower.includes("glob") ? "Searched" : lower.includes("bash") || lower.includes("shell") || lower.includes("python") || lower.includes("ipython") ? "Ran" : name;
|
|
62
|
-
return {
|
|
63
|
-
id: typeof part.toolCallId === "string" ? part.toolCallId : fallbackId,
|
|
64
|
-
icon,
|
|
65
|
-
verb,
|
|
66
|
-
target: target(part.input ?? part.args, name),
|
|
67
|
-
status: status(part, streaming)
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function artifactStep(artifact) {
|
|
71
|
-
const icon = artifact.kind === "diff" ? FilePenLine : artifact.kind === "bash" || artifact.kind === "ipython" ? Terminal : Wrench;
|
|
72
|
-
return {
|
|
73
|
-
id: `artifact:${artifact.id}`,
|
|
74
|
-
icon,
|
|
75
|
-
verb: artifact.kind === "compaction" ? "Compacted" : artifact.kind === "refinement" ? "Refined" : artifact.kind === "recap" ? "Recapped" : artifact.kind === "rlm" ? "Delegated" : artifact.kind === "diff" ? "Edited" : "Completed",
|
|
76
|
-
target: artifact.title,
|
|
77
|
-
status: artifact.status === "success" ? "complete" : artifact.status
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function statusClass(status2) {
|
|
81
|
-
if (status2 === "running") return "text-primary";
|
|
82
|
-
if (status2 === "error") return "text-destructive";
|
|
83
|
-
if (status2 === "cancelled") return "text-muted-foreground";
|
|
84
|
-
return "text-success";
|
|
85
|
-
}
|
|
86
|
-
function ToolTimeline({ messages, artifacts = NO_ARTIFACTS, streaming, className, onOpenArtifact }) {
|
|
87
|
-
const steps = useMemo(() => {
|
|
88
|
-
const seen = /* @__PURE__ */ new Set();
|
|
89
|
-
const artifactByToolCallId = new Map(artifacts.flatMap((artifact) => artifact.sourceToolCallId ? [[artifact.sourceToolCallId, artifact]] : []));
|
|
90
|
-
const fromMessages = messages.flatMap((message) => message.parts.flatMap((part, index) => {
|
|
91
|
-
const step = toolStep(record(part) ?? {}, `${message.id}:${index}`, streaming);
|
|
92
|
-
if (!step || seen.has(step.id)) return [];
|
|
93
|
-
seen.add(step.id);
|
|
94
|
-
return [withArtifact(step, artifactByToolCallId.get(step.id))];
|
|
95
|
-
}));
|
|
96
|
-
const fromArtifacts = artifacts.flatMap((artifact) => {
|
|
97
|
-
if (artifact.sourceToolCallId && seen.has(artifact.sourceToolCallId)) return [];
|
|
98
|
-
const step = withArtifact(artifactStep(artifact), artifact);
|
|
99
|
-
if (seen.has(step.id)) return [];
|
|
100
|
-
seen.add(step.id);
|
|
101
|
-
return [step];
|
|
102
|
-
});
|
|
103
|
-
return [...fromMessages, ...fromArtifacts];
|
|
104
|
-
}, [
|
|
105
|
-
artifacts,
|
|
106
|
-
messages,
|
|
107
|
-
streaming
|
|
108
|
-
]);
|
|
109
|
-
const [open, setOpen] = useState(true);
|
|
110
|
-
if (steps.length === 0) return null;
|
|
111
|
-
const active = steps.at(-1);
|
|
112
|
-
const ActiveIcon = active?.icon;
|
|
113
|
-
return /* @__PURE__ */ jsxs("section", {
|
|
114
|
-
className: cn("mb-2 rounded-xl border border-border/60 bg-muted/20", className),
|
|
115
|
-
children: [/* @__PURE__ */ jsxs("button", {
|
|
116
|
-
type: "button",
|
|
117
|
-
"aria-expanded": open,
|
|
118
|
-
onClick: () => setOpen((current) => !current),
|
|
119
|
-
className: "flex w-full items-center gap-2 px-3 py-2 text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
120
|
-
children: [
|
|
121
|
-
active && ActiveIcon ? /* @__PURE__ */ jsx(ActiveIcon, { className: cn("size-3.5 shrink-0", statusClass(active.status), active.status === "running" && "animate-pulse") }) : null,
|
|
122
|
-
/* @__PURE__ */ jsx("span", {
|
|
123
|
-
className: "min-w-0 flex-1 truncate font-medium",
|
|
124
|
-
children: streaming && active ? `${active.verb} ${active.target}` : `${steps.length} tool ${steps.length === 1 ? "action" : "actions"}`
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: cn("size-3.5 text-muted-foreground transition-transform", open && "rotate-180") })
|
|
127
|
-
]
|
|
128
|
-
}), open ? /* @__PURE__ */ jsx("div", {
|
|
129
|
-
className: "space-y-1 border-t border-border/50 px-3 py-2",
|
|
130
|
-
children: steps.map((step) => {
|
|
131
|
-
const Icon = step.icon;
|
|
132
|
-
const artifactId = step.artifactId;
|
|
133
|
-
const openLabel = artifactId && step.artifactTitle ? step.artifactTarget === "repl" ? `Open ${step.artifactTitle} in REPL` : `Open ${step.artifactTitle} in artifacts` : void 0;
|
|
134
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
135
|
-
className: "flex min-w-0 items-center gap-2 text-xs",
|
|
136
|
-
children: [
|
|
137
|
-
/* @__PURE__ */ jsx(Icon, { className: cn("size-3.5 shrink-0", statusClass(step.status)) }),
|
|
138
|
-
/* @__PURE__ */ jsx("span", {
|
|
139
|
-
className: "shrink-0 text-muted-foreground",
|
|
140
|
-
children: step.verb
|
|
141
|
-
}),
|
|
142
|
-
/* @__PURE__ */ jsx("span", {
|
|
143
|
-
className: "min-w-0 flex-1 truncate font-mono text-foreground/75",
|
|
144
|
-
children: step.target
|
|
145
|
-
}),
|
|
146
|
-
openLabel && artifactId && onOpenArtifact ? /* @__PURE__ */ jsx("button", {
|
|
147
|
-
type: "button",
|
|
148
|
-
className: "shrink-0 text-micro text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
149
|
-
"aria-label": openLabel,
|
|
150
|
-
onClick: () => onOpenArtifact(artifactId, step.artifactTarget),
|
|
151
|
-
children: "Open"
|
|
152
|
-
}) : null
|
|
153
|
-
]
|
|
154
|
-
}, step.id);
|
|
155
|
-
})
|
|
156
|
-
}) : null]
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export {
|
|
161
|
-
tool_timeline_exports,
|
|
162
|
-
ToolTimeline
|
|
163
|
-
};
|