@qredence/fleet 0.8.0 → 0.9.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 +31 -0
- package/dist/web/client/assets/DialogTitle-BlVq-tcv.js +1 -0
- package/dist/web/client/assets/FloatingPortal-D8-EPDs2.js +1 -0
- package/dist/web/client/assets/activity-BPIKUzOU.js +1 -0
- package/dist/web/client/assets/agents-CGjUBYX7.js +2 -0
- package/dist/web/client/assets/agents-page-CTuFJL9H.js +1 -0
- package/dist/web/client/assets/alert-CzWGeumf.js +1 -0
- package/dist/web/client/assets/alert-dialog-D-e1Pr4q.js +1 -0
- package/dist/web/client/assets/artifacts-panel-6JEdy6jU.js +1 -0
- package/dist/web/client/assets/badge-CzQFgmVK.js +1 -0
- package/dist/web/client/assets/chat-command-palette-Bxr5EkO6.js +1 -0
- package/dist/web/client/assets/chat-hpzV6IA6.js +57 -0
- package/dist/web/client/assets/chat-queries-CfZiupub.js +3 -0
- package/dist/web/client/assets/clock-3-BwWCSCm_.js +1 -0
- package/dist/web/client/assets/{command-imgUMV3r.js → command-xo-NK4xO.js} +1 -1
- package/dist/web/client/assets/connectors-CFxLqG2x.js +2 -0
- package/dist/web/client/assets/connectors-page-DQJdoAnl.js +1 -0
- package/dist/web/client/assets/create-project-dialog-Db-WhUmP.js +1 -0
- package/dist/web/client/assets/dialog-CK8dym6z.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-Cgi48NnT.js → fork-picker-dialog-DSaFeUii.js} +1 -1
- package/dist/web/client/assets/globals-DJhWyayo.css +2 -0
- package/dist/web/client/assets/index-C9FHZDGw.js +13 -0
- package/dist/web/client/assets/{input-7g8_nw-Z.js → input-CBoTMPC_.js} +1 -1
- package/dist/web/client/assets/{input-group-Nq03Qums.js → input-group-BFubAtz9.js} +1 -1
- package/dist/web/client/assets/mcp-connections-section-DEo6Kemv.js +2 -0
- package/dist/web/client/assets/message-queue-Btjt9wK2.js +1 -0
- package/dist/web/client/assets/{model-selector-list-Cp687pdm.js → model-selector-list-CbDAT0Rw.js} +1 -1
- package/dist/web/client/assets/mutation-Da9zdeWr.js +1 -0
- package/dist/web/client/assets/notify-BIL0-CGy.js +1 -0
- package/dist/web/client/assets/open-panel-action-message-SdA1VU42.js +1 -0
- package/dist/web/client/assets/openui-renderer-DG-iML7M.js +291 -0
- package/dist/web/client/assets/pencil-Cbgq3ybX.js +1 -0
- package/dist/web/client/assets/plus-DUP2JPVG.js +1 -0
- package/dist/web/client/assets/product-page-header-Ck6I13CE.js +1 -0
- package/dist/web/client/assets/provider-catalog-CLEDlH_v.js +1 -0
- package/dist/web/client/assets/provider-label-BItazQ6H.js +1 -0
- package/dist/web/client/assets/right-panel-context-CjX-HkDO.js +1 -0
- package/dist/web/client/assets/right-panel-registry-BAJ6TuEY.js +2 -0
- package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
- package/dist/web/client/assets/routes-ja_liP8Z.js +14 -0
- package/dist/web/client/assets/select-DYh951qi.js +1 -0
- package/dist/web/client/assets/{session-activity-panel-Bc4-HSfb.js → session-activity-panel-DwaXiSrS.js} +1 -1
- package/dist/web/client/assets/{session-insights-panel-D0v_DKcb.js → session-insights-panel-BXEmuJKf.js} +1 -1
- package/dist/web/client/assets/{session-tool-renderer-C7mYeUOs.js → session-tool-renderer-DEABxZG3.js} +25 -25
- package/dist/web/client/assets/{session-tree-panel-By9m9tGB.js → session-tree-panel-5QgMvXoX.js} +1 -1
- package/dist/web/client/assets/settings-dialog-DiikSLhF.js +1 -0
- package/dist/web/client/assets/sparkles-CASAe1AI.js +1 -0
- package/dist/web/client/assets/{subagent-chat-panel-DsPmLZSf.js → subagent-chat-panel-R2RoX1Yt.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-DVZhMo7a.js +1 -0
- package/dist/web/client/assets/{subagents-panel-gQ9BLfV3.js → subagents-panel-CMMRUP8F.js} +1 -1
- package/dist/web/client/assets/switch-BrxDfsX6.js +1 -0
- package/dist/web/client/assets/toast-BNWkgZ0u.js +1 -0
- package/dist/web/client/assets/{tool-output-normalizer-CADgEiI4.js → tool-output-normalizer-DDU09Zc6.js} +1 -1
- package/dist/web/client/assets/tool-part-normalizer-CF6bmJ0s.js +4 -0
- package/dist/web/client/assets/tool-result-7qREIVv_.js +5 -0
- package/dist/web/client/assets/tool-timeline-CGhwMeNl.js +2 -0
- package/dist/web/client/assets/trash-sm2UyOxe.js +1 -0
- package/dist/web/client/assets/types-gIgIxnnG.js +1 -0
- package/dist/web/client/assets/useNavigate-CVhM7pag.js +1 -0
- package/dist/web/client/assets/useRender-CzJUrRlB.js +1 -0
- package/dist/web/client/assets/useScrollLock-BcsteNzT.js +1 -0
- package/dist/web/client/assets/with-selector-B_VDO56x.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/{_tanstack-start-manifest_v-BiNPG4xt-BZTMSM2I.js → _tanstack-start-manifest_v-B6ne-00G-OFX7UD4K.js} +44 -23
- package/dist/web/server/agents-BwzqhPjK-ANFHE5AG.js +22 -0
- package/dist/web/server/agents-page-DEqPV-eG-BR5MR74O.js +215 -0
- package/dist/web/server/{artifacts-panel-CqGBNU4q-UHNMC7PK.js → artifacts-panel-DLO8OfXb-B2ZWCDFP.js} +27 -17
- package/dist/web/server/{chat-command-palette-B94-zIEz-ES2ZB4ZF.js → chat-command-palette-CaDQAMAu-KDH7BTDS.js} +22 -13
- package/dist/web/server/chunk-2ETDIMNM.js +40 -0
- package/dist/web/server/{chunk-2VKVSL6Y.js → chunk-35RIM6VP.js} +128 -127
- package/dist/web/server/{chunk-SI5IQSG4.js → chunk-5IE54MRG.js} +8 -7
- package/dist/web/server/chunk-5MOXRFX6.js +826 -0
- package/dist/web/server/{chunk-FB2QLQTN.js → chunk-6AFVCERK.js} +12 -13
- package/dist/web/server/chunk-6GYLXDX3.js +588 -0
- package/dist/web/server/chunk-7DQQMT5V.js +8993 -0
- package/dist/web/server/chunk-APOS34PW.js +8965 -0
- package/dist/web/server/{chunk-YQO36OP6.js → chunk-AXN2OBPF.js} +2 -4
- package/dist/web/server/{chunk-E6T36NM5.js → chunk-B5FKCW75.js} +36 -353
- package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
- package/dist/web/server/{chunk-BAHZXA4D.js → chunk-BZ2EAUZZ.js} +10 -12
- package/dist/web/server/chunk-CE7U5QB2.js +42 -0
- package/dist/web/server/{chunk-LTTBT3J7.js → chunk-FNV3WZXL.js} +5 -9
- package/dist/web/server/{chunk-2FHYWKDN.js → chunk-FSQWWR2M.js} +46 -16
- package/dist/web/server/chunk-FT7HNDR5.js +143 -0
- package/dist/web/server/chunk-GNXIDE26.js +44 -0
- package/dist/web/server/{chunk-EAKPTSWR.js → chunk-HAFELESQ.js} +5 -7
- package/dist/web/server/{chunk-K67IDUAI.js → chunk-HUHUPGHT.js} +42 -32
- package/dist/web/server/{chunk-WSK55TKE.js → chunk-KBMRRJQN.js} +96 -10
- package/dist/web/server/chunk-KDCSEISZ.js +6890 -0
- package/dist/web/server/chunk-KSGGSGOA.js +50 -0
- package/dist/web/server/chunk-OO7NBFQQ.js +15 -0
- package/dist/web/server/{chunk-EL2JCDAM.js → chunk-PQVTLG3E.js} +9 -9
- package/dist/web/server/{chunk-LQM6QR7S.js → chunk-Q4ECIATK.js} +61 -47
- package/dist/web/server/{chunk-CZLGB3NE.js → chunk-R4BS3KYI.js} +2 -4
- package/dist/web/server/chunk-RX2ZJARF.js +73 -0
- package/dist/web/server/chunk-TOJA3X5N.js +421 -0
- package/dist/web/server/chunk-TQ2RECTH.js +193 -0
- package/dist/web/server/{chunk-ABMGW6QH.js → chunk-TTNONWZZ.js} +15871 -15660
- package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
- package/dist/web/server/{chunk-SGAQVAYL.js → chunk-UDUG3MYZ.js} +2 -2
- package/dist/web/server/{chunk-5GUEYYYO.js → chunk-V2GCVTDP.js} +4583 -13665
- package/dist/web/server/{chunk-OAYEN3JV.js → chunk-VDEUVEWL.js} +2253 -1
- package/dist/web/server/chunk-VM3U6PUU.js +769 -0
- package/dist/web/server/connectors-C0xm91Ss-DJVBGD73.js +22 -0
- package/dist/web/server/connectors-page-B6tJNZ6c-R5K4NSAT.js +66 -0
- package/dist/web/server/{create-project-dialog-CFPX6Ihl-EO4XTINS.js → create-project-dialog-PFPHHWIV-GH7JR5IK.js} +25 -14
- package/dist/web/server/{fork-picker-dialog-B2RBFzoZ-R6GXPSPL.js → fork-picker-dialog-DFpKOdAw-JPLJSYYU.js} +7 -10
- package/dist/web/server/{markdown-BvCfOB26-VDH4YOQD.js → markdown-Cc8V9dOF-JTNTJKQU.js} +5 -6
- package/dist/web/server/{markdown-code-SYc-BQvp-MR4FXT5C.js → markdown-code-gaRnbgNM-V5LIRYCD.js} +7 -8
- package/dist/web/server/{message-queue-D32rLiJo-HEBRGH5B.js → message-queue-nQ2_kU82-KKSLYR4S.js} +7 -14
- package/dist/web/server/{model-selector-list-DKzt_xEN-5ZPU6XDY.js → model-selector-list-By_G7_Hr-GXT27BZO.js} +12 -14
- package/dist/web/server/{openui-renderer-CeVtOdYl-PY37PCJI.js → openui-renderer-B9D8-Av--LFZP4U5V.js} +20 -13
- package/dist/web/server/{prompt-suggestions-CpTK_fHV-Q4ILLZKC.js → prompt-suggestions-B67Uy5Rk-5SMTSIFQ.js} +5 -4
- package/dist/web/server/{repl-panel-1kSS1UGd-DDM5ADGZ.js → repl-panel-1kSS1UGd-POXRYDDJ.js} +2 -3
- package/dist/web/server/{resources-panel-S4NHlpz7-NF7WYYSR.js → resources-panel-CTzOOKPz-5G6RS2D6.js} +18 -10
- package/dist/web/server/router-CnBux_Ld-YTVBMJFL.js +23 -0
- package/dist/web/server/routes-BUGzvQoO-WW43X7W2.js +124 -0
- package/dist/web/server/server.js +3 -3
- package/dist/web/server/{session-activity-panel-Bz2GrdMk-PCOXG46X.js → session-activity-panel-f0d3fCm7-I6L5IKFQ.js} +18 -10
- package/dist/web/server/{session-insights-panel-CfMX2NRu-6HWZTTAC.js → session-insights-panel-BiVObm_6-AP4FITT7.js} +2 -12
- package/dist/web/server/{session-reasoning-panel-CpiTdyQz-O3B5CDKS.js → session-reasoning-panel-QIt_xjP0-FKJWMNHO.js} +17 -9
- package/dist/web/server/session-tool-renderer-Cg_ZPHxS-BNQKNJNZ.js +34 -0
- package/dist/web/server/{session-tree-panel-CzkE0RFB-P4KWA7S2.js → session-tree-panel-B--el8O5-NZOZJM5L.js} +18 -11
- package/dist/web/server/{settings-dialog-BUgVNpr1-THSYIOZL.js → settings-dialog-D_eJN2ia-W47Y474K.js} +102 -790
- package/dist/web/server/{subagent-chat-panel-mw3kEFfK-CDYX7LST.js → subagent-chat-panel-C9nWP21E-D5C2TTYD.js} +23 -15
- package/dist/web/server/{subagents-panel-2ZJfYrXG-NDJKHJHD.js → subagents-panel-fAKvBNRG-O7QHXNE2.js} +24 -17
- package/dist/web/server/{workspace-panel-xznrPDLt-QCJRZOF3.js → workspace-panel-CZMNMU63-SYOSM3B7.js} +23 -15
- package/package.json +1 -1
- package/dist/web/client/assets/DialogTitle-RY2UDuCY.js +0 -1
- package/dist/web/client/assets/FloatingPortal-XC0MCNnD.js +0 -1
- package/dist/web/client/assets/action-swap-BWRUNKQA.js +0 -1
- package/dist/web/client/assets/alert-dialog-DGNvg0B1.js +0 -1
- package/dist/web/client/assets/artifacts-panel-BGXpKRJ7.js +0 -1
- package/dist/web/client/assets/badge-DM06QVqB.js +0 -57
- package/dist/web/client/assets/chat-command-palette-PenyaZBw.js +0 -1
- package/dist/web/client/assets/create-project-dialog-C00d5yCq.js +0 -1
- package/dist/web/client/assets/dialog-zCNOQI63.js +0 -1
- package/dist/web/client/assets/globals-BuMuB_ea.css +0 -2
- package/dist/web/client/assets/index-BqBdQGWs.js +0 -13
- package/dist/web/client/assets/message-queue-sSljtjYz.js +0 -1
- package/dist/web/client/assets/mutation-DOi2Qgfa.js +0 -1
- package/dist/web/client/assets/notify-Cqdu6EV8.js +0 -1
- package/dist/web/client/assets/openui-renderer-BdYTcn-_.js +0 -291
- package/dist/web/client/assets/provider-label-QrVOwKBO.js +0 -1
- package/dist/web/client/assets/right-panel-context-DHKWoetk.js +0 -1
- package/dist/web/client/assets/right-panel-registry-BaLZiKny.js +0 -2
- package/dist/web/client/assets/routes-BkFkhfO3.js +0 -16
- package/dist/web/client/assets/select-BhV4ikeN.js +0 -1
- package/dist/web/client/assets/settings-dialog-Dpt4Ha_m.js +0 -2
- package/dist/web/client/assets/sparkles-BwVa9zQJ.js +0 -1
- package/dist/web/client/assets/subagent-transcript-CNQ9wGk2.js +0 -1
- package/dist/web/client/assets/switch-C7Myu-Dt.js +0 -1
- package/dist/web/client/assets/toast-DlbKi6K-.js +0 -1
- package/dist/web/client/assets/tool-part-normalizer-CYK62WZM.js +0 -4
- package/dist/web/client/assets/tool-result-bjAGZ2qm.js +0 -5
- package/dist/web/client/assets/tool-timeline-eNqH1zj7.js +0 -2
- package/dist/web/client/assets/types-D5hZ8IyV.js +0 -1
- package/dist/web/client/assets/useRender-Bbk_fl72.js +0 -1
- package/dist/web/server/chunk-2PAW6K4Q.js +0 -56
- package/dist/web/server/chunk-7L5PCCYR.js +0 -2287
- package/dist/web/server/chunk-FB3UHLLN.js +0 -49
- package/dist/web/server/chunk-OSPDNT7S.js +0 -25404
- package/dist/web/server/router-DVKxZik_-254GZAJW.js +0 -30
- package/dist/web/server/routes-BTxAklRp-UM7ZTLLP.js +0 -140
- package/dist/web/server/session-tool-renderer-BZiOxtt1-T3ZGAQKX.js +0 -26
|
@@ -0,0 +1,826 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useBaseUiId,
|
|
3
|
+
useControlled,
|
|
4
|
+
useTransitionStatus
|
|
5
|
+
} from "./chunk-TXZDDJCT.js";
|
|
6
|
+
import {
|
|
7
|
+
AnimationFrame,
|
|
8
|
+
TransitionStatusDataAttributes_exports,
|
|
9
|
+
addEventListener,
|
|
10
|
+
createChangeEventDetails,
|
|
11
|
+
reason_parts_exports,
|
|
12
|
+
transitionStatusMapping,
|
|
13
|
+
useAnimationsFinished,
|
|
14
|
+
useOpenChangeComplete,
|
|
15
|
+
useValueAsRef
|
|
16
|
+
} from "./chunk-APOS34PW.js";
|
|
17
|
+
import {
|
|
18
|
+
formatErrorMessage_default,
|
|
19
|
+
getWindow,
|
|
20
|
+
resolveStyle,
|
|
21
|
+
useButton,
|
|
22
|
+
useIsoLayoutEffect,
|
|
23
|
+
useMergedRefs,
|
|
24
|
+
useRenderElement,
|
|
25
|
+
useStableCallback,
|
|
26
|
+
warn
|
|
27
|
+
} from "./chunk-FSQWWR2M.js";
|
|
28
|
+
import {
|
|
29
|
+
__export
|
|
30
|
+
} from "./chunk-CZ7CSFO4.js";
|
|
31
|
+
|
|
32
|
+
// web/app/dist/server/assets/prime-agent-artifacts-CJUvqPu2.js
|
|
33
|
+
function stablePresentationId(seed) {
|
|
34
|
+
let hash = 2166136261;
|
|
35
|
+
for (let index = 0; index < seed.length; index += 1) {
|
|
36
|
+
hash ^= seed.charCodeAt(index);
|
|
37
|
+
hash = Math.imul(hash, 16777619);
|
|
38
|
+
}
|
|
39
|
+
return `${seed.replace(/[^a-zA-Z0-9:_-]+/g, "-").slice(0, 96)}-${(hash >>> 0).toString(36)}`;
|
|
40
|
+
}
|
|
41
|
+
function timestampFor(message) {
|
|
42
|
+
if (typeof message.createdAt === "number") return message.createdAt;
|
|
43
|
+
if (message.createdAt instanceof Date) return message.createdAt.getTime();
|
|
44
|
+
if (typeof message.createdAt === "string") {
|
|
45
|
+
const parsed = Date.parse(message.createdAt);
|
|
46
|
+
if (Number.isFinite(parsed)) return parsed;
|
|
47
|
+
}
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
function record(value) {
|
|
51
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
52
|
+
}
|
|
53
|
+
function stringField(source, ...keys) {
|
|
54
|
+
for (const key of keys) if (typeof source?.[key] === "string") return source[key];
|
|
55
|
+
}
|
|
56
|
+
function textContent(value) {
|
|
57
|
+
if (typeof value === "string") return value;
|
|
58
|
+
if (!Array.isArray(value)) return void 0;
|
|
59
|
+
return value.flatMap((part) => {
|
|
60
|
+
const source = record(part);
|
|
61
|
+
return typeof source?.text === "string" ? [source.text] : [];
|
|
62
|
+
}).join("") || void 0;
|
|
63
|
+
}
|
|
64
|
+
function splitLines(artifactId, index, content, type) {
|
|
65
|
+
return content.split("\n").map((line, lineIndex) => ({
|
|
66
|
+
id: `${artifactId}-${index}-${type}-${lineIndex}`,
|
|
67
|
+
type,
|
|
68
|
+
content: line
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
function filePathFor(artifact) {
|
|
72
|
+
const input = record(artifact.input);
|
|
73
|
+
const output = record(artifact.output);
|
|
74
|
+
return stringField(input, "path", "file_path", "filePath") ?? stringField(output, "path", "file_path", "filePath") ?? artifact.title;
|
|
75
|
+
}
|
|
76
|
+
function unifiedDiffFor(artifact) {
|
|
77
|
+
const input = record(artifact.input);
|
|
78
|
+
const output = record(artifact.output);
|
|
79
|
+
const details = record(output?.details);
|
|
80
|
+
return stringField(output, "diff", "patch") ?? stringField(details, "diff", "patch") ?? stringField(input, "diff", "patch");
|
|
81
|
+
}
|
|
82
|
+
function editDiffFor(artifact) {
|
|
83
|
+
const input = record(artifact.input);
|
|
84
|
+
const output = record(artifact.output);
|
|
85
|
+
return (Array.isArray(input?.edits) ? input.edits : Array.isArray(output?.edits) ? output.edits : []).flatMap((edit, index) => {
|
|
86
|
+
const source = record(edit);
|
|
87
|
+
if (!source) return [];
|
|
88
|
+
const before = stringField(source, "oldText", "old_string", "before");
|
|
89
|
+
const after = stringField(source, "newText", "new_string", "after", "content");
|
|
90
|
+
return [...before === void 0 ? [] : splitLines(artifact.id, index, before, "removed"), ...after === void 0 ? [] : splitLines(artifact.id, index, after, "added")];
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function primeAgentArtifactDiff(artifact) {
|
|
94
|
+
const unifiedDiff = unifiedDiffFor(artifact);
|
|
95
|
+
if (unifiedDiff?.trim()) {
|
|
96
|
+
const lines2 = unifiedDiff.split("\n").map((content2, index) => ({
|
|
97
|
+
id: `${artifact.id}-${index}`,
|
|
98
|
+
type: content2.startsWith("+") && !content2.startsWith("+++") ? "added" : content2.startsWith("-") && !content2.startsWith("---") ? "removed" : "context",
|
|
99
|
+
content: content2
|
|
100
|
+
}));
|
|
101
|
+
return {
|
|
102
|
+
file: filePathFor(artifact),
|
|
103
|
+
lines: lines2,
|
|
104
|
+
copyText: unifiedDiff
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
const editLines = editDiffFor(artifact);
|
|
108
|
+
if (editLines.length > 0) return {
|
|
109
|
+
file: filePathFor(artifact),
|
|
110
|
+
lines: editLines,
|
|
111
|
+
copyText: editLines.map((line) => `${line.type === "added" ? "+" : line.type === "removed" ? "-" : " "}${line.content}`).join("\n")
|
|
112
|
+
};
|
|
113
|
+
const input = record(artifact.input);
|
|
114
|
+
const output = record(artifact.output);
|
|
115
|
+
if (!(artifact.title.toLowerCase().includes("write") || input?.content !== void 0)) return void 0;
|
|
116
|
+
const content = textContent(input?.content) ?? textContent(output?.content);
|
|
117
|
+
if (content === void 0) return void 0;
|
|
118
|
+
const lines = splitLines(artifact.id, 0, content, "added");
|
|
119
|
+
return {
|
|
120
|
+
file: filePathFor(artifact),
|
|
121
|
+
lines,
|
|
122
|
+
copyText: lines.map((line) => `+${line.content}`).join("\n")
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function artifactKind(name) {
|
|
126
|
+
const lower = name.toLowerCase();
|
|
127
|
+
if (lower.includes("thinking") || lower.includes("reasoning") || lower.includes("question")) return void 0;
|
|
128
|
+
if (lower.includes("bash") || lower.includes("shell")) return "bash";
|
|
129
|
+
if (lower.includes("ipython") || lower.includes("python")) return "ipython";
|
|
130
|
+
if (lower.includes("mcp")) return "mcp";
|
|
131
|
+
if (lower.includes("edit") || lower.includes("write") || lower.includes("patch")) return "diff";
|
|
132
|
+
return "generic";
|
|
133
|
+
}
|
|
134
|
+
function statusFor(part, chatStatus) {
|
|
135
|
+
const state = typeof part.state === "string" ? part.state : void 0;
|
|
136
|
+
if (state === "output-error" || state === "error") return "error";
|
|
137
|
+
if (state === "output-available" || state === "complete" || state === "success") return "success";
|
|
138
|
+
if (state === "cancelled" || state === "canceled" || state === "aborted" || state === "interrupted") return "cancelled";
|
|
139
|
+
if (part.error !== void 0) return "error";
|
|
140
|
+
if (part.output !== void 0 || part.result !== void 0) return "success";
|
|
141
|
+
return chatStatus === "streaming" ? "running" : "cancelled";
|
|
142
|
+
}
|
|
143
|
+
function upsertRun(runs, artifact) {
|
|
144
|
+
const run = runs.find((candidate) => candidate.runId === artifact.runId);
|
|
145
|
+
if (!run) {
|
|
146
|
+
runs.push({
|
|
147
|
+
id: stablePresentationId(`artifact-run:${artifact.runId}`),
|
|
148
|
+
runId: artifact.runId,
|
|
149
|
+
artifacts: [artifact],
|
|
150
|
+
startedAt: artifact.timestamp,
|
|
151
|
+
...artifact.status !== "running" ? { endedAt: artifact.timestamp } : {}
|
|
152
|
+
});
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const existing = run.artifacts.findIndex((candidate) => candidate.id === artifact.id);
|
|
156
|
+
if (existing < 0) run.artifacts.push(artifact);
|
|
157
|
+
else run.artifacts[existing] = artifact;
|
|
158
|
+
if (artifact.status !== "running") run.endedAt = artifact.timestamp;
|
|
159
|
+
}
|
|
160
|
+
function artifactsFromMessages(messages, chatStatus) {
|
|
161
|
+
const runs = [];
|
|
162
|
+
for (const message of messages) for (const [partIndex, part] of message.parts.entries()) {
|
|
163
|
+
const source = record(part);
|
|
164
|
+
if (!source) continue;
|
|
165
|
+
const type = source?.type;
|
|
166
|
+
if (typeof type !== "string" || !type.startsWith("tool-")) continue;
|
|
167
|
+
const name = type.slice(5);
|
|
168
|
+
const kind = artifactKind(name);
|
|
169
|
+
if (!kind) continue;
|
|
170
|
+
const input = source.input ?? source.args;
|
|
171
|
+
const output = source.output ?? source.result;
|
|
172
|
+
if (input === void 0 && output === void 0) continue;
|
|
173
|
+
const sourceId = typeof source.toolCallId === "string" && source.toolCallId ? source.toolCallId : `${message.id}:${partIndex}`;
|
|
174
|
+
const runId = typeof source.runId === "string" && source.runId ? source.runId : message.id;
|
|
175
|
+
const timestamp = timestampFor(message);
|
|
176
|
+
upsertRun(runs, {
|
|
177
|
+
id: stablePresentationId(`${runId}:${sourceId}:${kind}`),
|
|
178
|
+
runId,
|
|
179
|
+
sourceMessageId: message.id,
|
|
180
|
+
...typeof source.toolCallId === "string" ? { sourceToolCallId: source.toolCallId } : {},
|
|
181
|
+
kind,
|
|
182
|
+
title: name,
|
|
183
|
+
status: statusFor(source, chatStatus),
|
|
184
|
+
...input !== void 0 ? { input } : {},
|
|
185
|
+
...output !== void 0 ? { output } : {},
|
|
186
|
+
...typeof source.backgroundOutput === "string" ? { backgroundOutput: source.backgroundOutput } : {},
|
|
187
|
+
timestamp
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
return runs;
|
|
191
|
+
}
|
|
192
|
+
function derivePrimeAgentArtifactRuns(messages, presentation, chatStatus) {
|
|
193
|
+
const runs = (presentation?.artifactRuns ?? []).map((run) => ({
|
|
194
|
+
...run,
|
|
195
|
+
artifacts: run.artifacts.map((artifact) => ({ ...artifact }))
|
|
196
|
+
}));
|
|
197
|
+
for (const run of artifactsFromMessages(messages, chatStatus)) for (const artifact of run.artifacts) upsertRun(runs, artifact);
|
|
198
|
+
return runs;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// web/app/dist/server/assets/collapsible-BJWsiuIc.js
|
|
202
|
+
import { jsx } from "react/jsx-runtime";
|
|
203
|
+
|
|
204
|
+
// 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/collapsible/index.parts.mjs
|
|
205
|
+
var index_parts_exports = {};
|
|
206
|
+
__export(index_parts_exports, {
|
|
207
|
+
Panel: () => CollapsiblePanel,
|
|
208
|
+
Root: () => CollapsibleRoot,
|
|
209
|
+
Trigger: () => CollapsibleTrigger
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// 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/collapsible/root/CollapsibleRoot.mjs
|
|
213
|
+
import * as React3 from "react";
|
|
214
|
+
|
|
215
|
+
// 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/collapsible/root/useCollapsibleRoot.mjs
|
|
216
|
+
import * as React from "react";
|
|
217
|
+
function useCollapsibleRoot(parameters) {
|
|
218
|
+
const {
|
|
219
|
+
open: openParam,
|
|
220
|
+
defaultOpen = false,
|
|
221
|
+
onOpenChange,
|
|
222
|
+
disabled
|
|
223
|
+
} = parameters;
|
|
224
|
+
const [open2, setOpen] = useControlled({
|
|
225
|
+
controlled: openParam,
|
|
226
|
+
default: defaultOpen,
|
|
227
|
+
name: "Collapsible",
|
|
228
|
+
state: "open"
|
|
229
|
+
});
|
|
230
|
+
const {
|
|
231
|
+
mounted,
|
|
232
|
+
setMounted,
|
|
233
|
+
transitionStatus
|
|
234
|
+
} = useTransitionStatus(open2, true, true);
|
|
235
|
+
const defaultPanelId = useBaseUiId();
|
|
236
|
+
const [registeredPanelId, setPanelIdState] = React.useState();
|
|
237
|
+
const panelId = registeredPanelId === null ? void 0 : registeredPanelId ?? defaultPanelId;
|
|
238
|
+
const handleTrigger = useStableCallback((event) => {
|
|
239
|
+
const nextOpen = !open2;
|
|
240
|
+
const eventDetails = createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent);
|
|
241
|
+
onOpenChange(nextOpen, eventDetails);
|
|
242
|
+
if (eventDetails.isCanceled) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
setOpen(nextOpen);
|
|
246
|
+
});
|
|
247
|
+
return React.useMemo(() => ({
|
|
248
|
+
defaultPanelId,
|
|
249
|
+
disabled,
|
|
250
|
+
handleTrigger,
|
|
251
|
+
mounted,
|
|
252
|
+
open: open2,
|
|
253
|
+
panelId,
|
|
254
|
+
setMounted,
|
|
255
|
+
setOpen,
|
|
256
|
+
setPanelIdState,
|
|
257
|
+
transitionStatus
|
|
258
|
+
}), [defaultPanelId, disabled, handleTrigger, mounted, open2, panelId, setMounted, setOpen, setPanelIdState, transitionStatus]);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// 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/collapsible/root/CollapsibleRootContext.mjs
|
|
262
|
+
import * as React2 from "react";
|
|
263
|
+
var CollapsibleRootContext = /* @__PURE__ */ React2.createContext(void 0);
|
|
264
|
+
if (process.env.NODE_ENV !== "production") CollapsibleRootContext.displayName = "CollapsibleRootContext";
|
|
265
|
+
function useCollapsibleRootContext() {
|
|
266
|
+
const context = React2.useContext(CollapsibleRootContext);
|
|
267
|
+
if (context === void 0) {
|
|
268
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>." : formatErrorMessage_default(15));
|
|
269
|
+
}
|
|
270
|
+
return context;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// 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/collapsible/panel/CollapsiblePanelDataAttributes.mjs
|
|
274
|
+
var open = "data-open";
|
|
275
|
+
var closed = "data-closed";
|
|
276
|
+
var startingStyle = TransitionStatusDataAttributes_exports.startingStyle;
|
|
277
|
+
var endingStyle = TransitionStatusDataAttributes_exports.endingStyle;
|
|
278
|
+
|
|
279
|
+
// 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/collapsible/trigger/CollapsibleTriggerDataAttributes.mjs
|
|
280
|
+
var panelOpen = "data-panel-open";
|
|
281
|
+
|
|
282
|
+
// 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/utils/collapsibleOpenStateMapping.mjs
|
|
283
|
+
var PANEL_OPEN_HOOK = {
|
|
284
|
+
[open]: ""
|
|
285
|
+
};
|
|
286
|
+
var PANEL_CLOSED_HOOK = {
|
|
287
|
+
[closed]: ""
|
|
288
|
+
};
|
|
289
|
+
var triggerOpenStateMapping = {
|
|
290
|
+
open(value) {
|
|
291
|
+
if (value) {
|
|
292
|
+
return {
|
|
293
|
+
[panelOpen]: ""
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
var collapsibleOpenStateMapping = {
|
|
300
|
+
open(value) {
|
|
301
|
+
if (value) {
|
|
302
|
+
return PANEL_OPEN_HOOK;
|
|
303
|
+
}
|
|
304
|
+
return PANEL_CLOSED_HOOK;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// 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/collapsible/root/stateAttributesMapping.mjs
|
|
309
|
+
var collapsibleStateAttributesMapping = {
|
|
310
|
+
...collapsibleOpenStateMapping,
|
|
311
|
+
...transitionStatusMapping
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// 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/collapsible/root/CollapsibleRoot.mjs
|
|
315
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
316
|
+
var CollapsibleRoot = /* @__PURE__ */ React3.forwardRef(function CollapsibleRoot2(componentProps, forwardedRef) {
|
|
317
|
+
const {
|
|
318
|
+
render,
|
|
319
|
+
className,
|
|
320
|
+
defaultOpen = false,
|
|
321
|
+
disabled = false,
|
|
322
|
+
onOpenChange: onOpenChangeProp,
|
|
323
|
+
open: open2,
|
|
324
|
+
style,
|
|
325
|
+
...elementProps
|
|
326
|
+
} = componentProps;
|
|
327
|
+
const onOpenChange = useStableCallback(onOpenChangeProp);
|
|
328
|
+
const collapsible = useCollapsibleRoot({
|
|
329
|
+
open: open2,
|
|
330
|
+
defaultOpen,
|
|
331
|
+
onOpenChange,
|
|
332
|
+
disabled
|
|
333
|
+
});
|
|
334
|
+
const state = React3.useMemo(() => ({
|
|
335
|
+
open: collapsible.open,
|
|
336
|
+
disabled: collapsible.disabled,
|
|
337
|
+
transitionStatus: collapsible.transitionStatus
|
|
338
|
+
}), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]);
|
|
339
|
+
const contextValue = React3.useMemo(() => ({
|
|
340
|
+
...collapsible,
|
|
341
|
+
onOpenChange,
|
|
342
|
+
state
|
|
343
|
+
}), [collapsible, onOpenChange, state]);
|
|
344
|
+
const element = useRenderElement("div", componentProps, {
|
|
345
|
+
state,
|
|
346
|
+
ref: forwardedRef,
|
|
347
|
+
props: elementProps,
|
|
348
|
+
stateAttributesMapping: collapsibleStateAttributesMapping
|
|
349
|
+
});
|
|
350
|
+
return /* @__PURE__ */ _jsx(CollapsibleRootContext.Provider, {
|
|
351
|
+
value: contextValue,
|
|
352
|
+
children: element
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
if (process.env.NODE_ENV !== "production") CollapsibleRoot.displayName = "CollapsibleRoot";
|
|
356
|
+
|
|
357
|
+
// 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/collapsible/trigger/CollapsibleTrigger.mjs
|
|
358
|
+
import * as React4 from "react";
|
|
359
|
+
var stateAttributesMapping = {
|
|
360
|
+
...triggerOpenStateMapping,
|
|
361
|
+
...transitionStatusMapping
|
|
362
|
+
};
|
|
363
|
+
var CollapsibleTrigger = /* @__PURE__ */ React4.forwardRef(function CollapsibleTrigger2(componentProps, forwardedRef) {
|
|
364
|
+
const {
|
|
365
|
+
panelId,
|
|
366
|
+
open: open2,
|
|
367
|
+
handleTrigger,
|
|
368
|
+
state,
|
|
369
|
+
disabled: contextDisabled
|
|
370
|
+
} = useCollapsibleRootContext();
|
|
371
|
+
const {
|
|
372
|
+
className,
|
|
373
|
+
disabled = contextDisabled,
|
|
374
|
+
render,
|
|
375
|
+
nativeButton = true,
|
|
376
|
+
style,
|
|
377
|
+
...elementProps
|
|
378
|
+
} = componentProps;
|
|
379
|
+
const {
|
|
380
|
+
getButtonProps,
|
|
381
|
+
buttonRef
|
|
382
|
+
} = useButton({
|
|
383
|
+
disabled,
|
|
384
|
+
focusableWhenDisabled: true,
|
|
385
|
+
native: nativeButton
|
|
386
|
+
});
|
|
387
|
+
const element = useRenderElement("button", componentProps, {
|
|
388
|
+
state,
|
|
389
|
+
ref: [forwardedRef, buttonRef],
|
|
390
|
+
props: [{
|
|
391
|
+
"aria-controls": open2 ? panelId : void 0,
|
|
392
|
+
"aria-expanded": open2,
|
|
393
|
+
onClick: handleTrigger
|
|
394
|
+
}, elementProps, getButtonProps],
|
|
395
|
+
stateAttributesMapping
|
|
396
|
+
});
|
|
397
|
+
return element;
|
|
398
|
+
});
|
|
399
|
+
if (process.env.NODE_ENV !== "production") CollapsibleTrigger.displayName = "CollapsibleTrigger";
|
|
400
|
+
|
|
401
|
+
// 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/collapsible/panel/CollapsiblePanel.mjs
|
|
402
|
+
import * as React6 from "react";
|
|
403
|
+
|
|
404
|
+
// 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/collapsible/panel/useCollapsiblePanel.mjs
|
|
405
|
+
import * as React5 from "react";
|
|
406
|
+
var EMPTY_DIMENSIONS = {
|
|
407
|
+
height: void 0,
|
|
408
|
+
width: void 0
|
|
409
|
+
};
|
|
410
|
+
function useCollapsiblePanel(parameters) {
|
|
411
|
+
const {
|
|
412
|
+
externalRef,
|
|
413
|
+
hiddenUntilFound,
|
|
414
|
+
id: idParam,
|
|
415
|
+
keepMounted,
|
|
416
|
+
mounted,
|
|
417
|
+
onOpenChange,
|
|
418
|
+
open: open2,
|
|
419
|
+
setMounted,
|
|
420
|
+
setOpen,
|
|
421
|
+
transitionStatus
|
|
422
|
+
} = parameters;
|
|
423
|
+
const panelRef = React5.useRef(null);
|
|
424
|
+
const animationTypeRef = React5.useRef(null);
|
|
425
|
+
const [dimensions, setDimensionsUnwrapped] = React5.useState(EMPTY_DIMENSIONS);
|
|
426
|
+
const lastMeasuredDimensionsRef = React5.useRef(EMPTY_DIMENSIONS);
|
|
427
|
+
const shouldSkipNextOpenRef = React5.useRef(false);
|
|
428
|
+
const shouldPreventMountAnimationRef = React5.useRef(open2);
|
|
429
|
+
const shouldPreventActivityResumeAnimationRef = React5.useRef(false);
|
|
430
|
+
const [forcePanelIdle, setForcePanelIdle] = React5.useState(false);
|
|
431
|
+
const pendingTemporaryStyleRestoreRef = React5.useRef(null);
|
|
432
|
+
const mergedPanelRef = useMergedRefs(externalRef, panelRef);
|
|
433
|
+
const latestOpenRef = useValueAsRef(open2);
|
|
434
|
+
const runOnceCloseAnimationsFinish = useAnimationsFinished(panelRef);
|
|
435
|
+
const hidden = !open2 && !mounted;
|
|
436
|
+
const panelTransitionStatus = forcePanelIdle ? "idle" : transitionStatus;
|
|
437
|
+
const shouldPreventOpenAnimation = open2 && // These 2 refs are safe to read in render, they are only written from committed
|
|
438
|
+
// layout/effect paths and gate one-shot motion suppression for the next open
|
|
439
|
+
// lifecycle. They intentionally expose the last committed motion snapshot.
|
|
440
|
+
(shouldPreventMountAnimationRef.current || shouldPreventActivityResumeAnimationRef.current);
|
|
441
|
+
const renderedDimensions = !open2 && mounted && // These 2 refs are also safe to read in render, both hold the last committed
|
|
442
|
+
// animation mode and measurement. This fallback only restores a previously
|
|
443
|
+
// measured pixel size after the live dimensions state has been reset back to `auto`.
|
|
444
|
+
animationTypeRef.current === "css-animation" && dimensions.height === void 0 && dimensions.width === void 0 ? lastMeasuredDimensionsRef.current : dimensions;
|
|
445
|
+
const shouldPersistHiddenTransitionStyles = hiddenUntilFound && hidden && animationTypeRef.current !== "css-animation";
|
|
446
|
+
const setDimensions = useStableCallback((nextDimensions, shouldCacheMeasurement = true) => {
|
|
447
|
+
if (shouldCacheMeasurement) {
|
|
448
|
+
lastMeasuredDimensionsRef.current = nextDimensions;
|
|
449
|
+
}
|
|
450
|
+
setDimensionsUnwrapped(nextDimensions);
|
|
451
|
+
});
|
|
452
|
+
const restorePendingTemporaryStyle = useStableCallback(() => {
|
|
453
|
+
pendingTemporaryStyleRestoreRef.current?.();
|
|
454
|
+
pendingTemporaryStyleRestoreRef.current = null;
|
|
455
|
+
});
|
|
456
|
+
const setPendingTemporaryStyleRestore = useStableCallback((restore) => {
|
|
457
|
+
restorePendingTemporaryStyle();
|
|
458
|
+
pendingTemporaryStyleRestoreRef.current = () => {
|
|
459
|
+
pendingTemporaryStyleRestoreRef.current = null;
|
|
460
|
+
restore();
|
|
461
|
+
};
|
|
462
|
+
});
|
|
463
|
+
const markActivityResumeAnimationSuppressed = useStableCallback(() => {
|
|
464
|
+
if (open2 && mounted && animationTypeRef.current === "css-animation") {
|
|
465
|
+
shouldPreventActivityResumeAnimationRef.current = true;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
useIsoLayoutEffect(() => {
|
|
469
|
+
if (!forcePanelIdle || transitionStatus === "starting") {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
setForcePanelIdle(false);
|
|
473
|
+
}, [forcePanelIdle, transitionStatus]);
|
|
474
|
+
React5.useEffect(() => {
|
|
475
|
+
return () => {
|
|
476
|
+
markActivityResumeAnimationSuppressed();
|
|
477
|
+
restorePendingTemporaryStyle();
|
|
478
|
+
};
|
|
479
|
+
}, [markActivityResumeAnimationSuppressed, restorePendingTemporaryStyle]);
|
|
480
|
+
useIsoLayoutEffect(() => {
|
|
481
|
+
const panel = panelRef.current;
|
|
482
|
+
if (!panel) {
|
|
483
|
+
return void 0;
|
|
484
|
+
}
|
|
485
|
+
if (!open2 && pendingTemporaryStyleRestoreRef.current) {
|
|
486
|
+
restorePendingTemporaryStyle();
|
|
487
|
+
}
|
|
488
|
+
const animationType = getAnimationType(panel, shouldPreventOpenAnimation);
|
|
489
|
+
animationTypeRef.current = animationType;
|
|
490
|
+
if (open2 && transitionStatus === "idle" && shouldPreventMountAnimationRef.current && animationType === "css-animation") {
|
|
491
|
+
lastMeasuredDimensionsRef.current = getDimensions(panel);
|
|
492
|
+
return void 0;
|
|
493
|
+
}
|
|
494
|
+
if (open2 && transitionStatus === "starting") {
|
|
495
|
+
const skipNextOpen = shouldSkipNextOpenRef.current;
|
|
496
|
+
shouldSkipNextOpenRef.current = false;
|
|
497
|
+
if (animationType === "none") {
|
|
498
|
+
setDimensions(getDimensions(panel));
|
|
499
|
+
setForcePanelIdle(true);
|
|
500
|
+
return void 0;
|
|
501
|
+
}
|
|
502
|
+
if (animationType === "css-transition") {
|
|
503
|
+
const restoreLayoutStyles = resetLayoutStyles(panel);
|
|
504
|
+
setDimensions(getDimensions(panel));
|
|
505
|
+
if (!skipNextOpen) {
|
|
506
|
+
return restoreLayoutStyles;
|
|
507
|
+
}
|
|
508
|
+
const restoreTransitionDuration = setTemporaryStyle(panel, "transition-duration", "0s");
|
|
509
|
+
setPendingTemporaryStyleRestore(restoreTransitionDuration);
|
|
510
|
+
setForcePanelIdle(true);
|
|
511
|
+
return restoreLayoutStyles;
|
|
512
|
+
}
|
|
513
|
+
setDimensions(getDimensions(panel));
|
|
514
|
+
const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
|
|
515
|
+
if (!skipNextOpen) {
|
|
516
|
+
restoreAnimationName();
|
|
517
|
+
return void 0;
|
|
518
|
+
}
|
|
519
|
+
const restoreAnimationDuration = setTemporaryStyle(panel, "animation-duration", "0s");
|
|
520
|
+
restoreAnimationName();
|
|
521
|
+
setPendingTemporaryStyleRestore(restoreAnimationDuration);
|
|
522
|
+
setForcePanelIdle(true);
|
|
523
|
+
return void 0;
|
|
524
|
+
}
|
|
525
|
+
if (!open2 && mounted && (transitionStatus === "idle" || transitionStatus === "starting")) {
|
|
526
|
+
shouldPreventMountAnimationRef.current = false;
|
|
527
|
+
shouldPreventActivityResumeAnimationRef.current = false;
|
|
528
|
+
if (animationType === "none") {
|
|
529
|
+
setDimensions(EMPTY_DIMENSIONS, false);
|
|
530
|
+
setMounted(false);
|
|
531
|
+
return void 0;
|
|
532
|
+
}
|
|
533
|
+
setDimensions(getDimensions(panel));
|
|
534
|
+
return void 0;
|
|
535
|
+
}
|
|
536
|
+
if (transitionStatus !== "ending") {
|
|
537
|
+
return void 0;
|
|
538
|
+
}
|
|
539
|
+
if (animationType === "none") {
|
|
540
|
+
setMounted(false);
|
|
541
|
+
return void 0;
|
|
542
|
+
}
|
|
543
|
+
const nextDimensions = getDimensions(panel);
|
|
544
|
+
const hasMeasuredSize = nextDimensions.height > 0 || nextDimensions.width > 0;
|
|
545
|
+
if (!hasMeasuredSize) {
|
|
546
|
+
setMounted(false);
|
|
547
|
+
return void 0;
|
|
548
|
+
}
|
|
549
|
+
setDimensions(nextDimensions);
|
|
550
|
+
if (animationType === "css-animation") {
|
|
551
|
+
const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none");
|
|
552
|
+
restoreAnimationName();
|
|
553
|
+
}
|
|
554
|
+
return void 0;
|
|
555
|
+
}, [mounted, open2, restorePendingTemporaryStyle, setDimensions, setMounted, setPendingTemporaryStyleRestore, shouldPreventOpenAnimation, transitionStatus]);
|
|
556
|
+
useOpenChangeComplete({
|
|
557
|
+
enabled: open2 && mounted && panelTransitionStatus === "idle",
|
|
558
|
+
open: true,
|
|
559
|
+
ref: panelRef,
|
|
560
|
+
onComplete() {
|
|
561
|
+
if (!open2) {
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
setDimensions(EMPTY_DIMENSIONS, false);
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
React5.useEffect(() => {
|
|
568
|
+
if (open2 || !mounted || panelTransitionStatus !== "ending") {
|
|
569
|
+
return void 0;
|
|
570
|
+
}
|
|
571
|
+
const panel = panelRef.current;
|
|
572
|
+
if (!panel) {
|
|
573
|
+
return void 0;
|
|
574
|
+
}
|
|
575
|
+
const abortController = new AbortController();
|
|
576
|
+
let endingStyleFrame = -1;
|
|
577
|
+
function handleComplete() {
|
|
578
|
+
if (latestOpenRef.current) {
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
setMounted(false);
|
|
582
|
+
setDimensions(EMPTY_DIMENSIONS, false);
|
|
583
|
+
}
|
|
584
|
+
endingStyleFrame = AnimationFrame.request(() => {
|
|
585
|
+
runOnceCloseAnimationsFinish(handleComplete, abortController.signal);
|
|
586
|
+
});
|
|
587
|
+
return () => {
|
|
588
|
+
AnimationFrame.cancel(endingStyleFrame);
|
|
589
|
+
abortController.abort();
|
|
590
|
+
};
|
|
591
|
+
}, [latestOpenRef, mounted, open2, panelTransitionStatus, runOnceCloseAnimationsFinish, setDimensions, setMounted]);
|
|
592
|
+
useIsoLayoutEffect(() => {
|
|
593
|
+
const panel = panelRef.current;
|
|
594
|
+
if (!panel || !hiddenUntilFound || !hidden) {
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
panel.setAttribute("hidden", "until-found");
|
|
598
|
+
}, [hidden, hiddenUntilFound]);
|
|
599
|
+
React5.useEffect(function registerBeforeMatchListener() {
|
|
600
|
+
const panel = panelRef.current;
|
|
601
|
+
if (!panel) {
|
|
602
|
+
return void 0;
|
|
603
|
+
}
|
|
604
|
+
function handleBeforeMatch(event) {
|
|
605
|
+
const eventDetails = createChangeEventDetails(reason_parts_exports.none, event);
|
|
606
|
+
onOpenChange(true, eventDetails);
|
|
607
|
+
if (eventDetails.isCanceled) {
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
shouldSkipNextOpenRef.current = true;
|
|
611
|
+
setOpen(true);
|
|
612
|
+
}
|
|
613
|
+
return addEventListener(panel, "beforematch", handleBeforeMatch);
|
|
614
|
+
}, [onOpenChange, setOpen]);
|
|
615
|
+
const shouldRender = keepMounted || hiddenUntilFound || mounted || open2;
|
|
616
|
+
return {
|
|
617
|
+
height: renderedDimensions.height,
|
|
618
|
+
props: {
|
|
619
|
+
...shouldPersistHiddenTransitionStyles ? {
|
|
620
|
+
[startingStyle]: ""
|
|
621
|
+
} : void 0,
|
|
622
|
+
hidden,
|
|
623
|
+
id: idParam
|
|
624
|
+
},
|
|
625
|
+
ref: mergedPanelRef,
|
|
626
|
+
shouldPreventOpenAnimation,
|
|
627
|
+
shouldRender,
|
|
628
|
+
transitionStatus: panelTransitionStatus,
|
|
629
|
+
width: renderedDimensions.width
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
function getDimensions(element) {
|
|
633
|
+
return {
|
|
634
|
+
height: element.scrollHeight,
|
|
635
|
+
width: element.scrollWidth
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
function getAnimationType(element, hasSuppressedMountAnimation) {
|
|
639
|
+
const panelStyles = getWindow(element).getComputedStyle(element);
|
|
640
|
+
const hasAnimation = (panelStyles.animationName.split(",").map((name) => name.trim()).some((name) => name !== "" && name !== "none") || hasSuppressedMountAnimation) && hasNonZeroDuration(panelStyles.animationDuration);
|
|
641
|
+
const hasTransition = hasNonZeroDuration(panelStyles.transitionDuration);
|
|
642
|
+
if (hasAnimation && hasTransition) {
|
|
643
|
+
if (process.env.NODE_ENV !== "production") {
|
|
644
|
+
warn("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used.");
|
|
645
|
+
}
|
|
646
|
+
return "css-transition";
|
|
647
|
+
}
|
|
648
|
+
if (hasTransition) {
|
|
649
|
+
return "css-transition";
|
|
650
|
+
}
|
|
651
|
+
if (hasAnimation) {
|
|
652
|
+
return "css-animation";
|
|
653
|
+
}
|
|
654
|
+
return "none";
|
|
655
|
+
}
|
|
656
|
+
function hasNonZeroDuration(value) {
|
|
657
|
+
return value.split(",").map((part) => part.trim()).some((part) => part !== "" && Number.parseFloat(part) > 0);
|
|
658
|
+
}
|
|
659
|
+
function setTemporaryStyle(element, property, value) {
|
|
660
|
+
const previousValue = element.style.getPropertyValue(property);
|
|
661
|
+
const previousPriority = element.style.getPropertyPriority(property);
|
|
662
|
+
element.style.setProperty(property, value);
|
|
663
|
+
return () => {
|
|
664
|
+
if (previousValue === "") {
|
|
665
|
+
element.style.removeProperty(property);
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
element.style.setProperty(property, previousValue, previousPriority);
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
function resetLayoutStyles(element) {
|
|
672
|
+
const originalLayoutStyles = {
|
|
673
|
+
"justify-content": element.style.justifyContent,
|
|
674
|
+
"align-items": element.style.alignItems,
|
|
675
|
+
"align-content": element.style.alignContent,
|
|
676
|
+
"justify-items": element.style.justifyItems
|
|
677
|
+
};
|
|
678
|
+
Object.keys(originalLayoutStyles).forEach((key) => {
|
|
679
|
+
element.style.setProperty(key, "initial", "important");
|
|
680
|
+
});
|
|
681
|
+
function restoreLayoutStyles() {
|
|
682
|
+
Object.entries(originalLayoutStyles).forEach(([key, value]) => {
|
|
683
|
+
if (value === "") {
|
|
684
|
+
element.style.removeProperty(key);
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
element.style.setProperty(key, value);
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
const frame = AnimationFrame.request(restoreLayoutStyles);
|
|
691
|
+
return () => {
|
|
692
|
+
AnimationFrame.cancel(frame);
|
|
693
|
+
restoreLayoutStyles();
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
// 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/collapsible/panel/CollapsiblePanelCssVars.mjs
|
|
698
|
+
var collapsiblePanelHeight = "--collapsible-panel-height";
|
|
699
|
+
var collapsiblePanelWidth = "--collapsible-panel-width";
|
|
700
|
+
|
|
701
|
+
// 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/collapsible/panel/CollapsiblePanel.mjs
|
|
702
|
+
var CollapsiblePanel = /* @__PURE__ */ React6.forwardRef(function CollapsiblePanel2(componentProps, forwardedRef) {
|
|
703
|
+
const {
|
|
704
|
+
className,
|
|
705
|
+
hiddenUntilFound: hiddenUntilFoundProp,
|
|
706
|
+
keepMounted: keepMountedProp,
|
|
707
|
+
render,
|
|
708
|
+
id: idProp,
|
|
709
|
+
style,
|
|
710
|
+
...elementProps
|
|
711
|
+
} = componentProps;
|
|
712
|
+
if (process.env.NODE_ENV !== "production") {
|
|
713
|
+
React6.useEffect(() => {
|
|
714
|
+
if (hiddenUntilFoundProp && keepMountedProp === false) {
|
|
715
|
+
warn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
|
|
716
|
+
}
|
|
717
|
+
}, [hiddenUntilFoundProp, keepMountedProp]);
|
|
718
|
+
}
|
|
719
|
+
const {
|
|
720
|
+
defaultPanelId,
|
|
721
|
+
mounted,
|
|
722
|
+
onOpenChange,
|
|
723
|
+
open: open2,
|
|
724
|
+
setMounted,
|
|
725
|
+
setPanelIdState,
|
|
726
|
+
setOpen,
|
|
727
|
+
state,
|
|
728
|
+
transitionStatus
|
|
729
|
+
} = useCollapsibleRootContext();
|
|
730
|
+
const hiddenUntilFound = hiddenUntilFoundProp ?? false;
|
|
731
|
+
const keepMounted = keepMountedProp ?? false;
|
|
732
|
+
const registeredId = idProp || void 0;
|
|
733
|
+
const id = registeredId ?? defaultPanelId;
|
|
734
|
+
useIsoLayoutEffect(() => {
|
|
735
|
+
setPanelIdState((currentId) => registeredId ?? (currentId === null ? void 0 : currentId));
|
|
736
|
+
return () => {
|
|
737
|
+
setPanelIdState((currentId) => currentId === registeredId ? null : currentId);
|
|
738
|
+
};
|
|
739
|
+
}, [registeredId, setPanelIdState]);
|
|
740
|
+
const {
|
|
741
|
+
height,
|
|
742
|
+
props,
|
|
743
|
+
ref,
|
|
744
|
+
shouldPreventOpenAnimation,
|
|
745
|
+
shouldRender,
|
|
746
|
+
transitionStatus: panelTransitionStatus,
|
|
747
|
+
width
|
|
748
|
+
} = useCollapsiblePanel({
|
|
749
|
+
externalRef: forwardedRef,
|
|
750
|
+
hiddenUntilFound,
|
|
751
|
+
id,
|
|
752
|
+
keepMounted,
|
|
753
|
+
mounted,
|
|
754
|
+
onOpenChange,
|
|
755
|
+
open: open2,
|
|
756
|
+
setMounted,
|
|
757
|
+
setOpen,
|
|
758
|
+
transitionStatus
|
|
759
|
+
});
|
|
760
|
+
const panelState = {
|
|
761
|
+
...state,
|
|
762
|
+
transitionStatus: panelTransitionStatus
|
|
763
|
+
};
|
|
764
|
+
const resolvedStyle = resolveStyle(style, panelState);
|
|
765
|
+
const element = useRenderElement("div", {
|
|
766
|
+
...componentProps,
|
|
767
|
+
style: void 0
|
|
768
|
+
}, {
|
|
769
|
+
state: panelState,
|
|
770
|
+
ref,
|
|
771
|
+
props: [
|
|
772
|
+
props,
|
|
773
|
+
{
|
|
774
|
+
style: {
|
|
775
|
+
[collapsiblePanelHeight]: height === void 0 ? "auto" : `${height}px`,
|
|
776
|
+
[collapsiblePanelWidth]: width === void 0 ? "auto" : `${width}px`
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
elementProps,
|
|
780
|
+
resolvedStyle ? {
|
|
781
|
+
style: resolvedStyle
|
|
782
|
+
} : void 0,
|
|
783
|
+
// Resolve the public `style` prop so temporary `animationName: 'none'`
|
|
784
|
+
// can still win after user's inline styles have been merged.
|
|
785
|
+
shouldPreventOpenAnimation ? {
|
|
786
|
+
style: {
|
|
787
|
+
animationName: "none"
|
|
788
|
+
}
|
|
789
|
+
} : void 0
|
|
790
|
+
],
|
|
791
|
+
stateAttributesMapping: collapsibleStateAttributesMapping
|
|
792
|
+
});
|
|
793
|
+
if (!shouldRender) {
|
|
794
|
+
return null;
|
|
795
|
+
}
|
|
796
|
+
return element;
|
|
797
|
+
});
|
|
798
|
+
if (process.env.NODE_ENV !== "production") CollapsiblePanel.displayName = "CollapsiblePanel";
|
|
799
|
+
|
|
800
|
+
// web/app/dist/server/assets/collapsible-BJWsiuIc.js
|
|
801
|
+
function Collapsible$1({ ...props }) {
|
|
802
|
+
return /* @__PURE__ */ jsx(index_parts_exports.Root, {
|
|
803
|
+
"data-slot": "collapsible",
|
|
804
|
+
...props
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
function CollapsibleTrigger3({ ...props }) {
|
|
808
|
+
return /* @__PURE__ */ jsx(index_parts_exports.Trigger, {
|
|
809
|
+
"data-slot": "collapsible-trigger",
|
|
810
|
+
...props
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
function CollapsibleContent({ ...props }) {
|
|
814
|
+
return /* @__PURE__ */ jsx(index_parts_exports.Panel, {
|
|
815
|
+
"data-slot": "collapsible-content",
|
|
816
|
+
...props
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export {
|
|
821
|
+
primeAgentArtifactDiff,
|
|
822
|
+
derivePrimeAgentArtifactRuns,
|
|
823
|
+
Collapsible$1,
|
|
824
|
+
CollapsibleTrigger3 as CollapsibleTrigger,
|
|
825
|
+
CollapsibleContent
|
|
826
|
+
};
|