@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.
Files changed (136) hide show
  1. package/README.md +31 -3
  2. package/SKILL.md +29 -1
  3. package/dist/graph-native-CS_TmaCK.mjs +1 -0
  4. package/dist/graph-viewer/Analytics-bWsqhurt.js +1001 -0
  5. package/dist/graph-viewer/{AnswerStrip-DhwqOyxI.js → AnswerStrip-COxV7gLW.js} +2 -2
  6. package/dist/graph-viewer/Checks-CQGmKcQ0.js +164 -0
  7. package/dist/graph-viewer/Conversations-DgCshBAf.js +627 -0
  8. package/dist/graph-viewer/{Files-DtZhf0ii.js → Files-CvIOGrAs.js} +81 -90
  9. package/dist/graph-viewer/LiveRun-DHmsr6F7.js +311 -0
  10. package/dist/graph-viewer/{Outputs-QET3nPPp.js → Outputs-rwBg_x36.js} +4 -4
  11. package/dist/graph-viewer/Overview-C150tkVa.js +194 -0
  12. package/dist/graph-viewer/{RunOverview-DJQDAMIx.js → RunOverview-CSqsunqf.js} +2 -2
  13. package/dist/graph-viewer/RunPage-F_prVwiV.js +286 -0
  14. package/dist/graph-viewer/Timeline-BFDywlmz.js +335 -0
  15. package/dist/graph-viewer/Today-BdDuqZGF.js +623 -0
  16. package/dist/graph-viewer/Topology-SAfGtd5u.js +238 -0
  17. package/dist/graph-viewer/Traces-BYqXaS_s.js +254 -0
  18. package/dist/graph-viewer/{WallPages-4d9QUZDq.js → WallPages-MM70VZrC.js} +48 -30
  19. package/dist/graph-viewer/agent-runtime.js +55 -55
  20. package/dist/graph-viewer/{data-BJmP7F1M.js → data-DTGmre1W.js} +31 -27
  21. package/dist/graph-viewer/harness-sessions.js +1 -1
  22. package/dist/graph-viewer/index.js +1357 -1392
  23. package/dist/graph-viewer/{lazy-pages-DM0cZM10.js → lazy-pages-BYuq_L_n.js} +9 -5
  24. package/dist/graph-viewer/{outputs-model-CGdvjkQh.js → outputs-model-CHTx8rMz.js} +2 -2
  25. package/dist/graph-viewer/{viewer/plain-words-CgvxtEOa.js → plain-words-BrMHl0On.js} +9 -4
  26. package/dist/graph-viewer/receipt.js +2 -2
  27. package/dist/graph-viewer/record-CsP_3NJS.js +612 -0
  28. package/dist/graph-viewer/record-part-CuT9Xw37.js +334 -0
  29. package/dist/graph-viewer/record.js +2 -336
  30. package/dist/graph-viewer/report-viewer.js +65 -65
  31. package/dist/graph-viewer/report.js +1 -1
  32. package/dist/graph-viewer/research-publication.js +1 -1
  33. package/dist/graph-viewer/{run-files-C1NgzM0l.js → run-files-BckQDdTD.js} +1 -1
  34. package/dist/graph-viewer/{run-receipt-Bvi4-KVM.js → run-receipt-Bt2iXJUy.js} +1 -0
  35. package/dist/graph-viewer/schemas/agent-workspace.play.v1.json +3 -0
  36. package/dist/graph-viewer/schemas/agent-workspace.plays.v1.json +2 -0
  37. package/dist/graph-viewer/schemas/agent-workspace.run.v1.json +1 -0
  38. package/dist/graph-viewer/styles.css +4559 -2385
  39. package/dist/graph-viewer/trace-spans.js +1 -1
  40. package/dist/graph-viewer/ui-xa5w5bEN.js +889 -0
  41. package/dist/graph-viewer/viewer/{AgentGraphCanvas-CMdOlSlh-4EervjeC.js → AgentGraphCanvas-B74GN1o6-BZEumF7-.js} +2610 -2707
  42. package/dist/graph-viewer/viewer/Analytics-E3XS570U.js +1002 -0
  43. package/dist/graph-viewer/viewer/{AnswerStrip-CGUyXuYH.js → AnswerStrip-B7xMU57A.js} +2 -2
  44. package/dist/graph-viewer/viewer/Checks-CJ5XSHbv.js +165 -0
  45. package/dist/graph-viewer/viewer/Conversations-AX8G7Qyl.js +904 -0
  46. package/dist/graph-viewer/viewer/Files-DxL1576V.js +630 -0
  47. package/dist/graph-viewer/viewer/LiveRun-B-BckyEj.js +820 -0
  48. package/dist/graph-viewer/viewer/{Outputs-CumGyjQo.js → Outputs-BoIpgfMv.js} +24 -23
  49. package/dist/graph-viewer/viewer/Overview-Dzg5XJgy.js +436 -0
  50. package/dist/graph-viewer/viewer/RunPage-NtevWXBs.js +285 -0
  51. package/dist/graph-viewer/viewer/{Scores-ZS16yk0n.js → Scores-Dgv4WePL.js} +3 -3
  52. package/dist/graph-viewer/viewer/Timeline-CzY3LVDu.js +335 -0
  53. package/dist/graph-viewer/viewer/Today-Bi9IIwuh.js +623 -0
  54. package/dist/graph-viewer/viewer/Topology-CzjqSFXH.js +239 -0
  55. package/dist/graph-viewer/viewer/Traces-CMX0H1VU.js +254 -0
  56. package/dist/graph-viewer/viewer/{WallPages-CzWpyIfp.js → WallPages-Clj4bORg.js} +50 -32
  57. package/dist/graph-viewer/viewer/addon-webgl-BSCscllv.js +4027 -0
  58. package/dist/graph-viewer/viewer/agent-record-BrP-ENHg.css +2 -0
  59. package/dist/graph-viewer/viewer/{bot-D6Nrej7Z.js → bot-BaQU59LG.js} +1 -1
  60. package/dist/graph-viewer/viewer/{chevron-right-D_5IKLxu.js → chevron-right-Xn05jYLT.js} +1 -1
  61. package/dist/graph-viewer/viewer/{createLucideIcon-yH0cxLMy.js → createLucideIcon-BSphcoOJ.js} +1 -1
  62. package/dist/graph-viewer/viewer/dashboard-D3JhmRhe-DSl0zhkw.js +371 -0
  63. package/dist/graph-viewer/viewer/{data-CkWfWr7i.js → data-CVHeKhrh.js} +144 -139
  64. package/dist/graph-viewer/viewer/dist-4_KJz8ZM.js +349 -0
  65. package/dist/graph-viewer/viewer/dist-Dy-wrdTt.js +1615 -0
  66. package/dist/graph-viewer/viewer/es2015-utW4DTOJ.js +3506 -0
  67. package/dist/graph-viewer/viewer/{final-output-kwY11u9X.js → final-output-BYT-g-9j.js} +1 -1
  68. package/dist/graph-viewer/viewer/flow-waterfall-model-DvrgPLGS-BdThSFH-.js +2696 -0
  69. package/dist/graph-viewer/viewer/git-branch-BzTbIcYL.js +28 -0
  70. package/dist/graph-viewer/viewer/{highlights-Btsi5OXl.js → highlights-DWeSCtiR.js} +4 -4
  71. package/dist/graph-viewer/viewer/jsx-runtime-DPT6sCLq.js +319 -0
  72. package/dist/graph-viewer/viewer/lazy-pages-ChiMJ8r_.js +803 -0
  73. package/dist/graph-viewer/viewer/{markdown-CX_sVrXB.js → markdown-lADwhD7y.js} +2324 -2608
  74. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-RSb7EbGB.js +476 -0
  75. package/dist/graph-viewer/viewer/{page-header-Brq611fd.js → page-header-QbUg8F8i.js} +12 -11
  76. package/dist/graph-viewer/{plain-words-CgvxtEOa.js → viewer/plain-words-BrMHl0On.js} +9 -4
  77. package/dist/graph-viewer/viewer/primitives-znfPK9NP-B6UO7uDr.js +346 -0
  78. package/dist/graph-viewer/viewer/react-DQ7E2Epi.js +4254 -0
  79. package/dist/graph-viewer/viewer/{react-dom-t1L4_-il.js → react-dom-BEusmvQH.js} +1 -1
  80. package/dist/graph-viewer/viewer/record-DZnT6SWN-H-ul3U3a.js +3523 -0
  81. package/dist/graph-viewer/viewer/record-W39D5MO-.js +1 -0
  82. package/dist/graph-viewer/viewer/record-part-CbweyYoV.js +335 -0
  83. package/dist/graph-viewer/viewer/{segmented-control-BaJmvTNd.js → segmented-control-Di1mbQlP.js} +27 -26
  84. package/dist/graph-viewer/viewer/{shiki-Qnby7Sh6.js → shiki-BfNNlmfZ.js} +15 -15
  85. package/dist/graph-viewer/viewer/status-meta-S0kV_RDp.js +273 -0
  86. package/dist/graph-viewer/viewer/{stream-tokenizer-CWtnjmRd.js → stream-tokenizer-B5wWaM3U.js} +12 -12
  87. package/dist/graph-viewer/viewer/{themes-1i1fzpRk.js → themes-DuRxHiga.js} +1 -1
  88. package/dist/graph-viewer/viewer/ui-Co03nZUX.js +889 -0
  89. package/dist/graph-viewer/viewer/utils-BuObIC0n.js +1815 -0
  90. package/dist/graph-viewer/viewer/workbench-E6_5q_oL.js +28351 -0
  91. package/dist/graph-viewer/viewer/workflows--mZpHYqo.js +3298 -0
  92. package/dist/graph-viewer/viewer/workspace-cKs9sGEO.js +2468 -0
  93. package/dist/graph-viewer/{workspace-model-Ewf17pTW.js → workspace-model-BkPl_J8E.js} +1 -1
  94. package/dist/graph-viewer/workspace-viewer.js +7452 -7489
  95. package/dist/graph-viewer/workspace.js +1 -1
  96. package/dist/index.mjs +27 -22
  97. package/package.json +10 -9
  98. package/dist/graph-viewer/Analytics-DFWW8Phh.js +0 -938
  99. package/dist/graph-viewer/Checks-qgqV4xgV.js +0 -155
  100. package/dist/graph-viewer/Conversations-CGB45kpj.js +0 -545
  101. package/dist/graph-viewer/LiveRun-C21wUKAY.js +0 -210
  102. package/dist/graph-viewer/Overview-BjeLsA2I.js +0 -506
  103. package/dist/graph-viewer/RunPage-CkkcBEUe.js +0 -258
  104. package/dist/graph-viewer/Timeline-C2Xolk0t.js +0 -293
  105. package/dist/graph-viewer/Today-BVVDtSVN.js +0 -660
  106. package/dist/graph-viewer/Topology-DO5XX8e4.js +0 -545
  107. package/dist/graph-viewer/Traces-BhMxjNgw.js +0 -259
  108. package/dist/graph-viewer/part-events-BrLrg_EV.js +0 -276
  109. package/dist/graph-viewer/record-part-CZal_IMH.js +0 -1408
  110. package/dist/graph-viewer/ui-D8QZRsC3.js +0 -938
  111. package/dist/graph-viewer/viewer/Analytics-DD__nbLm.js +0 -939
  112. package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +0 -156
  113. package/dist/graph-viewer/viewer/Conversations-C1n0EBBd.js +0 -819
  114. package/dist/graph-viewer/viewer/Files-Cjr7NMU_.js +0 -448
  115. package/dist/graph-viewer/viewer/LiveRun-uPTkPSjo.js +0 -6772
  116. package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +0 -507
  117. package/dist/graph-viewer/viewer/RunPage-DZlBW7Va.js +0 -257
  118. package/dist/graph-viewer/viewer/Timeline-BnK6-yBR.js +0 -294
  119. package/dist/graph-viewer/viewer/Today-a_-oNigi.js +0 -660
  120. package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +0 -546
  121. package/dist/graph-viewer/viewer/Traces-C0IGk0L4.js +0 -259
  122. package/dist/graph-viewer/viewer/WorkflowGraph-DZ3xejKE-jRXKeSrg.js +0 -1559
  123. package/dist/graph-viewer/viewer/agent-record-Dw772ROs.css +0 -2
  124. package/dist/graph-viewer/viewer/agent-timeline-Cs9Qbpvo.js +0 -1798
  125. package/dist/graph-viewer/viewer/dist-C1-7EfoW.js +0 -488
  126. package/dist/graph-viewer/viewer/file-text-m7a3piQF.js +0 -47
  127. package/dist/graph-viewer/viewer/jsx-runtime-DQWyJOhv.js +0 -2136
  128. package/dist/graph-viewer/viewer/lazy-pages-BowaGsg-.js +0 -20
  129. package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-fagiBQam.js +0 -723
  130. package/dist/graph-viewer/viewer/popover-CvOAjlnk.js +0 -5329
  131. package/dist/graph-viewer/viewer/react-CY3IbSNO.js +0 -4262
  132. package/dist/graph-viewer/viewer/record-part-D3_Anfpe.js +0 -1329
  133. package/dist/graph-viewer/viewer/terminal-83J_I4Ne.js +0 -52
  134. package/dist/graph-viewer/viewer/ui-C9b1rIUH.js +0 -938
  135. package/dist/graph-viewer/viewer/workspace-CekmOBs3.js +0 -25100
  136. package/dist/graph-viewer/viewer/x-DOc2URqZ.js +0 -56
