@tangle-network/sandbox-cli 0.21.63 → 0.21.65
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/README.md +31 -3
- package/SKILL.md +29 -1
- package/dist/graph-native-CS_TmaCK.mjs +1 -0
- package/dist/graph-viewer/Analytics-bWsqhurt.js +1001 -0
- package/dist/graph-viewer/{AnswerStrip-DhwqOyxI.js → AnswerStrip-COxV7gLW.js} +2 -2
- package/dist/graph-viewer/Checks-CQGmKcQ0.js +164 -0
- package/dist/graph-viewer/Conversations-DgCshBAf.js +627 -0
- package/dist/graph-viewer/{Files-DtZhf0ii.js → Files-CvIOGrAs.js} +81 -90
- package/dist/graph-viewer/LiveRun-DHmsr6F7.js +311 -0
- package/dist/graph-viewer/{Outputs-QET3nPPp.js → Outputs-rwBg_x36.js} +4 -4
- package/dist/graph-viewer/Overview-C150tkVa.js +194 -0
- package/dist/graph-viewer/{RunOverview-DJQDAMIx.js → RunOverview-CSqsunqf.js} +2 -2
- package/dist/graph-viewer/RunPage-F_prVwiV.js +286 -0
- package/dist/graph-viewer/Timeline-BFDywlmz.js +335 -0
- package/dist/graph-viewer/Today-BdDuqZGF.js +623 -0
- package/dist/graph-viewer/Topology-SAfGtd5u.js +238 -0
- package/dist/graph-viewer/Traces-BYqXaS_s.js +254 -0
- package/dist/graph-viewer/{WallPages-4d9QUZDq.js → WallPages-MM70VZrC.js} +48 -30
- package/dist/graph-viewer/agent-runtime.js +55 -55
- package/dist/graph-viewer/{data-BJmP7F1M.js → data-DTGmre1W.js} +31 -27
- package/dist/graph-viewer/harness-sessions.js +1 -1
- package/dist/graph-viewer/index.js +1357 -1392
- package/dist/graph-viewer/{lazy-pages-DM0cZM10.js → lazy-pages-BYuq_L_n.js} +9 -5
- package/dist/graph-viewer/{outputs-model-CGdvjkQh.js → outputs-model-CHTx8rMz.js} +2 -2
- package/dist/graph-viewer/{viewer/plain-words-CgvxtEOa.js → plain-words-BrMHl0On.js} +9 -4
- package/dist/graph-viewer/receipt.js +2 -2
- package/dist/graph-viewer/record-CsP_3NJS.js +612 -0
- package/dist/graph-viewer/record-part-CuT9Xw37.js +334 -0
- package/dist/graph-viewer/record.js +2 -336
- package/dist/graph-viewer/report-viewer.js +65 -65
- package/dist/graph-viewer/report.js +1 -1
- package/dist/graph-viewer/research-publication.js +1 -1
- package/dist/graph-viewer/{run-files-C1NgzM0l.js → run-files-BckQDdTD.js} +1 -1
- package/dist/graph-viewer/{run-receipt-Bvi4-KVM.js → run-receipt-Bt2iXJUy.js} +1 -0
- package/dist/graph-viewer/schemas/agent-workspace.play.v1.json +3 -0
- package/dist/graph-viewer/schemas/agent-workspace.plays.v1.json +2 -0
- package/dist/graph-viewer/schemas/agent-workspace.run.v1.json +1 -0
- package/dist/graph-viewer/styles.css +4559 -2385
- package/dist/graph-viewer/trace-spans.js +1 -1
- package/dist/graph-viewer/ui-xa5w5bEN.js +889 -0
- package/dist/graph-viewer/viewer/{AgentGraphCanvas-CMdOlSlh-4EervjeC.js → AgentGraphCanvas-B74GN1o6-BZEumF7-.js} +2610 -2707
- package/dist/graph-viewer/viewer/Analytics-E3XS570U.js +1002 -0
- package/dist/graph-viewer/viewer/{AnswerStrip-CGUyXuYH.js → AnswerStrip-B7xMU57A.js} +2 -2
- package/dist/graph-viewer/viewer/Checks-CJ5XSHbv.js +165 -0
- package/dist/graph-viewer/viewer/Conversations-AX8G7Qyl.js +904 -0
- package/dist/graph-viewer/viewer/Files-DxL1576V.js +630 -0
- package/dist/graph-viewer/viewer/LiveRun-B-BckyEj.js +820 -0
- package/dist/graph-viewer/viewer/{Outputs-CumGyjQo.js → Outputs-BoIpgfMv.js} +24 -23
- package/dist/graph-viewer/viewer/Overview-Dzg5XJgy.js +436 -0
- package/dist/graph-viewer/viewer/RunPage-NtevWXBs.js +285 -0
- package/dist/graph-viewer/viewer/{Scores-ZS16yk0n.js → Scores-Dgv4WePL.js} +3 -3
- package/dist/graph-viewer/viewer/Timeline-CzY3LVDu.js +335 -0
- package/dist/graph-viewer/viewer/Today-Bi9IIwuh.js +623 -0
- package/dist/graph-viewer/viewer/Topology-CzjqSFXH.js +239 -0
- package/dist/graph-viewer/viewer/Traces-CMX0H1VU.js +254 -0
- package/dist/graph-viewer/viewer/{WallPages-CzWpyIfp.js → WallPages-Clj4bORg.js} +50 -32
- package/dist/graph-viewer/viewer/addon-webgl-BSCscllv.js +4027 -0
- package/dist/graph-viewer/viewer/agent-record-BrP-ENHg.css +2 -0
- package/dist/graph-viewer/viewer/{bot-D6Nrej7Z.js → bot-BaQU59LG.js} +1 -1
- package/dist/graph-viewer/viewer/{chevron-right-D_5IKLxu.js → chevron-right-Xn05jYLT.js} +1 -1
- package/dist/graph-viewer/viewer/{createLucideIcon-yH0cxLMy.js → createLucideIcon-BSphcoOJ.js} +1 -1
- package/dist/graph-viewer/viewer/dashboard-D3JhmRhe-DSl0zhkw.js +371 -0
- package/dist/graph-viewer/viewer/{data-CkWfWr7i.js → data-CVHeKhrh.js} +144 -139
- package/dist/graph-viewer/viewer/dist-4_KJz8ZM.js +349 -0
- package/dist/graph-viewer/viewer/dist-Dy-wrdTt.js +1615 -0
- package/dist/graph-viewer/viewer/es2015-utW4DTOJ.js +3506 -0
- package/dist/graph-viewer/viewer/{final-output-kwY11u9X.js → final-output-BYT-g-9j.js} +1 -1
- package/dist/graph-viewer/viewer/flow-waterfall-model-DvrgPLGS-BdThSFH-.js +2696 -0
- package/dist/graph-viewer/viewer/git-branch-BzTbIcYL.js +28 -0
- package/dist/graph-viewer/viewer/{highlights-Btsi5OXl.js → highlights-DWeSCtiR.js} +4 -4
- package/dist/graph-viewer/viewer/jsx-runtime-DPT6sCLq.js +319 -0
- package/dist/graph-viewer/viewer/lazy-pages-ChiMJ8r_.js +803 -0
- package/dist/graph-viewer/viewer/{markdown-CX_sVrXB.js → markdown-lADwhD7y.js} +2324 -2608
- package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-RSb7EbGB.js +476 -0
- package/dist/graph-viewer/viewer/{page-header-Brq611fd.js → page-header-QbUg8F8i.js} +12 -11
- package/dist/graph-viewer/{plain-words-CgvxtEOa.js → viewer/plain-words-BrMHl0On.js} +9 -4
- package/dist/graph-viewer/viewer/primitives-znfPK9NP-B6UO7uDr.js +346 -0
- package/dist/graph-viewer/viewer/react-DQ7E2Epi.js +4254 -0
- package/dist/graph-viewer/viewer/{react-dom-t1L4_-il.js → react-dom-BEusmvQH.js} +1 -1
- package/dist/graph-viewer/viewer/record-DZnT6SWN-H-ul3U3a.js +3523 -0
- package/dist/graph-viewer/viewer/record-W39D5MO-.js +1 -0
- package/dist/graph-viewer/viewer/record-part-CbweyYoV.js +335 -0
- package/dist/graph-viewer/viewer/{segmented-control-BaJmvTNd.js → segmented-control-Di1mbQlP.js} +27 -26
- package/dist/graph-viewer/viewer/{shiki-Qnby7Sh6.js → shiki-BfNNlmfZ.js} +15 -15
- package/dist/graph-viewer/viewer/status-meta-S0kV_RDp.js +273 -0
- package/dist/graph-viewer/viewer/{stream-tokenizer-CWtnjmRd.js → stream-tokenizer-B5wWaM3U.js} +12 -12
- package/dist/graph-viewer/viewer/{themes-1i1fzpRk.js → themes-DuRxHiga.js} +1 -1
- package/dist/graph-viewer/viewer/ui-Co03nZUX.js +889 -0
- package/dist/graph-viewer/viewer/utils-BuObIC0n.js +1815 -0
- package/dist/graph-viewer/viewer/workbench-E6_5q_oL.js +28351 -0
- package/dist/graph-viewer/viewer/workflows--mZpHYqo.js +3298 -0
- package/dist/graph-viewer/viewer/workspace-cKs9sGEO.js +2468 -0
- package/dist/graph-viewer/{workspace-model-Ewf17pTW.js → workspace-model-BkPl_J8E.js} +1 -1
- package/dist/graph-viewer/workspace-viewer.js +7452 -7489
- package/dist/graph-viewer/workspace.js +1 -1
- package/dist/index.mjs +27 -22
- package/package.json +10 -9
- package/dist/graph-viewer/Analytics-DFWW8Phh.js +0 -938
- package/dist/graph-viewer/Checks-qgqV4xgV.js +0 -155
- package/dist/graph-viewer/Conversations-CGB45kpj.js +0 -545
- package/dist/graph-viewer/LiveRun-C21wUKAY.js +0 -210
- package/dist/graph-viewer/Overview-BjeLsA2I.js +0 -506
- package/dist/graph-viewer/RunPage-CkkcBEUe.js +0 -258
- package/dist/graph-viewer/Timeline-C2Xolk0t.js +0 -293
- package/dist/graph-viewer/Today-BVVDtSVN.js +0 -660
- package/dist/graph-viewer/Topology-DO5XX8e4.js +0 -545
- package/dist/graph-viewer/Traces-BhMxjNgw.js +0 -259
- package/dist/graph-viewer/part-events-BrLrg_EV.js +0 -276
- package/dist/graph-viewer/record-part-CZal_IMH.js +0 -1408
- package/dist/graph-viewer/ui-D8QZRsC3.js +0 -938
- package/dist/graph-viewer/viewer/Analytics-DD__nbLm.js +0 -939
- package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +0 -156
- package/dist/graph-viewer/viewer/Conversations-C1n0EBBd.js +0 -819
- package/dist/graph-viewer/viewer/Files-Cjr7NMU_.js +0 -448
- package/dist/graph-viewer/viewer/LiveRun-uPTkPSjo.js +0 -6772
- package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +0 -507
- package/dist/graph-viewer/viewer/RunPage-DZlBW7Va.js +0 -257
- package/dist/graph-viewer/viewer/Timeline-BnK6-yBR.js +0 -294
- package/dist/graph-viewer/viewer/Today-a_-oNigi.js +0 -660
- package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +0 -546
- package/dist/graph-viewer/viewer/Traces-C0IGk0L4.js +0 -259
- package/dist/graph-viewer/viewer/WorkflowGraph-DZ3xejKE-jRXKeSrg.js +0 -1559
- package/dist/graph-viewer/viewer/agent-record-Dw772ROs.css +0 -2
- package/dist/graph-viewer/viewer/agent-timeline-Cs9Qbpvo.js +0 -1798
- package/dist/graph-viewer/viewer/dist-C1-7EfoW.js +0 -488
- package/dist/graph-viewer/viewer/file-text-m7a3piQF.js +0 -47
- package/dist/graph-viewer/viewer/jsx-runtime-DQWyJOhv.js +0 -2136
- package/dist/graph-viewer/viewer/lazy-pages-BowaGsg-.js +0 -20
- package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-fagiBQam.js +0 -723
- package/dist/graph-viewer/viewer/popover-CvOAjlnk.js +0 -5329
- package/dist/graph-viewer/viewer/react-CY3IbSNO.js +0 -4262
- package/dist/graph-viewer/viewer/record-part-D3_Anfpe.js +0 -1329
- package/dist/graph-viewer/viewer/terminal-83J_I4Ne.js +0 -52
- package/dist/graph-viewer/viewer/ui-C9b1rIUH.js +0 -938
- package/dist/graph-viewer/viewer/workspace-CekmOBs3.js +0 -25100
- package/dist/graph-viewer/viewer/x-DOc2URqZ.js +0 -56
|
@@ -0,0 +1,3523 @@
|
|
|
1
|
+
import { i as e } from "./rolldown-runtime-DArdT4gl.js";
|
|
2
|
+
import { n as t, t as n } from "./jsx-runtime-DPT6sCLq.js";
|
|
3
|
+
import { n as r, o as i, y as a } from "./primitives-znfPK9NP-B6UO7uDr.js";
|
|
4
|
+
import { t as o } from "./utils-BuObIC0n.js";
|
|
5
|
+
import { a as s, i as c, o as l, r as u, s as d, t as f } from "./dist-4_KJz8ZM.js";
|
|
6
|
+
import { a as p, c as m, i as h, n as g, r as _, t as v, u as y } from "./dist-Dy-wrdTt.js";
|
|
7
|
+
import { t as b } from "./createLucideIcon-BSphcoOJ.js";
|
|
8
|
+
import { C as x, D as S, E as C, M as w, S as ee, _ as T, a as te, b as ne, f as E, g as re, h as D, m as ie, o as ae, s as oe, t as se, v as ce, w as le, y as ue } from "./markdown-lADwhD7y.js";
|
|
9
|
+
import { t as de } from "./bot-BaQU59LG.js";
|
|
10
|
+
import { t as fe } from "./chevron-right-Xn05jYLT.js";
|
|
11
|
+
import { i as pe, r as me, t as he } from "./status-meta-S0kV_RDp.js";
|
|
12
|
+
//#region node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/arrow-right.mjs
|
|
13
|
+
var ge = {
|
|
14
|
+
name: "arrow-right",
|
|
15
|
+
size: 24,
|
|
16
|
+
node: [["path", {
|
|
17
|
+
d: "M5 12h14",
|
|
18
|
+
key: "1ays0h"
|
|
19
|
+
}], ["path", {
|
|
20
|
+
d: "m12 5 7 7-7 7",
|
|
21
|
+
key: "xquz4c"
|
|
22
|
+
}]]
|
|
23
|
+
};
|
|
24
|
+
ge.node;
|
|
25
|
+
var _e = b(ge), ve = {
|
|
26
|
+
name: "brain",
|
|
27
|
+
size: 24,
|
|
28
|
+
node: [
|
|
29
|
+
["path", {
|
|
30
|
+
d: "M12 18V5",
|
|
31
|
+
key: "adv99a"
|
|
32
|
+
}],
|
|
33
|
+
["path", {
|
|
34
|
+
d: "M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4",
|
|
35
|
+
key: "5nuw1p"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294",
|
|
39
|
+
key: "18ldcf"
|
|
40
|
+
}],
|
|
41
|
+
["path", {
|
|
42
|
+
d: "M17.996 5.125a4 4 0 012.526 5.77",
|
|
43
|
+
key: "1sdu8q"
|
|
44
|
+
}],
|
|
45
|
+
["path", {
|
|
46
|
+
d: "M18 18a4 4 0 002-7.465",
|
|
47
|
+
key: "7xqqvr"
|
|
48
|
+
}],
|
|
49
|
+
["path", {
|
|
50
|
+
d: "M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517",
|
|
51
|
+
key: "t46ysz"
|
|
52
|
+
}],
|
|
53
|
+
["path", {
|
|
54
|
+
d: "M6 18a4 4 0 01-2-7.465",
|
|
55
|
+
key: "1y2m15"
|
|
56
|
+
}],
|
|
57
|
+
["path", {
|
|
58
|
+
d: "M6.004 5.125a4 4 0 00-2.526 5.77",
|
|
59
|
+
key: "3cw1ss"
|
|
60
|
+
}]
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
ve.node;
|
|
64
|
+
var ye = b(ve), be = {
|
|
65
|
+
name: "chevron-down",
|
|
66
|
+
size: 24,
|
|
67
|
+
node: [["path", {
|
|
68
|
+
d: "m6 9 6 6 6-6",
|
|
69
|
+
key: "qrunsl"
|
|
70
|
+
}]]
|
|
71
|
+
};
|
|
72
|
+
be.node;
|
|
73
|
+
var xe = b(be), Se = {
|
|
74
|
+
name: "clipboard-list",
|
|
75
|
+
size: 24,
|
|
76
|
+
node: [
|
|
77
|
+
["rect", {
|
|
78
|
+
width: "8",
|
|
79
|
+
height: "4",
|
|
80
|
+
x: "8",
|
|
81
|
+
y: "2",
|
|
82
|
+
rx: "1",
|
|
83
|
+
ry: "1",
|
|
84
|
+
key: "tgr4d6"
|
|
85
|
+
}],
|
|
86
|
+
["path", {
|
|
87
|
+
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
|
|
88
|
+
key: "116196"
|
|
89
|
+
}],
|
|
90
|
+
["path", {
|
|
91
|
+
d: "M12 11h4",
|
|
92
|
+
key: "1jrz19"
|
|
93
|
+
}],
|
|
94
|
+
["path", {
|
|
95
|
+
d: "M12 16h4",
|
|
96
|
+
key: "n85exb"
|
|
97
|
+
}],
|
|
98
|
+
["path", {
|
|
99
|
+
d: "M8 11h.01",
|
|
100
|
+
key: "1dfujw"
|
|
101
|
+
}],
|
|
102
|
+
["path", {
|
|
103
|
+
d: "M8 16h.01",
|
|
104
|
+
key: "18s6g9"
|
|
105
|
+
}]
|
|
106
|
+
]
|
|
107
|
+
};
|
|
108
|
+
Se.node;
|
|
109
|
+
var Ce = b(Se), we = {
|
|
110
|
+
name: "file-pen",
|
|
111
|
+
size: 24,
|
|
112
|
+
node: [
|
|
113
|
+
["path", {
|
|
114
|
+
d: "M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",
|
|
115
|
+
key: "o6klzx"
|
|
116
|
+
}],
|
|
117
|
+
["path", {
|
|
118
|
+
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
119
|
+
key: "wfsgrz"
|
|
120
|
+
}],
|
|
121
|
+
["path", {
|
|
122
|
+
d: "M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",
|
|
123
|
+
key: "zhnas1"
|
|
124
|
+
}]
|
|
125
|
+
],
|
|
126
|
+
aliases: ["file-edit"]
|
|
127
|
+
};
|
|
128
|
+
we.node;
|
|
129
|
+
var Te = b(we), Ee = {
|
|
130
|
+
name: "file-search",
|
|
131
|
+
size: 24,
|
|
132
|
+
node: [
|
|
133
|
+
["path", {
|
|
134
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
135
|
+
key: "1oefj6"
|
|
136
|
+
}],
|
|
137
|
+
["path", {
|
|
138
|
+
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
139
|
+
key: "wfsgrz"
|
|
140
|
+
}],
|
|
141
|
+
["circle", {
|
|
142
|
+
cx: "11.5",
|
|
143
|
+
cy: "14.5",
|
|
144
|
+
r: "2.5",
|
|
145
|
+
key: "1bq0ko"
|
|
146
|
+
}],
|
|
147
|
+
["path", {
|
|
148
|
+
d: "M13.3 16.3 15 18",
|
|
149
|
+
key: "2quom7"
|
|
150
|
+
}]
|
|
151
|
+
]
|
|
152
|
+
};
|
|
153
|
+
Ee.node;
|
|
154
|
+
var De = b(Ee), Oe = {
|
|
155
|
+
name: "git-compare-arrows",
|
|
156
|
+
size: 24,
|
|
157
|
+
node: [
|
|
158
|
+
["circle", {
|
|
159
|
+
cx: "5",
|
|
160
|
+
cy: "6",
|
|
161
|
+
r: "3",
|
|
162
|
+
key: "1qnov2"
|
|
163
|
+
}],
|
|
164
|
+
["path", {
|
|
165
|
+
d: "M12 6h5a2 2 0 0 1 2 2v7",
|
|
166
|
+
key: "1yj91y"
|
|
167
|
+
}],
|
|
168
|
+
["path", {
|
|
169
|
+
d: "m15 9-3-3 3-3",
|
|
170
|
+
key: "1lwv8l"
|
|
171
|
+
}],
|
|
172
|
+
["circle", {
|
|
173
|
+
cx: "19",
|
|
174
|
+
cy: "18",
|
|
175
|
+
r: "3",
|
|
176
|
+
key: "1qljk2"
|
|
177
|
+
}],
|
|
178
|
+
["path", {
|
|
179
|
+
d: "M12 18H7a2 2 0 0 1-2-2V9",
|
|
180
|
+
key: "16sdep"
|
|
181
|
+
}],
|
|
182
|
+
["path", {
|
|
183
|
+
d: "m9 15 3 3-3 3",
|
|
184
|
+
key: "1m3kbl"
|
|
185
|
+
}]
|
|
186
|
+
]
|
|
187
|
+
};
|
|
188
|
+
Oe.node;
|
|
189
|
+
var ke = b(Oe), Ae = {
|
|
190
|
+
name: "layers",
|
|
191
|
+
size: 24,
|
|
192
|
+
node: [
|
|
193
|
+
["path", {
|
|
194
|
+
d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
|
|
195
|
+
key: "zw3jo"
|
|
196
|
+
}],
|
|
197
|
+
["path", {
|
|
198
|
+
d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
|
|
199
|
+
key: "1wduqc"
|
|
200
|
+
}],
|
|
201
|
+
["path", {
|
|
202
|
+
d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
|
|
203
|
+
key: "kqbvx6"
|
|
204
|
+
}]
|
|
205
|
+
],
|
|
206
|
+
aliases: ["layers-3"]
|
|
207
|
+
};
|
|
208
|
+
Ae.node;
|
|
209
|
+
var je = b(Ae), Me = {
|
|
210
|
+
name: "message-square-quote",
|
|
211
|
+
size: 24,
|
|
212
|
+
node: [
|
|
213
|
+
["path", {
|
|
214
|
+
d: "M14 14a2 2 0 0 0 2-2V8h-2",
|
|
215
|
+
key: "1r06pg"
|
|
216
|
+
}],
|
|
217
|
+
["path", {
|
|
218
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
219
|
+
key: "18887p"
|
|
220
|
+
}],
|
|
221
|
+
["path", {
|
|
222
|
+
d: "M8 14a2 2 0 0 0 2-2V8H8",
|
|
223
|
+
key: "1jzu5j"
|
|
224
|
+
}]
|
|
225
|
+
]
|
|
226
|
+
};
|
|
227
|
+
Me.node;
|
|
228
|
+
var Ne = b(Me), Pe = {
|
|
229
|
+
name: "pencil-line",
|
|
230
|
+
size: 24,
|
|
231
|
+
node: [
|
|
232
|
+
["path", {
|
|
233
|
+
d: "M13 21h8",
|
|
234
|
+
key: "1jsn5i"
|
|
235
|
+
}],
|
|
236
|
+
["path", {
|
|
237
|
+
d: "m15 5 4 4",
|
|
238
|
+
key: "1mk7zo"
|
|
239
|
+
}],
|
|
240
|
+
["path", {
|
|
241
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
242
|
+
key: "1a8usu"
|
|
243
|
+
}]
|
|
244
|
+
]
|
|
245
|
+
};
|
|
246
|
+
Pe.node;
|
|
247
|
+
var Fe = b(Pe), Ie = {
|
|
248
|
+
name: "search",
|
|
249
|
+
size: 24,
|
|
250
|
+
node: [["path", {
|
|
251
|
+
d: "m21 21-4.34-4.34",
|
|
252
|
+
key: "14j7rj"
|
|
253
|
+
}], ["circle", {
|
|
254
|
+
cx: "11",
|
|
255
|
+
cy: "11",
|
|
256
|
+
r: "8",
|
|
257
|
+
key: "4ej97u"
|
|
258
|
+
}]]
|
|
259
|
+
};
|
|
260
|
+
Ie.node;
|
|
261
|
+
var Le = b(Ie), Re = {
|
|
262
|
+
name: "settings",
|
|
263
|
+
size: 24,
|
|
264
|
+
node: [["path", {
|
|
265
|
+
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
266
|
+
key: "1i5ecw"
|
|
267
|
+
}], ["circle", {
|
|
268
|
+
cx: "12",
|
|
269
|
+
cy: "12",
|
|
270
|
+
r: "3",
|
|
271
|
+
key: "1v7zrd"
|
|
272
|
+
}]]
|
|
273
|
+
};
|
|
274
|
+
Re.node;
|
|
275
|
+
var ze = b(Re), Be = {
|
|
276
|
+
name: "timer",
|
|
277
|
+
size: 24,
|
|
278
|
+
node: [
|
|
279
|
+
["line", {
|
|
280
|
+
x1: "10",
|
|
281
|
+
x2: "14",
|
|
282
|
+
y1: "2",
|
|
283
|
+
y2: "2",
|
|
284
|
+
key: "14vaq8"
|
|
285
|
+
}],
|
|
286
|
+
["line", {
|
|
287
|
+
x1: "12",
|
|
288
|
+
x2: "15",
|
|
289
|
+
y1: "14",
|
|
290
|
+
y2: "11",
|
|
291
|
+
key: "17fdiu"
|
|
292
|
+
}],
|
|
293
|
+
["circle", {
|
|
294
|
+
cx: "12",
|
|
295
|
+
cy: "14",
|
|
296
|
+
r: "8",
|
|
297
|
+
key: "1e1u0o"
|
|
298
|
+
}]
|
|
299
|
+
]
|
|
300
|
+
};
|
|
301
|
+
Be.node;
|
|
302
|
+
var Ve = b(Be), He = {
|
|
303
|
+
name: "triangle-alert",
|
|
304
|
+
size: 24,
|
|
305
|
+
node: [
|
|
306
|
+
["path", {
|
|
307
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
308
|
+
key: "wmoenq"
|
|
309
|
+
}],
|
|
310
|
+
["path", {
|
|
311
|
+
d: "M12 9v4",
|
|
312
|
+
key: "juzpu7"
|
|
313
|
+
}],
|
|
314
|
+
["path", {
|
|
315
|
+
d: "M12 17h.01",
|
|
316
|
+
key: "p32p05"
|
|
317
|
+
}]
|
|
318
|
+
],
|
|
319
|
+
aliases: ["alert-triangle"]
|
|
320
|
+
};
|
|
321
|
+
He.node;
|
|
322
|
+
var Ue = b(He), O = /* @__PURE__ */ e(t(), 1), k = n(), We = Object.defineProperty, A = (e, t) => We(e, "name", {
|
|
323
|
+
value: t,
|
|
324
|
+
configurable: !0
|
|
325
|
+
}), Ge = "Collapsible", [Ke, qe] = l(Ge), [Je, Ye] = Ke(Ge), Xe = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ A(function(e, t) {
|
|
326
|
+
let { __scopeCollapsible: n, open: i, defaultOpen: a, disabled: o, onOpenChange: s, ...l } = e, [d, f] = u({
|
|
327
|
+
prop: i,
|
|
328
|
+
defaultProp: a ?? !1,
|
|
329
|
+
onChange: s,
|
|
330
|
+
caller: Ge
|
|
331
|
+
});
|
|
332
|
+
return /* @__PURE__ */ (0, k.jsx)(Je, {
|
|
333
|
+
scope: n,
|
|
334
|
+
disabled: o,
|
|
335
|
+
contentId: c(),
|
|
336
|
+
open: d,
|
|
337
|
+
onOpenToggle: O.useCallback(() => f((e) => !e), [f]),
|
|
338
|
+
children: /* @__PURE__ */ (0, k.jsx)(r.div, {
|
|
339
|
+
"data-state": nt(d),
|
|
340
|
+
"data-disabled": o ? "" : void 0,
|
|
341
|
+
...l,
|
|
342
|
+
ref: t
|
|
343
|
+
})
|
|
344
|
+
});
|
|
345
|
+
}, "Collapsible")), Ze = "CollapsibleTrigger", Qe = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ A(function(e, t) {
|
|
346
|
+
let { __scopeCollapsible: n, ...i } = e, a = Ye(Ze, n);
|
|
347
|
+
return /* @__PURE__ */ (0, k.jsx)(r.button, {
|
|
348
|
+
type: "button",
|
|
349
|
+
"aria-controls": a.open ? a.contentId : void 0,
|
|
350
|
+
"aria-expanded": a.open || !1,
|
|
351
|
+
"data-state": nt(a.open),
|
|
352
|
+
"data-disabled": a.disabled ? "" : void 0,
|
|
353
|
+
disabled: a.disabled,
|
|
354
|
+
...i,
|
|
355
|
+
ref: t,
|
|
356
|
+
onClick: d(e.onClick, a.onOpenToggle)
|
|
357
|
+
});
|
|
358
|
+
}, "CollapsibleTrigger")), $e = "CollapsibleContent", et = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ A(function(e, t) {
|
|
359
|
+
let { forceMount: n, ...r } = e, i = Ye($e, e.__scopeCollapsible);
|
|
360
|
+
return /* @__PURE__ */ (0, k.jsx)(f, {
|
|
361
|
+
present: n || i.open,
|
|
362
|
+
children: ({ present: e }) => /* @__PURE__ */ (0, k.jsx)(tt, {
|
|
363
|
+
...r,
|
|
364
|
+
ref: t,
|
|
365
|
+
present: e
|
|
366
|
+
})
|
|
367
|
+
});
|
|
368
|
+
}, "CollapsibleContent")), tt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ A(function(e, t) {
|
|
369
|
+
let { __scopeCollapsible: n, present: a, children: o, ...c } = e, l = Ye($e, n), [u, d] = O.useState(a), f = O.useRef(null), p = i(t, f), m = O.useRef(0), h = m.current, g = O.useRef(0), _ = g.current, v = l.open || u, y = O.useRef(v), b = O.useRef(void 0);
|
|
370
|
+
return O.useEffect(() => {
|
|
371
|
+
let e = requestAnimationFrame(() => y.current = !1);
|
|
372
|
+
return () => cancelAnimationFrame(e);
|
|
373
|
+
}, []), s(() => {
|
|
374
|
+
let e = f.current;
|
|
375
|
+
if (e) {
|
|
376
|
+
b.current = b.current || {
|
|
377
|
+
transitionDuration: e.style.transitionDuration,
|
|
378
|
+
animationName: e.style.animationName
|
|
379
|
+
}, e.style.transitionDuration = "0s", e.style.animationName = "none";
|
|
380
|
+
let t = e.getBoundingClientRect();
|
|
381
|
+
m.current = t.height, g.current = t.width, y.current || (e.style.transitionDuration = b.current.transitionDuration, e.style.animationName = b.current.animationName), d(a);
|
|
382
|
+
}
|
|
383
|
+
}, [l.open, a]), /* @__PURE__ */ (0, k.jsx)(r.div, {
|
|
384
|
+
"data-state": nt(l.open),
|
|
385
|
+
"data-disabled": l.disabled ? "" : void 0,
|
|
386
|
+
id: l.contentId,
|
|
387
|
+
hidden: !v,
|
|
388
|
+
...c,
|
|
389
|
+
ref: p,
|
|
390
|
+
style: {
|
|
391
|
+
"--radix-collapsible-content-height": h ? `${h}px` : void 0,
|
|
392
|
+
"--radix-collapsible-content-width": _ ? `${_}px` : void 0,
|
|
393
|
+
...e.style
|
|
394
|
+
},
|
|
395
|
+
children: v && o
|
|
396
|
+
});
|
|
397
|
+
}, "CollapsibleContentImpl"));
|
|
398
|
+
function nt(e) {
|
|
399
|
+
return e ? "open" : "closed";
|
|
400
|
+
}
|
|
401
|
+
A(nt, "getState");
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/primitives/text-shimmer.js
|
|
404
|
+
var j = "tangle-text-shimmer", rt = "tangle-text-shimmer-styles", it = `
|
|
405
|
+
@keyframes ${j} {
|
|
406
|
+
from { -webkit-mask-position: 150% center; mask-position: 150% center; }
|
|
407
|
+
to { -webkit-mask-position: -50% center; mask-position: -50% center; }
|
|
408
|
+
}
|
|
409
|
+
.${j} {
|
|
410
|
+
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, #000 45%, rgba(0,0,0,0.72) 60%);
|
|
411
|
+
mask-image: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, #000 45%, rgba(0,0,0,0.72) 60%);
|
|
412
|
+
-webkit-mask-size: 250% 100%;
|
|
413
|
+
mask-size: 250% 100%;
|
|
414
|
+
animation: ${j} 1.4s linear infinite;
|
|
415
|
+
}
|
|
416
|
+
@media (prefers-reduced-motion: reduce) {
|
|
417
|
+
.${j} {
|
|
418
|
+
animation: none;
|
|
419
|
+
-webkit-mask-image: none;
|
|
420
|
+
mask-image: none;
|
|
421
|
+
text-decoration: underline dotted currentColor;
|
|
422
|
+
text-underline-offset: 3px;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
`;
|
|
426
|
+
function at() {
|
|
427
|
+
if (typeof document > "u" || document.getElementById(rt)) return;
|
|
428
|
+
let e = document.createElement("style");
|
|
429
|
+
e.id = rt, e.textContent = it, document.head.appendChild(e);
|
|
430
|
+
}
|
|
431
|
+
var ot = typeof window > "u" ? O.useEffect : O.useLayoutEffect;
|
|
432
|
+
function st({ children: e, className: t, durationMs: n = 1400 }) {
|
|
433
|
+
return ot(at, []), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
434
|
+
className: o(j, "text-foreground", t),
|
|
435
|
+
style: { animationDuration: `${n}ms` },
|
|
436
|
+
children: e
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/primitives/tag.js
|
|
441
|
+
var ct = {
|
|
442
|
+
sm: "gap-1 px-2 text-xs [&_svg]:size-3",
|
|
443
|
+
md: "gap-1.5 px-2.5 text-sm [&_svg]:size-3.5"
|
|
444
|
+
}, lt = {
|
|
445
|
+
sm: {
|
|
446
|
+
box: "items-start",
|
|
447
|
+
label: "py-[3px]",
|
|
448
|
+
icon: "h-[22px] items-center"
|
|
449
|
+
},
|
|
450
|
+
md: {
|
|
451
|
+
box: "items-start",
|
|
452
|
+
label: "py-[3px]",
|
|
453
|
+
icon: "h-[26px] items-center"
|
|
454
|
+
}
|
|
455
|
+
}, ut = O.forwardRef(({ className: e, children: t, tone: n = "neutral", emphasis: r = "soft", size: i = "sm", icon: s, onRemove: c, removeLabel: l, wrap: u = !1, ...d }, f) => {
|
|
456
|
+
let p = D[n], m = l ?? (typeof t == "string" ? `Remove ${t}` : "Remove");
|
|
457
|
+
return /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
458
|
+
ref: f,
|
|
459
|
+
className: o("inline-flex min-w-0 max-w-full shrink-0 rounded-md border font-medium", ct[i], u ? lt[i].box : ["items-center", i === "sm" ? "h-6" : "h-7"], r === "outline" ? p.outline : p.surface, c && (i === "sm" ? "pr-0.5" : "pr-1"), e),
|
|
460
|
+
...d,
|
|
461
|
+
children: [
|
|
462
|
+
s ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
463
|
+
"aria-hidden": "true",
|
|
464
|
+
className: o("inline-flex shrink-0", u && lt[i].icon, p.icon),
|
|
465
|
+
children: s
|
|
466
|
+
}) : null,
|
|
467
|
+
u ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
468
|
+
className: o("min-w-0 [overflow-wrap:anywhere]", lt[i].label),
|
|
469
|
+
children: t
|
|
470
|
+
}) : /* @__PURE__ */ (0, k.jsx)("span", {
|
|
471
|
+
className: "min-w-0 truncate",
|
|
472
|
+
title: typeof t == "string" ? t : void 0,
|
|
473
|
+
children: t
|
|
474
|
+
}),
|
|
475
|
+
c ? /* @__PURE__ */ (0, k.jsx)("button", {
|
|
476
|
+
type: "button",
|
|
477
|
+
"aria-label": m,
|
|
478
|
+
onClick: c,
|
|
479
|
+
className: o("relative inline-flex shrink-0 items-center justify-center rounded-sm opacity-70 transition-[opacity,background-color] duration-150 ease-out hover:bg-[color-mix(in_srgb,currentColor_14%,transparent)] hover:opacity-100 before:absolute before:-inset-1.5 before:content-['']", i === "sm" ? "size-5" : "size-6", u && "mt-px", a),
|
|
480
|
+
children: /* @__PURE__ */ (0, k.jsx)(ue, { "aria-hidden": "true" })
|
|
481
|
+
}) : null
|
|
482
|
+
]
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
ut.displayName = "Tag";
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region node_modules/.pnpm/@radix-ui+react-hover-card@1.2.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+re_3222637d86fb085a7eb2140ea9a43938/node_modules/@radix-ui/react-hover-card/dist/index.mjs
|
|
488
|
+
var dt = Object.defineProperty, M = (e, t) => dt(e, "name", {
|
|
489
|
+
value: t,
|
|
490
|
+
configurable: !0
|
|
491
|
+
}), ft, pt = "HoverCard", [mt, ht] = l(pt, [h]), gt = h(), [_t, vt] = mt(pt), yt = /* @__PURE__ */ M((e) => {
|
|
492
|
+
let { __scopeHoverCard: t, children: n, open: r, defaultOpen: i, onOpenChange: a, openDelay: o = 700, closeDelay: s = 300 } = e, c = gt(t), l = O.useRef(0), d = O.useRef(0), f = O.useRef(!1), p = O.useRef(!1), [m, h] = u({
|
|
493
|
+
prop: r,
|
|
494
|
+
defaultProp: i ?? !1,
|
|
495
|
+
onChange: a,
|
|
496
|
+
caller: pt
|
|
497
|
+
}), g = O.useCallback(() => {
|
|
498
|
+
clearTimeout(d.current), l.current = window.setTimeout(() => h(!0), o);
|
|
499
|
+
}, [o, h]), _ = O.useCallback(() => {
|
|
500
|
+
clearTimeout(l.current), !f.current && !p.current && (d.current = window.setTimeout(() => h(!1), s));
|
|
501
|
+
}, [s, h]), y = O.useCallback(() => h(!1), [h]);
|
|
502
|
+
return O.useEffect(() => () => {
|
|
503
|
+
clearTimeout(l.current), clearTimeout(d.current);
|
|
504
|
+
}, []), /* @__PURE__ */ (0, k.jsx)(_t, {
|
|
505
|
+
scope: t,
|
|
506
|
+
open: m,
|
|
507
|
+
onOpenChange: h,
|
|
508
|
+
onOpen: g,
|
|
509
|
+
onClose: _,
|
|
510
|
+
onDismiss: y,
|
|
511
|
+
hasSelectionRef: f,
|
|
512
|
+
isPointerDownOnContentRef: p,
|
|
513
|
+
children: /* @__PURE__ */ (0, k.jsx)(v, {
|
|
514
|
+
...c,
|
|
515
|
+
children: n
|
|
516
|
+
})
|
|
517
|
+
});
|
|
518
|
+
}, "HoverCard"), bt = "HoverCardTrigger", xt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
519
|
+
let { __scopeHoverCard: n, ...i } = e, a = vt(bt, n), o = gt(n);
|
|
520
|
+
return /* @__PURE__ */ (0, k.jsx)(g, {
|
|
521
|
+
asChild: !0,
|
|
522
|
+
...o,
|
|
523
|
+
children: /* @__PURE__ */ (0, k.jsx)(r.a, {
|
|
524
|
+
"data-state": a.open ? "open" : "closed",
|
|
525
|
+
...i,
|
|
526
|
+
ref: t,
|
|
527
|
+
onPointerEnter: d(e.onPointerEnter, N(a.onOpen)),
|
|
528
|
+
onPointerLeave: d(e.onPointerLeave, N(a.onClose)),
|
|
529
|
+
onFocus: d(e.onFocus, a.onOpen),
|
|
530
|
+
onBlur: d(e.onBlur, a.onClose),
|
|
531
|
+
onTouchStart: d(e.onTouchStart, (e) => e.preventDefault())
|
|
532
|
+
})
|
|
533
|
+
});
|
|
534
|
+
}, "HoverCardTrigger")), St = "HoverCardPortal", [Ct, wt] = mt(St, { forceMount: void 0 }), Tt = /* @__PURE__ */ M((e) => {
|
|
535
|
+
let { __scopeHoverCard: t, forceMount: n, children: r, container: i } = e, a = vt(St, t);
|
|
536
|
+
return /* @__PURE__ */ (0, k.jsx)(Ct, {
|
|
537
|
+
scope: t,
|
|
538
|
+
forceMount: n,
|
|
539
|
+
children: /* @__PURE__ */ (0, k.jsx)(f, {
|
|
540
|
+
present: n || a.open,
|
|
541
|
+
children: /* @__PURE__ */ (0, k.jsx)(p, {
|
|
542
|
+
asChild: !0,
|
|
543
|
+
container: i,
|
|
544
|
+
children: r
|
|
545
|
+
})
|
|
546
|
+
})
|
|
547
|
+
});
|
|
548
|
+
}, "HoverCardPortal"), Et = "HoverCardContent", Dt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
549
|
+
let n = wt(Et, e.__scopeHoverCard), { forceMount: r = n.forceMount, ...i } = e, a = vt(Et, e.__scopeHoverCard);
|
|
550
|
+
return /* @__PURE__ */ (0, k.jsx)(f, {
|
|
551
|
+
present: r || a.open,
|
|
552
|
+
children: /* @__PURE__ */ (0, k.jsx)(Ot, {
|
|
553
|
+
"data-state": a.open ? "open" : "closed",
|
|
554
|
+
...i,
|
|
555
|
+
onPointerEnter: d(e.onPointerEnter, N(a.onOpen)),
|
|
556
|
+
onPointerLeave: d(e.onPointerLeave, N(a.onClose)),
|
|
557
|
+
ref: t
|
|
558
|
+
})
|
|
559
|
+
});
|
|
560
|
+
}, "HoverCardContent")), Ot = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
561
|
+
let { __scopeHoverCard: n, onEscapeKeyDown: r, onPointerDownOutside: a, onFocusOutside: o, onInteractOutside: s, ...c } = e, l = vt(Et, n), u = gt(n), f = O.useRef(null), [p, h] = O.useState(null), g = i(t, f, h);
|
|
562
|
+
m(p);
|
|
563
|
+
let [v, b] = O.useState(!1);
|
|
564
|
+
return O.useEffect(() => {
|
|
565
|
+
if (v) {
|
|
566
|
+
let e = document.body;
|
|
567
|
+
return ft = e.style.userSelect || e.style.webkitUserSelect, e.style.userSelect = "none", e.style.webkitUserSelect = "none", () => {
|
|
568
|
+
e.style.userSelect = ft, e.style.webkitUserSelect = ft;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
}, [v]), O.useEffect(() => {
|
|
572
|
+
if (f.current) {
|
|
573
|
+
let e = /* @__PURE__ */ M(() => {
|
|
574
|
+
b(!1), l.isPointerDownOnContentRef.current = !1, setTimeout(() => {
|
|
575
|
+
document.getSelection()?.toString() !== "" && (l.hasSelectionRef.current = !0);
|
|
576
|
+
});
|
|
577
|
+
}, "handlePointerUp");
|
|
578
|
+
return document.addEventListener("pointerup", e), () => {
|
|
579
|
+
document.removeEventListener("pointerup", e), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !1;
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
}, [l.isPointerDownOnContentRef, l.hasSelectionRef]), O.useEffect(() => {
|
|
583
|
+
f.current && kt(f.current).forEach((e) => e.setAttribute("tabindex", "-1"));
|
|
584
|
+
}), /* @__PURE__ */ (0, k.jsx)(y, {
|
|
585
|
+
asChild: !0,
|
|
586
|
+
disableOutsidePointerEvents: !1,
|
|
587
|
+
onInteractOutside: s,
|
|
588
|
+
onEscapeKeyDown: r,
|
|
589
|
+
onPointerDownOutside: a,
|
|
590
|
+
onFocusOutside: d(o, (e) => {
|
|
591
|
+
e.preventDefault();
|
|
592
|
+
}),
|
|
593
|
+
onDismiss: l.onDismiss,
|
|
594
|
+
children: /* @__PURE__ */ (0, k.jsx)(_, {
|
|
595
|
+
...u,
|
|
596
|
+
...c,
|
|
597
|
+
onPointerDown: d(c.onPointerDown, (e) => {
|
|
598
|
+
e.currentTarget.contains(e.target) && b(!0), l.hasSelectionRef.current = !1, l.isPointerDownOnContentRef.current = !0;
|
|
599
|
+
}),
|
|
600
|
+
ref: g,
|
|
601
|
+
style: {
|
|
602
|
+
...c.style,
|
|
603
|
+
userSelect: v ? "text" : void 0,
|
|
604
|
+
WebkitUserSelect: v ? "text" : void 0,
|
|
605
|
+
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
606
|
+
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
607
|
+
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
608
|
+
"--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
|
|
609
|
+
"--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
|
|
610
|
+
}
|
|
611
|
+
})
|
|
612
|
+
});
|
|
613
|
+
}, "HoverCardContentImpl"));
|
|
614
|
+
function N(e) {
|
|
615
|
+
return (t) => t.pointerType === "touch" ? void 0 : e();
|
|
616
|
+
}
|
|
617
|
+
M(N, "excludeTouch");
|
|
618
|
+
function kt(e) {
|
|
619
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ M((e) => e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP, "acceptNode") });
|
|
620
|
+
for (; n.nextNode();) t.push(n.currentNode);
|
|
621
|
+
return t;
|
|
622
|
+
}
|
|
623
|
+
M(kt, "getTabbableNodes");
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/primitives/hover-card.js
|
|
626
|
+
var At = yt, jt = O.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ (0, k.jsx)(xt, {
|
|
627
|
+
ref: n,
|
|
628
|
+
className: o("cursor-pointer underline-offset-4 hover:underline", e),
|
|
629
|
+
...t
|
|
630
|
+
}));
|
|
631
|
+
jt.displayName = xt.displayName;
|
|
632
|
+
var Mt = O.forwardRef(({ className: e, side: t = "bottom", alignOffset: n = 6, ...r }, i) => /* @__PURE__ */ (0, k.jsx)(Tt, { children: /* @__PURE__ */ (0, k.jsx)(Dt, {
|
|
633
|
+
ref: i,
|
|
634
|
+
side: t,
|
|
635
|
+
alignOffset: n,
|
|
636
|
+
sideOffset: 6,
|
|
637
|
+
className: o("z-50 w-64 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", e),
|
|
638
|
+
...r
|
|
639
|
+
}) }));
|
|
640
|
+
Mt.displayName = Dt.displayName;
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/utils/tool-display.js
|
|
643
|
+
var Nt = "tool:";
|
|
644
|
+
function Pt(e) {
|
|
645
|
+
let t = e?.toLowerCase() ?? "";
|
|
646
|
+
return t.startsWith(Nt) ? t.slice(5) : t;
|
|
647
|
+
}
|
|
648
|
+
function P(e, t) {
|
|
649
|
+
if (typeof e == "object" && e && t in e) {
|
|
650
|
+
let n = e[t];
|
|
651
|
+
if (typeof n == "string") return n;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
function Ft(e) {
|
|
655
|
+
return typeof e == "string" ? e : P(e, "command") ?? P(e, "cmd");
|
|
656
|
+
}
|
|
657
|
+
function It(e) {
|
|
658
|
+
return P(e, "file_path") ?? P(e, "path") ?? P(e, "filePath") ?? P(e, "file");
|
|
659
|
+
}
|
|
660
|
+
function Lt(e) {
|
|
661
|
+
switch (Pt(e)) {
|
|
662
|
+
case "bash":
|
|
663
|
+
case "shell":
|
|
664
|
+
case "command":
|
|
665
|
+
case "execute": return "command";
|
|
666
|
+
case "write":
|
|
667
|
+
case "write_file":
|
|
668
|
+
case "create_file": return "write";
|
|
669
|
+
case "read":
|
|
670
|
+
case "read_file":
|
|
671
|
+
case "cat": return "read";
|
|
672
|
+
case "grep":
|
|
673
|
+
case "search":
|
|
674
|
+
case "rg": return "search";
|
|
675
|
+
case "edit":
|
|
676
|
+
case "patch":
|
|
677
|
+
case "sed": return "edit";
|
|
678
|
+
case "glob":
|
|
679
|
+
case "find":
|
|
680
|
+
case "ls": return "search";
|
|
681
|
+
case "web_search":
|
|
682
|
+
case "web_fetch":
|
|
683
|
+
case "fetch": return "web";
|
|
684
|
+
case "task":
|
|
685
|
+
case "agent":
|
|
686
|
+
case "spawn": return "task";
|
|
687
|
+
case "todo":
|
|
688
|
+
case "todo_write": return "todo";
|
|
689
|
+
default: return "other";
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
function Rt(e) {
|
|
693
|
+
let t = Pt(e.tool), n = e.state.status === "pending" ? void 0 : e.state.input, r = It(n), i = Ft(n);
|
|
694
|
+
switch (t) {
|
|
695
|
+
case "bash":
|
|
696
|
+
case "shell":
|
|
697
|
+
case "command":
|
|
698
|
+
case "execute": return {
|
|
699
|
+
title: "Shell",
|
|
700
|
+
description: i ? zt(i) : void 0,
|
|
701
|
+
displayVariant: "command",
|
|
702
|
+
commandSnippet: i
|
|
703
|
+
};
|
|
704
|
+
case "write":
|
|
705
|
+
case "write_file":
|
|
706
|
+
case "create_file": return {
|
|
707
|
+
title: "Write",
|
|
708
|
+
description: r,
|
|
709
|
+
displayVariant: "write-file",
|
|
710
|
+
targetPath: r
|
|
711
|
+
};
|
|
712
|
+
case "edit":
|
|
713
|
+
case "patch": return {
|
|
714
|
+
title: "Edit",
|
|
715
|
+
description: r,
|
|
716
|
+
hasDiffOutput: !0,
|
|
717
|
+
diffFilePath: r,
|
|
718
|
+
displayVariant: "diff",
|
|
719
|
+
targetPath: r
|
|
720
|
+
};
|
|
721
|
+
case "read":
|
|
722
|
+
case "read_file":
|
|
723
|
+
case "cat": return {
|
|
724
|
+
title: "Read",
|
|
725
|
+
description: r,
|
|
726
|
+
displayVariant: "read-file",
|
|
727
|
+
targetPath: r
|
|
728
|
+
};
|
|
729
|
+
case "grep":
|
|
730
|
+
case "search":
|
|
731
|
+
case "rg": return {
|
|
732
|
+
title: "Search",
|
|
733
|
+
description: P(n, "pattern"),
|
|
734
|
+
displayVariant: "grep"
|
|
735
|
+
};
|
|
736
|
+
case "glob":
|
|
737
|
+
case "find":
|
|
738
|
+
case "ls": return {
|
|
739
|
+
title: "Find",
|
|
740
|
+
description: P(n, "pattern"),
|
|
741
|
+
displayVariant: "glob"
|
|
742
|
+
};
|
|
743
|
+
case "web_search":
|
|
744
|
+
case "web_fetch":
|
|
745
|
+
case "fetch": {
|
|
746
|
+
let e = P(n, "query") ?? P(n, "url");
|
|
747
|
+
return {
|
|
748
|
+
title: t === "web_search" ? "Web search" : "Fetch",
|
|
749
|
+
description: e ? zt(e) : void 0,
|
|
750
|
+
displayVariant: "web-search"
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
case "task":
|
|
754
|
+
case "agent":
|
|
755
|
+
case "spawn": {
|
|
756
|
+
let e = P(n, "description") ?? P(n, "prompt");
|
|
757
|
+
return {
|
|
758
|
+
title: "Task",
|
|
759
|
+
description: e ? zt(e) : void 0
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
default: return {
|
|
763
|
+
title: e.tool || "Tool",
|
|
764
|
+
description: i ?? r ?? P(n, "pattern") ?? P(n, "query")
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
function zt(e) {
|
|
769
|
+
let t = e.split("\n")[0];
|
|
770
|
+
return t.length > 60 ? t.slice(0, 57) + "..." : t;
|
|
771
|
+
}
|
|
772
|
+
function Bt(e, t) {
|
|
773
|
+
if (e.state.status === "error") return e.state.error || t;
|
|
774
|
+
}
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/command-preview.js
|
|
777
|
+
var Vt = [
|
|
778
|
+
"command",
|
|
779
|
+
"cmd",
|
|
780
|
+
"script",
|
|
781
|
+
"commandLine"
|
|
782
|
+
];
|
|
783
|
+
function Ht(e) {
|
|
784
|
+
if (typeof e == "string") return e;
|
|
785
|
+
if (e && typeof e == "object") {
|
|
786
|
+
let t = e;
|
|
787
|
+
for (let e of Vt) {
|
|
788
|
+
let n = t[e];
|
|
789
|
+
if (typeof n == "string" && n.length > 0) return n;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
return "";
|
|
793
|
+
}
|
|
794
|
+
function Ut(e) {
|
|
795
|
+
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
796
|
+
if (typeof e == "string" && e.trim() !== "") {
|
|
797
|
+
let t = Number(e);
|
|
798
|
+
return Number.isFinite(t) ? t : void 0;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
function Wt(e) {
|
|
802
|
+
return e == null ? {
|
|
803
|
+
stdout: "",
|
|
804
|
+
stderr: "",
|
|
805
|
+
exitCode: void 0
|
|
806
|
+
} : typeof e == "string" ? qt(e) || {
|
|
807
|
+
stdout: e,
|
|
808
|
+
stderr: "",
|
|
809
|
+
exitCode: void 0
|
|
810
|
+
} : typeof e == "object" ? Gt(e) : {
|
|
811
|
+
stdout: String(e),
|
|
812
|
+
stderr: "",
|
|
813
|
+
exitCode: void 0
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
function Gt(e) {
|
|
817
|
+
let t = (e) => e == null ? "" : String(e), n = e.timedOut ?? e.timed_out, r = e.signal;
|
|
818
|
+
return {
|
|
819
|
+
stdout: t(e.stdout ?? e.output),
|
|
820
|
+
stderr: t(e.stderr),
|
|
821
|
+
exitCode: Ut(e.exitCode ?? e.exit_code ?? e.code),
|
|
822
|
+
...n === !0 ? { timedOut: !0 } : {},
|
|
823
|
+
...typeof r == "string" && r.length > 0 ? { signal: r } : {}
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
var Kt = /* @__PURE__ */ new Set([
|
|
827
|
+
"stdout",
|
|
828
|
+
"stderr",
|
|
829
|
+
"output",
|
|
830
|
+
"exitCode",
|
|
831
|
+
"exit_code",
|
|
832
|
+
"code",
|
|
833
|
+
"signal",
|
|
834
|
+
"durationMs",
|
|
835
|
+
"duration_ms",
|
|
836
|
+
"timedOut",
|
|
837
|
+
"timed_out"
|
|
838
|
+
]);
|
|
839
|
+
function qt(e) {
|
|
840
|
+
let t = e.trimStart();
|
|
841
|
+
if (t.startsWith("{")) try {
|
|
842
|
+
let e = JSON.parse(t);
|
|
843
|
+
if (!e || typeof e != "object" || Array.isArray(e)) return;
|
|
844
|
+
let n = e;
|
|
845
|
+
return !("stdout" in n) && !("stderr" in n) || !Object.keys(n).every((e) => Kt.has(e)) ? void 0 : Gt(n);
|
|
846
|
+
} catch {
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
function Jt({ output: e, status: t }) {
|
|
851
|
+
if (t === "running" || t === "pending") return /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
852
|
+
className: "inline-flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground",
|
|
853
|
+
children: [/* @__PURE__ */ (0, k.jsx)(ee, {
|
|
854
|
+
className: "h-3 w-3 animate-spin",
|
|
855
|
+
"aria-hidden": "true"
|
|
856
|
+
}), "running"]
|
|
857
|
+
});
|
|
858
|
+
let { exitCode: n, timedOut: r, signal: i } = e, a, s;
|
|
859
|
+
return r ? (a = "timed out", s = "danger") : i ? (a = i, s = "danger") : n !== void 0 && n !== 0 ? (a = `exit ${n}`, s = "danger") : t === "error" ? (a = n === 0 ? "exit 0 · tool reported error" : "tool reported error", s = "warning") : (a = n === 0 ? "exit 0" : null, s = "success"), a === null ? null : /* @__PURE__ */ (0, k.jsx)("span", {
|
|
860
|
+
className: o("inline-flex shrink-0 items-center rounded-full border px-1.5 py-px font-sans text-[11px] font-medium tabular-nums", s === "danger" && "border-transparent bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]", s === "success" && "border-transparent bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]", s === "warning" && "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]"),
|
|
861
|
+
children: a
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
function Yt({ command: e }) {
|
|
865
|
+
let t = e.split(/(\s+)/);
|
|
866
|
+
return /* @__PURE__ */ (0, k.jsx)(k.Fragment, { children: t.map((e, t) => e.length > 0 && !/\s/.test(e) ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
867
|
+
className: "inline-block max-w-full [overflow-wrap:anywhere]",
|
|
868
|
+
children: e
|
|
869
|
+
}, t) : e) });
|
|
870
|
+
}
|
|
871
|
+
function Xt({ label: e, text: t, className: n }) {
|
|
872
|
+
let r = (0, O.useRef)(null), [i, s] = (0, O.useState)(!1), [c, l] = (0, O.useState)(!1);
|
|
873
|
+
(0, O.useLayoutEffect)(() => {
|
|
874
|
+
let e = r.current;
|
|
875
|
+
if (!e || c) return;
|
|
876
|
+
let t = () => s(e.scrollHeight > e.clientHeight + 1);
|
|
877
|
+
if (t(), typeof ResizeObserver > "u") return;
|
|
878
|
+
let n = new ResizeObserver(t);
|
|
879
|
+
return n.observe(e), () => n.disconnect();
|
|
880
|
+
}, [c]);
|
|
881
|
+
let u = t.replace(/\n$/, "").split("\n").length;
|
|
882
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
883
|
+
className: n,
|
|
884
|
+
children: [/* @__PURE__ */ (0, k.jsx)("pre", {
|
|
885
|
+
ref: r,
|
|
886
|
+
tabIndex: 0,
|
|
887
|
+
role: "region",
|
|
888
|
+
"aria-label": e,
|
|
889
|
+
className: o("overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] px-3 py-2 leading-relaxed", c ? "" : "max-h-80", a),
|
|
890
|
+
children: t
|
|
891
|
+
}), i && !c ? /* @__PURE__ */ (0, k.jsxs)("button", {
|
|
892
|
+
type: "button",
|
|
893
|
+
onClick: () => l(!0),
|
|
894
|
+
className: o("w-full border-t border-white/10 px-3 py-1.5 text-left font-sans text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground", a),
|
|
895
|
+
children: [
|
|
896
|
+
"Show all ",
|
|
897
|
+
e,
|
|
898
|
+
" (",
|
|
899
|
+
u,
|
|
900
|
+
" lines)"
|
|
901
|
+
]
|
|
902
|
+
}) : null]
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
var Zt = (0, O.memo)(({ part: e, defaultExpanded: t = !1, className: n }) => {
|
|
906
|
+
let [r, i] = (0, O.useState)(t), s = (0, O.useId)(), c = Ht(e.state.input), { status: l } = e.state, u = Wt(e.state.output), d = (e) => e.replace(/\s+/g, " ").trim(), f = e.state.error !== void 0 && u.stdout.length > 0 && d(e.state.error) === d(u.stdout) ? void 0 : e.state.error, p = u.stdout.length > 0 || u.stderr.length > 0 || f !== void 0 && f.length > 0, m = /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [
|
|
907
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
908
|
+
"aria-hidden": "true",
|
|
909
|
+
className: "shrink-0 select-none text-muted-foreground",
|
|
910
|
+
children: "$"
|
|
911
|
+
}),
|
|
912
|
+
/* @__PURE__ */ (0, k.jsx)("code", {
|
|
913
|
+
title: r ? void 0 : c,
|
|
914
|
+
className: o("min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]", r ? "" : "line-clamp-2"),
|
|
915
|
+
children: r ? /* @__PURE__ */ (0, k.jsx)(Yt, { command: c }) : c
|
|
916
|
+
}),
|
|
917
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
918
|
+
className: "flex shrink-0 max-sm:order-last max-sm:basis-full max-sm:pl-4",
|
|
919
|
+
children: /* @__PURE__ */ (0, k.jsx)(Jt, {
|
|
920
|
+
output: u,
|
|
921
|
+
status: l
|
|
922
|
+
})
|
|
923
|
+
})
|
|
924
|
+
] });
|
|
925
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
926
|
+
"data-theme": r ? "dark" : void 0,
|
|
927
|
+
"data-testid": "command-preview",
|
|
928
|
+
"data-expanded": r,
|
|
929
|
+
className: o("overflow-hidden rounded-[var(--radius-md)] border font-mono text-xs text-foreground", r ? "border-[var(--md3-surface-container-lowest)] bg-[var(--md3-surface-container-lowest)]" : "border-transparent bg-transparent", n),
|
|
930
|
+
children: [p ? /* @__PURE__ */ (0, k.jsxs)("button", {
|
|
931
|
+
type: "button",
|
|
932
|
+
onClick: () => i((e) => !e),
|
|
933
|
+
"aria-expanded": r,
|
|
934
|
+
"aria-controls": s,
|
|
935
|
+
className: o("flex w-full flex-wrap items-start gap-x-2 gap-y-1 px-3 py-2 text-left transition-colors sm:flex-nowrap", r ? "hover:bg-white/5" : "hover:bg-muted", a),
|
|
936
|
+
children: [m, r ? /* @__PURE__ */ (0, k.jsx)(xe, {
|
|
937
|
+
className: "mt-px h-3.5 w-3.5 shrink-0 text-muted-foreground",
|
|
938
|
+
"aria-hidden": "true"
|
|
939
|
+
}) : /* @__PURE__ */ (0, k.jsx)(fe, {
|
|
940
|
+
className: "mt-px h-3.5 w-3.5 shrink-0 text-muted-foreground",
|
|
941
|
+
"aria-hidden": "true"
|
|
942
|
+
})]
|
|
943
|
+
}) : /* @__PURE__ */ (0, k.jsx)("div", {
|
|
944
|
+
className: "flex w-full flex-wrap items-start gap-x-2 gap-y-1 px-3 py-2 sm:flex-nowrap",
|
|
945
|
+
children: m
|
|
946
|
+
}), r && p ? /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
947
|
+
id: s,
|
|
948
|
+
className: "border-t border-white/10",
|
|
949
|
+
children: [
|
|
950
|
+
u.stdout ? /* @__PURE__ */ (0, k.jsx)(Xt, {
|
|
951
|
+
label: "stdout",
|
|
952
|
+
text: u.stdout,
|
|
953
|
+
className: ""
|
|
954
|
+
}) : null,
|
|
955
|
+
u.stderr ? /* @__PURE__ */ (0, k.jsx)(Xt, {
|
|
956
|
+
label: "stderr",
|
|
957
|
+
text: u.stderr,
|
|
958
|
+
className: "border-t border-white/10 text-[var(--surface-danger-text)]"
|
|
959
|
+
}) : null,
|
|
960
|
+
f ? /* @__PURE__ */ (0, k.jsx)(Xt, {
|
|
961
|
+
label: "error",
|
|
962
|
+
text: f,
|
|
963
|
+
className: "border-t border-white/10 text-[var(--surface-danger-text)]"
|
|
964
|
+
}) : null
|
|
965
|
+
]
|
|
966
|
+
}) : null]
|
|
967
|
+
});
|
|
968
|
+
});
|
|
969
|
+
Zt.displayName = "CommandPreview";
|
|
970
|
+
//#endregion
|
|
971
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/preview-primitives.js
|
|
972
|
+
function F({ icon: e, title: t, description: n, meta: r, children: i, className: a }) {
|
|
973
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
974
|
+
className: o("overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card shadow-[var(--shadow-card)]", a),
|
|
975
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
976
|
+
className: "flex items-center gap-2.5 border-b border-border bg-card px-[var(--tool-card-px)] py-[var(--tool-card-py)]",
|
|
977
|
+
children: [
|
|
978
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
979
|
+
className: "flex h-[var(--tool-icon-size)] w-[var(--tool-icon-size)] shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--border-accent)] bg-muted text-primary",
|
|
980
|
+
children: e
|
|
981
|
+
}),
|
|
982
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
983
|
+
className: "min-w-0 flex-1",
|
|
984
|
+
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
985
|
+
className: "flex items-center gap-2",
|
|
986
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
987
|
+
className: "text-xs font-semibold text-foreground",
|
|
988
|
+
children: t
|
|
989
|
+
}), n ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
990
|
+
className: "truncate text-xs font-mono text-muted-foreground",
|
|
991
|
+
children: n
|
|
992
|
+
}) : null]
|
|
993
|
+
})
|
|
994
|
+
}),
|
|
995
|
+
r ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
996
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
997
|
+
children: r
|
|
998
|
+
}) : null
|
|
999
|
+
]
|
|
1000
|
+
}), i ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1001
|
+
className: "space-y-2 px-[var(--tool-card-px)] py-[var(--tool-card-py)]",
|
|
1002
|
+
children: i
|
|
1003
|
+
}) : null]
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
function I({ label: e, className: t }) {
|
|
1007
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1008
|
+
className: o("rounded-[var(--radius-md)] border border-dashed border-border bg-muted px-3 py-2.5 text-xs text-muted-foreground", t),
|
|
1009
|
+
children: e
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
function L({ error: e }) {
|
|
1013
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1014
|
+
className: "rounded-[var(--radius-md)] border border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-3 text-sm text-[var(--surface-danger-text)]",
|
|
1015
|
+
children: e
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
function R({ label: e = "Running…" }) {
|
|
1019
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1020
|
+
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted px-3 py-2 text-xs text-muted-foreground",
|
|
1021
|
+
children: [/* @__PURE__ */ (0, k.jsx)(ee, { className: "h-4 w-4 animate-spin text-primary" }), /* @__PURE__ */ (0, k.jsx)("span", { children: e })]
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
//#endregion
|
|
1025
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/write-file-preview.js
|
|
1026
|
+
function Qt(e) {
|
|
1027
|
+
if (!e || typeof e != "object") return null;
|
|
1028
|
+
let t = e;
|
|
1029
|
+
return {
|
|
1030
|
+
path: String(t.file_path ?? t.path ?? t.filePath ?? "unknown"),
|
|
1031
|
+
content: String(t.content ?? t.contents ?? t.data ?? "")
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
var $t = (0, O.memo)(({ part: e }) => {
|
|
1035
|
+
let t = Qt(e.state.input);
|
|
1036
|
+
if (!t) return null;
|
|
1037
|
+
let n = t.content.split("\n").length, r = E(t.path);
|
|
1038
|
+
return /* @__PURE__ */ (0, k.jsxs)(F, {
|
|
1039
|
+
icon: /* @__PURE__ */ (0, k.jsx)(Te, { className: "h-4 w-4" }),
|
|
1040
|
+
title: "Write file",
|
|
1041
|
+
description: t.path,
|
|
1042
|
+
meta: /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
1043
|
+
className: "text-xs text-muted-foreground",
|
|
1044
|
+
children: [
|
|
1045
|
+
"+",
|
|
1046
|
+
n,
|
|
1047
|
+
" line",
|
|
1048
|
+
n === 1 ? "" : "s"
|
|
1049
|
+
]
|
|
1050
|
+
}),
|
|
1051
|
+
children: [
|
|
1052
|
+
e.state.status === "running" ? /* @__PURE__ */ (0, k.jsx)(R, { label: "Writing file…" }) : null,
|
|
1053
|
+
e.state.error ? /* @__PURE__ */ (0, k.jsx)(L, { error: e.state.error }) : null,
|
|
1054
|
+
/* @__PURE__ */ (0, k.jsx)(T, {
|
|
1055
|
+
code: t.content,
|
|
1056
|
+
language: r,
|
|
1057
|
+
className: "rounded-[var(--radius-md)]",
|
|
1058
|
+
children: /* @__PURE__ */ (0, k.jsx)(ce, { text: t.content })
|
|
1059
|
+
})
|
|
1060
|
+
]
|
|
1061
|
+
});
|
|
1062
|
+
});
|
|
1063
|
+
$t.displayName = "WriteFilePreview";
|
|
1064
|
+
//#endregion
|
|
1065
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/grep-results-preview.js
|
|
1066
|
+
function z(e) {
|
|
1067
|
+
return typeof e == "string" && e.trim() ? e : void 0;
|
|
1068
|
+
}
|
|
1069
|
+
function en(e) {
|
|
1070
|
+
if (typeof e == "string") {
|
|
1071
|
+
let [t, n, ...r] = e.split(":"), i = Number(n);
|
|
1072
|
+
return r.length > 0 && Number.isFinite(i) ? {
|
|
1073
|
+
path: t,
|
|
1074
|
+
line: i,
|
|
1075
|
+
text: r.join(":").trim()
|
|
1076
|
+
} : {
|
|
1077
|
+
path: "match",
|
|
1078
|
+
text: e
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
if (!e || typeof e != "object") return null;
|
|
1082
|
+
let t = e, n = z(t.path) ?? z(t.file) ?? z(t.filePath) ?? "match", r = t.line ?? t.lineNumber ?? t.line_number, i = typeof r == "number" ? r : Number(r), a = z(t.text) ?? z(t.content) ?? z(t.lineText) ?? z(t.preview);
|
|
1083
|
+
return a ? {
|
|
1084
|
+
path: n,
|
|
1085
|
+
line: Number.isFinite(i) ? i : void 0,
|
|
1086
|
+
text: a
|
|
1087
|
+
} : null;
|
|
1088
|
+
}
|
|
1089
|
+
function tn(e) {
|
|
1090
|
+
if (!e || typeof e != "object") return;
|
|
1091
|
+
let t = e;
|
|
1092
|
+
return z(t.pattern) ?? z(t.query);
|
|
1093
|
+
}
|
|
1094
|
+
function nn(e) {
|
|
1095
|
+
if (Array.isArray(e)) return e.map(en).filter((e) => e !== null);
|
|
1096
|
+
if (e && typeof e == "object") {
|
|
1097
|
+
let t = e, n = [
|
|
1098
|
+
t.matches,
|
|
1099
|
+
t.results,
|
|
1100
|
+
t.output
|
|
1101
|
+
];
|
|
1102
|
+
for (let e of n) if (Array.isArray(e)) return e.map(en).filter((e) => e !== null);
|
|
1103
|
+
}
|
|
1104
|
+
return typeof e == "string" ? e.split("\n").map((e) => e.trim()).filter(Boolean).map(en).filter((e) => e !== null) : [];
|
|
1105
|
+
}
|
|
1106
|
+
var rn = (0, O.memo)(({ part: e }) => {
|
|
1107
|
+
let t = tn(e.state.input), n = (0, O.useMemo)(() => nn(e.state.output), [e.state.output]), r = (0, O.useMemo)(() => {
|
|
1108
|
+
let e = /* @__PURE__ */ new Map();
|
|
1109
|
+
for (let t of n) {
|
|
1110
|
+
let n = e.get(t.path) ?? [];
|
|
1111
|
+
n.push(t), e.set(t.path, n);
|
|
1112
|
+
}
|
|
1113
|
+
return [...e.entries()];
|
|
1114
|
+
}, [n]);
|
|
1115
|
+
return /* @__PURE__ */ (0, k.jsxs)(F, {
|
|
1116
|
+
icon: /* @__PURE__ */ (0, k.jsx)(Le, { className: "h-4 w-4" }),
|
|
1117
|
+
title: t ? `Search results for "${t}"` : "Search results",
|
|
1118
|
+
description: n.length > 0 ? `${n.length} match${n.length === 1 ? "" : "es"}` : void 0,
|
|
1119
|
+
children: [
|
|
1120
|
+
e.state.status === "running" ? /* @__PURE__ */ (0, k.jsx)(R, { label: "Searching files…" }) : null,
|
|
1121
|
+
e.state.error ? /* @__PURE__ */ (0, k.jsx)(L, { error: e.state.error }) : null,
|
|
1122
|
+
e.state.status === "completed" && n.length === 0 ? /* @__PURE__ */ (0, k.jsx)(I, { label: "No matching files or lines were returned." }) : null,
|
|
1123
|
+
r.map(([e, t]) => /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1124
|
+
className: "rounded-[var(--radius-md)] border border-border bg-muted/55",
|
|
1125
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1126
|
+
className: "border-b border-border px-3 py-2 text-xs font-medium text-foreground",
|
|
1127
|
+
children: e
|
|
1128
|
+
}), /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1129
|
+
className: "divide-y divide-border",
|
|
1130
|
+
children: t.map((t, n) => /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1131
|
+
className: "grid grid-cols-[auto_minmax(0,1fr)] gap-3 px-3 py-2",
|
|
1132
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1133
|
+
className: "pt-0.5 text-xs font-mono text-muted-foreground",
|
|
1134
|
+
children: t.line ?? "·"
|
|
1135
|
+
}), /* @__PURE__ */ (0, k.jsx)("pre", {
|
|
1136
|
+
className: "overflow-x-auto whitespace-pre-wrap break-words text-xs font-mono text-foreground",
|
|
1137
|
+
children: t.text
|
|
1138
|
+
})]
|
|
1139
|
+
}, `${e}-${t.line ?? n}-${n}`))
|
|
1140
|
+
})]
|
|
1141
|
+
}, e))
|
|
1142
|
+
]
|
|
1143
|
+
});
|
|
1144
|
+
});
|
|
1145
|
+
rn.displayName = "GrepResultsPreview";
|
|
1146
|
+
//#endregion
|
|
1147
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/glob-results-preview.js
|
|
1148
|
+
function an(e) {
|
|
1149
|
+
return typeof e == "string" && e.trim() ? e : void 0;
|
|
1150
|
+
}
|
|
1151
|
+
function on(e) {
|
|
1152
|
+
if (!e || typeof e != "object") return;
|
|
1153
|
+
let t = e;
|
|
1154
|
+
return an(t.pattern) ?? an(t.path);
|
|
1155
|
+
}
|
|
1156
|
+
function sn(e) {
|
|
1157
|
+
if (Array.isArray(e)) return e.map((e) => String(e)).filter(Boolean);
|
|
1158
|
+
if (e && typeof e == "object") {
|
|
1159
|
+
let t = e, n = t.files ?? t.matches ?? t.paths ?? t.results;
|
|
1160
|
+
if (Array.isArray(n)) return n.map((e) => typeof e == "string" ? e : e && typeof e == "object" ? String(e.path ?? e.file ?? "") : "").filter(Boolean);
|
|
1161
|
+
}
|
|
1162
|
+
return typeof e == "string" ? e.split("\n").map((e) => e.trim()).filter(Boolean) : [];
|
|
1163
|
+
}
|
|
1164
|
+
var cn = (0, O.memo)(({ part: e }) => {
|
|
1165
|
+
let t = on(e.state.input), n = (0, O.useMemo)(() => sn(e.state.output), [e.state.output]);
|
|
1166
|
+
return /* @__PURE__ */ (0, k.jsxs)(F, {
|
|
1167
|
+
icon: /* @__PURE__ */ (0, k.jsx)(C, { className: "h-4 w-4" }),
|
|
1168
|
+
title: t ? `Files for ${t}` : "File results",
|
|
1169
|
+
description: n.length > 0 ? `${n.length} path${n.length === 1 ? "" : "s"}` : void 0,
|
|
1170
|
+
children: [
|
|
1171
|
+
e.state.status === "running" ? /* @__PURE__ */ (0, k.jsx)(R, { label: "Collecting files…" }) : null,
|
|
1172
|
+
e.state.error ? /* @__PURE__ */ (0, k.jsx)(L, { error: e.state.error }) : null,
|
|
1173
|
+
e.state.status === "completed" && n.length === 0 ? /* @__PURE__ */ (0, k.jsx)(I, { label: "No matching files were returned." }) : null,
|
|
1174
|
+
n.length > 0 ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1175
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
1176
|
+
children: n.map((e) => {
|
|
1177
|
+
let t = e.endsWith("/") ? C : S;
|
|
1178
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1179
|
+
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted/55 px-3 py-2",
|
|
1180
|
+
children: [/* @__PURE__ */ (0, k.jsx)(t, { className: "h-4 w-4 shrink-0 text-primary" }), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1181
|
+
className: "min-w-0 truncate text-xs font-mono text-foreground",
|
|
1182
|
+
children: e
|
|
1183
|
+
})]
|
|
1184
|
+
}, e);
|
|
1185
|
+
})
|
|
1186
|
+
}) : null
|
|
1187
|
+
]
|
|
1188
|
+
});
|
|
1189
|
+
});
|
|
1190
|
+
cn.displayName = "GlobResultsPreview";
|
|
1191
|
+
//#endregion
|
|
1192
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/web-search-preview.js
|
|
1193
|
+
function B(e) {
|
|
1194
|
+
return typeof e == "string" && e.trim() ? e : void 0;
|
|
1195
|
+
}
|
|
1196
|
+
function ln(e, t) {
|
|
1197
|
+
if (e && typeof e == "object") {
|
|
1198
|
+
let t = e, n = B(t.query) ?? B(t.url);
|
|
1199
|
+
if (n) return n;
|
|
1200
|
+
}
|
|
1201
|
+
if (t && typeof t == "object") return B(t.query);
|
|
1202
|
+
}
|
|
1203
|
+
function un(e) {
|
|
1204
|
+
if (!e || typeof e != "object") return null;
|
|
1205
|
+
let t = e, n = B(t.title) ?? B(t.name) ?? "Untitled result", r = B(t.url) ?? B(t.link);
|
|
1206
|
+
return r ? {
|
|
1207
|
+
title: n,
|
|
1208
|
+
url: r,
|
|
1209
|
+
snippet: B(t.snippet) ?? B(t.description) ?? B(t.text)
|
|
1210
|
+
} : null;
|
|
1211
|
+
}
|
|
1212
|
+
function dn(e) {
|
|
1213
|
+
if (e && typeof e == "object") {
|
|
1214
|
+
let t = e, n = t.results ?? t.items ?? t.output;
|
|
1215
|
+
if (Array.isArray(n)) return n.map(un).filter((e) => e !== null);
|
|
1216
|
+
}
|
|
1217
|
+
return Array.isArray(e) ? e.map(un).filter((e) => e !== null) : [];
|
|
1218
|
+
}
|
|
1219
|
+
var fn = (0, O.memo)(({ part: e }) => {
|
|
1220
|
+
let t = ln(e.state.input, e.state.output), n = (0, O.useMemo)(() => dn(e.state.output), [e.state.output]);
|
|
1221
|
+
return /* @__PURE__ */ (0, k.jsxs)(F, {
|
|
1222
|
+
icon: /* @__PURE__ */ (0, k.jsx)(le, { className: "h-4 w-4" }),
|
|
1223
|
+
title: t ? `Web results for ${t}` : "Web results",
|
|
1224
|
+
description: n.length > 0 ? `${n.length} result${n.length === 1 ? "" : "s"}` : void 0,
|
|
1225
|
+
children: [
|
|
1226
|
+
e.state.status === "running" ? /* @__PURE__ */ (0, k.jsx)(R, { label: "Searching the web…" }) : null,
|
|
1227
|
+
e.state.error ? /* @__PURE__ */ (0, k.jsx)(L, { error: e.state.error }) : null,
|
|
1228
|
+
e.state.status === "completed" && n.length === 0 ? /* @__PURE__ */ (0, k.jsx)(I, { label: "No web results were returned." }) : null,
|
|
1229
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1230
|
+
className: "space-y-2",
|
|
1231
|
+
children: n.map((e) => /* @__PURE__ */ (0, k.jsxs)("a", {
|
|
1232
|
+
href: e.url,
|
|
1233
|
+
target: "_blank",
|
|
1234
|
+
rel: "noreferrer",
|
|
1235
|
+
className: `block rounded-[var(--radius-md)] border border-border bg-muted/55 px-3 py-3 transition-colors hover:border-[var(--border-strong)] hover:bg-accent/50 ${a}`,
|
|
1236
|
+
children: [
|
|
1237
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1238
|
+
className: "text-sm font-medium text-foreground",
|
|
1239
|
+
children: e.title
|
|
1240
|
+
}),
|
|
1241
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1242
|
+
className: "mt-1 truncate text-xs text-primary",
|
|
1243
|
+
children: e.url
|
|
1244
|
+
}),
|
|
1245
|
+
e.snippet ? /* @__PURE__ */ (0, k.jsx)("p", {
|
|
1246
|
+
className: "mt-2 text-sm leading-relaxed text-muted-foreground",
|
|
1247
|
+
children: e.snippet
|
|
1248
|
+
}) : null
|
|
1249
|
+
]
|
|
1250
|
+
}, e.url))
|
|
1251
|
+
})
|
|
1252
|
+
]
|
|
1253
|
+
});
|
|
1254
|
+
});
|
|
1255
|
+
fn.displayName = "WebSearchPreview";
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/question-preview.js
|
|
1258
|
+
function pn(e) {
|
|
1259
|
+
if (!e) return [];
|
|
1260
|
+
if (typeof e == "string") return [e];
|
|
1261
|
+
if (Array.isArray(e)) return e.map((e) => String(e)).filter(Boolean);
|
|
1262
|
+
if (typeof e == "object") {
|
|
1263
|
+
let t = e, n = t.questions ?? t.question ?? t.prompt;
|
|
1264
|
+
if (Array.isArray(n)) return n.map((e) => String(e)).filter(Boolean);
|
|
1265
|
+
if (typeof n == "string") return [n];
|
|
1266
|
+
}
|
|
1267
|
+
return [];
|
|
1268
|
+
}
|
|
1269
|
+
function mn(e) {
|
|
1270
|
+
if (!e) return [];
|
|
1271
|
+
if (typeof e == "string") return [e];
|
|
1272
|
+
if (Array.isArray(e)) return e.map((e) => String(e)).filter(Boolean);
|
|
1273
|
+
if (typeof e == "object") {
|
|
1274
|
+
let t = e, n = t.answers ?? t.answer ?? t.response;
|
|
1275
|
+
if (Array.isArray(n)) return n.map((e) => String(e)).filter(Boolean);
|
|
1276
|
+
if (typeof n == "string") return [n];
|
|
1277
|
+
}
|
|
1278
|
+
return [];
|
|
1279
|
+
}
|
|
1280
|
+
var hn = (0, O.memo)(({ part: e }) => {
|
|
1281
|
+
let t = (0, O.useMemo)(() => pn(e.state.input), [e.state.input]), n = (0, O.useMemo)(() => mn(e.state.output), [e.state.output]);
|
|
1282
|
+
return /* @__PURE__ */ (0, k.jsxs)(F, {
|
|
1283
|
+
icon: /* @__PURE__ */ (0, k.jsx)(Ne, { className: "h-4 w-4" }),
|
|
1284
|
+
title: "Agent question",
|
|
1285
|
+
description: t.length > 1 ? `${t.length} questions require attention` : void 0,
|
|
1286
|
+
children: [
|
|
1287
|
+
e.state.status === "running" ? /* @__PURE__ */ (0, k.jsx)(R, { label: "Waiting for an answer…" }) : null,
|
|
1288
|
+
e.state.error ? /* @__PURE__ */ (0, k.jsx)(L, { error: e.state.error }) : null,
|
|
1289
|
+
t.length === 0 ? /* @__PURE__ */ (0, k.jsx)(I, { label: "No question text was provided." }) : null,
|
|
1290
|
+
t.map((t, r) => /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1291
|
+
className: "rounded-[var(--radius-md)] border border-border bg-muted px-3 py-3",
|
|
1292
|
+
children: [
|
|
1293
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1294
|
+
className: "text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",
|
|
1295
|
+
children: ["Question ", r + 1]
|
|
1296
|
+
}),
|
|
1297
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1298
|
+
className: "mt-2 text-sm leading-relaxed text-foreground",
|
|
1299
|
+
children: t
|
|
1300
|
+
}),
|
|
1301
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1302
|
+
className: "mt-3 rounded-[var(--radius-sm)] border border-border bg-card px-3 py-2 text-sm text-foreground",
|
|
1303
|
+
children: n[r] ?? (e.state.status === "completed" ? "No answer recorded." : "Awaiting answer")
|
|
1304
|
+
})
|
|
1305
|
+
]
|
|
1306
|
+
}, `${t}-${r}`))
|
|
1307
|
+
]
|
|
1308
|
+
});
|
|
1309
|
+
});
|
|
1310
|
+
hn.displayName = "QuestionPreview";
|
|
1311
|
+
//#endregion
|
|
1312
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/tool-previews/diff-preview.js
|
|
1313
|
+
function gn(e, ...t) {
|
|
1314
|
+
for (let n of t) {
|
|
1315
|
+
let t = e[n];
|
|
1316
|
+
if (typeof t == "string" && t.length > 0) return t;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
function _n(e) {
|
|
1320
|
+
let t = [
|
|
1321
|
+
e.state.input,
|
|
1322
|
+
e.state.output,
|
|
1323
|
+
e.state.metadata
|
|
1324
|
+
];
|
|
1325
|
+
for (let e of t) {
|
|
1326
|
+
if (!e || typeof e != "object") continue;
|
|
1327
|
+
let t = e, n = gn(t, "diff", "patch", "unifiedDiff", "unified_diff"), r = gn(t, "oldString", "old_string", "before", "previous"), i = gn(t, "newString", "new_string", "after", "updated"), a = gn(t, "file_path", "filePath", "path");
|
|
1328
|
+
if (n || r || i) return {
|
|
1329
|
+
path: a,
|
|
1330
|
+
diff: n,
|
|
1331
|
+
before: r,
|
|
1332
|
+
after: i
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
return {};
|
|
1336
|
+
}
|
|
1337
|
+
var vn = (0, O.memo)(({ part: e }) => {
|
|
1338
|
+
let t = _n(e);
|
|
1339
|
+
return /* @__PURE__ */ (0, k.jsxs)(F, {
|
|
1340
|
+
icon: /* @__PURE__ */ (0, k.jsx)(ke, { className: "h-4 w-4" }),
|
|
1341
|
+
title: t.path ? `Changes for ${t.path}` : "File changes",
|
|
1342
|
+
children: [
|
|
1343
|
+
e.state.status === "running" ? /* @__PURE__ */ (0, k.jsx)(R, { label: "Computing changes…" }) : null,
|
|
1344
|
+
e.state.error ? /* @__PURE__ */ (0, k.jsx)(L, { error: e.state.error }) : null,
|
|
1345
|
+
!t.diff && !t.before && !t.after ? /* @__PURE__ */ (0, k.jsx)(I, { label: "No structured diff payload was provided." }) : null,
|
|
1346
|
+
t.diff ? /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1347
|
+
code: t.diff,
|
|
1348
|
+
language: "diff",
|
|
1349
|
+
className: "rounded-[var(--radius-md)]"
|
|
1350
|
+
}) : null,
|
|
1351
|
+
!t.diff && t.before ? /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1352
|
+
className: "space-y-2",
|
|
1353
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1354
|
+
className: "text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",
|
|
1355
|
+
children: "Before"
|
|
1356
|
+
}), /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1357
|
+
code: t.before,
|
|
1358
|
+
language: "text",
|
|
1359
|
+
className: "rounded-[var(--radius-md)]"
|
|
1360
|
+
})]
|
|
1361
|
+
}) : null,
|
|
1362
|
+
!t.diff && t.after ? /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1363
|
+
className: "space-y-2",
|
|
1364
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1365
|
+
className: "text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",
|
|
1366
|
+
children: "After"
|
|
1367
|
+
}), /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1368
|
+
code: t.after,
|
|
1369
|
+
language: "text",
|
|
1370
|
+
className: "rounded-[var(--radius-md)]"
|
|
1371
|
+
})]
|
|
1372
|
+
}) : null
|
|
1373
|
+
]
|
|
1374
|
+
});
|
|
1375
|
+
});
|
|
1376
|
+
vn.displayName = "DiffPreview";
|
|
1377
|
+
//#endregion
|
|
1378
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/run/expandable-content.js
|
|
1379
|
+
function yn({ children: e, collapsedMaxPx: t = 180, fadeClassName: n = "from-muted", className: r, toggleClassName: i }) {
|
|
1380
|
+
let [a, s] = (0, O.useState)(!1), [c, l] = (0, O.useState)(!1), u = (0, O.useRef)(null);
|
|
1381
|
+
(0, O.useEffect)(() => {
|
|
1382
|
+
let e = u.current;
|
|
1383
|
+
if (!e) return;
|
|
1384
|
+
let n = () => l(e.scrollHeight > t + 4);
|
|
1385
|
+
if (n(), typeof ResizeObserver > "u") return;
|
|
1386
|
+
let r = new ResizeObserver(n);
|
|
1387
|
+
return r.observe(e), () => r.disconnect();
|
|
1388
|
+
}, [t]);
|
|
1389
|
+
let d = c && !a;
|
|
1390
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1391
|
+
className: r,
|
|
1392
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1393
|
+
ref: u,
|
|
1394
|
+
className: "relative overflow-hidden",
|
|
1395
|
+
style: d ? { maxHeight: t } : void 0,
|
|
1396
|
+
children: [e, d ? /* @__PURE__ */ (0, k.jsx)("div", { className: o("pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t to-transparent", n) }) : null]
|
|
1397
|
+
}), c ? /* @__PURE__ */ (0, k.jsx)("button", {
|
|
1398
|
+
type: "button",
|
|
1399
|
+
onClick: () => s((e) => !e),
|
|
1400
|
+
className: o("mt-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground", i),
|
|
1401
|
+
children: a ? "Show less" : "Show more"
|
|
1402
|
+
}) : null]
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
//#endregion
|
|
1406
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/run/expanded-tool-detail.js
|
|
1407
|
+
var bn = "mx-3 mb-2", xn = {
|
|
1408
|
+
ts: "typescript",
|
|
1409
|
+
tsx: "tsx",
|
|
1410
|
+
js: "javascript",
|
|
1411
|
+
jsx: "jsx",
|
|
1412
|
+
rs: "rust",
|
|
1413
|
+
py: "python",
|
|
1414
|
+
go: "go",
|
|
1415
|
+
rb: "ruby",
|
|
1416
|
+
json: "json",
|
|
1417
|
+
yaml: "yaml",
|
|
1418
|
+
yml: "yaml",
|
|
1419
|
+
toml: "toml",
|
|
1420
|
+
md: "markdown",
|
|
1421
|
+
css: "css",
|
|
1422
|
+
scss: "scss",
|
|
1423
|
+
html: "html",
|
|
1424
|
+
sh: "bash",
|
|
1425
|
+
bash: "bash",
|
|
1426
|
+
zsh: "bash",
|
|
1427
|
+
sql: "sql",
|
|
1428
|
+
sol: "solidity",
|
|
1429
|
+
proto: "protobuf"
|
|
1430
|
+
};
|
|
1431
|
+
function Sn(e) {
|
|
1432
|
+
if (!e) return;
|
|
1433
|
+
let t = e.split(".").pop()?.toLowerCase();
|
|
1434
|
+
return t ? xn[t] : void 0;
|
|
1435
|
+
}
|
|
1436
|
+
function Cn(e) {
|
|
1437
|
+
if (e == null) return "";
|
|
1438
|
+
if (typeof e == "string") return e;
|
|
1439
|
+
try {
|
|
1440
|
+
return JSON.stringify(e, null, 2);
|
|
1441
|
+
} catch {
|
|
1442
|
+
return String(e);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
var wn = (0, O.memo)(({ part: e }) => {
|
|
1446
|
+
let t = Rt(e), { status: n, input: r, output: i, error: a } = e.state;
|
|
1447
|
+
if (t.displayVariant === "command") return /* @__PURE__ */ (0, k.jsx)(Zt, {
|
|
1448
|
+
part: e,
|
|
1449
|
+
defaultExpanded: !0
|
|
1450
|
+
});
|
|
1451
|
+
if (t.displayVariant === "write-file") return /* @__PURE__ */ (0, k.jsx)($t, { part: e });
|
|
1452
|
+
if (t.displayVariant === "grep") return /* @__PURE__ */ (0, k.jsx)(rn, { part: e });
|
|
1453
|
+
if (t.displayVariant === "glob") return /* @__PURE__ */ (0, k.jsx)(cn, { part: e });
|
|
1454
|
+
if (t.displayVariant === "web-search") return /* @__PURE__ */ (0, k.jsx)(fn, { part: e });
|
|
1455
|
+
if (t.displayVariant === "question") return /* @__PURE__ */ (0, k.jsx)(hn, { part: e });
|
|
1456
|
+
if (t.displayVariant === "diff") return /* @__PURE__ */ (0, k.jsx)(vn, { part: e });
|
|
1457
|
+
if (t.displayVariant === "read-file") return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1458
|
+
className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card shadow-[var(--shadow-card)]",
|
|
1459
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1460
|
+
className: "flex items-center gap-2.5 border-b border-border bg-card px-3 py-2",
|
|
1461
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1462
|
+
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--border-accent)] bg-muted text-primary",
|
|
1463
|
+
children: /* @__PURE__ */ (0, k.jsx)(S, { className: "h-3.5 w-3.5" })
|
|
1464
|
+
}), /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1465
|
+
className: "min-w-0 flex items-center gap-2",
|
|
1466
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
1467
|
+
className: "text-xs font-semibold text-foreground",
|
|
1468
|
+
children: "Read file"
|
|
1469
|
+
}), t.targetPath ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1470
|
+
className: "truncate text-xs font-mono text-muted-foreground",
|
|
1471
|
+
children: t.targetPath
|
|
1472
|
+
}) : null]
|
|
1473
|
+
})]
|
|
1474
|
+
}), /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1475
|
+
className: "space-y-2 px-3 py-2.5",
|
|
1476
|
+
children: [typeof i == "string" ? /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1477
|
+
code: i,
|
|
1478
|
+
language: Sn(t.targetPath) ?? "text",
|
|
1479
|
+
className: "rounded-[var(--radius-md)]"
|
|
1480
|
+
}) : /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1481
|
+
className: "rounded-[var(--radius-md)] border border-dashed border-border bg-muted px-3 py-4 text-sm text-muted-foreground",
|
|
1482
|
+
children: "No readable file content was returned."
|
|
1483
|
+
}), a ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1484
|
+
className: "rounded-[var(--radius-md)] border border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-3 text-sm text-[var(--surface-danger-text)]",
|
|
1485
|
+
children: a
|
|
1486
|
+
}) : null]
|
|
1487
|
+
})]
|
|
1488
|
+
});
|
|
1489
|
+
let o = Cn(r), s = Cn(i);
|
|
1490
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1491
|
+
className: "space-y-3",
|
|
1492
|
+
children: [
|
|
1493
|
+
o && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1494
|
+
className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card",
|
|
1495
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1496
|
+
className: "flex items-center gap-2 border-b border-border bg-background px-3 py-2",
|
|
1497
|
+
children: [/* @__PURE__ */ (0, k.jsx)(_e, { className: "h-3 w-3 text-primary" }), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1498
|
+
className: "text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",
|
|
1499
|
+
children: "Input"
|
|
1500
|
+
})]
|
|
1501
|
+
}), /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1502
|
+
code: o,
|
|
1503
|
+
language: "json",
|
|
1504
|
+
className: "rounded-none border-0"
|
|
1505
|
+
})]
|
|
1506
|
+
}),
|
|
1507
|
+
n === "completed" && s && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1508
|
+
className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card",
|
|
1509
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1510
|
+
className: "flex items-center gap-2 border-b border-border bg-background px-3 py-2",
|
|
1511
|
+
children: [/* @__PURE__ */ (0, k.jsx)(w, { className: "h-3 w-3 text-primary" }), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1512
|
+
className: "text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",
|
|
1513
|
+
children: "Output"
|
|
1514
|
+
})]
|
|
1515
|
+
}), /* @__PURE__ */ (0, k.jsx)(yn, {
|
|
1516
|
+
fadeClassName: "from-card",
|
|
1517
|
+
toggleClassName: bn,
|
|
1518
|
+
children: /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1519
|
+
code: s.length > 2e3 ? s.slice(0, 2e3) + "\n...(truncated)" : s,
|
|
1520
|
+
language: "json",
|
|
1521
|
+
className: "rounded-none border-0"
|
|
1522
|
+
})
|
|
1523
|
+
})]
|
|
1524
|
+
}),
|
|
1525
|
+
a && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1526
|
+
className: "overflow-hidden rounded-[var(--radius-lg)] border border-[var(--surface-danger-border)]",
|
|
1527
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1528
|
+
className: "flex items-center gap-2 border-b border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-2",
|
|
1529
|
+
children: [/* @__PURE__ */ (0, k.jsx)(he, {
|
|
1530
|
+
status: "failed",
|
|
1531
|
+
"aria-hidden": !0,
|
|
1532
|
+
className: "size-3"
|
|
1533
|
+
}), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1534
|
+
className: "text-xs font-medium uppercase tracking-[0.08em] text-[var(--surface-danger-text)]",
|
|
1535
|
+
children: "Error"
|
|
1536
|
+
})]
|
|
1537
|
+
}), /* @__PURE__ */ (0, k.jsx)(yn, {
|
|
1538
|
+
fadeClassName: "from-[var(--surface-danger-bg)]",
|
|
1539
|
+
toggleClassName: bn,
|
|
1540
|
+
children: /* @__PURE__ */ (0, k.jsx)("pre", {
|
|
1541
|
+
className: "bg-[var(--surface-danger-bg)] p-3 text-xs font-mono whitespace-pre-wrap break-all text-[var(--surface-danger-text)]",
|
|
1542
|
+
children: a
|
|
1543
|
+
})
|
|
1544
|
+
})]
|
|
1545
|
+
}),
|
|
1546
|
+
(n === "pending" || n === "running") && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1547
|
+
className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted px-3 py-3 text-xs text-muted-foreground",
|
|
1548
|
+
children: [/* @__PURE__ */ (0, k.jsx)(he, {
|
|
1549
|
+
status: "running",
|
|
1550
|
+
"aria-hidden": !0,
|
|
1551
|
+
className: "size-3"
|
|
1552
|
+
}), "Running…"]
|
|
1553
|
+
})
|
|
1554
|
+
]
|
|
1555
|
+
});
|
|
1556
|
+
});
|
|
1557
|
+
wn.displayName = "ExpandedToolDetail";
|
|
1558
|
+
//#endregion
|
|
1559
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/run/run-row-shell.js
|
|
1560
|
+
var Tn = {
|
|
1561
|
+
single: "rounded-[var(--radius-lg)]",
|
|
1562
|
+
first: "rounded-t-[var(--radius-lg)] rounded-b-[var(--radius-sm)]",
|
|
1563
|
+
middle: "rounded-[var(--radius-sm)]",
|
|
1564
|
+
last: "rounded-t-[var(--radius-sm)] rounded-b-[var(--radius-lg)]"
|
|
1565
|
+
}, En = "px-2 py-1", Dn = "pl-[2.375rem]";
|
|
1566
|
+
function V({ icon: e, title: t, description: n, descriptionMono: r = !1, status: i = "idle", durationMs: a, groupPosition: s = "single", collapsedError: c, actions: l, open: u, onOpenChange: d, defaultOpen: f = !1, className: p, contentClassName: m, children: h }) {
|
|
1567
|
+
let [g, _] = (0, O.useState)(f), v = u !== void 0, y = v ? u : g, b = (e) => {
|
|
1568
|
+
v || _(e), d?.(e);
|
|
1569
|
+
}, x = i === "running", S = h != null;
|
|
1570
|
+
return /* @__PURE__ */ (0, k.jsx)(Xe, {
|
|
1571
|
+
open: y,
|
|
1572
|
+
onOpenChange: b,
|
|
1573
|
+
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1574
|
+
className: "flex items-start gap-2",
|
|
1575
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1576
|
+
"data-run-row": "",
|
|
1577
|
+
"data-state": y ? "open" : "closed",
|
|
1578
|
+
className: o("min-w-0 flex-1 overflow-hidden border transition-colors", y ? "border-border bg-[var(--md3-surface-container)]" : "border-transparent bg-transparent", S && !y && "hover:bg-[var(--md3-surface-container)]", Tn[s], p),
|
|
1579
|
+
children: [
|
|
1580
|
+
/* @__PURE__ */ (0, k.jsx)(Qe, {
|
|
1581
|
+
asChild: !0,
|
|
1582
|
+
disabled: !S,
|
|
1583
|
+
children: /* @__PURE__ */ (0, k.jsxs)("button", {
|
|
1584
|
+
type: "button",
|
|
1585
|
+
className: o("group flex w-full items-center gap-2 text-left", En, S ? "cursor-pointer" : "cursor-default"),
|
|
1586
|
+
children: [
|
|
1587
|
+
/* @__PURE__ */ (0, k.jsxs)("span", {
|
|
1588
|
+
"aria-hidden": !0,
|
|
1589
|
+
"data-run-row-status": i === "error" ? "error" : void 0,
|
|
1590
|
+
className: o("flex h-[1.375rem] w-[1.375rem] shrink-0 items-center justify-center", i === "error" ? "text-[var(--surface-danger-text)]" : "text-muted-foreground"),
|
|
1591
|
+
children: [/* @__PURE__ */ (0, k.jsx)("span", {
|
|
1592
|
+
"data-run-row-glyph": "",
|
|
1593
|
+
className: o("flex items-center justify-center", S && "group-hover:hidden", y && "hidden"),
|
|
1594
|
+
children: e
|
|
1595
|
+
}), S ? /* @__PURE__ */ (0, k.jsx)(fe, {
|
|
1596
|
+
"data-run-row-chevron": "",
|
|
1597
|
+
className: o("hidden h-3.5 w-3.5 transition-transform group-hover:block", y && "block rotate-90")
|
|
1598
|
+
}) : null]
|
|
1599
|
+
}),
|
|
1600
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
1601
|
+
className: o("shrink-0 whitespace-nowrap text-sm font-normal text-muted-foreground transition-colors group-hover:text-foreground", y && "text-foreground"),
|
|
1602
|
+
children: t
|
|
1603
|
+
}),
|
|
1604
|
+
n ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1605
|
+
className: o("min-w-0 flex-1 truncate text-sm text-muted-foreground transition-colors group-hover:text-foreground", r && "font-mono"),
|
|
1606
|
+
children: n
|
|
1607
|
+
}) : null,
|
|
1608
|
+
!x && a != null ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1609
|
+
"data-run-row-duration": "",
|
|
1610
|
+
className: "ml-auto shrink-0 font-mono text-sm tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
1611
|
+
children: te(a)
|
|
1612
|
+
}) : null
|
|
1613
|
+
]
|
|
1614
|
+
})
|
|
1615
|
+
}),
|
|
1616
|
+
c && !y ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1617
|
+
className: o("pb-1.5 pr-2 text-sm leading-snug text-[var(--surface-danger-text)]", Dn),
|
|
1618
|
+
children: c
|
|
1619
|
+
}) : null,
|
|
1620
|
+
S ? /* @__PURE__ */ (0, k.jsx)(et, {
|
|
1621
|
+
className: "overflow-hidden data-[state=open]:animate-slideDown data-[state=closed]:animate-slideUp",
|
|
1622
|
+
children: /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1623
|
+
className: o("border-t border-border", m),
|
|
1624
|
+
children: h
|
|
1625
|
+
})
|
|
1626
|
+
}) : null
|
|
1627
|
+
]
|
|
1628
|
+
}), l ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1629
|
+
className: "flex shrink-0 flex-wrap items-center justify-end gap-1.5 pt-1",
|
|
1630
|
+
onClick: (e) => e.stopPropagation(),
|
|
1631
|
+
children: l
|
|
1632
|
+
}) : null]
|
|
1633
|
+
})
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
//#endregion
|
|
1637
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/run/inline-tool-item.js
|
|
1638
|
+
var On = {
|
|
1639
|
+
command: ne,
|
|
1640
|
+
write: Te,
|
|
1641
|
+
read: De,
|
|
1642
|
+
search: Le,
|
|
1643
|
+
edit: Fe,
|
|
1644
|
+
task: de,
|
|
1645
|
+
web: le,
|
|
1646
|
+
todo: Ce,
|
|
1647
|
+
other: ze
|
|
1648
|
+
};
|
|
1649
|
+
function kn(e) {
|
|
1650
|
+
return e === "pending" || e === "running" ? "running" : e === "error" ? "error" : "success";
|
|
1651
|
+
}
|
|
1652
|
+
var An = (0, O.memo)(({ part: e, renderToolDetail: t, groupPosition: n = "single", className: r, contentClassName: i, actions: a, title: s, description: c }) => {
|
|
1653
|
+
let l = Rt(e), u = s ?? l.title, d = c ?? l.description, f = Bt(e), p = e.state.time?.start, m = e.state.time?.end, h = p != null && m != null ? m - p : void 0, g = On[Lt(e.tool)] ?? ze, _ = kn(e.state.status);
|
|
1654
|
+
return /* @__PURE__ */ (0, k.jsx)(V, {
|
|
1655
|
+
icon: /* @__PURE__ */ (0, k.jsx)(g, { className: "h-3.5 w-3.5" }),
|
|
1656
|
+
title: _ === "running" ? /* @__PURE__ */ (0, k.jsx)(st, { children: u }) : u,
|
|
1657
|
+
description: d,
|
|
1658
|
+
descriptionMono: !0,
|
|
1659
|
+
status: _,
|
|
1660
|
+
durationMs: h,
|
|
1661
|
+
groupPosition: n,
|
|
1662
|
+
collapsedError: f ?? void 0,
|
|
1663
|
+
actions: a,
|
|
1664
|
+
className: r,
|
|
1665
|
+
contentClassName: o("p-2", i),
|
|
1666
|
+
children: t?.(e) ?? /* @__PURE__ */ (0, k.jsx)(wn, { part: e })
|
|
1667
|
+
});
|
|
1668
|
+
});
|
|
1669
|
+
An.displayName = "InlineToolItem";
|
|
1670
|
+
//#endregion
|
|
1671
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/run/inline-thinking-item.js
|
|
1672
|
+
var jn = (0, O.memo)(({ part: e, defaultOpen: t = !1, autoCollapse: n = !0, openWhileActive: r = !0, className: i, contentClassName: a }) => {
|
|
1673
|
+
let [o, s] = (0, O.useState)(t), c = (0, O.useRef)(!1), l = e.time?.start, u = e.time?.end, d = l != null && u != null ? u - l : void 0, f = l != null && u == null, p = e.text ? oe(ae(e.text), 120) : void 0;
|
|
1674
|
+
return (0, O.useEffect)(() => {
|
|
1675
|
+
if (f) {
|
|
1676
|
+
c.current = !1, r && s(!0);
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
if (n && !c.current && d != null) {
|
|
1680
|
+
let e = window.setTimeout(() => {
|
|
1681
|
+
s(!1), c.current = !0;
|
|
1682
|
+
}, 900);
|
|
1683
|
+
return () => window.clearTimeout(e);
|
|
1684
|
+
}
|
|
1685
|
+
}, [
|
|
1686
|
+
n,
|
|
1687
|
+
d,
|
|
1688
|
+
f,
|
|
1689
|
+
r
|
|
1690
|
+
]), /* @__PURE__ */ (0, k.jsx)(V, {
|
|
1691
|
+
icon: /* @__PURE__ */ (0, k.jsx)(ye, { className: "h-3.5 w-3.5" }),
|
|
1692
|
+
title: f ? /* @__PURE__ */ (0, k.jsx)(st, { children: "Thinking…" }) : "Reasoning",
|
|
1693
|
+
description: p,
|
|
1694
|
+
status: f ? "running" : "idle",
|
|
1695
|
+
durationMs: d,
|
|
1696
|
+
open: o,
|
|
1697
|
+
onOpenChange: s,
|
|
1698
|
+
className: i,
|
|
1699
|
+
children: e.text ? /* @__PURE__ */ (0, k.jsx)(yn, {
|
|
1700
|
+
fadeClassName: "from-[var(--md3-surface-container)]",
|
|
1701
|
+
className: a ? `px-3 py-3 ${a}` : "px-3 py-3",
|
|
1702
|
+
children: /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1703
|
+
className: "text-sm leading-relaxed text-foreground",
|
|
1704
|
+
children: /* @__PURE__ */ (0, k.jsx)(se, { children: e.text })
|
|
1705
|
+
})
|
|
1706
|
+
}) : /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1707
|
+
className: "px-3 py-2.5 text-sm text-muted-foreground",
|
|
1708
|
+
children: "No reasoning text provided."
|
|
1709
|
+
})
|
|
1710
|
+
});
|
|
1711
|
+
});
|
|
1712
|
+
jn.displayName = "InlineThinkingItem";
|
|
1713
|
+
//#endregion
|
|
1714
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/synthetic-text.js
|
|
1715
|
+
function Mn({ text: e }) {
|
|
1716
|
+
return e.trim() ? /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1717
|
+
role: "note",
|
|
1718
|
+
"aria-label": "Application note",
|
|
1719
|
+
"data-synthetic-text": "",
|
|
1720
|
+
className: "min-w-0 rounded-md border border-dashed border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",
|
|
1721
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1722
|
+
className: "mb-1 font-medium",
|
|
1723
|
+
children: "Application note"
|
|
1724
|
+
}), /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1725
|
+
className: "break-words whitespace-pre-wrap",
|
|
1726
|
+
children: e
|
|
1727
|
+
})]
|
|
1728
|
+
}) : null;
|
|
1729
|
+
}
|
|
1730
|
+
function Nn(e) {
|
|
1731
|
+
let t = [], n = [], r = 0, i = () => {
|
|
1732
|
+
let e = n.join("\n");
|
|
1733
|
+
e.trim() && t.push({
|
|
1734
|
+
index: r,
|
|
1735
|
+
synthetic: !1,
|
|
1736
|
+
text: e
|
|
1737
|
+
}), n = [];
|
|
1738
|
+
};
|
|
1739
|
+
return e.forEach((e, a) => {
|
|
1740
|
+
e.type === "text" && (e.synthetic ? (i(), e.text.trim() && t.push({
|
|
1741
|
+
index: a,
|
|
1742
|
+
synthetic: !0,
|
|
1743
|
+
text: e.text
|
|
1744
|
+
})) : (n.length === 0 && (r = a), n.push(e.text)));
|
|
1745
|
+
}), i(), t;
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/transcript-text.js
|
|
1749
|
+
var Pn = "tangle-transcript-text text-[length:var(--transcript-font-size)] leading-[var(--transcript-line-height)]", Fn = {
|
|
1750
|
+
ts: "typescript",
|
|
1751
|
+
tsx: "typescript",
|
|
1752
|
+
js: "javascript",
|
|
1753
|
+
jsx: "javascript",
|
|
1754
|
+
mjs: "javascript",
|
|
1755
|
+
cjs: "javascript",
|
|
1756
|
+
css: "css",
|
|
1757
|
+
scss: "scss",
|
|
1758
|
+
json: "json",
|
|
1759
|
+
jsonc: "json",
|
|
1760
|
+
md: "markdown",
|
|
1761
|
+
mdx: "markdown",
|
|
1762
|
+
py: "python",
|
|
1763
|
+
sh: "bash",
|
|
1764
|
+
bash: "bash",
|
|
1765
|
+
zsh: "bash",
|
|
1766
|
+
html: "html",
|
|
1767
|
+
htm: "html",
|
|
1768
|
+
yaml: "yaml",
|
|
1769
|
+
yml: "yaml",
|
|
1770
|
+
toml: "toml",
|
|
1771
|
+
rs: "rust",
|
|
1772
|
+
go: "go",
|
|
1773
|
+
sql: "sql",
|
|
1774
|
+
xml: "xml"
|
|
1775
|
+
};
|
|
1776
|
+
function In(e, t) {
|
|
1777
|
+
if (t) return t;
|
|
1778
|
+
if (!e) return;
|
|
1779
|
+
let n = e.split(".").pop()?.toLowerCase();
|
|
1780
|
+
return n ? Fn[n] : void 0;
|
|
1781
|
+
}
|
|
1782
|
+
var Ln = {
|
|
1783
|
+
running: "running",
|
|
1784
|
+
success: "completed",
|
|
1785
|
+
error: "error"
|
|
1786
|
+
};
|
|
1787
|
+
function Rn({ type: e, label: t, status: n, detail: r, output: i, language: a, duration: o, className: s, actions: c, part: l }) {
|
|
1788
|
+
let u = l ?? {
|
|
1789
|
+
type: "tool",
|
|
1790
|
+
id: `${e}:${t}`,
|
|
1791
|
+
tool: e,
|
|
1792
|
+
state: {
|
|
1793
|
+
status: Ln[n],
|
|
1794
|
+
input: r ? { detail: r } : void 0,
|
|
1795
|
+
output: i,
|
|
1796
|
+
time: o == null ? void 0 : {
|
|
1797
|
+
start: 0,
|
|
1798
|
+
end: o
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
}, d = In(r, a);
|
|
1802
|
+
return /* @__PURE__ */ (0, k.jsx)(An, {
|
|
1803
|
+
part: u,
|
|
1804
|
+
title: t,
|
|
1805
|
+
description: r,
|
|
1806
|
+
className: s,
|
|
1807
|
+
actions: c,
|
|
1808
|
+
renderToolDetail: l ? void 0 : i ? () => /* @__PURE__ */ (0, k.jsx)(T, {
|
|
1809
|
+
code: i,
|
|
1810
|
+
language: d,
|
|
1811
|
+
className: "max-h-72 overflow-auto text-xs"
|
|
1812
|
+
}) : () => null
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
function zn({ title: e, children: t, className: n }) {
|
|
1816
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1817
|
+
role: "group",
|
|
1818
|
+
"aria-label": e,
|
|
1819
|
+
className: o("flex flex-col gap-1", n),
|
|
1820
|
+
children: t
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
//#endregion
|
|
1824
|
+
//#region node_modules/.pnpm/@tangle-network+sandbox-ui@2.0.15_b185337ee4bca5ec0279ca525649b58b/node_modules/@tangle-network/sandbox-ui/dist/rolldown-runtime-D8jQpDG7.js
|
|
1825
|
+
var Bn = Object.defineProperty, Vn = (e, t) => {
|
|
1826
|
+
let n = {};
|
|
1827
|
+
for (var r in e) Bn(n, r, {
|
|
1828
|
+
get: e[r],
|
|
1829
|
+
enumerable: !0
|
|
1830
|
+
});
|
|
1831
|
+
return t || Bn(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
1832
|
+
};
|
|
1833
|
+
//#endregion
|
|
1834
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/message-author.js
|
|
1835
|
+
function Hn(e, t) {
|
|
1836
|
+
return e === void 0 || e.id === t;
|
|
1837
|
+
}
|
|
1838
|
+
function Un({ author: e, className: t, children: n, ...r }) {
|
|
1839
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1840
|
+
"data-message-author": "",
|
|
1841
|
+
className: o("flex min-w-0 max-w-full items-center gap-2", t),
|
|
1842
|
+
...r,
|
|
1843
|
+
children: [
|
|
1844
|
+
/* @__PURE__ */ (0, k.jsx)(ie, {
|
|
1845
|
+
size: "xs",
|
|
1846
|
+
src: e.avatarUrl,
|
|
1847
|
+
name: e.name,
|
|
1848
|
+
tone: re(e.id),
|
|
1849
|
+
className: "rounded-full"
|
|
1850
|
+
}),
|
|
1851
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
1852
|
+
className: "min-w-0 truncate font-medium text-foreground text-sm",
|
|
1853
|
+
title: e.name,
|
|
1854
|
+
children: e.name
|
|
1855
|
+
}),
|
|
1856
|
+
e.role ? /* @__PURE__ */ (0, k.jsx)(ut, {
|
|
1857
|
+
size: "sm",
|
|
1858
|
+
emphasis: "outline",
|
|
1859
|
+
className: "max-w-[50%]",
|
|
1860
|
+
children: e.role
|
|
1861
|
+
}) : null,
|
|
1862
|
+
n
|
|
1863
|
+
]
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1866
|
+
//#endregion
|
|
1867
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/user-message.js
|
|
1868
|
+
function Wn(e) {
|
|
1869
|
+
return e.toLocaleTimeString(void 0, {
|
|
1870
|
+
hour: "numeric",
|
|
1871
|
+
minute: "2-digit"
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
function Gn({ children: e, align: t = "end" }) {
|
|
1875
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1876
|
+
className: `flex flex-wrap items-center ${t === "end" ? "justify-end" : "justify-start"} gap-1.5 text-sm text-muted-foreground`,
|
|
1877
|
+
children: e
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
function Kn({ text: e, lines: t }) {
|
|
1881
|
+
let n = (0, O.useRef)(null), [r, i] = (0, O.useState)(!1), [a, o] = (0, O.useState)(!1);
|
|
1882
|
+
(0, O.useLayoutEffect)(() => {
|
|
1883
|
+
let e = n.current;
|
|
1884
|
+
if (!e || !t || r) return;
|
|
1885
|
+
let i = () => o(e.scrollHeight > e.clientHeight + 1);
|
|
1886
|
+
if (i(), typeof ResizeObserver > "u") return;
|
|
1887
|
+
let a = new ResizeObserver(i);
|
|
1888
|
+
return a.observe(e), () => a.disconnect();
|
|
1889
|
+
}, [
|
|
1890
|
+
t,
|
|
1891
|
+
r,
|
|
1892
|
+
e
|
|
1893
|
+
]);
|
|
1894
|
+
let s = !!t && !r;
|
|
1895
|
+
return /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
1896
|
+
ref: n,
|
|
1897
|
+
className: `break-words whitespace-pre-wrap ${Pn}`,
|
|
1898
|
+
style: s ? {
|
|
1899
|
+
maxHeight: `${t}lh`,
|
|
1900
|
+
overflow: "hidden",
|
|
1901
|
+
...a ? {
|
|
1902
|
+
maskImage: "linear-gradient(to bottom, #000 calc(100% - 1.5lh), transparent)",
|
|
1903
|
+
WebkitMaskImage: "linear-gradient(to bottom, #000 calc(100% - 1.5lh), transparent)"
|
|
1904
|
+
} : {}
|
|
1905
|
+
} : void 0,
|
|
1906
|
+
children: e
|
|
1907
|
+
}), t && (a || r) ? /* @__PURE__ */ (0, k.jsx)("button", {
|
|
1908
|
+
type: "button",
|
|
1909
|
+
"aria-expanded": r,
|
|
1910
|
+
onClick: () => i(!r),
|
|
1911
|
+
className: "mt-1.5 text-sm font-medium underline-offset-2 opacity-75 transition-opacity hover:underline hover:opacity-100",
|
|
1912
|
+
children: r ? "Show less" : "Show more"
|
|
1913
|
+
}) : null] });
|
|
1914
|
+
}
|
|
1915
|
+
function qn({ text: e, timestamp: t, actions: n, lines: r }) {
|
|
1916
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1917
|
+
className: "flex justify-end",
|
|
1918
|
+
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1919
|
+
className: "group flex min-w-0 max-w-[78%] flex-col items-end gap-2",
|
|
1920
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1921
|
+
className: "relative w-full min-w-0 rounded-2xl bg-foreground px-4 py-3 text-background",
|
|
1922
|
+
children: [t ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1923
|
+
"data-user-message-time": "",
|
|
1924
|
+
className: "pointer-events-none absolute right-full top-1/2 mr-3 -translate-y-1/2 whitespace-nowrap text-sm text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
1925
|
+
children: Wn(t)
|
|
1926
|
+
}) : null, /* @__PURE__ */ (0, k.jsx)(Kn, {
|
|
1927
|
+
text: e,
|
|
1928
|
+
lines: r
|
|
1929
|
+
})]
|
|
1930
|
+
}), n ? /* @__PURE__ */ (0, k.jsx)(Gn, { children: n }) : null]
|
|
1931
|
+
})
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1934
|
+
function Jn({ text: e, timestamp: t, actions: n, author: r, lines: i }) {
|
|
1935
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
1936
|
+
className: "flex justify-start",
|
|
1937
|
+
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1938
|
+
className: "group flex min-w-0 max-w-[78%] flex-col items-start gap-1.5",
|
|
1939
|
+
children: [
|
|
1940
|
+
r ? /* @__PURE__ */ (0, k.jsx)(Un, { author: r }) : null,
|
|
1941
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1942
|
+
className: "relative min-w-0 max-w-full rounded-2xl border border-border bg-card px-4 py-3 text-foreground",
|
|
1943
|
+
children: [t ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
1944
|
+
"data-user-message-time": "",
|
|
1945
|
+
className: "pointer-events-none absolute left-full top-1/2 ml-3 -translate-y-1/2 whitespace-nowrap text-sm text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
1946
|
+
children: Wn(t)
|
|
1947
|
+
}) : null, /* @__PURE__ */ (0, k.jsx)(Kn, {
|
|
1948
|
+
text: e,
|
|
1949
|
+
lines: i
|
|
1950
|
+
})]
|
|
1951
|
+
}),
|
|
1952
|
+
n ? /* @__PURE__ */ (0, k.jsx)(Gn, {
|
|
1953
|
+
align: "start",
|
|
1954
|
+
children: n
|
|
1955
|
+
}) : null
|
|
1956
|
+
]
|
|
1957
|
+
})
|
|
1958
|
+
});
|
|
1959
|
+
}
|
|
1960
|
+
var Yn = (0, O.memo)(({ message: e, parts: t, content: n, timestamp: r, actions: i, author: a, viewerId: o, collapsedLines: s }) => {
|
|
1961
|
+
let c = Hn(a, o) ? void 0 : a, l = (e, t, n = !0, i) => c ? /* @__PURE__ */ (0, k.jsx)(Jn, {
|
|
1962
|
+
text: e,
|
|
1963
|
+
timestamp: r,
|
|
1964
|
+
actions: t,
|
|
1965
|
+
author: n ? c : void 0,
|
|
1966
|
+
lines: s
|
|
1967
|
+
}, i) : /* @__PURE__ */ (0, k.jsx)(qn, {
|
|
1968
|
+
text: e,
|
|
1969
|
+
timestamp: r,
|
|
1970
|
+
actions: t,
|
|
1971
|
+
lines: s
|
|
1972
|
+
}, i);
|
|
1973
|
+
if (n != null) return n.trim() ? l(n, i) : null;
|
|
1974
|
+
let u = Nn(t ?? []);
|
|
1975
|
+
if (u.length === 0) return null;
|
|
1976
|
+
if (u.length === 1 && !u[0].synthetic) return l(u[0].text, i);
|
|
1977
|
+
let d = u.find((e) => !e.synthetic);
|
|
1978
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1979
|
+
className: "space-y-2",
|
|
1980
|
+
children: [u.map((e) => e.synthetic ? /* @__PURE__ */ (0, k.jsx)(Mn, { text: e.text }, e.index) : l(e.text, void 0, e === d, e.index)), i ? /* @__PURE__ */ (0, k.jsx)(Gn, {
|
|
1981
|
+
align: c ? "start" : "end",
|
|
1982
|
+
children: i
|
|
1983
|
+
}) : null]
|
|
1984
|
+
});
|
|
1985
|
+
});
|
|
1986
|
+
Yn.displayName = "UserMessage";
|
|
1987
|
+
//#endregion
|
|
1988
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/thinking-indicator.js
|
|
1989
|
+
function Xn({ className: e }) {
|
|
1990
|
+
let [t, n] = (0, O.useState)(0);
|
|
1991
|
+
return (0, O.useEffect)(() => {
|
|
1992
|
+
let e = window.setInterval(() => n((e) => e + 1), 1e3);
|
|
1993
|
+
return () => window.clearInterval(e);
|
|
1994
|
+
}, []), /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1995
|
+
role: "status",
|
|
1996
|
+
"aria-label": "Agent is thinking",
|
|
1997
|
+
className: o("flex items-center gap-2 px-3 py-1.5", e),
|
|
1998
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
1999
|
+
className: "flex gap-[3px]",
|
|
2000
|
+
children: [
|
|
2001
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
2002
|
+
className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]",
|
|
2003
|
+
style: { animationDelay: "0ms" }
|
|
2004
|
+
}),
|
|
2005
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
2006
|
+
className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]",
|
|
2007
|
+
style: { animationDelay: "150ms" }
|
|
2008
|
+
}),
|
|
2009
|
+
/* @__PURE__ */ (0, k.jsx)("span", {
|
|
2010
|
+
className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]",
|
|
2011
|
+
style: { animationDelay: "300ms" }
|
|
2012
|
+
})
|
|
2013
|
+
]
|
|
2014
|
+
}), t > 3 && /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
2015
|
+
className: "text-[length:var(--font-size-xs)] tabular-nums text-muted-foreground",
|
|
2016
|
+
children: [t, "s"]
|
|
2017
|
+
})]
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
//#endregion
|
|
2021
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/agent-timeline.js
|
|
2022
|
+
var Zn = {
|
|
2023
|
+
default: {
|
|
2024
|
+
card: "border-border bg-card",
|
|
2025
|
+
text: "text-foreground",
|
|
2026
|
+
supportingText: "text-muted-foreground",
|
|
2027
|
+
icon: pe
|
|
2028
|
+
},
|
|
2029
|
+
info: {
|
|
2030
|
+
card: "border-[var(--surface-info-border)] bg-[var(--surface-info-bg)]",
|
|
2031
|
+
text: "text-[var(--surface-info-text)]",
|
|
2032
|
+
supportingText: "text-[var(--surface-info-text)]",
|
|
2033
|
+
icon: x
|
|
2034
|
+
},
|
|
2035
|
+
success: {
|
|
2036
|
+
card: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]",
|
|
2037
|
+
text: "text-[var(--surface-success-text)]",
|
|
2038
|
+
supportingText: "text-[var(--surface-success-text)]",
|
|
2039
|
+
icon: me("done").icon
|
|
2040
|
+
},
|
|
2041
|
+
warning: {
|
|
2042
|
+
card: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)]",
|
|
2043
|
+
text: "text-[var(--surface-warning-text)]",
|
|
2044
|
+
supportingText: "text-[var(--surface-warning-text)]",
|
|
2045
|
+
icon: Ue
|
|
2046
|
+
},
|
|
2047
|
+
error: {
|
|
2048
|
+
card: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)]",
|
|
2049
|
+
text: "text-[var(--surface-danger-text)]",
|
|
2050
|
+
supportingText: "text-[var(--surface-danger-text)]",
|
|
2051
|
+
icon: me("failed").icon
|
|
2052
|
+
}
|
|
2053
|
+
};
|
|
2054
|
+
function H(e) {
|
|
2055
|
+
return e.kind === "message" ? e.role === "user" ? "user" : "prose" : e.kind === "status" || e.kind === "artifact" ? "card" : "tool";
|
|
2056
|
+
}
|
|
2057
|
+
function Qn(e, t) {
|
|
2058
|
+
return e === void 0 ? "" : e === "user" || t === "user" ? "mt-4" : e === "card" || t === "card" ? "mt-2" : e === "tool" || t === "tool" ? "mt-1" : "mt-3";
|
|
2059
|
+
}
|
|
2060
|
+
var $n = "-mx-3", er = "[&>:last-child:not(ul,ol)]:after:ml-0.5 [&>:last-child:not(ul,ol)]:after:inline-block [&>:last-child:not(ul,ol)]:after:h-[1em] [&>:last-child:not(ul,ol)]:after:w-0.5 [&>:last-child:not(ul,ol)]:after:animate-pulse [&>:last-child:not(ul,ol)]:after:rounded-full [&>:last-child:not(ul,ol)]:after:bg-muted-foreground [&>:last-child:not(ul,ol)]:after:align-text-bottom [&>:last-child:not(ul,ol)]:after:content-[''] [&>:is(ul,ol):last-child>li:last-child]:after:ml-0.5 [&>:is(ul,ol):last-child>li:last-child]:after:inline-block [&>:is(ul,ol):last-child>li:last-child]:after:h-[1em] [&>:is(ul,ol):last-child>li:last-child]:after:w-0.5 [&>:is(ul,ol):last-child>li:last-child]:after:animate-pulse [&>:is(ul,ol):last-child>li:last-child]:after:rounded-full [&>:is(ul,ol):last-child>li:last-child]:after:bg-muted-foreground [&>:is(ul,ol):last-child>li:last-child]:after:align-text-bottom [&>:is(ul,ol):last-child>li:last-child]:after:content-['']";
|
|
2061
|
+
function tr({ item: e, author: t }) {
|
|
2062
|
+
return /* @__PURE__ */ (0, k.jsxs)("div", { children: [
|
|
2063
|
+
t && /* @__PURE__ */ (0, k.jsx)(Un, {
|
|
2064
|
+
author: t,
|
|
2065
|
+
className: "mb-1.5"
|
|
2066
|
+
}),
|
|
2067
|
+
e.content && /* @__PURE__ */ (0, k.jsx)(se, {
|
|
2068
|
+
className: o("tangle-prose", "tangle-transcript-text text-[length:var(--transcript-font-size)] leading-[var(--transcript-line-height)]", e.isStreaming && er),
|
|
2069
|
+
children: e.content
|
|
2070
|
+
}),
|
|
2071
|
+
e.isStreaming && !e.content && /* @__PURE__ */ (0, k.jsx)("span", {
|
|
2072
|
+
"aria-hidden": !0,
|
|
2073
|
+
"data-streaming-caret": "",
|
|
2074
|
+
className: "ml-0.5 inline-block h-[1em] w-0.5 animate-pulse rounded-full bg-muted-foreground align-text-bottom"
|
|
2075
|
+
}),
|
|
2076
|
+
e.toolCalls && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2077
|
+
className: "mt-1",
|
|
2078
|
+
children: e.toolCalls
|
|
2079
|
+
}),
|
|
2080
|
+
e.after && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2081
|
+
className: "mt-3 border-t border-border pt-3",
|
|
2082
|
+
children: e.after
|
|
2083
|
+
})
|
|
2084
|
+
] });
|
|
2085
|
+
}
|
|
2086
|
+
function nr({ item: e }) {
|
|
2087
|
+
let t = Zn[e.tone ?? "default"], n = t.icon;
|
|
2088
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2089
|
+
className: o("rounded-[var(--radius-lg)] border px-4 py-3", t.card),
|
|
2090
|
+
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2091
|
+
className: "flex items-start gap-3",
|
|
2092
|
+
children: [/* @__PURE__ */ (0, k.jsx)(n, { className: o("mt-0.5 h-4 w-4 shrink-0", t.text) }), /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2093
|
+
className: "min-w-0",
|
|
2094
|
+
children: [/* @__PURE__ */ (0, k.jsx)("div", {
|
|
2095
|
+
className: o("text-sm font-medium", t.text),
|
|
2096
|
+
children: e.label
|
|
2097
|
+
}), e.detail && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2098
|
+
className: o("mt-0.5 text-sm", t.supportingText),
|
|
2099
|
+
children: e.detail
|
|
2100
|
+
})]
|
|
2101
|
+
})]
|
|
2102
|
+
})
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
2105
|
+
function rr({ item: e }) {
|
|
2106
|
+
let t = Zn[e.tone ?? "default"], n = /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2107
|
+
className: o("rounded-[var(--radius-lg)] border px-4 py-3", t.card),
|
|
2108
|
+
children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2109
|
+
className: "flex items-start gap-3",
|
|
2110
|
+
children: [
|
|
2111
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
2112
|
+
className: "mt-0.5 flex h-[var(--avatar-size)] w-[var(--avatar-size)] shrink-0 items-center justify-center rounded-[var(--radius-md)] bg-muted/50 text-foreground",
|
|
2113
|
+
children: e.icon ?? /* @__PURE__ */ (0, k.jsx)(S, { className: "h-4 w-4" })
|
|
2114
|
+
}),
|
|
2115
|
+
/* @__PURE__ */ (0, k.jsxs)("div", {
|
|
2116
|
+
className: "min-w-0 flex-1",
|
|
2117
|
+
children: [
|
|
2118
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
2119
|
+
className: o("text-sm font-medium", t.text),
|
|
2120
|
+
children: e.title
|
|
2121
|
+
}),
|
|
2122
|
+
e.description && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2123
|
+
className: o("mt-1 text-sm", t.supportingText),
|
|
2124
|
+
children: e.description
|
|
2125
|
+
}),
|
|
2126
|
+
e.meta && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2127
|
+
className: o("mt-2 flex flex-wrap items-center gap-2 text-xs", t.supportingText),
|
|
2128
|
+
children: e.meta
|
|
2129
|
+
})
|
|
2130
|
+
]
|
|
2131
|
+
}),
|
|
2132
|
+
e.action && /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2133
|
+
className: "shrink-0",
|
|
2134
|
+
children: e.action
|
|
2135
|
+
})
|
|
2136
|
+
]
|
|
2137
|
+
})
|
|
2138
|
+
});
|
|
2139
|
+
return e.onClick ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2140
|
+
role: "button",
|
|
2141
|
+
tabIndex: 0,
|
|
2142
|
+
onClick: e.onClick,
|
|
2143
|
+
onKeyDown: (t) => {
|
|
2144
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.onClick?.());
|
|
2145
|
+
},
|
|
2146
|
+
className: o("block w-full rounded-[var(--radius-lg)] text-left transition-transform hover:-translate-y-0.5", a),
|
|
2147
|
+
children: n
|
|
2148
|
+
}) : n;
|
|
2149
|
+
}
|
|
2150
|
+
var ir = {
|
|
2151
|
+
read: (e) => `Read ${e} ${e === 1 ? "file" : "files"}`,
|
|
2152
|
+
write: (e) => `Wrote ${e} ${e === 1 ? "file" : "files"}`,
|
|
2153
|
+
edit: (e) => `Edited ${e} ${e === 1 ? "file" : "files"}`,
|
|
2154
|
+
bash: (e) => `Ran ${e} ${e === 1 ? "command" : "commands"}`,
|
|
2155
|
+
grep: (e) => `Searched ${e} ${e === 1 ? "time" : "times"}`,
|
|
2156
|
+
glob: (e) => `Matched ${e} ${e === 1 ? "pattern" : "patterns"}`,
|
|
2157
|
+
list: (e) => `Listed ${e} ${e === 1 ? "folder" : "folders"}`,
|
|
2158
|
+
download: (e) => `Downloaded ${e} ${e === 1 ? "file" : "files"}`,
|
|
2159
|
+
inspect: (e) => `Inspected ${e} ${e === 1 ? "item" : "items"}`,
|
|
2160
|
+
audit: (e) => `Audited ${e} ${e === 1 ? "item" : "items"}`,
|
|
2161
|
+
unknown: (e) => `Used ${e} ${e === 1 ? "tool" : "tools"}`
|
|
2162
|
+
};
|
|
2163
|
+
function ar(e) {
|
|
2164
|
+
return e.flatMap((e) => e.kind === "tool" ? [{
|
|
2165
|
+
call: e.call,
|
|
2166
|
+
part: e.part
|
|
2167
|
+
}] : e.kind === "tool_group" ? e.calls.map((t, n) => ({
|
|
2168
|
+
call: t,
|
|
2169
|
+
part: e.parts?.[n]
|
|
2170
|
+
})) : e.kind === "fold" ? ar(e.items) : []);
|
|
2171
|
+
}
|
|
2172
|
+
function or(e) {
|
|
2173
|
+
let t = /* @__PURE__ */ new Map();
|
|
2174
|
+
for (let { call: n } of ar(e)) t.set(n.type, (t.get(n.type) ?? 0) + 1);
|
|
2175
|
+
if (!t.size) return `${e.length} ${e.length === 1 ? "step" : "steps"}`;
|
|
2176
|
+
let n = [...t].map(([e, t]) => ir[e](t));
|
|
2177
|
+
return n.length > 3 ? `${n.slice(0, 3).join(" · ")} · ${n.length - 3} more` : n.join(" · ");
|
|
2178
|
+
}
|
|
2179
|
+
function sr({ item: e, renderToolActions: t, viewerId: n }) {
|
|
2180
|
+
let r = ar(e.items), i = r.filter(({ call: e }) => e.status === "error"), a = r.some(({ call: e }) => e.status === "running"), o = i.map(({ part: e }) => e?.state.status === "error" ? e.state.error : void 0).find(Boolean), s = r.reduce((e, { call: t }) => e + (t.duration ?? 0), 0), c = e.summary ?? or(e.items), l = [...new Set(r.map(({ call: e }) => e.detail).filter((e) => !!e))];
|
|
2181
|
+
return /* @__PURE__ */ (0, k.jsx)(V, {
|
|
2182
|
+
icon: /* @__PURE__ */ (0, k.jsx)(je, { className: "h-3.5 w-3.5" }),
|
|
2183
|
+
title: a ? /* @__PURE__ */ (0, k.jsx)(st, { children: c }) : c,
|
|
2184
|
+
description: l.join(", ") || void 0,
|
|
2185
|
+
descriptionMono: !0,
|
|
2186
|
+
status: i.length ? "error" : a ? "running" : "success",
|
|
2187
|
+
durationMs: s > 0 && !a ? s : void 0,
|
|
2188
|
+
collapsedError: i.length ? `${i.length} failed${o ? `: ${o}` : ""}` : void 0,
|
|
2189
|
+
defaultOpen: e.defaultOpen,
|
|
2190
|
+
contentClassName: "px-3 py-1.5",
|
|
2191
|
+
children: /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2192
|
+
"data-timeline-fold": "",
|
|
2193
|
+
className: "flex flex-col",
|
|
2194
|
+
children: e.items.map((r, i) => /* @__PURE__ */ (0, k.jsx)(U, {
|
|
2195
|
+
item: r,
|
|
2196
|
+
previous: i > 0 ? H(e.items[i - 1]) : void 0,
|
|
2197
|
+
renderToolActions: t,
|
|
2198
|
+
viewerId: n
|
|
2199
|
+
}, r.id))
|
|
2200
|
+
})
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
function cr({ className: e, children: t }) {
|
|
2204
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2205
|
+
className: o("mx-auto flex w-full max-w-5xl flex-col px-4 py-4", e),
|
|
2206
|
+
children: t
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2209
|
+
function U({ item: e, previous: t, headed: n, renderToolActions: r, viewerId: i }) {
|
|
2210
|
+
let a = H(e);
|
|
2211
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2212
|
+
"data-timeline-step": a,
|
|
2213
|
+
className: o(Qn(t, a), a === "tool" && $n),
|
|
2214
|
+
children: /* @__PURE__ */ (0, k.jsx)(lr, {
|
|
2215
|
+
item: e,
|
|
2216
|
+
headed: n,
|
|
2217
|
+
renderToolActions: r,
|
|
2218
|
+
viewerId: i
|
|
2219
|
+
})
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
function lr({ item: e, headed: t, renderToolActions: n, viewerId: r }) {
|
|
2223
|
+
return e.kind === "message" ? e.role === "user" ? /* @__PURE__ */ (0, k.jsx)(Yn, {
|
|
2224
|
+
content: e.content,
|
|
2225
|
+
timestamp: e.timestamp,
|
|
2226
|
+
author: e.author,
|
|
2227
|
+
viewerId: r,
|
|
2228
|
+
collapsedLines: e.collapsedLines
|
|
2229
|
+
}) : /* @__PURE__ */ (0, k.jsx)(tr, {
|
|
2230
|
+
item: e,
|
|
2231
|
+
author: t ? e.author : void 0
|
|
2232
|
+
}) : e.kind === "tool" ? /* @__PURE__ */ (0, k.jsx)(Rn, {
|
|
2233
|
+
type: e.call.type,
|
|
2234
|
+
label: e.call.label,
|
|
2235
|
+
status: e.call.status,
|
|
2236
|
+
detail: e.call.detail,
|
|
2237
|
+
output: e.call.output,
|
|
2238
|
+
duration: e.call.duration,
|
|
2239
|
+
part: e.part,
|
|
2240
|
+
actions: e.part ? n?.(e.part) : void 0
|
|
2241
|
+
}) : e.kind === "tool_group" ? /* @__PURE__ */ (0, k.jsx)(zn, {
|
|
2242
|
+
title: e.title,
|
|
2243
|
+
children: e.calls.map((t, r) => {
|
|
2244
|
+
let i = e.parts?.[r];
|
|
2245
|
+
return /* @__PURE__ */ (0, k.jsx)(Rn, {
|
|
2246
|
+
type: t.type,
|
|
2247
|
+
label: t.label,
|
|
2248
|
+
status: t.status,
|
|
2249
|
+
detail: t.detail,
|
|
2250
|
+
output: t.output,
|
|
2251
|
+
duration: t.duration,
|
|
2252
|
+
part: i,
|
|
2253
|
+
actions: i ? n?.(i) : void 0
|
|
2254
|
+
}, t.id);
|
|
2255
|
+
})
|
|
2256
|
+
}) : e.kind === "fold" ? /* @__PURE__ */ (0, k.jsx)(sr, {
|
|
2257
|
+
item: e,
|
|
2258
|
+
renderToolActions: n,
|
|
2259
|
+
viewerId: r
|
|
2260
|
+
}) : e.kind === "status" ? /* @__PURE__ */ (0, k.jsx)(nr, { item: e }) : e.kind === "artifact" ? /* @__PURE__ */ (0, k.jsx)(rr, { item: e }) : e.content;
|
|
2261
|
+
}
|
|
2262
|
+
function ur({ items: e, isThinking: t, emptyState: n, className: r, renderToolActions: i, collapseAfter: a, viewerId: s }) {
|
|
2263
|
+
let [c, l] = (0, O.useState)(!1);
|
|
2264
|
+
if (e.length === 0 && !t) return n ? /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2265
|
+
className: o("flex h-full items-center justify-center p-4", r),
|
|
2266
|
+
children: n
|
|
2267
|
+
}) : null;
|
|
2268
|
+
let u = t ? [...e, {
|
|
2269
|
+
id: "__thinking__",
|
|
2270
|
+
kind: "custom",
|
|
2271
|
+
content: /* @__PURE__ */ (0, k.jsx)(Xn, {})
|
|
2272
|
+
}] : e, d = (e) => e.kind === "message" && e.role === "user", f = u.filter((e) => !d(e)), p = a ?? Infinity, m = f.length > p, h = m && !c, g = u, _ = 0;
|
|
2273
|
+
if (h) {
|
|
2274
|
+
let e = [], t = 0;
|
|
2275
|
+
for (let n of u) {
|
|
2276
|
+
if (t >= p) break;
|
|
2277
|
+
e.push(n), d(n) || (t += 1);
|
|
2278
|
+
}
|
|
2279
|
+
g = e, _ = f.length - p;
|
|
2280
|
+
}
|
|
2281
|
+
let v = /* @__PURE__ */ new Set(), y;
|
|
2282
|
+
for (let e of g) if (e.kind === "message") {
|
|
2283
|
+
if (e.role === "user") {
|
|
2284
|
+
y = void 0;
|
|
2285
|
+
continue;
|
|
2286
|
+
}
|
|
2287
|
+
e.author && e.author.id !== y && v.add(e.id), y = e.author?.id;
|
|
2288
|
+
}
|
|
2289
|
+
return /* @__PURE__ */ (0, k.jsxs)(cr, {
|
|
2290
|
+
className: r,
|
|
2291
|
+
children: [g.map((e, t) => /* @__PURE__ */ (0, k.jsx)(U, {
|
|
2292
|
+
item: e,
|
|
2293
|
+
previous: t > 0 ? H(g[t - 1]) : void 0,
|
|
2294
|
+
headed: v.has(e.id),
|
|
2295
|
+
renderToolActions: i,
|
|
2296
|
+
viewerId: s
|
|
2297
|
+
}, e.id)), m ? /* @__PURE__ */ (0, k.jsx)("button", {
|
|
2298
|
+
type: "button",
|
|
2299
|
+
onClick: () => l((e) => !e),
|
|
2300
|
+
className: "mt-2 self-start text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",
|
|
2301
|
+
children: h ? `Show ${_} more step${_ === 1 ? "" : "s"}` : "Show less"
|
|
2302
|
+
}) : null]
|
|
2303
|
+
});
|
|
2304
|
+
}
|
|
2305
|
+
//#endregion
|
|
2306
|
+
//#region node_modules/.pnpm/@tangle-network+ui@11.51.1_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_a7187ff5a73f27dfe4cc06a400b0c7a3/node_modules/@tangle-network/ui/dist/chat/speaker.js
|
|
2307
|
+
function dr({ speaker: e, live: t = !1, ...n }) {
|
|
2308
|
+
let r = e.state ?? (t ? "answering" : "done");
|
|
2309
|
+
return /* @__PURE__ */ (0, k.jsxs)(Un, {
|
|
2310
|
+
author: {
|
|
2311
|
+
id: e.id,
|
|
2312
|
+
name: e.name
|
|
2313
|
+
},
|
|
2314
|
+
"data-speaker-state": r,
|
|
2315
|
+
...n,
|
|
2316
|
+
children: [e.handle ? /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
2317
|
+
className: "min-w-0 max-w-fit flex-1 truncate text-muted-foreground text-sm",
|
|
2318
|
+
title: `@${e.handle}`,
|
|
2319
|
+
children: ["@", e.handle]
|
|
2320
|
+
}) : null, r === "done" ? null : /* @__PURE__ */ (0, k.jsxs)("span", {
|
|
2321
|
+
className: "inline-flex shrink-0 items-center gap-1.5 font-medium text-sm",
|
|
2322
|
+
children: [/* @__PURE__ */ (0, k.jsx)(he, {
|
|
2323
|
+
status: r === "failed" ? "failed" : "running",
|
|
2324
|
+
"aria-hidden": !0
|
|
2325
|
+
}), r === "failed" ? "Failed" : "Answering"]
|
|
2326
|
+
})]
|
|
2327
|
+
});
|
|
2328
|
+
}
|
|
2329
|
+
//#endregion
|
|
2330
|
+
//#region node_modules/.pnpm/@tangle-network+sandbox-ui@2.0.15_b185337ee4bca5ec0279ca525649b58b/node_modules/@tangle-network/sandbox-ui/dist/record-DZnT6SWN.js
|
|
2331
|
+
function fr({ items: e, keyOf: t, render: n, scroller: r, estimate: i = 96, overscan: a = 900, target: o }) {
|
|
2332
|
+
let s = (0, O.useRef)(/* @__PURE__ */ new Map()), [c, l] = (0, O.useState)(0), [u, d] = (0, O.useState)({
|
|
2333
|
+
top: 0,
|
|
2334
|
+
height: 900
|
|
2335
|
+
}), f = (0, O.useRef)(null), p = (0, O.useRef)(/* @__PURE__ */ new Map()), m = (0, O.useRef)(0), h = (e) => {
|
|
2336
|
+
!f.current && typeof ResizeObserver < "u" && (f.current = new ResizeObserver((e) => {
|
|
2337
|
+
let t = !1;
|
|
2338
|
+
for (let n of e) {
|
|
2339
|
+
let e = p.current.get(n.target);
|
|
2340
|
+
if (!e) continue;
|
|
2341
|
+
let r = Math.ceil(n.borderBoxSize?.[0]?.blockSize ?? n.target.offsetHeight);
|
|
2342
|
+
r > 0 && s.current.get(e) !== r && (s.current.set(e, r), t = !0);
|
|
2343
|
+
}
|
|
2344
|
+
t && !m.current && (m.current = requestAnimationFrame(() => {
|
|
2345
|
+
m.current = 0, l((e) => e + 1);
|
|
2346
|
+
}));
|
|
2347
|
+
})), f.current?.observe(e);
|
|
2348
|
+
};
|
|
2349
|
+
(0, O.useEffect)(() => () => {
|
|
2350
|
+
cancelAnimationFrame(m.current), f.current?.disconnect(), f.current = null, p.current.clear();
|
|
2351
|
+
}, []), (0, O.useEffect)(() => {
|
|
2352
|
+
let e = r.current;
|
|
2353
|
+
if (!e) return;
|
|
2354
|
+
let t = 0, n = () => {
|
|
2355
|
+
t = 0, d((t) => t.top === e.scrollTop && t.height === e.clientHeight ? t : {
|
|
2356
|
+
top: e.scrollTop,
|
|
2357
|
+
height: e.clientHeight
|
|
2358
|
+
});
|
|
2359
|
+
}, i = () => {
|
|
2360
|
+
t ||= requestAnimationFrame(n);
|
|
2361
|
+
};
|
|
2362
|
+
n(), e.addEventListener("scroll", i, { passive: !0 });
|
|
2363
|
+
let a = new ResizeObserver(i);
|
|
2364
|
+
return a.observe(e), () => {
|
|
2365
|
+
cancelAnimationFrame(t), e.removeEventListener("scroll", i), a.disconnect();
|
|
2366
|
+
};
|
|
2367
|
+
}, [r]);
|
|
2368
|
+
let g = (0, O.useMemo)(() => {
|
|
2369
|
+
let n = new Float64Array(e.length + 1), r = typeof i == "function" ? i : () => i;
|
|
2370
|
+
for (let i = 0; i < e.length; i++) n[i + 1] = n[i] + (s.current.get(t(e[i])) ?? r(e[i]));
|
|
2371
|
+
return n;
|
|
2372
|
+
}, [
|
|
2373
|
+
e,
|
|
2374
|
+
t,
|
|
2375
|
+
i,
|
|
2376
|
+
c
|
|
2377
|
+
]), _ = (t) => {
|
|
2378
|
+
let n = 0, r = e.length;
|
|
2379
|
+
for (; n < r;) {
|
|
2380
|
+
let e = n + r >> 1;
|
|
2381
|
+
g[e + 1] <= t ? n = e + 1 : r = e;
|
|
2382
|
+
}
|
|
2383
|
+
return n;
|
|
2384
|
+
}, v = Math.max(0, _(u.top - a)), y = Math.min(e.length, _(u.top + u.height + a) + 1), b = (0, O.useCallback)((n, i) => {
|
|
2385
|
+
let a = r.current, o = e.findIndex((e) => t(e) === n);
|
|
2386
|
+
if (!a || o < 0) return !1;
|
|
2387
|
+
let s = g[o], c = g[o + 1];
|
|
2388
|
+
return (i || s < a.scrollTop || c > a.scrollTop + a.clientHeight) && (a.scrollTop = Math.max(0, s - 8)), !0;
|
|
2389
|
+
}, [
|
|
2390
|
+
e,
|
|
2391
|
+
t,
|
|
2392
|
+
g,
|
|
2393
|
+
r
|
|
2394
|
+
]), x = (0, O.useRef)(null), S = (0, O.useRef)(/* @__PURE__ */ new Map()), C = () => {
|
|
2395
|
+
let e = x.current;
|
|
2396
|
+
if (!e) return;
|
|
2397
|
+
if (performance.now() > e.until) {
|
|
2398
|
+
x.current = null;
|
|
2399
|
+
return;
|
|
2400
|
+
}
|
|
2401
|
+
if (!b(e.key, !0)) return;
|
|
2402
|
+
let t = S.current.get(e.key);
|
|
2403
|
+
if (t?.isConnected) {
|
|
2404
|
+
let e = t.getBoundingClientRect();
|
|
2405
|
+
(e.top < 72 || e.top > window.innerHeight - 96) && window.scrollBy({ top: e.top - 120 });
|
|
2406
|
+
}
|
|
2407
|
+
};
|
|
2408
|
+
(0, O.useLayoutEffect)(() => {
|
|
2409
|
+
x.current = o ? {
|
|
2410
|
+
key: o,
|
|
2411
|
+
until: performance.now() + 2e3
|
|
2412
|
+
} : null, C();
|
|
2413
|
+
}, [o]), (0, O.useLayoutEffect)(C, [
|
|
2414
|
+
c,
|
|
2415
|
+
u,
|
|
2416
|
+
e
|
|
2417
|
+
]), (0, O.useEffect)(() => {
|
|
2418
|
+
let n = r.current;
|
|
2419
|
+
if (!n) return;
|
|
2420
|
+
let i = (r) => {
|
|
2421
|
+
let i = r instanceof KeyboardEvent && r.target === n && !r.defaultPrevented ? r.key : "";
|
|
2422
|
+
x.current = e.length && (i === "Home" || i === "End") ? {
|
|
2423
|
+
key: t(e[i === "Home" ? 0 : e.length - 1]),
|
|
2424
|
+
until: performance.now() + 2e3
|
|
2425
|
+
} : null, x.current && (r.preventDefault(), C());
|
|
2426
|
+
};
|
|
2427
|
+
return n.addEventListener("wheel", i, { passive: !0 }), n.addEventListener("touchstart", i, { passive: !0 }), n.addEventListener("pointerdown", i), n.addEventListener("keydown", i), () => {
|
|
2428
|
+
n.removeEventListener("wheel", i), n.removeEventListener("touchstart", i), n.removeEventListener("pointerdown", i), n.removeEventListener("keydown", i);
|
|
2429
|
+
};
|
|
2430
|
+
}, [
|
|
2431
|
+
r,
|
|
2432
|
+
e,
|
|
2433
|
+
t,
|
|
2434
|
+
g
|
|
2435
|
+
]);
|
|
2436
|
+
let w = (e) => (t) => {
|
|
2437
|
+
if (!t) {
|
|
2438
|
+
S.current.delete(e);
|
|
2439
|
+
return;
|
|
2440
|
+
}
|
|
2441
|
+
S.current.set(e, t);
|
|
2442
|
+
for (let [n, r] of p.current) r === e && n !== t && (f.current?.unobserve(n), p.current.delete(n));
|
|
2443
|
+
p.current.has(t) || (p.current.set(t, e), h(t));
|
|
2444
|
+
};
|
|
2445
|
+
return (0, O.useEffect)(() => {
|
|
2446
|
+
for (let e of [...p.current.keys()]) e.isConnected || (f.current?.unobserve(e), p.current.delete(e));
|
|
2447
|
+
}), /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [
|
|
2448
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
2449
|
+
style: {
|
|
2450
|
+
height: g[v],
|
|
2451
|
+
transitionProperty: "none"
|
|
2452
|
+
},
|
|
2453
|
+
"aria-hidden": "true"
|
|
2454
|
+
}),
|
|
2455
|
+
e.slice(v, y).map((e, r) => {
|
|
2456
|
+
let i = t(e);
|
|
2457
|
+
return /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2458
|
+
ref: w(i),
|
|
2459
|
+
className: "virtual-row",
|
|
2460
|
+
style: { display: "flow-root" },
|
|
2461
|
+
children: n(e, v + r)
|
|
2462
|
+
}, i);
|
|
2463
|
+
}),
|
|
2464
|
+
/* @__PURE__ */ (0, k.jsx)("div", {
|
|
2465
|
+
style: {
|
|
2466
|
+
height: g[e.length] - g[y],
|
|
2467
|
+
transitionProperty: "none"
|
|
2468
|
+
},
|
|
2469
|
+
"aria-hidden": "true"
|
|
2470
|
+
})
|
|
2471
|
+
] });
|
|
2472
|
+
}
|
|
2473
|
+
var pr = /* @__PURE__ */ Vn({
|
|
2474
|
+
agentState: () => Sr,
|
|
2475
|
+
callsOf: () => Z,
|
|
2476
|
+
compact: () => K,
|
|
2477
|
+
eventMatches: () => Cr,
|
|
2478
|
+
eventSource: () => wr,
|
|
2479
|
+
fmt: () => J,
|
|
2480
|
+
hostless: () => q,
|
|
2481
|
+
hoverLines: () => Tr,
|
|
2482
|
+
indexRecord: () => br,
|
|
2483
|
+
interval: () => gr,
|
|
2484
|
+
measuredUsage: () => xr,
|
|
2485
|
+
modelIdentity: () => Er,
|
|
2486
|
+
ms: () => W,
|
|
2487
|
+
preview: () => yr,
|
|
2488
|
+
roleOf: () => _r,
|
|
2489
|
+
textOf: () => Y,
|
|
2490
|
+
toolKey: () => X,
|
|
2491
|
+
tooltipSections: () => Dr,
|
|
2492
|
+
utcTime: () => G
|
|
2493
|
+
}), W = (e) => Date.parse(e);
|
|
2494
|
+
function G(e, t = !1) {
|
|
2495
|
+
let n = new Date(e);
|
|
2496
|
+
if (!Number.isFinite(n.valueOf())) return "Unknown time";
|
|
2497
|
+
let r = n.toISOString();
|
|
2498
|
+
return `${t ? r.slice(0, 19).replace("T", " ") : r.slice(11, 19)} UTC`;
|
|
2499
|
+
}
|
|
2500
|
+
var K = (e) => e.replace(/\s+/g, " ").trim(), mr = /\/(?:home|Users)\/[^/\s"'`]+(?:\/\.cache\/disco\/host\/[^/\s"'`]+(?:\/sessions\/[^/\s"'`]+)?)?(\/?)/g;
|
|
2501
|
+
function q(e) {
|
|
2502
|
+
return !e || !(e.includes("/home/") || e.includes("/Users/")) ? e : e.replace(mr, (e, t, n, r) => {
|
|
2503
|
+
if (!e.includes("/.cache/disco/host/")) return t ? "~/" : "~";
|
|
2504
|
+
let i = r[n + e.length];
|
|
2505
|
+
return t && i !== void 0 && !/[\s"'`)]/.test(i) ? "" : "./";
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
function hr(e) {
|
|
2509
|
+
let t = e.detail, n = q(t.publicText), r = q(t.reasoning), i = t.publicToolCalls?.map((e) => e.input && q(e.input) !== e.input ? {
|
|
2510
|
+
...e,
|
|
2511
|
+
input: q(e.input)
|
|
2512
|
+
} : e);
|
|
2513
|
+
return n === t.publicText && r === t.reasoning && i?.every((e, n) => e === t.publicToolCalls[n]) !== !1 ? e : {
|
|
2514
|
+
...e,
|
|
2515
|
+
detail: {
|
|
2516
|
+
...t,
|
|
2517
|
+
...n === void 0 ? {} : { publicText: n },
|
|
2518
|
+
...r === void 0 ? {} : { reasoning: r },
|
|
2519
|
+
...i ? { publicToolCalls: i } : {}
|
|
2520
|
+
}
|
|
2521
|
+
};
|
|
2522
|
+
}
|
|
2523
|
+
var J = (e) => new Intl.NumberFormat("en-US", {
|
|
2524
|
+
notation: "compact",
|
|
2525
|
+
maximumFractionDigits: 1
|
|
2526
|
+
}).format(e), gr = (e) => e < 1e3 ? `${Math.round(e)} ms` : e < 6e4 ? `${(e / 1e3).toFixed(1)} s` : `${(e / 6e4).toFixed(1)} min`, _r = (e) => e?.role ?? (e?.kind === "session" ? "Session" : e?.kind === "finding" ? "Finding" : "Agent"), Y = (e) => e.detail.publicText ?? e.detail.recordedClaim ?? "", X = (e, t) => JSON.stringify([e, t]);
|
|
2527
|
+
function Z(e) {
|
|
2528
|
+
let t = e.detail.publicToolCalls ?? [], n = new Map(t.map((e) => [e.id, e]));
|
|
2529
|
+
return [.../* @__PURE__ */ new Set([...e.detail.toolCallIds ?? [], ...t.map((e) => e.id)])].map((t) => n.get(t) ?? {
|
|
2530
|
+
id: t,
|
|
2531
|
+
name: e.detail.toolNames?.length === 1 ? e.detail.toolNames[0] : "Tool call"
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
var vr = (e) => e.replace(/^[a-z0-9][\w.-]*-\d{8}[a-z]?:/i, "");
|
|
2535
|
+
function yr(e) {
|
|
2536
|
+
if (e.input === void 0) return "args not captured";
|
|
2537
|
+
try {
|
|
2538
|
+
let t = JSON.parse(e.input);
|
|
2539
|
+
if (t && typeof t == "object" && !Array.isArray(t)) {
|
|
2540
|
+
let e = t;
|
|
2541
|
+
for (let t of [
|
|
2542
|
+
"command",
|
|
2543
|
+
"cmd",
|
|
2544
|
+
"filePath",
|
|
2545
|
+
"file_path",
|
|
2546
|
+
"path",
|
|
2547
|
+
"query",
|
|
2548
|
+
"question",
|
|
2549
|
+
"pattern",
|
|
2550
|
+
"url",
|
|
2551
|
+
"pageId",
|
|
2552
|
+
"title",
|
|
2553
|
+
"task",
|
|
2554
|
+
"prompt",
|
|
2555
|
+
"message"
|
|
2556
|
+
]) if (typeof e[t] == "string" && e[t]) return K(vr(e[t]));
|
|
2557
|
+
let n = Object.values(e).filter((e) => [
|
|
2558
|
+
"string",
|
|
2559
|
+
"number",
|
|
2560
|
+
"boolean"
|
|
2561
|
+
].includes(typeof e));
|
|
2562
|
+
if (n.length) return K(n.map((e) => vr(String(e))).join(" · "));
|
|
2563
|
+
}
|
|
2564
|
+
} catch {}
|
|
2565
|
+
return K(e.input);
|
|
2566
|
+
}
|
|
2567
|
+
function br(e) {
|
|
2568
|
+
let t = e.nodes, n = e.events, r = new Map(t.map((e) => [e.id, e])), i = (e) => r.get(e)?.agentId ?? e, a = t.filter((e) => e.kind !== "session" || !e.agentId), o = n.map((e) => hr(e)).sort((e, t) => W(e.at) - W(t.at)), s = new Map(o.map((e) => [e.id, e])), c = new Map(n.map((e, t) => [e.id, t])), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
2569
|
+
for (let e of o) {
|
|
2570
|
+
let t = i(e.node), n = l.get(t) ?? [];
|
|
2571
|
+
n.push(e), l.set(t, n);
|
|
2572
|
+
for (let t of Z(e)) {
|
|
2573
|
+
let n = X(e.node, t.id), r = d.get(n) ?? [];
|
|
2574
|
+
r.push({
|
|
2575
|
+
event: e,
|
|
2576
|
+
call: t
|
|
2577
|
+
}), d.set(n, r);
|
|
2578
|
+
}
|
|
2579
|
+
if (e.detail.toolCallId !== void 0) {
|
|
2580
|
+
let t = X(e.node, e.detail.toolCallId), n = u.get(t) ?? [];
|
|
2581
|
+
n.push(e), u.set(t, n);
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
let f = o.map((e) => W(e.at)), p = f[0] ?? 0;
|
|
2585
|
+
return {
|
|
2586
|
+
nodes: r,
|
|
2587
|
+
canonical: i,
|
|
2588
|
+
actors: a,
|
|
2589
|
+
events: o,
|
|
2590
|
+
byEvent: s,
|
|
2591
|
+
recordedOrder: c,
|
|
2592
|
+
byActor: l,
|
|
2593
|
+
calls: d,
|
|
2594
|
+
results: u,
|
|
2595
|
+
start: p,
|
|
2596
|
+
end: o.reduce((e, t) => Math.max(e, t.end ? W(t.end) : W(t.at)), f.at(-1) ?? p)
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
function xr(e, t) {
|
|
2600
|
+
return (e.byActor.get(t) ?? []).some((e) => typeof e.detail.costListUsd == "number" || Object.values(e.detail.usage ?? {}).some((e) => typeof e == "number" && e > 0));
|
|
2601
|
+
}
|
|
2602
|
+
function Sr(e, t, n) {
|
|
2603
|
+
if (!e?.status && n) return n === "running" ? "working" : n.replaceAll("-", " ");
|
|
2604
|
+
let r = e?.status ?? "no terminal state recorded";
|
|
2605
|
+
if (t) return r;
|
|
2606
|
+
let i = e?.capture?.status;
|
|
2607
|
+
return `${r} · no usage recorded${i === "absent" ? "; capture missing" : i === "lossy" ? "; capture partial" : ""}`;
|
|
2608
|
+
}
|
|
2609
|
+
function Cr(e, t, n, r) {
|
|
2610
|
+
return (r === "all" || r === "prompts" && (e.detail.promptKind === "initial" || e.detail.promptKind === "steering") || e.category === r || r === "findings" && (e.kind === "finding-record" || e.detail.recordedClaim !== void 0)) && (!n || JSON.stringify({
|
|
2611
|
+
label: e.label,
|
|
2612
|
+
node: t.nodes.get(t.canonical(e.node)),
|
|
2613
|
+
detail: e.detail
|
|
2614
|
+
}).toLowerCase().includes(n));
|
|
2615
|
+
}
|
|
2616
|
+
function wr(e, t, n) {
|
|
2617
|
+
let r = n.nodes.get(e.node);
|
|
2618
|
+
return {
|
|
2619
|
+
...e.source,
|
|
2620
|
+
runId: t.runId,
|
|
2621
|
+
at: e.at,
|
|
2622
|
+
observedNodeId: e.node,
|
|
2623
|
+
agentId: r?.kind === "agent" ? r.id : r?.agentId ?? null,
|
|
2624
|
+
nativeSessionId: r?.nativeSessionId ?? null,
|
|
2625
|
+
joinBasis: r?.joinBasis ?? null,
|
|
2626
|
+
joinProof: r?.joinProof ?? null
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
function Tr(e, t, n) {
|
|
2630
|
+
let r = [`${t.nodes.get(t.canonical(e.node))?.label ?? e.node} · ${G(e.at)}`, `${e.detail.role ?? e.kind}${e.detail.isError ? " · tool error" : e.detail.responseStatus === "error" ? " · request failed" : ""}`];
|
|
2631
|
+
if (W(e.at) > n) return [...r, "After the selected time. Select this event to advance."];
|
|
2632
|
+
let i = e.detail.usage;
|
|
2633
|
+
i && r.push(`Input ${i.input === void 0 ? "unknown" : J(i.input)} · output ${i.output === void 0 ? "unknown" : J(i.output)} · cache read ${i.cacheRead === void 0 ? "unknown" : J(i.cacheRead)} · cache write ${i.cacheWrite === void 0 ? "unknown" : J(i.cacheWrite)}`);
|
|
2634
|
+
let a = Y(e);
|
|
2635
|
+
a && r.push(a.slice(0, 220) + (a.length > 220 ? "…" : ""));
|
|
2636
|
+
for (let t of Z(e).slice(0, 3)) r.push(`${t.name}: ${yr(t).slice(0, 220)}`);
|
|
2637
|
+
return !a && !Z(e).length && e.detail.role && r.push(e.detail.contentOmitted ?? e.detail.publicationNote ?? "No text body is present in this record."), r;
|
|
2638
|
+
}
|
|
2639
|
+
function Er(e, t) {
|
|
2640
|
+
if (!e) return null;
|
|
2641
|
+
let n = [...new Set(t.nodes.filter((t) => t.agentId === e.id || t.id === e.id).map((e) => e.servedModel).filter((e) => !!e))];
|
|
2642
|
+
return n.length ? `${n.join(", ")} (served)` : e.model ? `${e.model} (declared; served model unknown)` : null;
|
|
2643
|
+
}
|
|
2644
|
+
function Dr(e, t, n) {
|
|
2645
|
+
let r = t.nodes.get(t.canonical(e.node)), i = e.detail.isError === !0 || e.detail.responseStatus === "error", a = e.detail.role ?? e.kind, o = e.label || a, s = [{
|
|
2646
|
+
kind: "header",
|
|
2647
|
+
value: `${r?.label ?? e.node} · ${G(e.at)}`,
|
|
2648
|
+
tone: "muted"
|
|
2649
|
+
}];
|
|
2650
|
+
if (W(e.at) > n) return s.push({
|
|
2651
|
+
kind: "note",
|
|
2652
|
+
value: "After the selected time. Select this event to advance."
|
|
2653
|
+
}), {
|
|
2654
|
+
title: o,
|
|
2655
|
+
category: a,
|
|
2656
|
+
tone: i ? "error" : "default",
|
|
2657
|
+
sections: s
|
|
2658
|
+
};
|
|
2659
|
+
e.detail.isError && s.push({
|
|
2660
|
+
kind: "status",
|
|
2661
|
+
value: "Tool error",
|
|
2662
|
+
tone: "error"
|
|
2663
|
+
}), e.detail.responseStatus === "error" && s.push({
|
|
2664
|
+
kind: "status",
|
|
2665
|
+
value: "Request failed",
|
|
2666
|
+
tone: "error"
|
|
2667
|
+
});
|
|
2668
|
+
let c = Y(e);
|
|
2669
|
+
c && s.push({
|
|
2670
|
+
kind: "body",
|
|
2671
|
+
value: c.slice(0, 200) + (c.length > 200 ? "…" : "")
|
|
2672
|
+
});
|
|
2673
|
+
let l = Z(e);
|
|
2674
|
+
for (let e of l.slice(0, 2)) s.push({
|
|
2675
|
+
kind: "body",
|
|
2676
|
+
label: e.name,
|
|
2677
|
+
value: yr(e).slice(0, 160)
|
|
2678
|
+
});
|
|
2679
|
+
let u = e.detail.usage;
|
|
2680
|
+
if (u && !e.detail.usageScope) {
|
|
2681
|
+
let e = [];
|
|
2682
|
+
u.input !== void 0 && e.push(`↑ ${J(u.input)}`), u.output !== void 0 && e.push(`↓ ${J(u.output)}`), u.cacheRead !== void 0 && e.push(`⟳ ${J(u.cacheRead)}`), u.cacheWrite !== void 0 && e.push(`→ ${J(u.cacheWrite)}`), e.length && s.push({
|
|
2683
|
+
kind: "usage",
|
|
2684
|
+
value: e.join(" "),
|
|
2685
|
+
tone: "accent"
|
|
2686
|
+
});
|
|
2687
|
+
}
|
|
2688
|
+
let d = e.detail.durationMs;
|
|
2689
|
+
return typeof d == "number" && s.push({
|
|
2690
|
+
kind: "status",
|
|
2691
|
+
value: `⏱ ${d < 1e3 ? `${d}ms` : `${(d / 1e3).toFixed(1)}s`}`,
|
|
2692
|
+
tone: "muted"
|
|
2693
|
+
}), {
|
|
2694
|
+
title: o,
|
|
2695
|
+
category: a,
|
|
2696
|
+
tone: i ? "error" : "default",
|
|
2697
|
+
sections: s
|
|
2698
|
+
};
|
|
2699
|
+
}
|
|
2700
|
+
function Or(e) {
|
|
2701
|
+
let t = e.source, n = e.detail.nativeRecordId;
|
|
2702
|
+
return typeof n == "string" && n ? JSON.stringify([
|
|
2703
|
+
e.node,
|
|
2704
|
+
"native",
|
|
2705
|
+
n,
|
|
2706
|
+
e.kind,
|
|
2707
|
+
t?.item ?? null
|
|
2708
|
+
]) : t?.path ? JSON.stringify([
|
|
2709
|
+
e.node,
|
|
2710
|
+
t.path,
|
|
2711
|
+
t.line ?? null,
|
|
2712
|
+
t.pointer ?? null,
|
|
2713
|
+
t.item ?? null
|
|
2714
|
+
]) : e.id;
|
|
2715
|
+
}
|
|
2716
|
+
function kr(e) {
|
|
2717
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
2718
|
+
for (let r of e) {
|
|
2719
|
+
let e = Or(r), i = t.get(e) ?? 0;
|
|
2720
|
+
t.set(e, i + 1), n.set(r.id, i ? `${e}#${i}` : e);
|
|
2721
|
+
}
|
|
2722
|
+
return n;
|
|
2723
|
+
}
|
|
2724
|
+
var Ar = (e) => e === void 0 || /^\s*(\{\s*\}|null)?\s*$/.test(e);
|
|
2725
|
+
function jr(e) {
|
|
2726
|
+
return e === void 0 ? "args not captured" : Ar(e) ? "empty args" : null;
|
|
2727
|
+
}
|
|
2728
|
+
function Mr(e, t) {
|
|
2729
|
+
switch (e) {
|
|
2730
|
+
case "error": return "Error";
|
|
2731
|
+
case "returned": return "Returned";
|
|
2732
|
+
case "pending": return "Not returned";
|
|
2733
|
+
case "ambiguous": return "Ambiguous";
|
|
2734
|
+
default: return t ? "Pending" : "Result not captured";
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
function Nr(e) {
|
|
2738
|
+
let t = e.usage;
|
|
2739
|
+
return typeof t?.output == "number" && Number.isFinite(t.output) ? t.output : null;
|
|
2740
|
+
}
|
|
2741
|
+
function Pr(e) {
|
|
2742
|
+
let t = Nr(e);
|
|
2743
|
+
return t !== null && t < 2e3;
|
|
2744
|
+
}
|
|
2745
|
+
function Q(e) {
|
|
2746
|
+
let t = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 ? Math.floor(e) : 0, n = t(e.reasoningOmitted), r = t(e.reasoningRedacted), i = [];
|
|
2747
|
+
return n && i.push(n === 1 ? "thinking not returned by provider" : `${n} thinking blocks not returned by provider`), r && i.push(r === 1 ? "thinking redacted (encrypted)" : `${r} thinking blocks redacted (encrypted)`), i;
|
|
2748
|
+
}
|
|
2749
|
+
var Fr = /await|wait|poll|sleep|observe|status/i;
|
|
2750
|
+
function Ir(e) {
|
|
2751
|
+
if (typeof e != "string" || !e.trimStart().startsWith("{")) return !1;
|
|
2752
|
+
try {
|
|
2753
|
+
let t = JSON.parse(e);
|
|
2754
|
+
return !!t && typeof t == "object" && !Array.isArray(t) && t.pending === !0;
|
|
2755
|
+
} catch {
|
|
2756
|
+
return !1;
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
var Lr = (e) => (e ?? []).some((e) => !Ir(e.detail.publicText));
|
|
2760
|
+
function Rr(e, t, n) {
|
|
2761
|
+
let r = e.detail;
|
|
2762
|
+
if (r.role !== "assistant" || e.category === "lifecycle" || r.lifecycle !== void 0 || r.publicText || r.recordedClaim || r.reasoning || r.responseStatus === "error" || r.contentOmitted || r.publicationNote || r.clip || Q(r).length || t.length !== 1) return null;
|
|
2763
|
+
let i = t[0];
|
|
2764
|
+
return i.clip || i.publicationNote || n(i.id) || !Ar(i.input) && !Fr.test(i.name) ? null : i;
|
|
2765
|
+
}
|
|
2766
|
+
function zr(e, t, n) {
|
|
2767
|
+
let r = e.detail;
|
|
2768
|
+
return r.role !== "assistant" || e.category === "lifecycle" || r.lifecycle !== void 0 || r.publicText || r.recordedClaim || r.reasoning || r.responseStatus === "error" || r.contentOmitted || r.publicationNote || r.clip || Q(r).length || !t.length || t.some((t) => t.input !== void 0 || t.clip || t.publicationNote || n(e, t.id)) ? null : t;
|
|
2769
|
+
}
|
|
2770
|
+
function Br(e, t, n, r, i = 2) {
|
|
2771
|
+
let a = [], o = null, s = () => {
|
|
2772
|
+
o && a.push(...o.rows.length >= i ? [r(o.rows.map((e) => e.event), o.value)] : o.rows), o = null;
|
|
2773
|
+
};
|
|
2774
|
+
for (let r of e) {
|
|
2775
|
+
let e = r.kind === "event" ? t(r.event) : null;
|
|
2776
|
+
if (e === null) {
|
|
2777
|
+
s(), a.push(r);
|
|
2778
|
+
continue;
|
|
2779
|
+
}
|
|
2780
|
+
o && !n(o.value, e) && s(), o ??= {
|
|
2781
|
+
rows: [],
|
|
2782
|
+
value: e
|
|
2783
|
+
}, o.rows.push(r);
|
|
2784
|
+
}
|
|
2785
|
+
return s(), a;
|
|
2786
|
+
}
|
|
2787
|
+
function Vr(e, { callsOf: t, captured: n, keyOf: r, min: i = 2 }) {
|
|
2788
|
+
return Br(e, (e) => zr(e, t(e), n), () => !0, (e) => {
|
|
2789
|
+
let n = /* @__PURE__ */ new Map();
|
|
2790
|
+
for (let r of e) for (let e of t(r)) n.set(e.name, (n.get(e.name) ?? 0) + 1);
|
|
2791
|
+
let i = e.map((e) => Date.parse(e.at)).filter(Number.isFinite);
|
|
2792
|
+
return {
|
|
2793
|
+
kind: "hollow",
|
|
2794
|
+
key: `hollow:${r(e[0])}`,
|
|
2795
|
+
events: e,
|
|
2796
|
+
calls: [...n].map(([e, t]) => ({
|
|
2797
|
+
name: e,
|
|
2798
|
+
count: t
|
|
2799
|
+
})),
|
|
2800
|
+
spanMs: i.length > 1 ? Math.max(...i) - Math.min(...i) : 0
|
|
2801
|
+
};
|
|
2802
|
+
}, i);
|
|
2803
|
+
}
|
|
2804
|
+
function Hr(e) {
|
|
2805
|
+
let t = e.reduce((e, t) => e + t.count, 0);
|
|
2806
|
+
return `${t} tool call${t === 1 ? "" : "s"} · ${e.map((e) => e.count > 1 ? `${e.name} ×${e.count}` : e.name).join(" · ")}`;
|
|
2807
|
+
}
|
|
2808
|
+
function Ur(e, { callsOf: t, answered: n, keyOf: r, min: i = 2 }) {
|
|
2809
|
+
return Br(e.map((e) => ({
|
|
2810
|
+
kind: "event",
|
|
2811
|
+
key: r(e),
|
|
2812
|
+
event: e
|
|
2813
|
+
})), (e) => Rr(e, t(e), (t) => n(e, t)), (e, t) => e.name === t.name && (Ar(e.input) ? "" : e.input.trim()) === (Ar(t.input) ? "" : t.input.trim()), (e, t) => ({
|
|
2814
|
+
kind: "polls",
|
|
2815
|
+
key: `polls:${r(e[0])}`,
|
|
2816
|
+
name: t.name,
|
|
2817
|
+
input: t.input,
|
|
2818
|
+
events: e
|
|
2819
|
+
}), i);
|
|
2820
|
+
}
|
|
2821
|
+
function Wr(e, t) {
|
|
2822
|
+
return Br(e, (e) => {
|
|
2823
|
+
let n = e.detail;
|
|
2824
|
+
if (n.role !== "assistant" || e.category === "lifecycle" || n.lifecycle || n.reasoning || n.recordedClaim || n.responseStatus === "error" || n.isError || n.contentOmitted || n.publicationNote || n.clip || Q(n).length || t(e).length) return null;
|
|
2825
|
+
let r = typeof n.publicText == "string" ? n.publicText.trim() : "";
|
|
2826
|
+
return r.length <= 280 && /\b(waiting|ending the turn|end turn|no new updates|nothing new)\b/i.test(r) ? r : null;
|
|
2827
|
+
}, (e, t) => e === t, (e) => ({
|
|
2828
|
+
kind: "idle",
|
|
2829
|
+
key: `idle:${Or(e[0])}`,
|
|
2830
|
+
events: e
|
|
2831
|
+
}));
|
|
2832
|
+
}
|
|
2833
|
+
function Gr(e) {
|
|
2834
|
+
let t = Math.max(0, Math.round(e / 1e3));
|
|
2835
|
+
if (t < 60) return `${t}s`;
|
|
2836
|
+
let n = Math.floor(t / 60);
|
|
2837
|
+
return n < 60 ? `${n}m ${t % 60}s` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
2838
|
+
}
|
|
2839
|
+
function Kr(e) {
|
|
2840
|
+
let t = e.map((e) => Date.parse(e.at)).filter(Number.isFinite), n = t.length ? Math.max(...t) - Math.min(...t) : 0, r = 0, i = 0;
|
|
2841
|
+
for (let t of e) {
|
|
2842
|
+
let e = t.detail.usage;
|
|
2843
|
+
if (!e || t.detail.usageScope !== void 0) continue;
|
|
2844
|
+
let n = [
|
|
2845
|
+
e.input,
|
|
2846
|
+
e.output,
|
|
2847
|
+
e.cacheRead,
|
|
2848
|
+
e.cacheWrite
|
|
2849
|
+
].filter((e) => typeof e == "number");
|
|
2850
|
+
n.length && (i++, r += n.reduce((e, t) => e + t, 0));
|
|
2851
|
+
}
|
|
2852
|
+
let a = new Intl.NumberFormat("en-US", {
|
|
2853
|
+
notation: "compact",
|
|
2854
|
+
maximumFractionDigits: 1
|
|
2855
|
+
}), o = i ? i < e.length ? `~${a.format(r)} tokens (${i} of ${e.length} measured)` : `~${a.format(r)} tokens` : "tokens unknown";
|
|
2856
|
+
return {
|
|
2857
|
+
polls: e.length,
|
|
2858
|
+
spanMs: n,
|
|
2859
|
+
tokens: i ? r : null,
|
|
2860
|
+
measured: i,
|
|
2861
|
+
label: `waited ${Gr(n)} · ${e.length} polls · ${o}`
|
|
2862
|
+
};
|
|
2863
|
+
}
|
|
2864
|
+
function qr(e) {
|
|
2865
|
+
let t = e.indexOf("[user] "), n = e.startsWith("[system] ") && t >= 0 ? e.slice(t + 7).trim() : e.trim();
|
|
2866
|
+
if (!n.startsWith("{")) return n;
|
|
2867
|
+
try {
|
|
2868
|
+
let e = JSON.parse(n), t = ["objective", "instruction"].map((t) => e[t]).filter((e) => typeof e == "string" && e.trim().length > 0);
|
|
2869
|
+
return t.length ? t.join("\n\n") : n;
|
|
2870
|
+
} catch {
|
|
2871
|
+
return n;
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
var $ = (e) => e.category === "lifecycle" || e.detail.lifecycle !== void 0, Jr = (e) => new Intl.NumberFormat("en-US", {
|
|
2875
|
+
notation: "compact",
|
|
2876
|
+
maximumFractionDigits: 1
|
|
2877
|
+
}).format(e), Yr = (e) => {
|
|
2878
|
+
let t = Math.round(e / 1e3);
|
|
2879
|
+
if (t < 60) return `${t} s`;
|
|
2880
|
+
let n = Math.floor(t / 60);
|
|
2881
|
+
return n < 60 ? `${n} m ${t % 60} s` : `${Math.floor(n / 60)} h ${n % 60} m`;
|
|
2882
|
+
};
|
|
2883
|
+
function Xr({ item: e, previous: t }) {
|
|
2884
|
+
let n = e.part, r = n.state.metadata?.costUsd, i = n.state.time, a = Lt(n.tool), o = n.state.status === "error" ? "var(--surface-danger-text)" : [
|
|
2885
|
+
"command",
|
|
2886
|
+
"write",
|
|
2887
|
+
"edit"
|
|
2888
|
+
].includes(a) ? "var(--tone-teal-icon)" : "var(--accent-text)";
|
|
2889
|
+
return /* @__PURE__ */ (0, k.jsxs)(At, { children: [/* @__PURE__ */ (0, k.jsx)(jt, {
|
|
2890
|
+
asChild: !0,
|
|
2891
|
+
children: /* @__PURE__ */ (0, k.jsx)("div", {
|
|
2892
|
+
className: "record-tool-row rounded-[var(--radius-control)] border-l-2 border-l-[var(--record-tool-tone)] bg-[color-mix(in_srgb,var(--record-tool-tone)_7%,transparent)] px-1.5 py-0.5 hover:bg-[color-mix(in_srgb,var(--record-tool-tone)_14%,transparent)] focus-within:bg-[color-mix(in_srgb,var(--record-tool-tone)_14%,transparent)]",
|
|
2893
|
+
style: { "--record-tool-tone": o },
|
|
2894
|
+
"data-tool-category": a,
|
|
2895
|
+
"data-tool-status": n.state.status,
|
|
2896
|
+
children: /* @__PURE__ */ (0, k.jsx)(U, {
|
|
2897
|
+
item: e,
|
|
2898
|
+
previous: t,
|
|
2899
|
+
renderToolActions: ri
|
|
2900
|
+
})
|
|
2901
|
+
})
|
|
2902
|
+
}), /* @__PURE__ */ (0, k.jsxs)(Mt, {
|
|
2903
|
+
className: "record-tool-preview w-[min(640px,calc(100vw-32px))] max-h-[min(70vh,620px)] overflow-auto text-sm [&_pre]:text-[13px] [&_code]:text-[13px]",
|
|
2904
|
+
side: "top",
|
|
2905
|
+
collisionPadding: 16,
|
|
2906
|
+
children: [
|
|
2907
|
+
/* @__PURE__ */ (0, k.jsx)("strong", { children: e.call.label }),
|
|
2908
|
+
/* @__PURE__ */ (0, k.jsxs)("dl", {
|
|
2909
|
+
className: "my-2 grid grid-cols-[auto_1fr] gap-x-4 gap-y-1",
|
|
2910
|
+
children: [
|
|
2911
|
+
/* @__PURE__ */ (0, k.jsx)("dt", { children: "Duration" }),
|
|
2912
|
+
/* @__PURE__ */ (0, k.jsx)("dd", {
|
|
2913
|
+
className: "m-0 text-right",
|
|
2914
|
+
children: i?.end != null && i.start != null ? Yr(i.end - i.start) : "Not recorded"
|
|
2915
|
+
}),
|
|
2916
|
+
/* @__PURE__ */ (0, k.jsx)("dt", { children: "Cost" }),
|
|
2917
|
+
/* @__PURE__ */ (0, k.jsx)("dd", {
|
|
2918
|
+
className: "m-0 text-right",
|
|
2919
|
+
children: typeof r == "number" ? `$${r.toFixed(4)}` : "Not recorded"
|
|
2920
|
+
})
|
|
2921
|
+
]
|
|
2922
|
+
}),
|
|
2923
|
+
/* @__PURE__ */ (0, k.jsx)(wn, { part: n })
|
|
2924
|
+
]
|
|
2925
|
+
})] });
|
|
2926
|
+
}
|
|
2927
|
+
var Zr = /* @__PURE__ */ new Set([
|
|
2928
|
+
"bash",
|
|
2929
|
+
"shell",
|
|
2930
|
+
"command",
|
|
2931
|
+
"execute",
|
|
2932
|
+
"write",
|
|
2933
|
+
"write_file",
|
|
2934
|
+
"create_file",
|
|
2935
|
+
"edit",
|
|
2936
|
+
"patch",
|
|
2937
|
+
"read",
|
|
2938
|
+
"read_file",
|
|
2939
|
+
"cat",
|
|
2940
|
+
"grep",
|
|
2941
|
+
"search",
|
|
2942
|
+
"rg",
|
|
2943
|
+
"glob",
|
|
2944
|
+
"find",
|
|
2945
|
+
"ls",
|
|
2946
|
+
"web_search",
|
|
2947
|
+
"web_fetch",
|
|
2948
|
+
"fetch",
|
|
2949
|
+
"task",
|
|
2950
|
+
"agent",
|
|
2951
|
+
"spawn"
|
|
2952
|
+
]), Qr = {
|
|
2953
|
+
bash: "bash",
|
|
2954
|
+
shell: "bash",
|
|
2955
|
+
command: "bash",
|
|
2956
|
+
execute: "bash",
|
|
2957
|
+
read: "read",
|
|
2958
|
+
read_file: "read",
|
|
2959
|
+
cat: "read",
|
|
2960
|
+
write: "write",
|
|
2961
|
+
write_file: "write",
|
|
2962
|
+
create_file: "write",
|
|
2963
|
+
edit: "edit",
|
|
2964
|
+
patch: "edit",
|
|
2965
|
+
grep: "grep",
|
|
2966
|
+
search: "grep",
|
|
2967
|
+
rg: "grep",
|
|
2968
|
+
glob: "glob",
|
|
2969
|
+
find: "glob",
|
|
2970
|
+
ls: "list"
|
|
2971
|
+
}, $r = (e) => (e.startsWith("mcp__") && e.slice(e.lastIndexOf("__") + 2) || e).replace(/^agent-runtime-/, ""), ei = (e) => {
|
|
2972
|
+
if (e !== void 0) try {
|
|
2973
|
+
let t = JSON.parse(e);
|
|
2974
|
+
return t && typeof t == "object" ? t : e;
|
|
2975
|
+
} catch {
|
|
2976
|
+
return e;
|
|
2977
|
+
}
|
|
2978
|
+
}, ti = (e) => {
|
|
2979
|
+
let t = e;
|
|
2980
|
+
try {
|
|
2981
|
+
let n = JSON.parse(e), r = typeof n?.error == "string" ? n.error : typeof n?.message == "string" ? n.message : void 0;
|
|
2982
|
+
r && (t = r);
|
|
2983
|
+
} catch {}
|
|
2984
|
+
return K(t.split("\n").find((e) => e.trim()) ?? "").slice(0, 200);
|
|
2985
|
+
};
|
|
2986
|
+
function ni(e, t, n, r, i, a, o) {
|
|
2987
|
+
let s = $r(t.name), c = n ? Y(n) || n.detail.contentOmitted || "" : void 0, l = r === "error" ? "error" : r === "pending" || r === "missing" && a ? "running" : "completed", u = r === "ambiguous" || r === "missing" && !a ? Mr(r, a) : void 0, d = {
|
|
2988
|
+
type: "tool",
|
|
2989
|
+
id: e,
|
|
2990
|
+
tool: s,
|
|
2991
|
+
state: {
|
|
2992
|
+
status: l,
|
|
2993
|
+
input: ei(t.input),
|
|
2994
|
+
...c === void 0 ? {} : { output: c },
|
|
2995
|
+
...l === "error" ? { error: ti(c ?? "") || "The call failed." } : {},
|
|
2996
|
+
...i !== null && i >= 0 ? { time: {
|
|
2997
|
+
start: 0,
|
|
2998
|
+
end: i
|
|
2999
|
+
} } : {},
|
|
3000
|
+
metadata: {
|
|
3001
|
+
...u ? { note: u } : {},
|
|
3002
|
+
...typeof n?.detail.costListUsd == "number" ? { costUsd: n.detail.costListUsd } : {}
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
}, f = Zr.has(s.toLowerCase()), p = Rt(d), m = jr(t.input) ?? (p.description || (f ? void 0 : yr(t))), h = {
|
|
3006
|
+
id: e,
|
|
3007
|
+
kind: "tool",
|
|
3008
|
+
part: d,
|
|
3009
|
+
call: {
|
|
3010
|
+
id: e,
|
|
3011
|
+
type: Qr[s.toLowerCase()] ?? "unknown",
|
|
3012
|
+
label: f ? p.title : s.replaceAll("_", " "),
|
|
3013
|
+
status: l === "error" ? "error" : l === "running" ? "running" : "success",
|
|
3014
|
+
...m ? { detail: m } : {},
|
|
3015
|
+
...i !== null && i >= 0 ? { duration: i } : {}
|
|
3016
|
+
}
|
|
3017
|
+
}, g = ii(n?.detail.clip);
|
|
3018
|
+
return n && g ? [h, {
|
|
3019
|
+
id: `${e}:clip`,
|
|
3020
|
+
kind: "custom",
|
|
3021
|
+
content: /* @__PURE__ */ (0, k.jsx)(ai, {
|
|
3022
|
+
clip: g,
|
|
3023
|
+
open: o(n)
|
|
3024
|
+
})
|
|
3025
|
+
}] : [h];
|
|
3026
|
+
}
|
|
3027
|
+
var ri = (e) => {
|
|
3028
|
+
let t = e.state.metadata?.note;
|
|
3029
|
+
return t ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
3030
|
+
className: "tool-note",
|
|
3031
|
+
children: t
|
|
3032
|
+
}) : null;
|
|
3033
|
+
}, ii = (e) => e && typeof e == "object" && "bytes" in e ? e : void 0;
|
|
3034
|
+
function ai({ clip: e, open: t }) {
|
|
3035
|
+
return e ? /* @__PURE__ */ (0, k.jsxs)("p", {
|
|
3036
|
+
className: "clip-note",
|
|
3037
|
+
children: [/* @__PURE__ */ (0, k.jsxs)("span", { children: [new Intl.NumberFormat("en-US").format(e.bytes), " bytes, middle omitted."] }), e.sha256 && t ? /* @__PURE__ */ (0, k.jsx)("button", {
|
|
3038
|
+
type: "button",
|
|
3039
|
+
className: "link-button",
|
|
3040
|
+
"data-load-full": e.sha256,
|
|
3041
|
+
onClick: () => t(e.sha256),
|
|
3042
|
+
children: "Full output"
|
|
3043
|
+
}) : null]
|
|
3044
|
+
}) : null;
|
|
3045
|
+
}
|
|
3046
|
+
function oi(e) {
|
|
3047
|
+
let t = Kr(e.events), n = jr(e.input) ?? K(e.input ?? "");
|
|
3048
|
+
return {
|
|
3049
|
+
id: e.key,
|
|
3050
|
+
kind: "custom",
|
|
3051
|
+
content: /* @__PURE__ */ (0, k.jsx)(V, {
|
|
3052
|
+
icon: /* @__PURE__ */ (0, k.jsx)(Ve, {
|
|
3053
|
+
size: 14,
|
|
3054
|
+
"aria-hidden": "true"
|
|
3055
|
+
}),
|
|
3056
|
+
title: $r(e.name),
|
|
3057
|
+
description: [t.label, n].filter(Boolean).join(" · "),
|
|
3058
|
+
descriptionMono: !0,
|
|
3059
|
+
children: /* @__PURE__ */ (0, k.jsx)("ol", {
|
|
3060
|
+
className: "poll-calls",
|
|
3061
|
+
children: e.events.map((e) => /* @__PURE__ */ (0, k.jsxs)("li", {
|
|
3062
|
+
"data-message": e.id,
|
|
3063
|
+
children: [/* @__PURE__ */ (0, k.jsx)("time", {
|
|
3064
|
+
dateTime: e.at,
|
|
3065
|
+
children: G(e.at)
|
|
3066
|
+
}), /* @__PURE__ */ (0, k.jsx)("span", {
|
|
3067
|
+
className: "mono",
|
|
3068
|
+
children: jr(Z(e)[0]?.input) ?? K(Z(e)[0]?.input ?? "")
|
|
3069
|
+
})]
|
|
3070
|
+
}, e.id))
|
|
3071
|
+
})
|
|
3072
|
+
})
|
|
3073
|
+
};
|
|
3074
|
+
}
|
|
3075
|
+
var si = (e) => ({
|
|
3076
|
+
id: e.key,
|
|
3077
|
+
kind: "custom",
|
|
3078
|
+
content: /* @__PURE__ */ (0, k.jsx)(V, {
|
|
3079
|
+
icon: /* @__PURE__ */ (0, k.jsx)(ze, {
|
|
3080
|
+
size: 14,
|
|
3081
|
+
"aria-hidden": "true"
|
|
3082
|
+
}),
|
|
3083
|
+
title: Hr(e.calls),
|
|
3084
|
+
description: "args not captured",
|
|
3085
|
+
durationMs: e.spanMs || void 0
|
|
3086
|
+
})
|
|
3087
|
+
});
|
|
3088
|
+
function ci(e, t) {
|
|
3089
|
+
if (e.kind === "polls") return [oi(e)];
|
|
3090
|
+
if (e.kind === "hollow") return [si(e)];
|
|
3091
|
+
if (e.kind === "idle") return [{
|
|
3092
|
+
id: `${e.key}:${t.selected ?? ""}`,
|
|
3093
|
+
kind: "fold",
|
|
3094
|
+
summary: `${e.events.length} idle turns · ${Y(e.events[0])}`,
|
|
3095
|
+
defaultOpen: e.events.some((e) => e.id === t.selected),
|
|
3096
|
+
items: e.events.map((e) => ({
|
|
3097
|
+
id: e.id,
|
|
3098
|
+
kind: "custom",
|
|
3099
|
+
content: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3100
|
+
className: "ar-idle-event",
|
|
3101
|
+
"data-message": e.id,
|
|
3102
|
+
children: [/* @__PURE__ */ (0, k.jsx)("time", {
|
|
3103
|
+
dateTime: e.at,
|
|
3104
|
+
children: G(e.at)
|
|
3105
|
+
}), /* @__PURE__ */ (0, k.jsx)(U, { item: {
|
|
3106
|
+
id: e.id,
|
|
3107
|
+
kind: "message",
|
|
3108
|
+
role: "assistant",
|
|
3109
|
+
content: Y(e)
|
|
3110
|
+
} })]
|
|
3111
|
+
})
|
|
3112
|
+
}))
|
|
3113
|
+
}];
|
|
3114
|
+
let { index: n, cutoff: r, anchor: i, thinkingSpan: a, opened: o, paired: s, live: c } = t, l = e.event;
|
|
3115
|
+
if ($(l)) {
|
|
3116
|
+
let e = Y(l);
|
|
3117
|
+
return [{
|
|
3118
|
+
id: l.id,
|
|
3119
|
+
kind: "custom",
|
|
3120
|
+
content: /* @__PURE__ */ (0, k.jsxs)("p", {
|
|
3121
|
+
className: `lifecycle-note${l.detail.isError ? " lifecycle-error" : ""}`,
|
|
3122
|
+
children: [/* @__PURE__ */ (0, k.jsx)("b", { children: l.label }), e && /* @__PURE__ */ (0, k.jsx)("span", { children: K(e).slice(0, 280) })]
|
|
3123
|
+
})
|
|
3124
|
+
}];
|
|
3125
|
+
}
|
|
3126
|
+
let u = Y(l), d = Z(l), f = typeof l.detail.reasoning == "string" ? l.detail.reasoning : "", p = Q(l.detail), m = l.detail.responseStatus === "error", h = l.detail.recordedClaim !== void 0, g = l.detail.toolCallId !== void 0 || l.detail.role === "toolResult";
|
|
3127
|
+
if (l.detail.role === "user" && u && !g) {
|
|
3128
|
+
let e = qr(u), t = e.length > 280 && !o.has(`prompt:${i(l)}`);
|
|
3129
|
+
return [{
|
|
3130
|
+
id: l.id,
|
|
3131
|
+
kind: "message",
|
|
3132
|
+
role: "user",
|
|
3133
|
+
content: t ? `${e.slice(0, 280).trimEnd()}…` : e,
|
|
3134
|
+
timestamp: new Date(l.at)
|
|
3135
|
+
}];
|
|
3136
|
+
}
|
|
3137
|
+
let _ = [];
|
|
3138
|
+
if (f && _.push({
|
|
3139
|
+
id: `${l.id}:reasoning`,
|
|
3140
|
+
kind: "custom",
|
|
3141
|
+
content: /* @__PURE__ */ (0, k.jsx)(jn, {
|
|
3142
|
+
part: {
|
|
3143
|
+
type: "reasoning",
|
|
3144
|
+
text: f
|
|
3145
|
+
},
|
|
3146
|
+
autoCollapse: !1
|
|
3147
|
+
})
|
|
3148
|
+
}), p.length) {
|
|
3149
|
+
let e = Nr(l.detail), t = a.get(l.id), n = e === null ? p.join(" · ") : `${t !== void 0 && t >= 1e3 ? `for ${Yr(t)} · ` : ""}${Jr(e)} output tokens · ${p.join(" · ")}`;
|
|
3150
|
+
_.push({
|
|
3151
|
+
id: `${l.id}:thinking`,
|
|
3152
|
+
kind: "custom",
|
|
3153
|
+
content: /* @__PURE__ */ (0, k.jsx)("span", {
|
|
3154
|
+
"data-thinking-withheld": !0,
|
|
3155
|
+
children: /* @__PURE__ */ (0, k.jsx)(V, {
|
|
3156
|
+
icon: /* @__PURE__ */ (0, k.jsx)(ye, {
|
|
3157
|
+
size: 14,
|
|
3158
|
+
"aria-hidden": "true"
|
|
3159
|
+
}),
|
|
3160
|
+
title: "Thought",
|
|
3161
|
+
description: n
|
|
3162
|
+
})
|
|
3163
|
+
})
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3166
|
+
if (m) _.push({
|
|
3167
|
+
id: l.id,
|
|
3168
|
+
kind: "status",
|
|
3169
|
+
tone: "error",
|
|
3170
|
+
label: "The request failed",
|
|
3171
|
+
detail: u ? K(u).slice(0, 400) : "No assistant response is present in this record."
|
|
3172
|
+
});
|
|
3173
|
+
else if (h) _.push({
|
|
3174
|
+
id: l.id,
|
|
3175
|
+
kind: "status",
|
|
3176
|
+
tone: "info",
|
|
3177
|
+
label: "Recorded finding",
|
|
3178
|
+
detail: K(u).slice(0, 600)
|
|
3179
|
+
});
|
|
3180
|
+
else if (g) {
|
|
3181
|
+
let e = l.detail.toolCallId !== void 0 && (n.calls.get(X(l.node, l.detail.toolCallId))?.length ?? 0) > 1;
|
|
3182
|
+
_.push(...ni(l.id, {
|
|
3183
|
+
id: l.id,
|
|
3184
|
+
name: l.label || "Tool result"
|
|
3185
|
+
}, l, e ? "ambiguous" : l.detail.isError ? "error" : "returned", null, c, t.opener));
|
|
3186
|
+
} else u ? _.push({
|
|
3187
|
+
id: l.id,
|
|
3188
|
+
kind: "message",
|
|
3189
|
+
role: "assistant",
|
|
3190
|
+
content: u
|
|
3191
|
+
}) : !d.length && !f && !p.length && _.push({
|
|
3192
|
+
id: l.id,
|
|
3193
|
+
kind: "status",
|
|
3194
|
+
label: l.detail.contentOmitted ?? "No text body is present in this record."
|
|
3195
|
+
});
|
|
3196
|
+
let v = i(l);
|
|
3197
|
+
for (let e of d) {
|
|
3198
|
+
let i = s(l, e), a = i.filter((e) => W(e.at) <= r).at(-1), o = (n.calls.get(X(l.node, e.id))?.length ?? 0) > 1 ? "ambiguous" : a ? a.detail.isError ? "error" : "returned" : i.some((e) => W(e.at) > r) ? "pending" : "missing", u = (typeof a?.detail.durationMs == "number" ? a.detail.durationMs : null) ?? (a && a.detail.atBasis !== "carried" ? W(a.at) - W(l.at) : null);
|
|
3199
|
+
_.push(...ni(`tool:${v}:${e.id}`, e, a, o, u, c, t.opener));
|
|
3200
|
+
}
|
|
3201
|
+
return _;
|
|
3202
|
+
}
|
|
3203
|
+
var li = (e) => e.length ? H(e[e.length - 1]) : void 0;
|
|
3204
|
+
function ui({ row: e, items: t, previous: n, turn: r, context: i }) {
|
|
3205
|
+
let { selected: a, opened: o, anchor: s, setOpen: c, flagMarks: l, opener: u, flags: d } = i, f = e.kind === "event" ? [e.event] : e.events, p = f[0], m = /* @__PURE__ */ (0, k.jsxs)(k.Fragment, { children: [r && /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3206
|
+
className: "ar-turn",
|
|
3207
|
+
"data-turn-start": !0,
|
|
3208
|
+
children: [/* @__PURE__ */ (0, k.jsx)(dr, { speaker: {
|
|
3209
|
+
id: p.node,
|
|
3210
|
+
name: i.index.nodes.get(p.node)?.label ?? "Agent"
|
|
3211
|
+
} }), /* @__PURE__ */ (0, k.jsx)("time", {
|
|
3212
|
+
dateTime: p.at,
|
|
3213
|
+
title: p.at,
|
|
3214
|
+
children: G(p.at)
|
|
3215
|
+
})]
|
|
3216
|
+
}), t.map((e, r) => e.kind === "tool" && e.part ? /* @__PURE__ */ (0, k.jsx)(Xr, {
|
|
3217
|
+
item: e,
|
|
3218
|
+
previous: r ? H(t[r - 1]) : n
|
|
3219
|
+
}, e.id) : /* @__PURE__ */ (0, k.jsx)(U, {
|
|
3220
|
+
item: e,
|
|
3221
|
+
previous: r ? H(t[r - 1]) : n,
|
|
3222
|
+
renderToolActions: ri
|
|
3223
|
+
}, e.id))] }), h = {
|
|
3224
|
+
className: [
|
|
3225
|
+
"chat-row",
|
|
3226
|
+
f.some((e) => e.id === a) && "selected",
|
|
3227
|
+
e.kind === "event" && d?.has(p.id) && "flagged"
|
|
3228
|
+
].filter(Boolean).join(" "),
|
|
3229
|
+
"data-entry": p.id,
|
|
3230
|
+
title: G(p.at),
|
|
3231
|
+
...e.kind === "event" ? {
|
|
3232
|
+
"data-message": p.id,
|
|
3233
|
+
"data-message-node": p.node
|
|
3234
|
+
} : { [`data-${e.kind === "polls" ? "poll" : e.kind}-group`]: e.events.length }
|
|
3235
|
+
};
|
|
3236
|
+
if (e.kind !== "event" || $(p)) return /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3237
|
+
...h,
|
|
3238
|
+
children: [m, e.kind === "event" && l(p)]
|
|
3239
|
+
});
|
|
3240
|
+
let g = Y(p), _ = p.detail.toolCallId !== void 0 || p.detail.role === "toolResult", v = ii(p.detail.clip);
|
|
3241
|
+
if (p.detail.role === "user" && g && !_) {
|
|
3242
|
+
let e = `prompt:${s(p)}`, t = qr(g).length > 280, n = t && !o.has(e);
|
|
3243
|
+
return /* @__PURE__ */ (0, k.jsxs)("article", {
|
|
3244
|
+
...h,
|
|
3245
|
+
children: [
|
|
3246
|
+
m,
|
|
3247
|
+
t && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
3248
|
+
className: "ar-prompt-more",
|
|
3249
|
+
children: /* @__PURE__ */ (0, k.jsx)("button", {
|
|
3250
|
+
type: "button",
|
|
3251
|
+
className: "link-button",
|
|
3252
|
+
"data-open-key": e,
|
|
3253
|
+
"aria-expanded": !n,
|
|
3254
|
+
onClick: () => c(e, n),
|
|
3255
|
+
children: n ? "Full prompt" : "Shorter"
|
|
3256
|
+
})
|
|
3257
|
+
}),
|
|
3258
|
+
!n && /* @__PURE__ */ (0, k.jsx)(ai, {
|
|
3259
|
+
clip: v,
|
|
3260
|
+
open: u(p)
|
|
3261
|
+
}),
|
|
3262
|
+
l(p)
|
|
3263
|
+
]
|
|
3264
|
+
});
|
|
3265
|
+
}
|
|
3266
|
+
let y = p.detail.recordedClaim !== void 0, b = [p.detail.publicationNote, y ? p.detail.assessment : void 0].filter((e) => !!e);
|
|
3267
|
+
return /* @__PURE__ */ (0, k.jsxs)("article", {
|
|
3268
|
+
...h,
|
|
3269
|
+
children: [
|
|
3270
|
+
m,
|
|
3271
|
+
g && !_ && /* @__PURE__ */ (0, k.jsx)(ai, {
|
|
3272
|
+
clip: Z(p).length ? void 0 : v,
|
|
3273
|
+
open: u(p)
|
|
3274
|
+
}),
|
|
3275
|
+
b.map((e) => /* @__PURE__ */ (0, k.jsx)("p", {
|
|
3276
|
+
className: "publication-note",
|
|
3277
|
+
children: e
|
|
3278
|
+
}, e)),
|
|
3279
|
+
l(p)
|
|
3280
|
+
]
|
|
3281
|
+
});
|
|
3282
|
+
}
|
|
3283
|
+
function di({ index: e, actor: t, cutoff: n, query: r, category: i, selected: a, openSource: o, flags: s, onFlag: c, lifecycle: l = !1, live: u = !1, follow: d = u, opening: f }) {
|
|
3284
|
+
let [p, m] = (0, O.useState)(() => {
|
|
3285
|
+
let t = kr(e.events);
|
|
3286
|
+
return new Set(e.events.filter((e) => e.detail.promptKind === "initial").map((e) => `prompt:${t.get(e.id) ?? e.id}`));
|
|
3287
|
+
}), h = (0, O.useRef)(null), g = (0, O.useMemo)(() => kr(e.events), [e]), _ = (0, O.useCallback)((e) => g.get(e.id) ?? e.id, [g]), v = (e) => o ? (t) => o(t, e) : void 0, y = (e, t) => m((n) => {
|
|
3288
|
+
if (n.has(e) === t) return n;
|
|
3289
|
+
let r = new Set(n);
|
|
3290
|
+
return t ? r.add(e) : r.delete(e), r;
|
|
3291
|
+
}), b = (t, n) => {
|
|
3292
|
+
let r = X(t.node, n.id);
|
|
3293
|
+
return e.calls.get(r)?.length === 1 ? e.results.get(r) ?? [] : [];
|
|
3294
|
+
}, x = (0, O.useMemo)(() => {
|
|
3295
|
+
if (!a) return;
|
|
3296
|
+
let t = e.byEvent.get(a);
|
|
3297
|
+
if (t?.detail.toolCallId !== void 0) {
|
|
3298
|
+
let n = e.calls.get(X(t.node, t.detail.toolCallId));
|
|
3299
|
+
if (n?.length === 1) return n[0].event.id;
|
|
3300
|
+
}
|
|
3301
|
+
return a;
|
|
3302
|
+
}, [a, e]), S = (0, O.useMemo)(() => (e.byActor.get(t) ?? []).filter((t) => {
|
|
3303
|
+
if (W(t.at) > n) return !1;
|
|
3304
|
+
if (t.id === x) return !0;
|
|
3305
|
+
if ($(t)) return l && Cr(t, e, r, i);
|
|
3306
|
+
if (t.detail.toolCallId !== void 0) {
|
|
3307
|
+
let r = e.calls.get(X(t.node, t.detail.toolCallId));
|
|
3308
|
+
if (r?.length === 1 && W(r[0].event.at) <= n) return !1;
|
|
3309
|
+
}
|
|
3310
|
+
let a = Z(t);
|
|
3311
|
+
return !(t.detail.role || Y(t) || t.detail.reasoning || t.detail.responseStatus === "error" || a.length) || t.detail.role === "assistant" && !Y(t) && !t.detail.reasoning && !a.length && t.detail.responseStatus !== "error" && !t.detail.contentOmitted && (!Q(t.detail).length || Pr(t.detail)) ? !1 : Cr(t, e, r, i) ? !0 : a.some((a) => {
|
|
3312
|
+
let o = X(t.node, a.id);
|
|
3313
|
+
return e.calls.get(o)?.length === 1 && (e.results.get(o) ?? []).some((t) => W(t.at) <= n && Cr(t, e, r, i));
|
|
3314
|
+
});
|
|
3315
|
+
}), [
|
|
3316
|
+
e,
|
|
3317
|
+
t,
|
|
3318
|
+
n,
|
|
3319
|
+
r,
|
|
3320
|
+
i,
|
|
3321
|
+
l,
|
|
3322
|
+
x
|
|
3323
|
+
]), C = (0, O.useMemo)(() => {
|
|
3324
|
+
if (!f?.text || r || i !== "all" || S.some((e) => e.detail.role === "user" && e.detail.promptKind !== "steering")) return S;
|
|
3325
|
+
let e = S[0]?.at ?? f.at;
|
|
3326
|
+
return [{
|
|
3327
|
+
id: `${t}:opening`,
|
|
3328
|
+
node: t,
|
|
3329
|
+
at: e < f.at ? e : f.at,
|
|
3330
|
+
kind: "message",
|
|
3331
|
+
category: "other",
|
|
3332
|
+
label: "prompt",
|
|
3333
|
+
detail: {
|
|
3334
|
+
role: "user",
|
|
3335
|
+
publicText: f.text,
|
|
3336
|
+
promptKind: "initial"
|
|
3337
|
+
}
|
|
3338
|
+
}, ...S];
|
|
3339
|
+
}, [
|
|
3340
|
+
S,
|
|
3341
|
+
f,
|
|
3342
|
+
t,
|
|
3343
|
+
r,
|
|
3344
|
+
i
|
|
3345
|
+
]), w = (0, O.useMemo)(() => Wr(Vr(Ur(C, {
|
|
3346
|
+
callsOf: Z,
|
|
3347
|
+
answered: (t, n) => Lr(e.results.get(X(t.node, n))),
|
|
3348
|
+
keyOf: _
|
|
3349
|
+
}), {
|
|
3350
|
+
callsOf: Z,
|
|
3351
|
+
captured: (t, n) => (e.results.get(X(t.node, n)) ?? []).some((e) => Y(e)),
|
|
3352
|
+
keyOf: _
|
|
3353
|
+
}), Z), [
|
|
3354
|
+
C,
|
|
3355
|
+
e,
|
|
3356
|
+
_
|
|
3357
|
+
]), ee = (0, O.useMemo)(() => {
|
|
3358
|
+
let n = /* @__PURE__ */ new Map(), r = null;
|
|
3359
|
+
for (let i of e.byActor.get(t) ?? []) {
|
|
3360
|
+
let e = W(i.at);
|
|
3361
|
+
r !== null && Number.isFinite(e) && Q(i.detail).length && n.set(i.id, Math.max(0, e - r)), Number.isFinite(e) && (r = e);
|
|
3362
|
+
}
|
|
3363
|
+
return n;
|
|
3364
|
+
}, [e, t]), T = (0, O.useMemo)(() => {
|
|
3365
|
+
let e = /* @__PURE__ */ new Map();
|
|
3366
|
+
for (let t of w) if (t.kind !== "event") for (let n of t.events) e.set(n.id, t.key);
|
|
3367
|
+
else e.set(t.event.id, t.key);
|
|
3368
|
+
return e;
|
|
3369
|
+
}, [w]), te = (e.byActor.get(t) ?? []).some((e) => !$(e) && (e.detail.role || Y(e) || Z(e).length)), ne = (0, O.useRef)(x);
|
|
3370
|
+
ne.current = x;
|
|
3371
|
+
let E = (0, O.useRef)(!1), re = (0, O.useRef)(d);
|
|
3372
|
+
re.current = d, (0, O.useLayoutEffect)(() => {
|
|
3373
|
+
E.current = d && !ne.current, h.current && !ne.current && (h.current.scrollTop = d ? h.current.scrollHeight : 0);
|
|
3374
|
+
}, [t]), (0, O.useLayoutEffect)(() => {
|
|
3375
|
+
d || (E.current = !1);
|
|
3376
|
+
}, [d]), (0, O.useEffect)(() => {
|
|
3377
|
+
let e = h.current;
|
|
3378
|
+
if (!e) return;
|
|
3379
|
+
let t = () => {
|
|
3380
|
+
E.current = re.current && e.scrollHeight - e.scrollTop - e.clientHeight < 24;
|
|
3381
|
+
};
|
|
3382
|
+
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
3383
|
+
}, []);
|
|
3384
|
+
let D = (0, O.useRef)({ actor: t });
|
|
3385
|
+
(0, O.useLayoutEffect)(() => {
|
|
3386
|
+
let e = w.at(-1), n = e?.kind === "event" ? e.event : e?.events.at(-1), r = e?.kind === "event" ? e.event.id : e?.events[0]?.id, i = u && D.current.actor === t && !!D.current.id && D.current.id !== n?.id;
|
|
3387
|
+
D.current = {
|
|
3388
|
+
actor: t,
|
|
3389
|
+
id: n?.id
|
|
3390
|
+
};
|
|
3391
|
+
let a = h.current;
|
|
3392
|
+
if (!a || !E.current) return;
|
|
3393
|
+
a.scrollTop = a.scrollHeight;
|
|
3394
|
+
let o = 0, s = requestAnimationFrame(function e() {
|
|
3395
|
+
if (!E.current) return;
|
|
3396
|
+
a.scrollTop = a.scrollHeight;
|
|
3397
|
+
let t = r && a.querySelector(`[data-entry="${CSS.escape(r)}"]`);
|
|
3398
|
+
if (i && t) {
|
|
3399
|
+
i = !1;
|
|
3400
|
+
let e = getComputedStyle(a), n = e.getPropertyValue("--duration-stream").trim(), r = parseFloat(n) * (n.endsWith("ms") ? 1 : 1e3);
|
|
3401
|
+
r > 0 && !matchMedia("(prefers-reduced-motion: reduce)").matches && t.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
3402
|
+
duration: r,
|
|
3403
|
+
easing: e.getPropertyValue("--ease-expo").trim() || "linear"
|
|
3404
|
+
});
|
|
3405
|
+
}
|
|
3406
|
+
++o < 20 && (s = requestAnimationFrame(e));
|
|
3407
|
+
});
|
|
3408
|
+
return () => cancelAnimationFrame(s);
|
|
3409
|
+
}, [w]), (0, O.useEffect)(() => {
|
|
3410
|
+
if (!a) return;
|
|
3411
|
+
let t = e.byEvent.get(a);
|
|
3412
|
+
if (!t) return;
|
|
3413
|
+
let n = [`prompt:${_(t)}`, `reasoning:${_(t)}`];
|
|
3414
|
+
if (t.detail.toolCallId !== void 0) for (let r of e.calls.get(X(t.node, t.detail.toolCallId)) ?? []) n.push(`tool:${_(r.event)}:${r.call.id}`, T.get(r.event.id) ?? "");
|
|
3415
|
+
for (let e of Z(t)) n.push(`tool:${_(t)}:${e.id}`);
|
|
3416
|
+
let r = T.get(a);
|
|
3417
|
+
r?.startsWith("polls:") && n.push(r), m((e) => /* @__PURE__ */ new Set([...e, ...n.filter(Boolean)]));
|
|
3418
|
+
}, [a, e]);
|
|
3419
|
+
let ie = (e) => {
|
|
3420
|
+
let t = s?.get(e.id);
|
|
3421
|
+
return t?.length ? /* @__PURE__ */ (0, k.jsx)("span", {
|
|
3422
|
+
className: "event-flags",
|
|
3423
|
+
children: t.map((t) => /* @__PURE__ */ (0, k.jsx)("button", {
|
|
3424
|
+
type: "button",
|
|
3425
|
+
className: `event-flag polarity-${t.polarity}`,
|
|
3426
|
+
title: t.title,
|
|
3427
|
+
"data-flag": t.dimension,
|
|
3428
|
+
onClick: () => c?.(t, e),
|
|
3429
|
+
children: t.dimension
|
|
3430
|
+
}, `${t.dimension}:${t.label}`))
|
|
3431
|
+
}) : null;
|
|
3432
|
+
}, ae = (0, O.useCallback)((e) => e.key, []), oe = (0, O.useCallback)((e) => e.kind === "event" ? $(e.event) ? 26 : !Y(e.event) && Z(e.event).length ? 16 + 36 * Z(e.event).length : 96 : 36, []), se = {
|
|
3433
|
+
index: e,
|
|
3434
|
+
cutoff: n,
|
|
3435
|
+
selected: a,
|
|
3436
|
+
opened: p,
|
|
3437
|
+
anchor: _,
|
|
3438
|
+
opener: v,
|
|
3439
|
+
setOpen: y,
|
|
3440
|
+
flagMarks: ie,
|
|
3441
|
+
paired: b,
|
|
3442
|
+
thinkingSpan: ee,
|
|
3443
|
+
flags: s,
|
|
3444
|
+
live: u
|
|
3445
|
+
}, ce = (0, O.useMemo)(() => w.map((e) => ci(e, se)), [
|
|
3446
|
+
w,
|
|
3447
|
+
p,
|
|
3448
|
+
n,
|
|
3449
|
+
a,
|
|
3450
|
+
u,
|
|
3451
|
+
e,
|
|
3452
|
+
ee
|
|
3453
|
+
]), le = (0, O.useMemo)(() => {
|
|
3454
|
+
let e;
|
|
3455
|
+
return w.map((t) => {
|
|
3456
|
+
let n = t.kind === "event" ? t.event : t.events[0], r = n.detail.role === "assistant" && !$(n) && (!e || e.detail.role === "user" || (n.detail.attempt === void 0 ? W(n.at) - W(e.at) > 12e4 : n.detail.attempt !== e.detail.attempt));
|
|
3457
|
+
return e = t.kind === "event" ? n : t.events.at(-1), r;
|
|
3458
|
+
});
|
|
3459
|
+
}, [w]);
|
|
3460
|
+
return /* @__PURE__ */ (0, k.jsx)(k.Fragment, { children: /* @__PURE__ */ (0, k.jsxs)("div", {
|
|
3461
|
+
className: "record-conversation conversation-scroll",
|
|
3462
|
+
"data-chat": !0,
|
|
3463
|
+
ref: h,
|
|
3464
|
+
tabIndex: 0,
|
|
3465
|
+
"aria-label": "Scrollable retained conversation",
|
|
3466
|
+
children: [!w.length && /* @__PURE__ */ (0, k.jsx)("p", {
|
|
3467
|
+
className: "chat-empty",
|
|
3468
|
+
children: r || i !== "all" ? "No messages match this filter." : te ? "No messages at the selected time." : "Conversation not retained. Its absence does not mean the agent did no work."
|
|
3469
|
+
}), /* @__PURE__ */ (0, k.jsx)(cr, {
|
|
3470
|
+
className: "ar-chat",
|
|
3471
|
+
children: /* @__PURE__ */ (0, k.jsx)(fr, {
|
|
3472
|
+
items: w,
|
|
3473
|
+
keyOf: ae,
|
|
3474
|
+
render: (e, t) => /* @__PURE__ */ (0, k.jsx)(ui, {
|
|
3475
|
+
row: e,
|
|
3476
|
+
items: ce[t] ?? [],
|
|
3477
|
+
previous: t ? li(ce[t - 1] ?? []) : void 0,
|
|
3478
|
+
turn: le[t],
|
|
3479
|
+
context: se
|
|
3480
|
+
}),
|
|
3481
|
+
scroller: h,
|
|
3482
|
+
target: x ? T.get(x) : void 0,
|
|
3483
|
+
estimate: oe
|
|
3484
|
+
})
|
|
3485
|
+
})]
|
|
3486
|
+
}) });
|
|
3487
|
+
}
|
|
3488
|
+
function fi(e) {
|
|
3489
|
+
let t = e.events.map((e) => ({
|
|
3490
|
+
...e,
|
|
3491
|
+
detail: { ...e.detail }
|
|
3492
|
+
})), n = new Map(e.nodes.map((e) => [e.id, e.agentId ?? e.id]));
|
|
3493
|
+
for (let r of e.nodes.filter((e) => e.kind === "agent")) {
|
|
3494
|
+
let e = t.filter((e) => (n.get(e.node) ?? e.node) === r.id), i = e.find((e) => e.detail.role === "assistant")?.at, a = e.filter((e) => e.detail.role === "user" && typeof e.detail.publicText == "string" && !e.detail.publicText.trimStart().startsWith("<task-notification>")), o = a.find((e) => e.detail.promptKind !== "steering" && (!i || e.at <= i));
|
|
3495
|
+
if (o) o.detail.promptKind = "initial";
|
|
3496
|
+
else if (r.assignment?.trim()) {
|
|
3497
|
+
let n = r.start ?? e[0]?.at;
|
|
3498
|
+
n && t.push({
|
|
3499
|
+
id: `prompt:${r.id}`,
|
|
3500
|
+
node: r.id,
|
|
3501
|
+
at: n,
|
|
3502
|
+
kind: "message",
|
|
3503
|
+
category: "other",
|
|
3504
|
+
label: "Prompt",
|
|
3505
|
+
source: null,
|
|
3506
|
+
detail: {
|
|
3507
|
+
role: "user",
|
|
3508
|
+
publicText: r.assignment,
|
|
3509
|
+
promptKind: "initial",
|
|
3510
|
+
promptReconstructed: !0,
|
|
3511
|
+
promptSource: "node.assignment"
|
|
3512
|
+
}
|
|
3513
|
+
});
|
|
3514
|
+
}
|
|
3515
|
+
for (let e of a) e !== o && e.detail.promptKind !== "initial" && (e.detail.promptKind ??= "steering");
|
|
3516
|
+
}
|
|
3517
|
+
return t.sort((e, t) => e.at.localeCompare(t.at) || Number(t.detail.promptKind === "initial") - Number(e.detail.promptKind === "initial")), {
|
|
3518
|
+
...e,
|
|
3519
|
+
events: t
|
|
3520
|
+
};
|
|
3521
|
+
}
|
|
3522
|
+
//#endregion
|
|
3523
|
+
export { ur as a, fi as i, fr as n, jn as o, pr as r, di as t };
|