@@ -1,1798 +0,0 @@
1
- import { i as e } from "./rolldown-runtime-DArdT4gl.js";
2
- import { i as t, n, t as r } from "./jsx-runtime-DQWyJOhv.js";
3
- import { $ as i, A as a, C as o, E as s, M as c, O as l, S as u, a as d, b as f, c as p, h as m, j as h, l as g, p as _, t as v, u as y, v as b, w as ee, x, y as S } from "./markdown-CX_sVrXB.js";
4
- import { t as C } from "./createLucideIcon-yH0cxLMy.js";
5
- import { t as w } from "./bot-D6Nrej7Z.js";
6
- import { n as T, r as E } from "./x-DOc2URqZ.js";
7
- import { t as D } from "./chevron-right-D_5IKLxu.js";
8
- import { n as te, t as O } from "./file-text-m7a3piQF.js";
9
- import { n as ne, r as re, t as ie } from "./terminal-83J_I4Ne.js";
10
- //#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
11
- var ae = {
12
- name: "arrow-right",
13
- size: 24,
14
- node: [["path", {
15
- d: "M5 12h14",
16
- key: "1ays0h"
17
- }], ["path", {
18
- d: "m12 5 7 7-7 7",
19
- key: "xquz4c"
20
- }]]
21
- };
22
- ae.node;
23
- var oe = C(ae), se = {
24
- name: "brain",
25
- size: 24,
26
- node: [
27
- ["path", {
28
- d: "M12 18V5",
29
- key: "adv99a"
30
- }],
31
- ["path", {
32
- d: "M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4",
33
- key: "5nuw1p"
34
- }],
35
- ["path", {
36
- d: "M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294",
37
- key: "18ldcf"
38
- }],
39
- ["path", {
40
- d: "M17.996 5.125a4 4 0 012.526 5.77",
41
- key: "1sdu8q"
42
- }],
43
- ["path", {
44
- d: "M18 18a4 4 0 002-7.465",
45
- key: "7xqqvr"
46
- }],
47
- ["path", {
48
- d: "M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517",
49
- key: "t46ysz"
50
- }],
51
- ["path", {
52
- d: "M6 18a4 4 0 01-2-7.465",
53
- key: "1y2m15"
54
- }],
55
- ["path", {
56
- d: "M6.004 5.125a4 4 0 00-2.526 5.77",
57
- key: "3cw1ss"
58
- }]
59
- ]
60
- };
61
- se.node;
62
- var ce = C(se), le = {
63
- name: "circle-dot",
64
- size: 24,
65
- node: [["circle", {
66
- cx: "12",
67
- cy: "12",
68
- r: "1",
69
- key: "41hilf"
70
- }], ["circle", {
71
- cx: "12",
72
- cy: "12",
73
- r: "10",
74
- key: "1mglay"
75
- }]]
76
- };
77
- le.node;
78
- var ue = C(le), k = {
79
- name: "clipboard-list",
80
- size: 24,
81
- node: [
82
- ["rect", {
83
- width: "8",
84
- height: "4",
85
- x: "8",
86
- y: "2",
87
- rx: "1",
88
- ry: "1",
89
- key: "tgr4d6"
90
- }],
91
- ["path", {
92
- 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",
93
- key: "116196"
94
- }],
95
- ["path", {
96
- d: "M12 11h4",
97
- key: "1jrz19"
98
- }],
99
- ["path", {
100
- d: "M12 16h4",
101
- key: "n85exb"
102
- }],
103
- ["path", {
104
- d: "M8 11h.01",
105
- key: "1dfujw"
106
- }],
107
- ["path", {
108
- d: "M8 16h.01",
109
- key: "18s6g9"
110
- }]
111
- ]
112
- };
113
- k.node;
114
- var de = C(k), A = {
115
- name: "file-pen",
116
- size: 24,
117
- node: [
118
- ["path", {
119
- 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",
120
- key: "o6klzx"
121
- }],
122
- ["path", {
123
- d: "M14 2v5a1 1 0 0 0 1 1h5",
124
- key: "wfsgrz"
125
- }],
126
- ["path", {
127
- 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",
128
- key: "zhnas1"
129
- }]
130
- ],
131
- aliases: ["file-edit"]
132
- };
133
- A.node;
134
- var fe = C(A), pe = {
135
- name: "file-search",
136
- size: 24,
137
- node: [
138
- ["path", {
139
- 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",
140
- key: "1oefj6"
141
- }],
142
- ["path", {
143
- d: "M14 2v5a1 1 0 0 0 1 1h5",
144
- key: "wfsgrz"
145
- }],
146
- ["circle", {
147
- cx: "11.5",
148
- cy: "14.5",
149
- r: "2.5",
150
- key: "1bq0ko"
151
- }],
152
- ["path", {
153
- d: "M13.3 16.3 15 18",
154
- key: "2quom7"
155
- }]
156
- ]
157
- };
158
- pe.node;
159
- var me = C(pe), he = {
160
- name: "git-compare-arrows",
161
- size: 24,
162
- node: [
163
- ["circle", {
164
- cx: "5",
165
- cy: "6",
166
- r: "3",
167
- key: "1qnov2"
168
- }],
169
- ["path", {
170
- d: "M12 6h5a2 2 0 0 1 2 2v7",
171
- key: "1yj91y"
172
- }],
173
- ["path", {
174
- d: "m15 9-3-3 3-3",
175
- key: "1lwv8l"
176
- }],
177
- ["circle", {
178
- cx: "19",
179
- cy: "18",
180
- r: "3",
181
- key: "1qljk2"
182
- }],
183
- ["path", {
184
- d: "M12 18H7a2 2 0 0 1-2-2V9",
185
- key: "16sdep"
186
- }],
187
- ["path", {
188
- d: "m9 15 3 3-3 3",
189
- key: "1m3kbl"
190
- }]
191
- ]
192
- };
193
- he.node;
194
- var ge = C(he), _e = {
195
- name: "message-square-quote",
196
- size: 24,
197
- node: [
198
- ["path", {
199
- d: "M14 14a2 2 0 0 0 2-2V8h-2",
200
- key: "1r06pg"
201
- }],
202
- ["path", {
203
- 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",
204
- key: "18887p"
205
- }],
206
- ["path", {
207
- d: "M8 14a2 2 0 0 0 2-2V8H8",
208
- key: "1jzu5j"
209
- }]
210
- ]
211
- };
212
- _e.node;
213
- var ve = C(_e), ye = {
214
- name: "pencil-line",
215
- size: 24,
216
- node: [
217
- ["path", {
218
- d: "M13 21h8",
219
- key: "1jsn5i"
220
- }],
221
- ["path", {
222
- d: "m15 5 4 4",
223
- key: "1mk7zo"
224
- }],
225
- ["path", {
226
- 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",
227
- key: "1a8usu"
228
- }]
229
- ]
230
- };
231
- ye.node;
232
- var be = C(ye), xe = {
233
- name: "settings",
234
- size: 24,
235
- node: [["path", {
236
- 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",
237
- key: "1i5ecw"
238
- }], ["circle", {
239
- cx: "12",
240
- cy: "12",
241
- r: "3",
242
- key: "1v7zrd"
243
- }]]
244
- };
245
- xe.node;
246
- var Se = C(xe), j = /* @__PURE__ */ e(t(), 1), M = r(), N = "tangle-transcript-text text-[length:var(--transcript-font-size)] leading-[var(--transcript-line-height)]";
247
- //#endregion
248
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/chat/message-author.js
249
- function Ce(e, t) {
250
- return e === void 0 || e.id === t;
251
- }
252
- function P({ author: e, className: t, ...r }) {
253
- return /* @__PURE__ */ (0, M.jsxs)("div", {
254
- "data-message-author": "",
255
- className: n("flex min-w-0 max-w-full items-center gap-2", t),
256
- ...r,
257
- children: [
258
- /* @__PURE__ */ (0, M.jsx)(_, {
259
- size: "xs",
260
- src: e.avatarUrl,
261
- name: e.name,
262
- tone: b(e.id),
263
- className: "rounded-full"
264
- }),
265
- /* @__PURE__ */ (0, M.jsx)("span", {
266
- className: "min-w-0 truncate font-medium text-foreground text-sm",
267
- title: e.name,
268
- children: e.name
269
- }),
270
- e.role ? /* @__PURE__ */ (0, M.jsx)(m, {
271
- size: "sm",
272
- emphasis: "outline",
273
- className: "max-w-[50%]",
274
- children: e.role
275
- }) : null
276
- ]
277
- });
278
- }
279
- //#endregion
280
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/chat/synthetic-text.js
281
- function we({ text: e }) {
282
- return e.trim() ? /* @__PURE__ */ (0, M.jsxs)("div", {
283
- role: "note",
284
- "aria-label": "Application note",
285
- "data-synthetic-text": "",
286
- className: "min-w-0 rounded-md border border-dashed border-border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",
287
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
288
- className: "mb-1 font-medium",
289
- children: "Application note"
290
- }), /* @__PURE__ */ (0, M.jsx)("div", {
291
- className: "break-words whitespace-pre-wrap",
292
- children: e
293
- })]
294
- }) : null;
295
- }
296
- function Te(e) {
297
- let t = [], n = [], r = 0, i = () => {
298
- let e = n.join("\n");
299
- e.trim() && t.push({
300
- index: r,
301
- synthetic: !1,
302
- text: e
303
- }), n = [];
304
- };
305
- return e.forEach((e, a) => {
306
- e.type === "text" && (e.synthetic ? (i(), e.text.trim() && t.push({
307
- index: a,
308
- synthetic: !0,
309
- text: e.text
310
- })) : (n.length === 0 && (r = a), n.push(e.text)));
311
- }), i(), t;
312
- }
313
- //#endregion
314
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/chat/user-message.js
315
- function F(e) {
316
- return e.toLocaleTimeString(void 0, {
317
- hour: "numeric",
318
- minute: "2-digit"
319
- });
320
- }
321
- function I({ children: e, align: t = "end" }) {
322
- return /* @__PURE__ */ (0, M.jsx)("div", {
323
- className: `flex flex-wrap items-center ${t === "end" ? "justify-end" : "justify-start"} gap-1.5 text-sm text-muted-foreground`,
324
- children: e
325
- });
326
- }
327
- function Ee({ text: e, timestamp: t, actions: n }) {
328
- return /* @__PURE__ */ (0, M.jsx)("div", {
329
- className: "flex justify-end",
330
- children: /* @__PURE__ */ (0, M.jsxs)("div", {
331
- className: "group flex min-w-0 max-w-[78%] flex-col items-end gap-2",
332
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
333
- className: "relative w-full min-w-0 rounded-2xl bg-foreground px-4 py-3 text-background",
334
- children: [t ? /* @__PURE__ */ (0, M.jsx)("span", {
335
- "data-user-message-time": "",
336
- className: "pointer-events-none absolute right-full top-1/2 mr-3 -translate-y-1/2 whitespace-nowrap text-[length:var(--font-size-xs)] text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
337
- children: F(t)
338
- }) : null, /* @__PURE__ */ (0, M.jsx)("div", {
339
- className: `break-words whitespace-pre-wrap ${N}`,
340
- children: e
341
- })]
342
- }), n ? /* @__PURE__ */ (0, M.jsx)(I, { children: n }) : null]
343
- })
344
- });
345
- }
346
- function De({ text: e, timestamp: t, actions: n, author: r }) {
347
- return /* @__PURE__ */ (0, M.jsx)("div", {
348
- className: "flex justify-start",
349
- children: /* @__PURE__ */ (0, M.jsxs)("div", {
350
- className: "group flex min-w-0 max-w-[78%] flex-col items-start gap-1.5",
351
- children: [
352
- r ? /* @__PURE__ */ (0, M.jsx)(P, { author: r }) : null,
353
- /* @__PURE__ */ (0, M.jsxs)("div", {
354
- className: "relative min-w-0 max-w-full rounded-2xl border border-border bg-card px-4 py-3 text-foreground",
355
- children: [t ? /* @__PURE__ */ (0, M.jsx)("span", {
356
- "data-user-message-time": "",
357
- className: "pointer-events-none absolute left-full top-1/2 ml-3 -translate-y-1/2 whitespace-nowrap text-[length:var(--font-size-xs)] text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
358
- children: F(t)
359
- }) : null, /* @__PURE__ */ (0, M.jsx)("div", {
360
- className: `break-words whitespace-pre-wrap ${N}`,
361
- children: e
362
- })]
363
- }),
364
- n ? /* @__PURE__ */ (0, M.jsx)(I, {
365
- align: "start",
366
- children: n
367
- }) : null
368
- ]
369
- })
370
- });
371
- }
372
- var L = (0, j.memo)(({ message: e, parts: t, content: n, timestamp: r, actions: i, author: a, viewerId: o }) => {
373
- let s = Ce(a, o) ? void 0 : a, c = (e, t, n = !0, i) => s ? /* @__PURE__ */ (0, M.jsx)(De, {
374
- text: e,
375
- timestamp: r,
376
- actions: t,
377
- author: n ? s : void 0
378
- }, i) : /* @__PURE__ */ (0, M.jsx)(Ee, {
379
- text: e,
380
- timestamp: r,
381
- actions: t
382
- }, i);
383
- if (n != null) return n.trim() ? c(n, i) : null;
384
- let l = Te(t ?? []);
385
- if (l.length === 0) return null;
386
- if (l.length === 1 && !l[0].synthetic) return c(l[0].text, i);
387
- let u = l.find((e) => !e.synthetic);
388
- return /* @__PURE__ */ (0, M.jsxs)("div", {
389
- className: "space-y-2",
390
- children: [l.map((e) => e.synthetic ? /* @__PURE__ */ (0, M.jsx)(we, { text: e.text }, e.index) : c(e.text, void 0, e === u, e.index)), i ? /* @__PURE__ */ (0, M.jsx)(I, {
391
- align: s ? "start" : "end",
392
- children: i
393
- }) : null]
394
- });
395
- });
396
- L.displayName = "UserMessage";
397
- //#endregion
398
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/utils/tool-display.js
399
- var Oe = "tool:";
400
- function R(e) {
401
- let t = e?.toLowerCase() ?? "";
402
- return t.startsWith(Oe) ? t.slice(5) : t;
403
- }
404
- function z(e, t) {
405
- if (typeof e == "object" && e && t in e) {
406
- let n = e[t];
407
- if (typeof n == "string") return n;
408
- }
409
- }
410
- function ke(e) {
411
- return typeof e == "string" ? e : z(e, "command") ?? z(e, "cmd");
412
- }
413
- function Ae(e) {
414
- return z(e, "file_path") ?? z(e, "path") ?? z(e, "filePath") ?? z(e, "file");
415
- }
416
- function je(e) {
417
- switch (R(e)) {
418
- case "bash":
419
- case "shell":
420
- case "command":
421
- case "execute": return "command";
422
- case "write":
423
- case "write_file":
424
- case "create_file": return "write";
425
- case "read":
426
- case "read_file":
427
- case "cat": return "read";
428
- case "grep":
429
- case "search":
430
- case "rg": return "search";
431
- case "edit":
432
- case "patch":
433
- case "sed": return "edit";
434
- case "glob":
435
- case "find":
436
- case "ls": return "search";
437
- case "web_search":
438
- case "web_fetch":
439
- case "fetch": return "web";
440
- case "task":
441
- case "agent":
442
- case "spawn": return "task";
443
- case "todo":
444
- case "todo_write": return "todo";
445
- default: return "other";
446
- }
447
- }
448
- function B(e) {
449
- let t = R(e.tool), n = e.state.status === "pending" ? void 0 : e.state.input, r = Ae(n), i = ke(n);
450
- switch (t) {
451
- case "bash":
452
- case "shell":
453
- case "command":
454
- case "execute": return {
455
- title: "Shell",
456
- description: i ? V(i) : void 0,
457
- displayVariant: "command",
458
- commandSnippet: i
459
- };
460
- case "write":
461
- case "write_file":
462
- case "create_file": return {
463
- title: "Write",
464
- description: r,
465
- displayVariant: "write-file",
466
- targetPath: r
467
- };
468
- case "edit":
469
- case "patch": return {
470
- title: "Edit",
471
- description: r,
472
- hasDiffOutput: !0,
473
- diffFilePath: r,
474
- displayVariant: "diff",
475
- targetPath: r
476
- };
477
- case "read":
478
- case "read_file":
479
- case "cat": return {
480
- title: "Read",
481
- description: r,
482
- displayVariant: "read-file",
483
- targetPath: r
484
- };
485
- case "grep":
486
- case "search":
487
- case "rg": return {
488
- title: "Search",
489
- description: z(n, "pattern"),
490
- displayVariant: "grep"
491
- };
492
- case "glob":
493
- case "find":
494
- case "ls": return {
495
- title: "Find",
496
- description: z(n, "pattern"),
497
- displayVariant: "glob"
498
- };
499
- case "web_search":
500
- case "web_fetch":
501
- case "fetch": {
502
- let e = z(n, "query") ?? z(n, "url");
503
- return {
504
- title: t === "web_search" ? "Web search" : "Fetch",
505
- description: e ? V(e) : void 0,
506
- displayVariant: "web-search"
507
- };
508
- }
509
- case "task":
510
- case "agent":
511
- case "spawn": {
512
- let e = z(n, "description") ?? z(n, "prompt");
513
- return {
514
- title: "Task",
515
- description: e ? V(e) : void 0
516
- };
517
- }
518
- default: return {
519
- title: e.tool || "Tool",
520
- description: i ?? r ?? z(n, "pattern") ?? z(n, "query")
521
- };
522
- }
523
- }
524
- function V(e) {
525
- let t = e.split("\n")[0];
526
- return t.length > 60 ? t.slice(0, 57) + "..." : t;
527
- }
528
- function Me(e, t) {
529
- if (e.state.status === "error") return e.state.error || t;
530
- }
531
- //#endregion
532
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/command-preview.js
533
- var Ne = [
534
- "command",
535
- "cmd",
536
- "script",
537
- "commandLine"
538
- ];
539
- function Pe(e) {
540
- if (typeof e == "string") return e;
541
- if (e && typeof e == "object") {
542
- let t = e;
543
- for (let e of Ne) {
544
- let n = t[e];
545
- if (typeof n == "string" && n.length > 0) return n;
546
- }
547
- }
548
- return "";
549
- }
550
- function Fe(e) {
551
- if (typeof e == "number" && Number.isFinite(e)) return e;
552
- if (typeof e == "string" && e.trim() !== "") {
553
- let t = Number(e);
554
- return Number.isFinite(t) ? t : void 0;
555
- }
556
- }
557
- function Ie(e) {
558
- return e == null ? {
559
- stdout: "",
560
- stderr: "",
561
- exitCode: void 0
562
- } : typeof e == "string" ? ze(e) || {
563
- stdout: e,
564
- stderr: "",
565
- exitCode: void 0
566
- } : typeof e == "object" ? Le(e) : {
567
- stdout: String(e),
568
- stderr: "",
569
- exitCode: void 0
570
- };
571
- }
572
- function Le(e) {
573
- let t = (e) => e == null ? "" : String(e), n = e.timedOut ?? e.timed_out, r = e.signal;
574
- return {
575
- stdout: t(e.stdout ?? e.output),
576
- stderr: t(e.stderr),
577
- exitCode: Fe(e.exitCode ?? e.exit_code ?? e.code),
578
- ...n === !0 ? { timedOut: !0 } : {},
579
- ...typeof r == "string" && r.length > 0 ? { signal: r } : {}
580
- };
581
- }
582
- var Re = /* @__PURE__ */ new Set([
583
- "stdout",
584
- "stderr",
585
- "output",
586
- "exitCode",
587
- "exit_code",
588
- "code",
589
- "signal",
590
- "durationMs",
591
- "duration_ms",
592
- "timedOut",
593
- "timed_out"
594
- ]);
595
- function ze(e) {
596
- let t = e.trimStart();
597
- if (t.startsWith("{")) try {
598
- let e = JSON.parse(t);
599
- if (!e || typeof e != "object" || Array.isArray(e)) return;
600
- let n = e;
601
- return !("stdout" in n) && !("stderr" in n) || !Object.keys(n).every((e) => Re.has(e)) ? void 0 : Le(n);
602
- } catch {
603
- return;
604
- }
605
- }
606
- function Be({ output: e, status: t }) {
607
- if (t === "running" || t === "pending") return /* @__PURE__ */ (0, M.jsxs)("span", {
608
- className: "inline-flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground",
609
- children: [/* @__PURE__ */ (0, M.jsx)(E, {
610
- className: "h-3 w-3 animate-spin",
611
- "aria-hidden": "true"
612
- }), "running"]
613
- });
614
- let { exitCode: r, timedOut: i, signal: a } = e, o, s;
615
- return i ? (o = "timed out", s = "danger") : a ? (o = a, s = "danger") : r !== void 0 && r !== 0 ? (o = `exit ${r}`, s = "danger") : t === "error" ? (o = r === 0 ? "exit 0 · tool reported error" : "tool reported error", s = "warning") : (o = r === 0 ? "exit 0" : null, s = "success"), o === null ? null : /* @__PURE__ */ (0, M.jsx)("span", {
616
- className: n("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)]"),
617
- children: o
618
- });
619
- }
620
- function Ve({ command: e }) {
621
- let t = e.split(/(\s+)/);
622
- return /* @__PURE__ */ (0, M.jsx)(M.Fragment, { children: t.map((e, t) => e.length > 0 && !/\s/.test(e) ? /* @__PURE__ */ (0, M.jsx)("span", {
623
- className: "inline-block max-w-full [overflow-wrap:anywhere]",
624
- children: e
625
- }, t) : e) });
626
- }
627
- function H({ label: e, text: t, className: r }) {
628
- let a = (0, j.useRef)(null), [o, s] = (0, j.useState)(!1), [c, l] = (0, j.useState)(!1);
629
- (0, j.useLayoutEffect)(() => {
630
- let e = a.current;
631
- if (!e || c) return;
632
- let t = () => s(e.scrollHeight > e.clientHeight + 1);
633
- if (t(), typeof ResizeObserver > "u") return;
634
- let n = new ResizeObserver(t);
635
- return n.observe(e), () => n.disconnect();
636
- }, [c]);
637
- let u = t.replace(/\n$/, "").split("\n").length;
638
- return /* @__PURE__ */ (0, M.jsxs)("div", {
639
- className: r,
640
- children: [/* @__PURE__ */ (0, M.jsx)("pre", {
641
- ref: a,
642
- tabIndex: 0,
643
- role: "region",
644
- "aria-label": e,
645
- className: n("overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] px-3 py-2 leading-relaxed", c ? "" : "max-h-80", i),
646
- children: t
647
- }), o && !c ? /* @__PURE__ */ (0, M.jsxs)("button", {
648
- type: "button",
649
- onClick: () => l(!0),
650
- className: n("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", i),
651
- children: [
652
- "Show all ",
653
- e,
654
- " (",
655
- u,
656
- " lines)"
657
- ]
658
- }) : null]
659
- });
660
- }
661
- var He = (0, j.memo)(({ part: e, defaultExpanded: t = !1, className: r }) => {
662
- let [a, o] = (0, j.useState)(t), s = (0, j.useId)(), c = Pe(e.state.input), { status: l } = e.state, u = Ie(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, M.jsxs)(M.Fragment, { children: [
663
- /* @__PURE__ */ (0, M.jsx)("span", {
664
- "aria-hidden": "true",
665
- className: "shrink-0 select-none text-muted-foreground",
666
- children: "$"
667
- }),
668
- /* @__PURE__ */ (0, M.jsx)("code", {
669
- title: a ? void 0 : c,
670
- className: n("min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]", a ? "" : "line-clamp-2"),
671
- children: a ? /* @__PURE__ */ (0, M.jsx)(Ve, { command: c }) : c
672
- }),
673
- /* @__PURE__ */ (0, M.jsx)("span", {
674
- className: "flex shrink-0 max-sm:order-last max-sm:basis-full max-sm:pl-4",
675
- children: /* @__PURE__ */ (0, M.jsx)(Be, {
676
- output: u,
677
- status: l
678
- })
679
- })
680
- ] });
681
- return /* @__PURE__ */ (0, M.jsxs)("div", {
682
- "data-theme": a ? "dark" : void 0,
683
- "data-testid": "command-preview",
684
- "data-expanded": a,
685
- className: n("overflow-hidden rounded-[var(--radius-md)] border font-mono text-xs text-foreground", a ? "border-[var(--md3-surface-container-lowest)] bg-[var(--md3-surface-container-lowest)]" : "border-transparent bg-transparent", r),
686
- children: [p ? /* @__PURE__ */ (0, M.jsxs)("button", {
687
- type: "button",
688
- onClick: () => o((e) => !e),
689
- "aria-expanded": a,
690
- "aria-controls": s,
691
- className: n("flex w-full flex-wrap items-start gap-x-2 gap-y-1 px-3 py-2 text-left transition-colors sm:flex-nowrap", a ? "hover:bg-white/5" : "hover:bg-muted", i),
692
- children: [m, a ? /* @__PURE__ */ (0, M.jsx)(h, {
693
- className: "mt-px h-3.5 w-3.5 shrink-0 text-muted-foreground",
694
- "aria-hidden": "true"
695
- }) : /* @__PURE__ */ (0, M.jsx)(D, {
696
- className: "mt-px h-3.5 w-3.5 shrink-0 text-muted-foreground",
697
- "aria-hidden": "true"
698
- })]
699
- }) : /* @__PURE__ */ (0, M.jsx)("div", {
700
- className: "flex w-full flex-wrap items-start gap-x-2 gap-y-1 px-3 py-2 sm:flex-nowrap",
701
- children: m
702
- }), a && p ? /* @__PURE__ */ (0, M.jsxs)("div", {
703
- id: s,
704
- className: "border-t border-white/10",
705
- children: [
706
- u.stdout ? /* @__PURE__ */ (0, M.jsx)(H, {
707
- label: "stdout",
708
- text: u.stdout,
709
- className: ""
710
- }) : null,
711
- u.stderr ? /* @__PURE__ */ (0, M.jsx)(H, {
712
- label: "stderr",
713
- text: u.stderr,
714
- className: "border-t border-white/10 text-[var(--surface-danger-text)]"
715
- }) : null,
716
- f ? /* @__PURE__ */ (0, M.jsx)(H, {
717
- label: "error",
718
- text: f,
719
- className: "border-t border-white/10 text-[var(--surface-danger-text)]"
720
- }) : null
721
- ]
722
- }) : null]
723
- });
724
- });
725
- He.displayName = "CommandPreview";
726
- //#endregion
727
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/preview-primitives.js
728
- function U({ icon: e, title: t, description: r, meta: i, children: a, className: o }) {
729
- return /* @__PURE__ */ (0, M.jsxs)("div", {
730
- className: n("overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card shadow-[var(--shadow-card)]", o),
731
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
732
- className: "flex items-center gap-2.5 border-b border-border bg-card px-[var(--tool-card-px)] py-[var(--tool-card-py)]",
733
- children: [
734
- /* @__PURE__ */ (0, M.jsx)("div", {
735
- 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",
736
- children: e
737
- }),
738
- /* @__PURE__ */ (0, M.jsx)("div", {
739
- className: "min-w-0 flex-1",
740
- children: /* @__PURE__ */ (0, M.jsxs)("div", {
741
- className: "flex items-center gap-2",
742
- children: [/* @__PURE__ */ (0, M.jsx)("span", {
743
- className: "text-xs font-semibold text-foreground",
744
- children: t
745
- }), r ? /* @__PURE__ */ (0, M.jsx)("span", {
746
- className: "truncate text-xs font-mono text-muted-foreground",
747
- children: r
748
- }) : null]
749
- })
750
- }),
751
- i ? /* @__PURE__ */ (0, M.jsx)("div", {
752
- className: "shrink-0 text-xs text-muted-foreground",
753
- children: i
754
- }) : null
755
- ]
756
- }), a ? /* @__PURE__ */ (0, M.jsx)("div", {
757
- className: "space-y-2 px-[var(--tool-card-px)] py-[var(--tool-card-py)]",
758
- children: a
759
- }) : null]
760
- });
761
- }
762
- function W({ label: e, className: t }) {
763
- return /* @__PURE__ */ (0, M.jsx)("div", {
764
- className: n("rounded-[var(--radius-md)] border border-dashed border-border bg-muted px-3 py-2.5 text-xs text-muted-foreground", t),
765
- children: e
766
- });
767
- }
768
- function G({ error: e }) {
769
- return /* @__PURE__ */ (0, M.jsx)("div", {
770
- 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)]",
771
- children: e
772
- });
773
- }
774
- function K({ label: e = "Running…" }) {
775
- return /* @__PURE__ */ (0, M.jsxs)("div", {
776
- className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted px-3 py-2 text-xs text-muted-foreground",
777
- children: [/* @__PURE__ */ (0, M.jsx)(E, { className: "h-4 w-4 animate-spin text-primary" }), /* @__PURE__ */ (0, M.jsx)("span", { children: e })]
778
- });
779
- }
780
- //#endregion
781
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/write-file-preview.js
782
- function Ue(e) {
783
- if (!e || typeof e != "object") return null;
784
- let t = e;
785
- return {
786
- path: String(t.file_path ?? t.path ?? t.filePath ?? "unknown"),
787
- content: String(t.content ?? t.contents ?? t.data ?? "")
788
- };
789
- }
790
- var We = (0, j.memo)(({ part: e }) => {
791
- let t = Ue(e.state.input);
792
- if (!t) return null;
793
- let n = t.content.split("\n").length, r = d(t.path);
794
- return /* @__PURE__ */ (0, M.jsxs)(U, {
795
- icon: /* @__PURE__ */ (0, M.jsx)(fe, { className: "h-4 w-4" }),
796
- title: "Write file",
797
- description: t.path,
798
- meta: /* @__PURE__ */ (0, M.jsxs)("span", {
799
- className: "text-xs text-muted-foreground",
800
- children: [
801
- "+",
802
- n,
803
- " line",
804
- n === 1 ? "" : "s"
805
- ]
806
- }),
807
- children: [
808
- e.state.status === "running" ? /* @__PURE__ */ (0, M.jsx)(K, { label: "Writing file…" }) : null,
809
- e.state.error ? /* @__PURE__ */ (0, M.jsx)(G, { error: e.state.error }) : null,
810
- /* @__PURE__ */ (0, M.jsx)(S, {
811
- code: t.content,
812
- language: r,
813
- className: "rounded-[var(--radius-md)]",
814
- children: /* @__PURE__ */ (0, M.jsx)(f, { text: t.content })
815
- })
816
- ]
817
- });
818
- });
819
- We.displayName = "WriteFilePreview";
820
- //#endregion
821
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/grep-results-preview.js
822
- function q(e) {
823
- return typeof e == "string" && e.trim() ? e : void 0;
824
- }
825
- function J(e) {
826
- if (typeof e == "string") {
827
- let [t, n, ...r] = e.split(":"), i = Number(n);
828
- return r.length > 0 && Number.isFinite(i) ? {
829
- path: t,
830
- line: i,
831
- text: r.join(":").trim()
832
- } : {
833
- path: "match",
834
- text: e
835
- };
836
- }
837
- if (!e || typeof e != "object") return null;
838
- let t = e, n = q(t.path) ?? q(t.file) ?? q(t.filePath) ?? "match", r = t.line ?? t.lineNumber ?? t.line_number, i = typeof r == "number" ? r : Number(r), a = q(t.text) ?? q(t.content) ?? q(t.lineText) ?? q(t.preview);
839
- return a ? {
840
- path: n,
841
- line: Number.isFinite(i) ? i : void 0,
842
- text: a
843
- } : null;
844
- }
845
- function Ge(e) {
846
- if (!e || typeof e != "object") return;
847
- let t = e;
848
- return q(t.pattern) ?? q(t.query);
849
- }
850
- function Ke(e) {
851
- if (Array.isArray(e)) return e.map(J).filter((e) => e !== null);
852
- if (e && typeof e == "object") {
853
- let t = e, n = [
854
- t.matches,
855
- t.results,
856
- t.output
857
- ];
858
- for (let e of n) if (Array.isArray(e)) return e.map(J).filter((e) => e !== null);
859
- }
860
- return typeof e == "string" ? e.split("\n").map((e) => e.trim()).filter(Boolean).map(J).filter((e) => e !== null) : [];
861
- }
862
- var qe = (0, j.memo)(({ part: e }) => {
863
- let t = Ge(e.state.input), n = (0, j.useMemo)(() => Ke(e.state.output), [e.state.output]), r = (0, j.useMemo)(() => {
864
- let e = /* @__PURE__ */ new Map();
865
- for (let t of n) {
866
- let n = e.get(t.path) ?? [];
867
- n.push(t), e.set(t.path, n);
868
- }
869
- return [...e.entries()];
870
- }, [n]);
871
- return /* @__PURE__ */ (0, M.jsxs)(U, {
872
- icon: /* @__PURE__ */ (0, M.jsx)(ne, { className: "h-4 w-4" }),
873
- title: t ? `Search results for "${t}"` : "Search results",
874
- description: n.length > 0 ? `${n.length} match${n.length === 1 ? "" : "es"}` : void 0,
875
- children: [
876
- e.state.status === "running" ? /* @__PURE__ */ (0, M.jsx)(K, { label: "Searching files…" }) : null,
877
- e.state.error ? /* @__PURE__ */ (0, M.jsx)(G, { error: e.state.error }) : null,
878
- e.state.status === "completed" && n.length === 0 ? /* @__PURE__ */ (0, M.jsx)(W, { label: "No matching files or lines were returned." }) : null,
879
- r.map(([e, t]) => /* @__PURE__ */ (0, M.jsxs)("div", {
880
- className: "rounded-[var(--radius-md)] border border-border bg-muted/55",
881
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
882
- className: "border-b border-border px-3 py-2 text-xs font-medium text-foreground",
883
- children: e
884
- }), /* @__PURE__ */ (0, M.jsx)("div", {
885
- className: "divide-y divide-border",
886
- children: t.map((t, n) => /* @__PURE__ */ (0, M.jsxs)("div", {
887
- className: "grid grid-cols-[auto_minmax(0,1fr)] gap-3 px-3 py-2",
888
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
889
- className: "pt-0.5 text-xs font-mono text-muted-foreground",
890
- children: t.line ?? "·"
891
- }), /* @__PURE__ */ (0, M.jsx)("pre", {
892
- className: "overflow-x-auto whitespace-pre-wrap break-words text-xs font-mono text-foreground",
893
- children: t.text
894
- })]
895
- }, `${e}-${t.line ?? n}-${n}`))
896
- })]
897
- }, e))
898
- ]
899
- });
900
- });
901
- qe.displayName = "GrepResultsPreview";
902
- //#endregion
903
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/glob-results-preview.js
904
- function Je(e) {
905
- return typeof e == "string" && e.trim() ? e : void 0;
906
- }
907
- function Ye(e) {
908
- if (!e || typeof e != "object") return;
909
- let t = e;
910
- return Je(t.pattern) ?? Je(t.path);
911
- }
912
- function Xe(e) {
913
- if (Array.isArray(e)) return e.map((e) => String(e)).filter(Boolean);
914
- if (e && typeof e == "object") {
915
- let t = e, n = t.files ?? t.matches ?? t.paths ?? t.results;
916
- if (Array.isArray(n)) return n.map((e) => typeof e == "string" ? e : e && typeof e == "object" ? String(e.path ?? e.file ?? "") : "").filter(Boolean);
917
- }
918
- return typeof e == "string" ? e.split("\n").map((e) => e.trim()).filter(Boolean) : [];
919
- }
920
- var Ze = (0, j.memo)(({ part: e }) => {
921
- let t = Ye(e.state.input), n = (0, j.useMemo)(() => Xe(e.state.output), [e.state.output]);
922
- return /* @__PURE__ */ (0, M.jsxs)(U, {
923
- icon: /* @__PURE__ */ (0, M.jsx)(l, { className: "h-4 w-4" }),
924
- title: t ? `Files for ${t}` : "File results",
925
- description: n.length > 0 ? `${n.length} path${n.length === 1 ? "" : "s"}` : void 0,
926
- children: [
927
- e.state.status === "running" ? /* @__PURE__ */ (0, M.jsx)(K, { label: "Collecting files…" }) : null,
928
- e.state.error ? /* @__PURE__ */ (0, M.jsx)(G, { error: e.state.error }) : null,
929
- e.state.status === "completed" && n.length === 0 ? /* @__PURE__ */ (0, M.jsx)(W, { label: "No matching files were returned." }) : null,
930
- n.length > 0 ? /* @__PURE__ */ (0, M.jsx)("div", {
931
- className: "grid gap-2 sm:grid-cols-2",
932
- children: n.map((e) => {
933
- let t = e.endsWith("/") ? l : O;
934
- return /* @__PURE__ */ (0, M.jsxs)("div", {
935
- className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted/55 px-3 py-2",
936
- children: [/* @__PURE__ */ (0, M.jsx)(t, { className: "h-4 w-4 shrink-0 text-primary" }), /* @__PURE__ */ (0, M.jsx)("span", {
937
- className: "min-w-0 truncate text-xs font-mono text-foreground",
938
- children: e
939
- })]
940
- }, e);
941
- })
942
- }) : null
943
- ]
944
- });
945
- });
946
- Ze.displayName = "GlobResultsPreview";
947
- //#endregion
948
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/web-search-preview.js
949
- function Y(e) {
950
- return typeof e == "string" && e.trim() ? e : void 0;
951
- }
952
- function Qe(e, t) {
953
- if (e && typeof e == "object") {
954
- let t = e, n = Y(t.query) ?? Y(t.url);
955
- if (n) return n;
956
- }
957
- if (t && typeof t == "object") return Y(t.query);
958
- }
959
- function $e(e) {
960
- if (!e || typeof e != "object") return null;
961
- let t = e, n = Y(t.title) ?? Y(t.name) ?? "Untitled result", r = Y(t.url) ?? Y(t.link);
962
- return r ? {
963
- title: n,
964
- url: r,
965
- snippet: Y(t.snippet) ?? Y(t.description) ?? Y(t.text)
966
- } : null;
967
- }
968
- function et(e) {
969
- if (e && typeof e == "object") {
970
- let t = e, n = t.results ?? t.items ?? t.output;
971
- if (Array.isArray(n)) return n.map($e).filter((e) => e !== null);
972
- }
973
- return Array.isArray(e) ? e.map($e).filter((e) => e !== null) : [];
974
- }
975
- var tt = (0, j.memo)(({ part: e }) => {
976
- let t = Qe(e.state.input, e.state.output), n = (0, j.useMemo)(() => et(e.state.output), [e.state.output]);
977
- return /* @__PURE__ */ (0, M.jsxs)(U, {
978
- icon: /* @__PURE__ */ (0, M.jsx)(re, { className: "h-4 w-4" }),
979
- title: t ? `Web results for ${t}` : "Web results",
980
- description: n.length > 0 ? `${n.length} result${n.length === 1 ? "" : "s"}` : void 0,
981
- children: [
982
- e.state.status === "running" ? /* @__PURE__ */ (0, M.jsx)(K, { label: "Searching the web…" }) : null,
983
- e.state.error ? /* @__PURE__ */ (0, M.jsx)(G, { error: e.state.error }) : null,
984
- e.state.status === "completed" && n.length === 0 ? /* @__PURE__ */ (0, M.jsx)(W, { label: "No web results were returned." }) : null,
985
- /* @__PURE__ */ (0, M.jsx)("div", {
986
- className: "space-y-2",
987
- children: n.map((e) => /* @__PURE__ */ (0, M.jsxs)("a", {
988
- href: e.url,
989
- target: "_blank",
990
- rel: "noreferrer",
991
- 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 ${i}`,
992
- children: [
993
- /* @__PURE__ */ (0, M.jsx)("div", {
994
- className: "text-sm font-medium text-foreground",
995
- children: e.title
996
- }),
997
- /* @__PURE__ */ (0, M.jsx)("div", {
998
- className: "mt-1 truncate text-xs text-primary",
999
- children: e.url
1000
- }),
1001
- e.snippet ? /* @__PURE__ */ (0, M.jsx)("p", {
1002
- className: "mt-2 text-sm leading-relaxed text-muted-foreground",
1003
- children: e.snippet
1004
- }) : null
1005
- ]
1006
- }, e.url))
1007
- })
1008
- ]
1009
- });
1010
- });
1011
- tt.displayName = "WebSearchPreview";
1012
- //#endregion
1013
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/question-preview.js
1014
- function nt(e) {
1015
- if (!e) return [];
1016
- if (typeof e == "string") return [e];
1017
- if (Array.isArray(e)) return e.map((e) => String(e)).filter(Boolean);
1018
- if (typeof e == "object") {
1019
- let t = e, n = t.questions ?? t.question ?? t.prompt;
1020
- if (Array.isArray(n)) return n.map((e) => String(e)).filter(Boolean);
1021
- if (typeof n == "string") return [n];
1022
- }
1023
- return [];
1024
- }
1025
- function rt(e) {
1026
- if (!e) return [];
1027
- if (typeof e == "string") return [e];
1028
- if (Array.isArray(e)) return e.map((e) => String(e)).filter(Boolean);
1029
- if (typeof e == "object") {
1030
- let t = e, n = t.answers ?? t.answer ?? t.response;
1031
- if (Array.isArray(n)) return n.map((e) => String(e)).filter(Boolean);
1032
- if (typeof n == "string") return [n];
1033
- }
1034
- return [];
1035
- }
1036
- var it = (0, j.memo)(({ part: e }) => {
1037
- let t = (0, j.useMemo)(() => nt(e.state.input), [e.state.input]), n = (0, j.useMemo)(() => rt(e.state.output), [e.state.output]);
1038
- return /* @__PURE__ */ (0, M.jsxs)(U, {
1039
- icon: /* @__PURE__ */ (0, M.jsx)(ve, { className: "h-4 w-4" }),
1040
- title: "Agent question",
1041
- description: t.length > 1 ? `${t.length} questions require attention` : void 0,
1042
- children: [
1043
- e.state.status === "running" ? /* @__PURE__ */ (0, M.jsx)(K, { label: "Waiting for an answer…" }) : null,
1044
- e.state.error ? /* @__PURE__ */ (0, M.jsx)(G, { error: e.state.error }) : null,
1045
- t.length === 0 ? /* @__PURE__ */ (0, M.jsx)(W, { label: "No question text was provided." }) : null,
1046
- t.map((t, r) => /* @__PURE__ */ (0, M.jsxs)("div", {
1047
- className: "rounded-[var(--radius-md)] border border-border bg-muted px-3 py-3",
1048
- children: [
1049
- /* @__PURE__ */ (0, M.jsxs)("div", {
1050
- className: "text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",
1051
- children: ["Question ", r + 1]
1052
- }),
1053
- /* @__PURE__ */ (0, M.jsx)("div", {
1054
- className: "mt-2 text-sm leading-relaxed text-foreground",
1055
- children: t
1056
- }),
1057
- /* @__PURE__ */ (0, M.jsx)("div", {
1058
- className: "mt-3 rounded-[var(--radius-sm)] border border-border bg-card px-3 py-2 text-sm text-foreground",
1059
- children: n[r] ?? (e.state.status === "completed" ? "No answer recorded." : "Awaiting answer")
1060
- })
1061
- ]
1062
- }, `${t}-${r}`))
1063
- ]
1064
- });
1065
- });
1066
- it.displayName = "QuestionPreview";
1067
- //#endregion
1068
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/tool-previews/diff-preview.js
1069
- function X(e, ...t) {
1070
- for (let n of t) {
1071
- let t = e[n];
1072
- if (typeof t == "string" && t.length > 0) return t;
1073
- }
1074
- }
1075
- function at(e) {
1076
- let t = [
1077
- e.state.input,
1078
- e.state.output,
1079
- e.state.metadata
1080
- ];
1081
- for (let e of t) {
1082
- if (!e || typeof e != "object") continue;
1083
- let t = e, n = X(t, "diff", "patch", "unifiedDiff", "unified_diff"), r = X(t, "oldString", "old_string", "before", "previous"), i = X(t, "newString", "new_string", "after", "updated"), a = X(t, "file_path", "filePath", "path");
1084
- if (n || r || i) return {
1085
- path: a,
1086
- diff: n,
1087
- before: r,
1088
- after: i
1089
- };
1090
- }
1091
- return {};
1092
- }
1093
- var ot = (0, j.memo)(({ part: e }) => {
1094
- let t = at(e);
1095
- return /* @__PURE__ */ (0, M.jsxs)(U, {
1096
- icon: /* @__PURE__ */ (0, M.jsx)(ge, { className: "h-4 w-4" }),
1097
- title: t.path ? `Changes for ${t.path}` : "File changes",
1098
- children: [
1099
- e.state.status === "running" ? /* @__PURE__ */ (0, M.jsx)(K, { label: "Computing changes…" }) : null,
1100
- e.state.error ? /* @__PURE__ */ (0, M.jsx)(G, { error: e.state.error }) : null,
1101
- !t.diff && !t.before && !t.after ? /* @__PURE__ */ (0, M.jsx)(W, { label: "No structured diff payload was provided." }) : null,
1102
- t.diff ? /* @__PURE__ */ (0, M.jsx)(S, {
1103
- code: t.diff,
1104
- language: "diff",
1105
- className: "rounded-[var(--radius-md)]"
1106
- }) : null,
1107
- !t.diff && t.before ? /* @__PURE__ */ (0, M.jsxs)("div", {
1108
- className: "space-y-2",
1109
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
1110
- className: "text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",
1111
- children: "Before"
1112
- }), /* @__PURE__ */ (0, M.jsx)(S, {
1113
- code: t.before,
1114
- language: "text",
1115
- className: "rounded-[var(--radius-md)]"
1116
- })]
1117
- }) : null,
1118
- !t.diff && t.after ? /* @__PURE__ */ (0, M.jsxs)("div", {
1119
- className: "space-y-2",
1120
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
1121
- className: "text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground",
1122
- children: "After"
1123
- }), /* @__PURE__ */ (0, M.jsx)(S, {
1124
- code: t.after,
1125
- language: "text",
1126
- className: "rounded-[var(--radius-md)]"
1127
- })]
1128
- }) : null
1129
- ]
1130
- });
1131
- });
1132
- ot.displayName = "DiffPreview";
1133
- //#endregion
1134
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/run/expandable-content.js
1135
- function Z({ children: e, collapsedMaxPx: t = 180, fadeClassName: r = "from-muted", className: i, toggleClassName: a }) {
1136
- let [o, s] = (0, j.useState)(!1), [c, l] = (0, j.useState)(!1), u = (0, j.useRef)(null);
1137
- (0, j.useEffect)(() => {
1138
- let e = u.current;
1139
- if (!e) return;
1140
- let n = () => l(e.scrollHeight > t + 4);
1141
- if (n(), typeof ResizeObserver > "u") return;
1142
- let r = new ResizeObserver(n);
1143
- return r.observe(e), () => r.disconnect();
1144
- }, [t]);
1145
- let d = c && !o;
1146
- return /* @__PURE__ */ (0, M.jsxs)("div", {
1147
- className: i,
1148
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1149
- ref: u,
1150
- className: "relative overflow-hidden",
1151
- style: d ? { maxHeight: t } : void 0,
1152
- children: [e, d ? /* @__PURE__ */ (0, M.jsx)("div", { className: n("pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t to-transparent", r) }) : null]
1153
- }), c ? /* @__PURE__ */ (0, M.jsx)("button", {
1154
- type: "button",
1155
- onClick: () => s((e) => !e),
1156
- className: n("mt-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground", a),
1157
- children: o ? "Show less" : "Show more"
1158
- }) : null]
1159
- });
1160
- }
1161
- //#endregion
1162
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/run/expanded-tool-detail.js
1163
- var st = "mx-3 mb-2", ct = {
1164
- ts: "typescript",
1165
- tsx: "tsx",
1166
- js: "javascript",
1167
- jsx: "jsx",
1168
- rs: "rust",
1169
- py: "python",
1170
- go: "go",
1171
- rb: "ruby",
1172
- json: "json",
1173
- yaml: "yaml",
1174
- yml: "yaml",
1175
- toml: "toml",
1176
- md: "markdown",
1177
- css: "css",
1178
- scss: "scss",
1179
- html: "html",
1180
- sh: "bash",
1181
- bash: "bash",
1182
- zsh: "bash",
1183
- sql: "sql",
1184
- sol: "solidity",
1185
- proto: "protobuf"
1186
- };
1187
- function lt(e) {
1188
- if (!e) return;
1189
- let t = e.split(".").pop()?.toLowerCase();
1190
- return t ? ct[t] : void 0;
1191
- }
1192
- function ut(e) {
1193
- if (e == null) return "";
1194
- if (typeof e == "string") return e;
1195
- try {
1196
- return JSON.stringify(e, null, 2);
1197
- } catch {
1198
- return String(e);
1199
- }
1200
- }
1201
- var dt = (0, j.memo)(({ part: e }) => {
1202
- let t = B(e), { status: r, input: i, output: o, error: s } = e.state;
1203
- if (t.displayVariant === "command") return /* @__PURE__ */ (0, M.jsx)(He, {
1204
- part: e,
1205
- defaultExpanded: !0
1206
- });
1207
- if (t.displayVariant === "write-file") return /* @__PURE__ */ (0, M.jsx)(We, { part: e });
1208
- if (t.displayVariant === "grep") return /* @__PURE__ */ (0, M.jsx)(qe, { part: e });
1209
- if (t.displayVariant === "glob") return /* @__PURE__ */ (0, M.jsx)(Ze, { part: e });
1210
- if (t.displayVariant === "web-search") return /* @__PURE__ */ (0, M.jsx)(tt, { part: e });
1211
- if (t.displayVariant === "question") return /* @__PURE__ */ (0, M.jsx)(it, { part: e });
1212
- if (t.displayVariant === "diff") return /* @__PURE__ */ (0, M.jsx)(ot, { part: e });
1213
- if (t.displayVariant === "read-file") return /* @__PURE__ */ (0, M.jsxs)("div", {
1214
- className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card shadow-[var(--shadow-card)]",
1215
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1216
- className: "flex items-center gap-2.5 border-b border-border bg-card px-3 py-2",
1217
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
1218
- 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",
1219
- children: /* @__PURE__ */ (0, M.jsx)(O, { className: "h-3.5 w-3.5" })
1220
- }), /* @__PURE__ */ (0, M.jsxs)("div", {
1221
- className: "min-w-0 flex items-center gap-2",
1222
- children: [/* @__PURE__ */ (0, M.jsx)("span", {
1223
- className: "text-xs font-semibold text-foreground",
1224
- children: "Read file"
1225
- }), t.targetPath ? /* @__PURE__ */ (0, M.jsx)("span", {
1226
- className: "truncate text-xs font-mono text-muted-foreground",
1227
- children: t.targetPath
1228
- }) : null]
1229
- })]
1230
- }), /* @__PURE__ */ (0, M.jsxs)("div", {
1231
- className: "space-y-2 px-3 py-2.5",
1232
- children: [typeof o == "string" ? /* @__PURE__ */ (0, M.jsx)(S, {
1233
- code: o,
1234
- language: lt(t.targetPath) ?? "text",
1235
- className: "rounded-[var(--radius-md)]"
1236
- }) : /* @__PURE__ */ (0, M.jsx)("div", {
1237
- className: "rounded-[var(--radius-md)] border border-dashed border-border bg-muted px-3 py-4 text-sm text-muted-foreground",
1238
- children: "No readable file content was returned."
1239
- }), s ? /* @__PURE__ */ (0, M.jsx)("div", {
1240
- 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)]",
1241
- children: s
1242
- }) : null]
1243
- })]
1244
- });
1245
- let l = ut(i), u = ut(o);
1246
- return /* @__PURE__ */ (0, M.jsxs)("div", {
1247
- className: "space-y-3",
1248
- children: [
1249
- l && /* @__PURE__ */ (0, M.jsxs)("div", {
1250
- className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card",
1251
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1252
- className: "flex items-center gap-2 border-b border-border bg-background px-3 py-2",
1253
- children: [/* @__PURE__ */ (0, M.jsx)(oe, { className: "h-3 w-3 text-primary" }), /* @__PURE__ */ (0, M.jsx)("span", {
1254
- className: "text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",
1255
- children: "Input"
1256
- })]
1257
- }), /* @__PURE__ */ (0, M.jsx)(S, {
1258
- code: l,
1259
- language: "json",
1260
- className: "rounded-none border-0"
1261
- })]
1262
- }),
1263
- r === "completed" && u && /* @__PURE__ */ (0, M.jsxs)("div", {
1264
- className: "overflow-hidden rounded-[var(--radius-lg)] border border-border bg-card",
1265
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1266
- className: "flex items-center gap-2 border-b border-border bg-background px-3 py-2",
1267
- children: [/* @__PURE__ */ (0, M.jsx)(c, { className: "h-3 w-3 text-primary" }), /* @__PURE__ */ (0, M.jsx)("span", {
1268
- className: "text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",
1269
- children: "Output"
1270
- })]
1271
- }), /* @__PURE__ */ (0, M.jsx)(Z, {
1272
- fadeClassName: "from-card",
1273
- toggleClassName: st,
1274
- children: /* @__PURE__ */ (0, M.jsx)(S, {
1275
- code: u.length > 2e3 ? u.slice(0, 2e3) + "\n...(truncated)" : u,
1276
- language: "json",
1277
- className: "rounded-none border-0"
1278
- })
1279
- })]
1280
- }),
1281
- s && /* @__PURE__ */ (0, M.jsxs)("div", {
1282
- className: "overflow-hidden rounded-[var(--radius-lg)] border border-[var(--surface-danger-border)]",
1283
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1284
- className: "flex items-center gap-2 border-b border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] px-3 py-2",
1285
- children: [/* @__PURE__ */ (0, M.jsx)(a, { className: "h-3 w-3 text-[var(--surface-danger-text)]" }), /* @__PURE__ */ (0, M.jsx)("span", {
1286
- className: "text-xs font-medium uppercase tracking-[0.08em] text-[var(--surface-danger-text)]",
1287
- children: "Error"
1288
- })]
1289
- }), /* @__PURE__ */ (0, M.jsx)(Z, {
1290
- fadeClassName: "from-[var(--surface-danger-bg)]",
1291
- toggleClassName: st,
1292
- children: /* @__PURE__ */ (0, M.jsx)("pre", {
1293
- className: "bg-[var(--surface-danger-bg)] p-3 text-xs font-mono whitespace-pre-wrap break-all text-[var(--surface-danger-text)]",
1294
- children: s
1295
- })
1296
- })]
1297
- }),
1298
- (r === "pending" || r === "running") && /* @__PURE__ */ (0, M.jsxs)("div", {
1299
- className: "flex items-center gap-2 rounded-[var(--radius-md)] border border-border bg-muted px-3 py-3 text-xs text-muted-foreground",
1300
- children: [/* @__PURE__ */ (0, M.jsx)(E, { className: n("h-3 w-3 animate-spin text-primary") }), "Running…"]
1301
- })
1302
- ]
1303
- });
1304
- });
1305
- dt.displayName = "ExpandedToolDetail";
1306
- //#endregion
1307
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/run/run-row-shell.js
1308
- var ft = {
1309
- single: "rounded-[var(--radius-lg)]",
1310
- first: "rounded-t-[var(--radius-lg)] rounded-b-[var(--radius-sm)]",
1311
- middle: "rounded-[var(--radius-sm)]",
1312
- last: "rounded-t-[var(--radius-sm)] rounded-b-[var(--radius-lg)]"
1313
- }, pt = "px-2 py-1", mt = "pl-[2.375rem]";
1314
- function Q({ icon: e, title: t, description: r, descriptionMono: i = !1, status: a = "idle", durationMs: s, groupPosition: c = "single", collapsedError: l, actions: d, open: f, onOpenChange: m, defaultOpen: h = !1, className: g, contentClassName: _, children: v }) {
1315
- let [y, b] = (0, j.useState)(h), x = f !== void 0, S = x ? f : y, C = (e) => {
1316
- x || b(e), m?.(e);
1317
- }, w = a === "running", T = v != null;
1318
- return /* @__PURE__ */ (0, M.jsx)(u, {
1319
- open: S,
1320
- onOpenChange: C,
1321
- children: /* @__PURE__ */ (0, M.jsxs)("div", {
1322
- className: "flex items-start gap-2",
1323
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1324
- "data-run-row": "",
1325
- "data-state": S ? "open" : "closed",
1326
- className: n("group min-w-0 flex-1 overflow-hidden border transition-colors", S ? "border-border bg-[var(--md3-surface-container)]" : "border-transparent bg-transparent", T && !S && "hover:bg-[var(--md3-surface-container)]", ft[c], g),
1327
- children: [
1328
- /* @__PURE__ */ (0, M.jsx)(ee, {
1329
- asChild: !0,
1330
- disabled: !T,
1331
- children: /* @__PURE__ */ (0, M.jsxs)("button", {
1332
- type: "button",
1333
- className: n("flex w-full items-center gap-2 text-left", pt, T ? "cursor-pointer" : "cursor-default"),
1334
- children: [
1335
- /* @__PURE__ */ (0, M.jsxs)("span", {
1336
- "aria-hidden": !0,
1337
- "data-run-row-status": a === "error" ? "error" : void 0,
1338
- className: n("flex h-[1.375rem] w-[1.375rem] shrink-0 items-center justify-center", a === "error" ? "text-[var(--surface-danger-text)]" : "text-muted-foreground"),
1339
- children: [/* @__PURE__ */ (0, M.jsx)("span", {
1340
- "data-run-row-glyph": "",
1341
- className: n("flex items-center justify-center", T && "group-hover:hidden", S && "hidden"),
1342
- children: e
1343
- }), T ? /* @__PURE__ */ (0, M.jsx)(D, {
1344
- "data-run-row-chevron": "",
1345
- className: n("hidden h-3.5 w-3.5 transition-transform group-hover:block", S && "block rotate-90")
1346
- }) : null]
1347
- }),
1348
- /* @__PURE__ */ (0, M.jsx)("span", {
1349
- className: n("shrink-0 whitespace-nowrap text-sm font-normal text-muted-foreground transition-colors group-hover:text-foreground", S && "text-foreground"),
1350
- children: t
1351
- }),
1352
- r ? /* @__PURE__ */ (0, M.jsx)("span", {
1353
- className: n("min-w-0 flex-1 truncate text-sm text-muted-foreground transition-colors group-hover:text-foreground", i && "font-mono"),
1354
- children: r
1355
- }) : null,
1356
- !w && s != null ? /* @__PURE__ */ (0, M.jsx)("span", {
1357
- "data-run-row-duration": "",
1358
- className: "ml-auto shrink-0 font-mono text-sm tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
1359
- children: p(s)
1360
- }) : null
1361
- ]
1362
- })
1363
- }),
1364
- l && !S ? /* @__PURE__ */ (0, M.jsx)("div", {
1365
- className: n("pb-1.5 pr-2 text-sm leading-snug text-[var(--surface-danger-text)]", mt),
1366
- children: l
1367
- }) : null,
1368
- T ? /* @__PURE__ */ (0, M.jsx)(o, {
1369
- className: "overflow-hidden data-[state=open]:animate-slideDown data-[state=closed]:animate-slideUp",
1370
- children: /* @__PURE__ */ (0, M.jsx)("div", {
1371
- className: n("border-t border-border", _),
1372
- children: v
1373
- })
1374
- }) : null
1375
- ]
1376
- }), d ? /* @__PURE__ */ (0, M.jsx)("div", {
1377
- className: "flex shrink-0 flex-wrap items-center justify-end gap-1.5 pt-1",
1378
- onClick: (e) => e.stopPropagation(),
1379
- children: d
1380
- }) : null]
1381
- })
1382
- });
1383
- }
1384
- //#endregion
1385
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/run/inline-tool-item.js
1386
- var ht = {
1387
- command: ie,
1388
- write: fe,
1389
- read: me,
1390
- search: ne,
1391
- edit: be,
1392
- task: w,
1393
- web: re,
1394
- todo: de,
1395
- other: Se
1396
- };
1397
- function gt(e) {
1398
- return e === "pending" || e === "running" ? "running" : e === "error" ? "error" : "success";
1399
- }
1400
- var _t = (0, j.memo)(({ part: e, renderToolDetail: t, groupPosition: r = "single", className: i, contentClassName: a, actions: o, title: s, description: c }) => {
1401
- let l = B(e), u = s ?? l.title, d = c ?? l.description, f = Me(e), p = e.state.time?.start, m = e.state.time?.end, h = p != null && m != null ? m - p : void 0, g = ht[je(e.tool)] ?? Se, _ = gt(e.state.status);
1402
- return /* @__PURE__ */ (0, M.jsx)(Q, {
1403
- icon: /* @__PURE__ */ (0, M.jsx)(g, { className: "h-3.5 w-3.5" }),
1404
- title: _ === "running" ? /* @__PURE__ */ (0, M.jsx)(x, { children: u }) : u,
1405
- description: d,
1406
- descriptionMono: !0,
1407
- status: _,
1408
- durationMs: h,
1409
- groupPosition: r,
1410
- collapsedError: f ?? void 0,
1411
- actions: o,
1412
- className: i,
1413
- contentClassName: n("p-2", a),
1414
- children: t?.(e) ?? /* @__PURE__ */ (0, M.jsx)(dt, { part: e })
1415
- });
1416
- });
1417
- _t.displayName = "InlineToolItem";
1418
- //#endregion
1419
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/run/inline-thinking-item.js
1420
- var vt = (0, j.memo)(({ part: e, defaultOpen: t = !1, autoCollapse: n = !0, openWhileActive: r = !0, className: i, contentClassName: a }) => {
1421
- let [o, s] = (0, j.useState)(t), c = (0, j.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 ? y(g(e.text), 120) : void 0;
1422
- return (0, j.useEffect)(() => {
1423
- if (f) {
1424
- c.current = !1, r && s(!0);
1425
- return;
1426
- }
1427
- if (n && !c.current && d != null) {
1428
- let e = window.setTimeout(() => {
1429
- s(!1), c.current = !0;
1430
- }, 900);
1431
- return () => window.clearTimeout(e);
1432
- }
1433
- }, [
1434
- n,
1435
- d,
1436
- f,
1437
- r
1438
- ]), /* @__PURE__ */ (0, M.jsx)(Q, {
1439
- icon: /* @__PURE__ */ (0, M.jsx)(ce, { className: "h-3.5 w-3.5" }),
1440
- title: f ? /* @__PURE__ */ (0, M.jsx)(x, { children: "Thinking…" }) : "Reasoning",
1441
- description: p,
1442
- status: f ? "running" : "idle",
1443
- durationMs: d,
1444
- open: o,
1445
- onOpenChange: s,
1446
- className: i,
1447
- children: e.text ? /* @__PURE__ */ (0, M.jsx)(Z, {
1448
- fadeClassName: "from-[var(--md3-surface-container)]",
1449
- className: a ? `px-3 py-3 ${a}` : "px-3 py-3",
1450
- children: /* @__PURE__ */ (0, M.jsx)("div", {
1451
- className: "text-sm leading-relaxed text-foreground",
1452
- children: /* @__PURE__ */ (0, M.jsx)(v, { children: e.text })
1453
- })
1454
- }) : /* @__PURE__ */ (0, M.jsx)("div", {
1455
- className: "px-3 py-2.5 text-sm text-muted-foreground",
1456
- children: "No reasoning text provided."
1457
- })
1458
- });
1459
- });
1460
- vt.displayName = "InlineThinkingItem";
1461
- //#endregion
1462
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/chat/thinking-indicator.js
1463
- function yt({ className: e }) {
1464
- let [t, r] = (0, j.useState)(0);
1465
- return (0, j.useEffect)(() => {
1466
- let e = window.setInterval(() => r((e) => e + 1), 1e3);
1467
- return () => window.clearInterval(e);
1468
- }, []), /* @__PURE__ */ (0, M.jsxs)("div", {
1469
- role: "status",
1470
- "aria-label": "Agent is thinking",
1471
- className: n("flex items-center gap-2 px-3 py-1.5", e),
1472
- children: [/* @__PURE__ */ (0, M.jsxs)("div", {
1473
- className: "flex gap-[3px]",
1474
- children: [
1475
- /* @__PURE__ */ (0, M.jsx)("span", {
1476
- className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]",
1477
- style: { animationDelay: "0ms" }
1478
- }),
1479
- /* @__PURE__ */ (0, M.jsx)("span", {
1480
- className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]",
1481
- style: { animationDelay: "150ms" }
1482
- }),
1483
- /* @__PURE__ */ (0, M.jsx)("span", {
1484
- className: "h-[var(--indicator-dot-size)] w-[var(--indicator-dot-size)] animate-bounce rounded-full bg-[var(--brand-glow)]",
1485
- style: { animationDelay: "300ms" }
1486
- })
1487
- ]
1488
- }), t > 3 && /* @__PURE__ */ (0, M.jsxs)("span", {
1489
- className: "text-[length:var(--font-size-xs)] tabular-nums text-muted-foreground",
1490
- children: [t, "s"]
1491
- })]
1492
- });
1493
- }
1494
- //#endregion
1495
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/run/tool-call-step.js
1496
- var bt = {
1497
- ts: "typescript",
1498
- tsx: "typescript",
1499
- js: "javascript",
1500
- jsx: "javascript",
1501
- mjs: "javascript",
1502
- cjs: "javascript",
1503
- css: "css",
1504
- scss: "scss",
1505
- json: "json",
1506
- jsonc: "json",
1507
- md: "markdown",
1508
- mdx: "markdown",
1509
- py: "python",
1510
- sh: "bash",
1511
- bash: "bash",
1512
- zsh: "bash",
1513
- html: "html",
1514
- htm: "html",
1515
- yaml: "yaml",
1516
- yml: "yaml",
1517
- toml: "toml",
1518
- rs: "rust",
1519
- go: "go",
1520
- sql: "sql",
1521
- xml: "xml"
1522
- };
1523
- function xt(e, t) {
1524
- if (t) return t;
1525
- if (!e) return;
1526
- let n = e.split(".").pop()?.toLowerCase();
1527
- return n ? bt[n] : void 0;
1528
- }
1529
- var St = {
1530
- running: "running",
1531
- success: "completed",
1532
- error: "error"
1533
- };
1534
- function Ct({ type: e, label: t, status: n, detail: r, output: i, language: a, duration: o, className: s, actions: c, part: l }) {
1535
- let u = l ?? {
1536
- type: "tool",
1537
- id: `${e}:${t}`,
1538
- tool: e,
1539
- state: {
1540
- status: St[n],
1541
- input: r ? { detail: r } : void 0,
1542
- output: i,
1543
- time: o == null ? void 0 : {
1544
- start: 0,
1545
- end: o
1546
- }
1547
- }
1548
- }, d = xt(r, a);
1549
- return /* @__PURE__ */ (0, M.jsx)(_t, {
1550
- part: u,
1551
- title: t,
1552
- description: r,
1553
- className: s,
1554
- actions: c,
1555
- renderToolDetail: l ? void 0 : i ? () => /* @__PURE__ */ (0, M.jsx)(S, {
1556
- code: i,
1557
- language: d,
1558
- className: "max-h-72 overflow-auto text-xs"
1559
- }) : () => null
1560
- });
1561
- }
1562
- function wt({ title: e, children: t, className: r }) {
1563
- return /* @__PURE__ */ (0, M.jsx)("div", {
1564
- role: "group",
1565
- "aria-label": e,
1566
- className: n("flex flex-col gap-1", r),
1567
- children: t
1568
- });
1569
- }
1570
- //#endregion
1571
- //#region node_modules/.pnpm/@tangle-network+ui@11.47.0_@nanostores+react@1.1.0_nanostores@1.5.5_react@19.3.0__@shik_0d590f730856c7e14e0139f079bd126c/node_modules/@tangle-network/ui/dist/chat/agent-timeline.js
1572
- var Tt = {
1573
- default: {
1574
- card: "border-border bg-card",
1575
- text: "text-foreground",
1576
- supportingText: "text-muted-foreground",
1577
- icon: ue
1578
- },
1579
- info: {
1580
- card: "border-[var(--surface-info-border)] bg-[var(--surface-info-bg)]",
1581
- text: "text-[var(--surface-info-text)]",
1582
- supportingText: "text-[var(--surface-info-text)]",
1583
- icon: s
1584
- },
1585
- success: {
1586
- card: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]",
1587
- text: "text-[var(--surface-success-text)]",
1588
- supportingText: "text-[var(--surface-success-text)]",
1589
- icon: te
1590
- },
1591
- warning: {
1592
- card: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)]",
1593
- text: "text-[var(--surface-warning-text)]",
1594
- supportingText: "text-[var(--surface-warning-text)]",
1595
- icon: T
1596
- },
1597
- error: {
1598
- card: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)]",
1599
- text: "text-[var(--surface-danger-text)]",
1600
- supportingText: "text-[var(--surface-danger-text)]",
1601
- icon: T
1602
- }
1603
- };
1604
- function $(e) {
1605
- return e.kind === "message" ? e.role === "user" ? "user" : "prose" : e.kind === "status" || e.kind === "artifact" ? "card" : "tool";
1606
- }
1607
- function Et(e, t) {
1608
- return e === void 0 ? "" : e === "user" || t === "user" ? "mt-4" : e === "card" || t === "card" ? "mt-2" : e === "tool" || t === "tool" ? "mt-1" : "mt-3";
1609
- }
1610
- var Dt = "-mx-3", Ot = "[&>: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-['']";
1611
- function kt({ item: e, author: t }) {
1612
- return /* @__PURE__ */ (0, M.jsxs)("div", { children: [
1613
- t && /* @__PURE__ */ (0, M.jsx)(P, {
1614
- author: t,
1615
- className: "mb-1.5"
1616
- }),
1617
- e.content && /* @__PURE__ */ (0, M.jsx)(v, {
1618
- className: n("tangle-prose", "tangle-transcript-text text-[length:var(--transcript-font-size)] leading-[var(--transcript-line-height)]", e.isStreaming && Ot),
1619
- children: e.content
1620
- }),
1621
- e.isStreaming && !e.content && /* @__PURE__ */ (0, M.jsx)("span", {
1622
- "aria-hidden": !0,
1623
- "data-streaming-caret": "",
1624
- className: "ml-0.5 inline-block h-[1em] w-0.5 animate-pulse rounded-full bg-muted-foreground align-text-bottom"
1625
- }),
1626
- e.toolCalls && /* @__PURE__ */ (0, M.jsx)("div", {
1627
- className: "mt-1",
1628
- children: e.toolCalls
1629
- }),
1630
- e.after && /* @__PURE__ */ (0, M.jsx)("div", {
1631
- className: "mt-3 border-t border-border pt-3",
1632
- children: e.after
1633
- })
1634
- ] });
1635
- }
1636
- function At({ item: e }) {
1637
- let t = Tt[e.tone ?? "default"], r = t.icon;
1638
- return /* @__PURE__ */ (0, M.jsx)("div", {
1639
- className: n("rounded-[var(--radius-lg)] border px-4 py-3", t.card),
1640
- children: /* @__PURE__ */ (0, M.jsxs)("div", {
1641
- className: "flex items-start gap-3",
1642
- children: [/* @__PURE__ */ (0, M.jsx)(r, { className: n("mt-0.5 h-4 w-4 shrink-0", t.text) }), /* @__PURE__ */ (0, M.jsxs)("div", {
1643
- className: "min-w-0",
1644
- children: [/* @__PURE__ */ (0, M.jsx)("div", {
1645
- className: n("text-sm font-medium", t.text),
1646
- children: e.label
1647
- }), e.detail && /* @__PURE__ */ (0, M.jsx)("div", {
1648
- className: n("mt-0.5 text-sm", t.supportingText),
1649
- children: e.detail
1650
- })]
1651
- })]
1652
- })
1653
- });
1654
- }
1655
- function jt({ item: e }) {
1656
- let t = Tt[e.tone ?? "default"], r = /* @__PURE__ */ (0, M.jsx)("div", {
1657
- className: n("rounded-[var(--radius-lg)] border px-4 py-3", t.card),
1658
- children: /* @__PURE__ */ (0, M.jsxs)("div", {
1659
- className: "flex items-start gap-3",
1660
- children: [
1661
- /* @__PURE__ */ (0, M.jsx)("div", {
1662
- 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",
1663
- children: e.icon ?? /* @__PURE__ */ (0, M.jsx)(O, { className: "h-4 w-4" })
1664
- }),
1665
- /* @__PURE__ */ (0, M.jsxs)("div", {
1666
- className: "min-w-0 flex-1",
1667
- children: [
1668
- /* @__PURE__ */ (0, M.jsx)("div", {
1669
- className: n("text-sm font-medium", t.text),
1670
- children: e.title
1671
- }),
1672
- e.description && /* @__PURE__ */ (0, M.jsx)("div", {
1673
- className: n("mt-1 text-sm", t.supportingText),
1674
- children: e.description
1675
- }),
1676
- e.meta && /* @__PURE__ */ (0, M.jsx)("div", {
1677
- className: n("mt-2 flex flex-wrap items-center gap-2 text-xs", t.supportingText),
1678
- children: e.meta
1679
- })
1680
- ]
1681
- }),
1682
- e.action && /* @__PURE__ */ (0, M.jsx)("div", {
1683
- className: "shrink-0",
1684
- children: e.action
1685
- })
1686
- ]
1687
- })
1688
- });
1689
- return e.onClick ? /* @__PURE__ */ (0, M.jsx)("div", {
1690
- role: "button",
1691
- tabIndex: 0,
1692
- onClick: e.onClick,
1693
- onKeyDown: (t) => {
1694
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.onClick?.());
1695
- },
1696
- className: n("block w-full rounded-[var(--radius-lg)] text-left transition-transform hover:-translate-y-0.5", i),
1697
- children: r
1698
- }) : r;
1699
- }
1700
- function Mt({ className: e, children: t }) {
1701
- return /* @__PURE__ */ (0, M.jsx)("div", {
1702
- className: n("mx-auto flex w-full max-w-5xl flex-col px-4 py-4", e),
1703
- children: t
1704
- });
1705
- }
1706
- function Nt({ item: e, previous: t, headed: r, renderToolActions: i, viewerId: a }) {
1707
- let o = $(e);
1708
- return /* @__PURE__ */ (0, M.jsx)("div", {
1709
- "data-timeline-step": o,
1710
- className: n(Et(t, o), o === "tool" && Dt),
1711
- children: /* @__PURE__ */ (0, M.jsx)(Pt, {
1712
- item: e,
1713
- headed: r,
1714
- renderToolActions: i,
1715
- viewerId: a
1716
- })
1717
- });
1718
- }
1719
- function Pt({ item: e, headed: t, renderToolActions: n, viewerId: r }) {
1720
- return e.kind === "message" ? e.role === "user" ? /* @__PURE__ */ (0, M.jsx)(L, {
1721
- content: e.content,
1722
- timestamp: e.timestamp,
1723
- author: e.author,
1724
- viewerId: r
1725
- }) : /* @__PURE__ */ (0, M.jsx)(kt, {
1726
- item: e,
1727
- author: t ? e.author : void 0
1728
- }) : e.kind === "tool" ? /* @__PURE__ */ (0, M.jsx)(Ct, {
1729
- type: e.call.type,
1730
- label: e.call.label,
1731
- status: e.call.status,
1732
- detail: e.call.detail,
1733
- output: e.call.output,
1734
- duration: e.call.duration,
1735
- part: e.part,
1736
- actions: e.part ? n?.(e.part) : void 0
1737
- }) : e.kind === "tool_group" ? /* @__PURE__ */ (0, M.jsx)(wt, {
1738
- title: e.title,
1739
- children: e.calls.map((t, r) => {
1740
- let i = e.parts?.[r];
1741
- return /* @__PURE__ */ (0, M.jsx)(Ct, {
1742
- type: t.type,
1743
- label: t.label,
1744
- status: t.status,
1745
- detail: t.detail,
1746
- output: t.output,
1747
- duration: t.duration,
1748
- part: i,
1749
- actions: i ? n?.(i) : void 0
1750
- }, t.id);
1751
- })
1752
- }) : e.kind === "status" ? /* @__PURE__ */ (0, M.jsx)(At, { item: e }) : e.kind === "artifact" ? /* @__PURE__ */ (0, M.jsx)(jt, { item: e }) : e.content;
1753
- }
1754
- function Ft({ items: e, isThinking: t, emptyState: r, className: i, renderToolActions: a, collapseAfter: o, viewerId: s }) {
1755
- let [c, l] = (0, j.useState)(!1);
1756
- if (e.length === 0 && !t) return r ? /* @__PURE__ */ (0, M.jsx)("div", {
1757
- className: n("flex h-full items-center justify-center p-4", i),
1758
- children: r
1759
- }) : null;
1760
- let u = t ? [...e, {
1761
- id: "__thinking__",
1762
- kind: "custom",
1763
- content: /* @__PURE__ */ (0, M.jsx)(yt, {})
1764
- }] : e, d = (e) => e.kind === "message" && e.role === "user", f = u.filter((e) => !d(e)), p = o ?? Infinity, m = f.length > p, h = m && !c, g = u, _ = 0;
1765
- if (h) {
1766
- let e = [], t = 0;
1767
- for (let n of u) {
1768
- if (t >= p) break;
1769
- e.push(n), d(n) || (t += 1);
1770
- }
1771
- g = e, _ = f.length - p;
1772
- }
1773
- let v = /* @__PURE__ */ new Set(), y;
1774
- for (let e of g) if (e.kind === "message") {
1775
- if (e.role === "user") {
1776
- y = void 0;
1777
- continue;
1778
- }
1779
- e.author && e.author.id !== y && v.add(e.id), y = e.author?.id;
1780
- }
1781
- return /* @__PURE__ */ (0, M.jsxs)(Mt, {
1782
- className: i,
1783
- children: [g.map((e, t) => /* @__PURE__ */ (0, M.jsx)(Nt, {
1784
- item: e,
1785
- previous: t > 0 ? $(g[t - 1]) : void 0,
1786
- headed: v.has(e.id),
1787
- renderToolActions: a,
1788
- viewerId: s
1789
- }, e.id)), m ? /* @__PURE__ */ (0, M.jsx)("button", {
1790
- type: "button",
1791
- onClick: () => l((e) => !e),
1792
- className: "mt-2 self-start text-sm font-medium text-muted-foreground transition-colors hover:text-foreground",
1793
- children: h ? `Show ${_} more step${_ === 1 ? "" : "s"}` : "Show less"
1794
- }) : null]
1795
- });
1796
- }
1797
- //#endregion
1798
- export { vt as a, $ as i, Mt as n, Q as o, Nt as r, B as s, Ft as t };