@inupedia/spotlight-vue 0.1.4 → 0.1.5

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.
@@ -1,124 +1,128 @@
1
- import { defineComponent as Mt, ref as D, onMounted as jt, nextTick as gt, onBeforeUnmount as Pt, computed as L, watch as kt, openBlock as r, createElementBlock as o, normalizeClass as C, createElementVNode as s, toDisplayString as a, Fragment as d, renderList as f, createBlock as It, createCommentVNode as u, unref as H, createVNode as W, normalizeStyle as bt } from "vue";
2
- import { MdPreview as ft } from "md-editor-v3";
1
+ import { defineComponent as jt, ref as D, onMounted as Pt, nextTick as kt, onBeforeUnmount as It, computed as H, watch as bt, openBlock as r, createElementBlock as o, normalizeClass as B, createElementVNode as s, toDisplayString as a, createCommentVNode as u, Fragment as d, renderList as m, createBlock as Vt, unref as M, createVNode as W, normalizeStyle as ft } from "vue";
2
+ import { MdPreview as mt } from "md-editor-v3";
3
3
  import "md-editor-v3/lib/preview.css";
4
- import Vt from "./SpotlightMarkdownPreview.vue.js";
5
- import { isToolExecutionStep as qt, humanizeSpotlightStepContent as Kt, getIntentStepDisplayContent as Jt, splitToolStepContent as mt, sanitizeToolStepAnswerText as pt } from "../store/pipeline/displayText.js";
6
- import { partitionToolCalls as yt } from "../store/pipeline/toolDisplay.js";
7
- import { TOOL_NAMES as Ut } from "../constants/toolNames.js";
8
- import Wt from "./OfficialBorderBeam.js";
9
- const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-stack" }, Qt = { class: "thinking-bar-title" }, Xt = {
4
+ import qt from "./SpotlightMarkdownPreview.vue.js";
5
+ import { isToolExecutionStep as Kt, humanizeSpotlightStepContent as Jt, getIntentStepDisplayContent as Ut, splitToolStepContent as pt, sanitizeToolStepAnswerText as yt } from "../store/pipeline/displayText.js";
6
+ import { partitionToolCalls as _t } from "../store/pipeline/toolDisplay.js";
7
+ import { TOOL_NAMES as Wt } from "../constants/toolNames.js";
8
+ import Yt from "./OfficialBorderBeam.js";
9
+ const Gt = { class: "thinking-bar-header" }, Qt = { class: "thinking-bar-title-stack" }, Xt = { class: "thinking-bar-title" }, Zt = {
10
+ key: 0,
11
+ class: "thinking-bar-memory-badge"
12
+ }, te = {
10
13
  class: "thinking-bar-metrics",
11
14
  "aria-label": "执行状态概览"
12
- }, Zt = { class: "thinking-bar-metric" }, te = { class: "thinking-bar-metric" }, ee = { class: "thinking-bar-metric" }, ne = { class: "thinking-bar-step-inner" }, ie = { class: "thinking-bar-step-icon" }, se = { class: "thinking-bar-step-column" }, re = { class: "thinking-bar-step-label" }, oe = ["onScrollPassive"], le = {
15
+ }, ee = { class: "thinking-bar-metric" }, ne = { class: "thinking-bar-metric" }, ie = { class: "thinking-bar-metric" }, se = { class: "thinking-bar-step-inner" }, re = { class: "thinking-bar-step-icon" }, oe = { class: "thinking-bar-step-column" }, le = { class: "thinking-bar-step-label" }, ae = ["onScrollPassive"], ce = {
13
16
  key: 0,
14
17
  class: "thinking-bar-tool-step-flow"
15
- }, ae = {
18
+ }, ue = {
16
19
  key: 0,
17
20
  class: "thinking-bar-execution-details"
18
- }, ce = { class: "thinking-bar-execution-details-summary" }, ue = { class: "thinking-bar-execution-details-meta" }, de = { class: "thinking-bar-execution-details-body" }, he = {
21
+ }, de = { class: "thinking-bar-execution-details-summary" }, he = { class: "thinking-bar-execution-details-meta" }, ge = { class: "thinking-bar-execution-details-body" }, ke = {
19
22
  key: 0,
20
23
  class: "thinking-bar-execution-planning"
21
- }, ge = ["open"], ke = { class: "thinking-bar-tool-call-head" }, be = { class: "thinking-bar-tool-call-head-main" }, fe = { class: "thinking-bar-tool-call-name" }, me = {
24
+ }, be = ["open"], fe = { class: "thinking-bar-tool-call-head" }, me = { class: "thinking-bar-tool-call-head-main" }, pe = { class: "thinking-bar-tool-call-name" }, ye = {
22
25
  key: 0,
23
26
  class: "thinking-bar-tool-call-id"
24
- }, pe = { class: "thinking-bar-tool-call-head-side" }, ye = { class: "thinking-bar-tool-call-body" }, _e = {
27
+ }, _e = { class: "thinking-bar-tool-call-head-side" }, ve = { class: "thinking-bar-tool-call-body" }, we = {
25
28
  key: 0,
26
29
  class: "thinking-bar-tool-call-block"
27
- }, ve = { class: "thinking-bar-tool-call-pre" }, we = {
30
+ }, Te = { class: "thinking-bar-tool-call-pre" }, Se = {
28
31
  key: 1,
29
32
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
30
- }, Te = { class: "thinking-bar-tool-call-pre" }, Se = {
33
+ }, xe = { class: "thinking-bar-tool-call-pre" }, $e = {
31
34
  key: 2,
32
35
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
33
- }, xe = {
36
+ }, Ae = {
34
37
  key: 0,
35
38
  class: "thinking-bar-tool-result-image-shell"
36
- }, $e = ["src", "alt"], Ae = ["srcdoc", "title"], Ce = {
39
+ }, Be = ["src", "alt"], Ce = ["srcdoc", "title"], Re = {
37
40
  key: 2,
38
41
  class: "thinking-bar-tool-result-table-wrap"
39
- }, Be = { class: "thinking-bar-tool-result-table" }, Ee = {
42
+ }, Ee = { class: "thinking-bar-tool-result-table" }, Fe = {
40
43
  key: 3,
41
44
  class: "thinking-bar-tool-call-pre"
42
- }, Re = {
45
+ }, Oe = {
43
46
  key: 3,
44
47
  class: "thinking-bar-tool-call-block"
45
- }, Fe = { class: "thinking-bar-tool-call-pre" }, Oe = {
48
+ }, ze = { class: "thinking-bar-tool-call-pre" }, De = {
46
49
  key: 4,
47
50
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--error"
48
- }, ze = { class: "thinking-bar-tool-call-pre" }, De = {
51
+ }, He = { class: "thinking-bar-tool-call-pre" }, Me = {
49
52
  key: 5,
50
53
  class: "thinking-bar-nested-tools"
51
- }, He = { class: "thinking-bar-tool-call-head" }, Ne = { class: "thinking-bar-tool-call-head-main" }, Le = { class: "thinking-bar-tool-call-name" }, Me = { class: "thinking-bar-tool-call-head-side" }, je = { class: "thinking-bar-tool-call-body" }, Pe = {
54
+ }, Ne = { class: "thinking-bar-tool-call-head" }, Le = { class: "thinking-bar-tool-call-head-main" }, je = { class: "thinking-bar-tool-call-name" }, Pe = { class: "thinking-bar-tool-call-head-side" }, Ie = { class: "thinking-bar-tool-call-body" }, Ve = {
52
55
  key: 0,
53
56
  class: "thinking-bar-tool-call-block"
54
- }, Ie = { class: "thinking-bar-tool-call-pre" }, Ve = {
57
+ }, qe = { class: "thinking-bar-tool-call-pre" }, Ke = {
55
58
  key: 1,
56
59
  class: "thinking-bar-tool-call-block"
57
- }, qe = { class: "thinking-bar-tool-call-pre" }, Ke = {
60
+ }, Je = { class: "thinking-bar-tool-call-pre" }, Ue = {
58
61
  key: 1,
59
62
  class: "thinking-bar-step-answer-section"
60
- }, Je = { class: "thinking-bar-step-text thinking-bar-step-markdown thinking-bar-step-answer" }, Ue = {
63
+ }, We = { class: "thinking-bar-step-text thinking-bar-step-markdown thinking-bar-step-answer" }, Ye = {
61
64
  key: 0,
62
65
  class: "thinking-bar-chat-items"
63
- }, We = {
66
+ }, Ge = {
64
67
  key: 0,
65
68
  class: "thinking-bar-step-text thinking-bar-step-markdown"
66
- }, Ye = ["open"], Ge = { class: "thinking-bar-tool-call-head" }, Qe = { class: "thinking-bar-tool-call-head-main" }, Xe = { class: "thinking-bar-tool-call-name" }, Ze = { class: "thinking-bar-tool-call-head-side" }, tn = { class: "thinking-bar-tool-call-body" }, en = {
69
+ }, Qe = ["open"], Xe = { class: "thinking-bar-tool-call-head" }, Ze = { class: "thinking-bar-tool-call-head-main" }, tn = { class: "thinking-bar-tool-call-name" }, en = { class: "thinking-bar-tool-call-head-side" }, nn = { class: "thinking-bar-tool-call-body" }, sn = {
67
70
  key: 0,
68
71
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
69
- }, nn = {
72
+ }, rn = {
70
73
  key: 0,
71
74
  class: "thinking-bar-tool-result-image-shell"
72
- }, sn = ["src", "alt"], rn = ["srcdoc", "title"], on = {
75
+ }, on = ["src", "alt"], ln = ["srcdoc", "title"], an = {
73
76
  key: 2,
74
77
  class: "thinking-bar-tool-result-table-wrap"
75
- }, ln = { class: "thinking-bar-tool-result-table" }, an = {
78
+ }, cn = { class: "thinking-bar-tool-result-table" }, un = {
76
79
  key: 3,
77
80
  class: "thinking-bar-tool-call-pre"
78
- }, cn = {
81
+ }, dn = {
79
82
  key: 1,
80
83
  class: "thinking-bar-step-text thinking-bar-step-markdown"
81
- }, un = {
84
+ }, hn = {
82
85
  key: 2,
83
86
  class: "thinking-bar-attachments"
84
- }, dn = ["href"], hn = ["src", "alt"], gn = { class: "thinking-bar-attachment-meta" }, kn = { class: "thinking-bar-attachment-name" }, bn = { class: "thinking-bar-attachment-type" }, fn = {
87
+ }, gn = ["href"], kn = ["src", "alt"], bn = { class: "thinking-bar-attachment-meta" }, fn = { class: "thinking-bar-attachment-name" }, mn = { class: "thinking-bar-attachment-type" }, pn = {
85
88
  key: 3,
86
89
  class: "thinking-bar-workspace"
87
- }, mn = { class: "thinking-bar-workspace-shell" }, pn = { class: "thinking-bar-file-tree-pane" }, yn = { class: "thinking-bar-file-tree-body" }, _n = {
90
+ }, yn = { class: "thinking-bar-workspace-shell" }, _n = { class: "thinking-bar-file-tree-pane" }, vn = { class: "thinking-bar-file-tree-body" }, wn = {
88
91
  key: 0,
89
92
  class: "thinking-bar-tree-node"
90
- }, vn = ["onClick"], wn = { class: "thinking-bar-tree-caret" }, Tn = { class: "thinking-bar-tree-label" }, Sn = ["onClick"], xn = { class: "thinking-bar-tree-icon" }, $n = { class: "thinking-bar-tree-label" }, An = { class: "thinking-bar-file-preview" }, Cn = { class: "thinking-bar-file-preview-head" }, Bn = { class: "thinking-bar-file-preview-title" }, En = { class: "thinking-bar-tree-icon" }, Rn = {
93
+ }, Tn = ["onClick"], Sn = { class: "thinking-bar-tree-caret" }, xn = { class: "thinking-bar-tree-label" }, $n = ["onClick"], An = { class: "thinking-bar-tree-icon" }, Bn = { class: "thinking-bar-tree-label" }, Cn = { class: "thinking-bar-file-preview" }, Rn = { class: "thinking-bar-file-preview-head" }, En = { class: "thinking-bar-file-preview-title" }, Fn = { class: "thinking-bar-tree-icon" }, On = {
91
94
  key: 0,
92
95
  class: "thinking-bar-preview-chip"
93
- }, Fn = {
96
+ }, zn = {
94
97
  key: 0,
95
98
  class: "thinking-bar-image-shell"
96
- }, On = ["src", "alt"], zn = {
99
+ }, Dn = ["src", "alt"], Hn = {
97
100
  key: 1,
98
101
  class: "thinking-bar-empty-preview"
99
- }, Dn = ["srcdoc", "title"], Hn = {
102
+ }, Mn = ["srcdoc", "title"], Nn = {
100
103
  key: 2,
101
104
  class: "thinking-bar-file-preview-body"
102
- }, Nn = {
105
+ }, Ln = {
103
106
  key: 1,
104
107
  class: "thinking-bar-empty-preview"
105
- }, Jn = /* @__PURE__ */ Mt({
108
+ }, Wn = /* @__PURE__ */ jt({
106
109
  __name: "SpotlightThinking",
107
110
  props: {
108
111
  steps: {},
109
112
  embedded: { type: Boolean },
110
- centered: { type: Boolean }
113
+ centered: { type: Boolean },
114
+ memoryReplay: {}
111
115
  },
112
116
  emits: ["close"],
113
117
  setup(w) {
114
- const Y = D(!1), M = D(null), _ = D({}), T = /* @__PURE__ */ new Map();
115
- let B = null, S = null;
118
+ const Y = D(!1), L = D(null), _ = D({}), T = /* @__PURE__ */ new Map();
119
+ let C = null, S = null;
116
120
  function j(e) {
117
121
  K(e), requestAnimationFrame(() => {
118
122
  K(e);
119
123
  });
120
124
  }
121
- function _t(e, t) {
125
+ function vt(e, t) {
122
126
  const i = T.get(e);
123
127
  i && S && S.unobserve(i);
124
128
  const n = t instanceof HTMLElement ? t : null;
@@ -127,31 +131,31 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
127
131
  function G(e) {
128
132
  return e.scrollHeight - e.scrollTop - e.clientHeight <= 96;
129
133
  }
130
- function vt(e, t) {
134
+ function wt(e, t) {
131
135
  const i = t.target;
132
- B != null && window.clearTimeout(B), _.value = {
136
+ C != null && window.clearTimeout(C), _.value = {
133
137
  ..._.value,
134
138
  [e]: G(i)
135
- }, B = window.setTimeout(() => {
139
+ }, C = window.setTimeout(() => {
136
140
  _.value = {
137
141
  ..._.value,
138
142
  [e]: G(i)
139
143
  };
140
144
  }, 120);
141
145
  }
142
- function wt() {
143
- const e = m.steps.find((i) => i.status === "active");
146
+ function Tt() {
147
+ const e = h.steps.find((i) => i.status === "active");
144
148
  if (e) return [e.id];
145
- const t = m.steps[m.steps.length - 1];
149
+ const t = h.steps[h.steps.length - 1];
146
150
  return t ? [t.id] : [];
147
151
  }
148
152
  function Q(e, t) {
149
153
  return t ? !0 : _.value[e] !== !1;
150
154
  }
151
- jt(() => {
155
+ Pt(() => {
152
156
  typeof ResizeObserver < "u" && (S = new ResizeObserver(() => {
153
157
  K();
154
- }), gt(() => {
158
+ }), kt(() => {
155
159
  T.forEach((e) => {
156
160
  S?.observe(e);
157
161
  });
@@ -160,21 +164,21 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
160
164
  }), requestAnimationFrame(() => {
161
165
  j(!0);
162
166
  });
163
- }), Pt(() => {
164
- B != null && window.clearTimeout(B), S?.disconnect(), S = null, T.clear();
167
+ }), It(() => {
168
+ C != null && window.clearTimeout(C), S?.disconnect(), S = null, T.clear();
165
169
  });
166
- const m = w, Tt = L(() => m.steps.length > 0 && m.steps.every((t) => t.status === "done" || t.status === "error") ? "执行完成" : "思考中"), St = L(
167
- () => m.steps.some(
170
+ const h = w, St = H(() => h.steps.length > 0 && h.steps.every((t) => t.status === "done" || t.status === "error") ? "执行完成" : "思考中"), X = H(() => h.memoryReplay ? h.memoryReplay.source === "semantic" ? "语义缓存" : h.memoryReplay.source === "exact" ? "Memory 缓存" : "Session 缓存" : ""), xt = H(
171
+ () => h.steps.some(
168
172
  (e) => e.status === "active" || e.status === "pending" || e.toolCalls?.some(
169
173
  (t) => t.status === "pending" || t.status === "running"
170
174
  )
171
175
  )
172
- ), xt = L(
173
- () => m.steps.filter((e) => e.status === "active").length
174
- ), $t = L(
175
- () => m.steps.filter((e) => e.status === "done").length
176
+ ), $t = H(
177
+ () => h.steps.filter((e) => e.status === "active").length
178
+ ), At = H(
179
+ () => h.steps.filter((e) => e.status === "done").length
176
180
  );
177
- function At(e) {
181
+ function Bt(e) {
178
182
  switch (e) {
179
183
  case "active":
180
184
  return "⋯";
@@ -193,45 +197,45 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
193
197
  return e.displayName?.trim() || e.name;
194
198
  }
195
199
  function P(e) {
196
- return mt(e.content ?? "").planning;
200
+ return pt(e.content ?? "").planning;
197
201
  }
198
- function X(e) {
199
- const { planning: t } = mt(e.content ?? ""), i = Z(
200
- pt(e.content ?? "")
202
+ function Z(e) {
203
+ const { planning: t } = pt(e.content ?? ""), i = tt(
204
+ yt(e.content ?? "")
201
205
  );
202
- return i.trim() ? i : t.trim() ? "" : Z(
203
- pt(e.content ?? "")
206
+ return i.trim() ? i : t.trim() ? "" : tt(
207
+ yt(e.content ?? "")
204
208
  );
205
209
  }
206
- function Z(e) {
210
+ function tt(e) {
207
211
  const t = e.trim();
208
212
  return !t || t.startsWith("联网检索证据:") || t.includes("Tavily answer:") ? "" : t;
209
213
  }
210
- function tt(e) {
214
+ function et(e) {
211
215
  return e.toolCalls?.length ? e.toolCalls : (e.chatItems ?? []).filter(
212
216
  (t) => t.type === "tool"
213
217
  ).map((t) => t.toolCall);
214
218
  }
215
219
  function I(e) {
216
- return yt(tt(e)).visible;
220
+ return _t(et(e)).visible;
217
221
  }
218
- function et(e) {
219
- return yt(tt(e)).nestedKnowledge;
222
+ function nt(e) {
223
+ return _t(et(e)).nestedKnowledge;
220
224
  }
221
- function Bt(e) {
222
- return Et(e.name) === Ut.knowledge.answer;
225
+ function Rt(e) {
226
+ return Et(e.name) === Wt.knowledge.answer;
223
227
  }
224
228
  function Et(e) {
225
229
  return e.trim().toLowerCase();
226
230
  }
227
- function Rt(e) {
231
+ function Ft(e) {
228
232
  return !!(P(e).trim() || I(e).length > 0);
229
233
  }
230
- function Ft(e) {
234
+ function Ot(e) {
231
235
  const t = I(e).length;
232
236
  return t > 0 ? `${t} 个工具调用` : "规划记录";
233
237
  }
234
- function nt(e) {
238
+ function it(e) {
235
239
  switch (e) {
236
240
  case "done":
237
241
  return "已完成";
@@ -243,13 +247,13 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
243
247
  return "待执行";
244
248
  }
245
249
  }
246
- function it(e) {
250
+ function st(e) {
247
251
  return e?.length ? e.map(
248
252
  (t) => `[${t.phase}/${t.type}] ${t.tool}${t.detail ? ` · ${t.detail}` : ""}`
249
253
  ).join(`
250
254
  `) : "";
251
255
  }
252
- function st(e) {
256
+ function rt(e) {
253
257
  return e.status === "running" || e.status === "pending";
254
258
  }
255
259
  function V(e) {
@@ -277,19 +281,19 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
277
281
  const t = e.resultText?.trim() || "";
278
282
  return t ? V(t) ?? t : null;
279
283
  }
280
- function E(e) {
284
+ function R(e) {
281
285
  return typeof e == "object" && e !== null && !Array.isArray(e);
282
286
  }
283
- function rt(e) {
287
+ function ot(e) {
284
288
  return /<(table|html|body|svg|div|span|img|p|iframe)[\s>]/i.test(e);
285
289
  }
286
- function R(e) {
290
+ function E(e) {
287
291
  const t = q(e);
288
292
  if (typeof t == "string") {
289
293
  const i = t.trim();
290
294
  return /^data:image\//i.test(i) || /\.(png|jpe?g|gif|webp|svg)(\?.*)?$/i.test(i) ? i : null;
291
295
  }
292
- if (E(t)) {
296
+ if (R(t)) {
293
297
  const i = [t.url, t.uri, t.path].find(
294
298
  (n) => typeof n == "string" && /^data:image\//i.test(n)
295
299
  );
@@ -299,18 +303,18 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
299
303
  }
300
304
  function F(e) {
301
305
  const t = q(e);
302
- if (typeof t == "string" && rt(t.trim()))
306
+ if (typeof t == "string" && ot(t.trim()))
303
307
  return t;
304
- if (E(t)) {
308
+ if (R(t)) {
305
309
  const i = [t.html, t.content, t.markup].find(
306
- (n) => typeof n == "string" && rt(n)
310
+ (n) => typeof n == "string" && ot(n)
307
311
  );
308
312
  return typeof i == "string" ? i : null;
309
313
  }
310
314
  return null;
311
315
  }
312
- function ot(e) {
313
- return !Array.isArray(e) || e.length === 0 || !e.every((t) => E(t)) ? null : e;
316
+ function lt(e) {
317
+ return !Array.isArray(e) || e.length === 0 || !e.every((t) => R(t)) ? null : e;
314
318
  }
315
319
  function y(e) {
316
320
  const t = q(e);
@@ -319,22 +323,22 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
319
323
  columns: ["value"],
320
324
  rows: t.map((n) => ({ value: n }))
321
325
  };
322
- const i = ot(t);
326
+ const i = lt(t);
323
327
  if (i) {
324
328
  const n = [...new Set(i.flatMap((l) => Object.keys(l)))];
325
329
  return n.length > 0 ? { columns: n, rows: i } : null;
326
330
  }
327
- if (!E(t)) return null;
331
+ if (!R(t)) return null;
328
332
  if (Array.isArray(t.columns) && Array.isArray(t.rows) && t.columns.every((n) => typeof n == "string")) {
329
333
  const n = t.columns, l = t.rows.map(
330
- (c) => E(c) ? c : Array.isArray(c) ? Object.fromEntries(
331
- n.map((b, p) => [b, c[p]])
334
+ (c) => R(c) ? c : Array.isArray(c) ? Object.fromEntries(
335
+ n.map((f, p) => [f, c[p]])
332
336
  ) : { value: c }
333
337
  );
334
338
  return n.length > 0 ? { columns: n, rows: l } : null;
335
339
  }
336
340
  if (Array.isArray(t.data)) {
337
- const n = ot(t.data);
341
+ const n = lt(t.data);
338
342
  if (n) {
339
343
  const l = [
340
344
  ...new Set(n.flatMap((c) => Object.keys(c)))
@@ -344,11 +348,11 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
344
348
  }
345
349
  return null;
346
350
  }
347
- function lt(e) {
351
+ function at(e) {
348
352
  const t = x(e), i = e.summary?.trim();
349
- return t && i && t.trim() === i ? !1 : !!(R(e) || F(e) || y(e) || t);
353
+ return t && i && t.trim() === i ? !1 : !!(E(e) || F(e) || y(e) || t);
350
354
  }
351
- function at(e) {
355
+ function ct(e) {
352
356
  if (e == null) return "-";
353
357
  if (typeof e == "string") return e;
354
358
  if (typeof e == "number" || typeof e == "boolean")
@@ -360,13 +364,13 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
360
364
  }
361
365
  }
362
366
  async function K(e = !1) {
363
- await gt();
364
- const t = M.value;
367
+ await kt();
368
+ const t = L.value;
365
369
  t && t.scrollTo({
366
370
  top: t.scrollHeight,
367
371
  behavior: e ? "auto" : "smooth"
368
372
  });
369
- const i = wt();
373
+ const i = Tt();
370
374
  for (const n of i) {
371
375
  const l = T.get(n);
372
376
  !l || !Q(n, e) || l.scrollTo({
@@ -375,7 +379,7 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
375
379
  });
376
380
  }
377
381
  window.setTimeout(() => {
378
- const n = M.value;
382
+ const n = L.value;
379
383
  n && n.scrollTo({
380
384
  top: n.scrollHeight,
381
385
  behavior: "auto"
@@ -389,11 +393,11 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
389
393
  }
390
394
  }, 120);
391
395
  }
392
- kt(
393
- () => m.steps,
396
+ bt(
397
+ () => h.steps,
394
398
  () => {
395
- if (St.value) {
396
- const e = m.steps.find((t) => t.status === "active");
399
+ if (xt.value) {
400
+ const e = h.steps.find((t) => t.status === "active");
397
401
  e && !(e.id in _.value) && (_.value = {
398
402
  ..._.value,
399
403
  [e.id]: !0
@@ -405,16 +409,16 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
405
409
  { deep: !0 }
406
410
  );
407
411
  const O = D({}), A = D({});
408
- kt(
409
- () => m.steps,
412
+ bt(
413
+ () => h.steps,
410
414
  (e) => {
411
415
  const t = { ...O.value }, i = { ...A.value };
412
416
  for (const n of e) {
413
417
  if (n.files?.length && !t[n.id] && (t[n.id] = n.files[0].id), !n.files?.length && t[n.id] && delete t[n.id], n.files?.length) {
414
418
  const l = new Set(i[n.id] || []);
415
419
  for (const c of n.files)
416
- Dt(c.path).forEach(
417
- (b) => l.add(b)
420
+ Ht(c.path).forEach(
421
+ (f) => l.add(f)
418
422
  );
419
423
  i[n.id] = [...l];
420
424
  }
@@ -424,30 +428,30 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
424
428
  },
425
429
  { deep: !0, immediate: !0 }
426
430
  );
427
- function Ot(e, t) {
431
+ function zt(e, t) {
428
432
  O.value = {
429
433
  ...O.value,
430
434
  [e]: t
431
435
  };
432
436
  }
433
- function zt(e, t) {
434
- t && Ot(e, t.id);
437
+ function Dt(e, t) {
438
+ t && zt(e, t.id);
435
439
  }
436
- function g(e) {
440
+ function k(e) {
437
441
  const t = O.value[e.id];
438
442
  return e.files?.find((i) => i.id === t) ?? e.files?.[0] ?? null;
439
443
  }
440
- function Dt(e) {
444
+ function Ht(e) {
441
445
  const t = e.split("/").filter(Boolean), i = [];
442
446
  let n = "";
443
447
  return t.slice(0, -1).forEach((l) => {
444
448
  n += `/${l}`, i.push(n);
445
449
  }), i;
446
450
  }
447
- function ct(e, t) {
451
+ function ut(e, t) {
448
452
  return (A.value[e] || []).includes(t);
449
453
  }
450
- function Ht(e, t) {
454
+ function Mt(e, t) {
451
455
  const i = new Set(A.value[e] || []);
452
456
  i.has(t) ? i.delete(t) : i.add(t), A.value = {
453
457
  ...A.value,
@@ -465,65 +469,65 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
465
469
  for (const p of t) {
466
470
  const $ = p.path.split("/").filter(Boolean);
467
471
  let v = "", z = l;
468
- $.slice(0, -1).forEach((k, h) => {
469
- v += `/${k}`;
470
- const Lt = n(v, k, h);
472
+ $.slice(0, -1).forEach((b, g) => {
473
+ v += `/${b}`;
474
+ const Lt = n(v, b, g);
471
475
  z.directoryChildren.includes(v) || z.directoryChildren.push(v), z = Lt;
472
476
  }), z.files.push(p);
473
477
  }
474
- const c = [], b = (p) => {
478
+ const c = [], f = (p) => {
475
479
  const $ = i.get(p);
476
480
  if (!$) return;
477
481
  const v = [...$.directoryChildren].sort(
478
- (k, h) => k.localeCompare(h, "zh-CN")
482
+ (b, g) => b.localeCompare(g, "zh-CN")
479
483
  );
480
- for (const k of v) {
481
- const h = i.get(k);
482
- h && (c.push({
484
+ for (const b of v) {
485
+ const g = i.get(b);
486
+ g && (c.push({
483
487
  type: "directory",
484
- path: h.path,
485
- name: h.name,
486
- depth: h.depth,
488
+ path: g.path,
489
+ name: g.name,
490
+ depth: g.depth,
487
491
  file: null
488
- }), ct(e, h.path) && b(h.path));
492
+ }), ut(e, g.path) && f(g.path));
489
493
  }
490
494
  [...$.files].sort(
491
- (k, h) => k.path.localeCompare(h.path, "zh-CN")
492
- ).forEach((k) => {
493
- const h = Math.max(
494
- k.path.split("/").filter(Boolean).length - 1,
495
+ (b, g) => b.path.localeCompare(g.path, "zh-CN")
496
+ ).forEach((b) => {
497
+ const g = Math.max(
498
+ b.path.split("/").filter(Boolean).length - 1,
495
499
  0
496
500
  );
497
501
  c.push({
498
502
  type: "file",
499
- path: k.path,
500
- name: k.name,
501
- depth: h,
502
- file: k
503
+ path: b.path,
504
+ name: b.name,
505
+ depth: g,
506
+ file: b
503
507
  });
504
508
  });
505
509
  };
506
- return b(""), c;
510
+ return f(""), c;
507
511
  }
508
512
  function J(e) {
509
513
  return (e?.content || []).join(`
510
514
  `).trim();
511
515
  }
512
- function ut(e) {
516
+ function dt(e) {
513
517
  return /\.(png|jpe?g|gif|webp|svg)$/i.test(e);
514
518
  }
515
519
  function U(e) {
516
520
  return /\.(html?)$/i.test(e);
517
521
  }
518
- function dt(e) {
522
+ function ht(e) {
519
523
  const t = J(e);
520
524
  return /^data:image\//i.test(t) ? t : "";
521
525
  }
522
- function ht(e) {
523
- return ut(e) ? "🖼" : U(e) ? "🌐" : /\.md$/i.test(e) ? "📝" : /\.(csv|xlsx?)$/i.test(e) ? "📊" : /\.(json|ya?ml|xml)$/i.test(e) ? "🧩" : "📄";
526
+ function gt(e) {
527
+ return dt(e) ? "🖼" : U(e) ? "🌐" : /\.md$/i.test(e) ? "📝" : /\.(csv|xlsx?)$/i.test(e) ? "📊" : /\.(json|ya?ml|xml)$/i.test(e) ? "🧩" : "📄";
524
528
  }
525
529
  return (e, t) => (r(), o("div", {
526
- class: C(["thinking-bar", [
530
+ class: B(["thinking-bar", [
527
531
  { "thinking-bar--embedded": w.embedded },
528
532
  { "thinking-bar--open": Y.value },
529
533
  { "thinking-bar--centered": w.centered },
@@ -534,22 +538,23 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
534
538
  class: "thinking-bar-grid",
535
539
  "aria-hidden": "true"
536
540
  }, null, -1)),
537
- s("div", Yt, [
538
- s("div", Gt, [
541
+ s("div", Gt, [
542
+ s("div", Qt, [
539
543
  t[1] || (t[1] = s("span", { class: "thinking-bar-kicker" }, "HYDRO PROCESS", -1)),
540
- s("span", Qt, a(Tt.value), 1)
544
+ s("span", Xt, a(St.value), 1),
545
+ X.value ? (r(), o("span", Zt, a(X.value), 1)) : u("", !0)
541
546
  ]),
542
- s("div", Xt, [
543
- s("span", Zt, [
547
+ s("div", te, [
548
+ s("span", ee, [
544
549
  s("strong", null, a(w.steps.length), 1),
545
550
  t[2] || (t[2] = s("em", null, "阶段", -1))
546
551
  ]),
547
- s("span", te, [
548
- s("strong", null, a(xt.value), 1),
552
+ s("span", ne, [
553
+ s("strong", null, a($t.value), 1),
549
554
  t[3] || (t[3] = s("em", null, "运行", -1))
550
555
  ]),
551
- s("span", ee, [
552
- s("strong", null, a($t.value), 1),
556
+ s("span", ie, [
557
+ s("strong", null, a(At.value), 1),
553
558
  t[4] || (t[4] = s("em", null, "完成", -1))
554
559
  ])
555
560
  ]),
@@ -562,14 +567,14 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
562
567
  ]),
563
568
  s("div", {
564
569
  ref_key: "stepsContainerRef",
565
- ref: M,
570
+ ref: L,
566
571
  class: "thinking-bar-steps"
567
572
  }, [
568
- (r(!0), o(d, null, f(w.steps, (i) => (r(), o("div", {
573
+ (r(!0), o(d, null, m(w.steps, (i) => (r(), o("div", {
569
574
  key: i.id,
570
- class: C(["thinking-bar-step", [i.status]])
575
+ class: B(["thinking-bar-step", [i.status]])
571
576
  }, [
572
- i.status === "active" ? (r(), It(Wt, {
577
+ i.status === "active" ? (r(), Vt(Yt, {
573
578
  key: 0,
574
579
  class: "thinking-bar-step-beam",
575
580
  size: 88,
@@ -578,149 +583,149 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
578
583
  "color-from": "#c9a25d",
579
584
  "color-to": "#5d8f9b"
580
585
  })) : u("", !0),
581
- s("div", ne, [
582
- s("span", ie, a(At(i.status)), 1),
583
- s("div", se, [
584
- s("span", re, a(i.label), 1),
586
+ s("div", se, [
587
+ s("span", re, a(Bt(i.status)), 1),
588
+ s("div", oe, [
589
+ s("span", le, a(i.label), 1),
585
590
  s("div", {
586
591
  ref_for: !0,
587
- ref: (n) => _t(i.id, n),
592
+ ref: (n) => vt(i.id, n),
588
593
  class: "thinking-bar-step-body",
589
- onScrollPassive: (n) => vt(i.id, n)
594
+ onScrollPassive: (n) => wt(i.id, n)
590
595
  }, [
591
- H(qt)(i.id) ? (r(), o("div", le, [
592
- Rt(i) ? (r(), o("details", ae, [
593
- s("summary", ce, [
596
+ M(Kt)(i.id) ? (r(), o("div", ce, [
597
+ Ft(i) ? (r(), o("details", ue, [
598
+ s("summary", de, [
594
599
  t[5] || (t[5] = s("span", { class: "thinking-bar-execution-details-title" }, "调用工具", -1)),
595
- s("span", ue, a(Ft(i)), 1),
600
+ s("span", he, a(Ot(i)), 1),
596
601
  t[6] || (t[6] = s("span", { class: "thinking-bar-execution-details-caret" }, "▾", -1))
597
602
  ]),
598
- s("div", de, [
599
- P(i) ? (r(), o("pre", he, a(P(i)), 1)) : u("", !0),
600
- (r(!0), o(d, null, f(I(i), (n) => (r(), o("details", {
603
+ s("div", ge, [
604
+ P(i) ? (r(), o("pre", ke, a(P(i)), 1)) : u("", !0),
605
+ (r(!0), o(d, null, m(I(i), (n) => (r(), o("details", {
601
606
  key: n.id,
602
607
  class: "thinking-bar-tool-call",
603
- open: st(n)
608
+ open: rt(n)
604
609
  }, [
605
- s("summary", ke, [
606
- s("div", be, [
607
- s("span", fe, a(N(n)), 1),
608
- n.name !== N(n) ? (r(), o("span", me, a(n.name), 1)) : u("", !0)
610
+ s("summary", fe, [
611
+ s("div", me, [
612
+ s("span", pe, a(N(n)), 1),
613
+ n.name !== N(n) ? (r(), o("span", ye, a(n.name), 1)) : u("", !0)
609
614
  ]),
610
- s("div", pe, [
615
+ s("div", _e, [
611
616
  s("span", {
612
- class: C(["thinking-bar-tool-call-status", `is-${n.status}`])
613
- }, a(nt(n.status)), 3),
617
+ class: B(["thinking-bar-tool-call-status", `is-${n.status}`])
618
+ }, a(it(n.status)), 3),
614
619
  t[7] || (t[7] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
615
620
  ])
616
621
  ]),
617
- s("div", ye, [
618
- n.argsText?.trim() ? (r(), o("div", _e, [
622
+ s("div", ve, [
623
+ n.argsText?.trim() ? (r(), o("div", we, [
619
624
  t[8] || (t[8] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
620
- s("pre", ve, a(n.argsText), 1)
625
+ s("pre", Te, a(n.argsText), 1)
621
626
  ])) : u("", !0),
622
- n.summary?.trim() ? (r(), o("div", we, [
627
+ n.summary?.trim() ? (r(), o("div", Se, [
623
628
  t[9] || (t[9] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行摘要 ", -1)),
624
- s("pre", Te, a(n.summary), 1)
629
+ s("pre", xe, a(n.summary), 1)
625
630
  ])) : u("", !0),
626
- lt(n) ? (r(), o("div", Se, [
631
+ at(n) ? (r(), o("div", $e, [
627
632
  t[10] || (t[10] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
628
- R(n) ? (r(), o("div", xe, [
633
+ E(n) ? (r(), o("div", Ae, [
629
634
  s("img", {
630
635
  class: "thinking-bar-tool-result-image",
631
- src: R(n) || "",
636
+ src: E(n) || "",
632
637
  alt: n.name
633
- }, null, 8, $e)
638
+ }, null, 8, Be)
634
639
  ])) : F(n) ? (r(), o("iframe", {
635
640
  key: 1,
636
641
  class: "thinking-bar-tool-result-html",
637
642
  srcdoc: F(n) || "",
638
643
  title: n.name,
639
644
  sandbox: ""
640
- }, null, 8, Ae)) : y(n) ? (r(), o("div", Ce, [
641
- s("table", Be, [
645
+ }, null, 8, Ce)) : y(n) ? (r(), o("div", Re, [
646
+ s("table", Ee, [
642
647
  s("thead", null, [
643
648
  s("tr", null, [
644
- (r(!0), o(d, null, f(y(
649
+ (r(!0), o(d, null, m(y(
645
650
  n
646
651
  )?.columns, (l) => (r(), o("th", { key: l }, a(l), 1))), 128))
647
652
  ])
648
653
  ]),
649
654
  s("tbody", null, [
650
- (r(!0), o(d, null, f(y(n)?.rows, (l, c) => (r(), o("tr", {
655
+ (r(!0), o(d, null, m(y(n)?.rows, (l, c) => (r(), o("tr", {
651
656
  key: `${n.id}-${c}`
652
657
  }, [
653
- (r(!0), o(d, null, f(y(
658
+ (r(!0), o(d, null, m(y(
654
659
  n
655
- )?.columns, (b) => (r(), o("td", {
656
- key: `${n.id}-${c}-${b}`
657
- }, a(at(l[b])), 1))), 128))
660
+ )?.columns, (f) => (r(), o("td", {
661
+ key: `${n.id}-${c}-${f}`
662
+ }, a(ct(l[f])), 1))), 128))
658
663
  ]))), 128))
659
664
  ])
660
665
  ])
661
- ])) : x(n) ? (r(), o("pre", Ee, a(x(n)), 1)) : u("", !0)
666
+ ])) : x(n) ? (r(), o("pre", Fe, a(x(n)), 1)) : u("", !0)
662
667
  ])) : u("", !0),
663
- it(n.trace) ? (r(), o("div", Re, [
668
+ st(n.trace) ? (r(), o("div", Oe, [
664
669
  t[11] || (t[11] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行轨迹 ", -1)),
665
- s("pre", Fe, a(it(n.trace)), 1)
670
+ s("pre", ze, a(st(n.trace)), 1)
666
671
  ])) : u("", !0),
667
- n.errorCode ? (r(), o("div", Oe, [
672
+ n.errorCode ? (r(), o("div", De, [
668
673
  t[12] || (t[12] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 错误码 ", -1)),
669
- s("pre", ze, a(n.errorCode), 1)
674
+ s("pre", He, a(n.errorCode), 1)
670
675
  ])) : u("", !0),
671
- Bt(n) && et(i).length > 0 ? (r(), o("div", De, [
676
+ Rt(n) && nt(i).length > 0 ? (r(), o("div", Me, [
672
677
  t[16] || (t[16] = s("div", { class: "thinking-bar-nested-tools-label" }, " 知识库内部步骤 ", -1)),
673
- (r(!0), o(d, null, f(et(
678
+ (r(!0), o(d, null, m(nt(
674
679
  i
675
680
  ), (l) => (r(), o("details", {
676
681
  key: l.id,
677
682
  class: "thinking-bar-tool-call thinking-bar-tool-call--nested"
678
683
  }, [
679
- s("summary", He, [
680
- s("div", Ne, [
681
- s("span", Le, a(N(l)), 1)
684
+ s("summary", Ne, [
685
+ s("div", Le, [
686
+ s("span", je, a(N(l)), 1)
682
687
  ]),
683
- s("div", Me, [
688
+ s("div", Pe, [
684
689
  s("span", {
685
- class: C(["thinking-bar-tool-call-status", `is-${l.status}`])
686
- }, a(nt(l.status)), 3),
690
+ class: B(["thinking-bar-tool-call-status", `is-${l.status}`])
691
+ }, a(it(l.status)), 3),
687
692
  t[13] || (t[13] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
688
693
  ])
689
694
  ]),
690
- s("div", je, [
691
- l.argsText?.trim() ? (r(), o("div", Pe, [
695
+ s("div", Ie, [
696
+ l.argsText?.trim() ? (r(), o("div", Ve, [
692
697
  t[14] || (t[14] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
693
- s("pre", Ie, a(l.argsText), 1)
698
+ s("pre", qe, a(l.argsText), 1)
694
699
  ])) : u("", !0),
695
- x(l) ? (r(), o("div", Ve, [
700
+ x(l) ? (r(), o("div", Ke, [
696
701
  t[15] || (t[15] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
697
- s("pre", qe, a(x(l)), 1)
702
+ s("pre", Je, a(x(l)), 1)
698
703
  ])) : u("", !0)
699
704
  ])
700
705
  ]))), 128))
701
706
  ])) : u("", !0)
702
707
  ])
703
- ], 8, ge))), 128))
708
+ ], 8, be))), 128))
704
709
  ])
705
710
  ])) : u("", !0),
706
- X(i) ? (r(), o("section", Ke, [
711
+ Z(i) ? (r(), o("section", Ue, [
707
712
  t[17] || (t[17] = s("div", { class: "thinking-bar-step-section-label" }, "回答", -1)),
708
- s("div", Je, [
709
- W(Vt, {
710
- "model-value": X(i),
713
+ s("div", We, [
714
+ W(qt, {
715
+ "model-value": Z(i),
711
716
  "format-knowledge": ""
712
717
  }, null, 8, ["model-value"])
713
718
  ])
714
719
  ])) : u("", !0)
715
720
  ])) : (r(), o(d, { key: 1 }, [
716
- i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ue, [
717
- (r(!0), o(d, null, f(i.chatItems, (n) => (r(), o("div", {
721
+ i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ye, [
722
+ (r(!0), o(d, null, m(i.chatItems, (n) => (r(), o("div", {
718
723
  key: n.id,
719
724
  class: "thinking-bar-chat-item"
720
725
  }, [
721
- n.type === "text" && n.text.trim() ? (r(), o("div", We, [
722
- W(H(ft), {
723
- "model-value": H(Kt)(n.text),
726
+ n.type === "text" && n.text.trim() ? (r(), o("div", Ge, [
727
+ W(M(mt), {
728
+ "model-value": M(Jt)(n.text),
724
729
  theme: "dark",
725
730
  "preview-theme": "github",
726
731
  "code-theme": "github",
@@ -729,65 +734,65 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
729
734
  ])) : n.type === "tool" ? (r(), o("details", {
730
735
  key: 1,
731
736
  class: "thinking-bar-tool-call",
732
- open: st(n.toolCall)
737
+ open: rt(n.toolCall)
733
738
  }, [
734
- s("summary", Ge, [
735
- s("div", Qe, [
736
- s("span", Xe, a(N(n.toolCall)), 1)
737
- ]),
739
+ s("summary", Xe, [
738
740
  s("div", Ze, [
741
+ s("span", tn, a(N(n.toolCall)), 1)
742
+ ]),
743
+ s("div", en, [
739
744
  s("span", {
740
- class: C(["thinking-bar-tool-call-status", `is-${n.toolCall.status}`])
745
+ class: B(["thinking-bar-tool-call-status", `is-${n.toolCall.status}`])
741
746
  }, a(n.toolCall.status === "done" ? "已完成" : n.toolCall.status === "error" ? "失败" : n.toolCall.status === "running" ? "执行中" : "待执行"), 3),
742
747
  t[18] || (t[18] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
743
748
  ])
744
749
  ]),
745
- s("div", tn, [
746
- lt(n.toolCall) ? (r(), o("div", en, [
750
+ s("div", nn, [
751
+ at(n.toolCall) ? (r(), o("div", sn, [
747
752
  t[19] || (t[19] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 结果 ", -1)),
748
- R(n.toolCall) ? (r(), o("div", nn, [
753
+ E(n.toolCall) ? (r(), o("div", rn, [
749
754
  s("img", {
750
755
  class: "thinking-bar-tool-result-image",
751
- src: R(n.toolCall) || "",
756
+ src: E(n.toolCall) || "",
752
757
  alt: n.toolCall.name
753
- }, null, 8, sn)
758
+ }, null, 8, on)
754
759
  ])) : F(n.toolCall) ? (r(), o("iframe", {
755
760
  key: 1,
756
761
  class: "thinking-bar-tool-result-html",
757
762
  srcdoc: F(n.toolCall) || "",
758
763
  title: n.toolCall.name,
759
764
  sandbox: ""
760
- }, null, 8, rn)) : y(n.toolCall) ? (r(), o("div", on, [
761
- s("table", ln, [
765
+ }, null, 8, ln)) : y(n.toolCall) ? (r(), o("div", an, [
766
+ s("table", cn, [
762
767
  s("thead", null, [
763
768
  s("tr", null, [
764
- (r(!0), o(d, null, f(y(
769
+ (r(!0), o(d, null, m(y(
765
770
  n.toolCall
766
771
  )?.columns, (l) => (r(), o("th", { key: l }, a(l), 1))), 128))
767
772
  ])
768
773
  ]),
769
774
  s("tbody", null, [
770
- (r(!0), o(d, null, f(y(
775
+ (r(!0), o(d, null, m(y(
771
776
  n.toolCall
772
777
  )?.rows, (l, c) => (r(), o("tr", {
773
778
  key: `${n.toolCall.id}-${c}`
774
779
  }, [
775
- (r(!0), o(d, null, f(y(
780
+ (r(!0), o(d, null, m(y(
776
781
  n.toolCall
777
- )?.columns, (b) => (r(), o("td", {
778
- key: `${n.toolCall.id}-${c}-${b}`
779
- }, a(at(l[b])), 1))), 128))
782
+ )?.columns, (f) => (r(), o("td", {
783
+ key: `${n.toolCall.id}-${c}-${f}`
784
+ }, a(ct(l[f])), 1))), 128))
780
785
  ]))), 128))
781
786
  ])
782
787
  ])
783
- ])) : x(n.toolCall) ? (r(), o("pre", an, a(x(n.toolCall)), 1)) : u("", !0)
788
+ ])) : x(n.toolCall) ? (r(), o("pre", un, a(x(n.toolCall)), 1)) : u("", !0)
784
789
  ])) : u("", !0)
785
790
  ])
786
- ], 8, Ye)) : u("", !0)
791
+ ], 8, Qe)) : u("", !0)
787
792
  ]))), 128))
788
- ])) : i.content ? (r(), o("div", cn, [
789
- W(H(ft), {
790
- "model-value": H(Jt)(i.content ?? ""),
793
+ ])) : i.content ? (r(), o("div", dn, [
794
+ W(M(mt), {
795
+ "model-value": M(Ut)(i.content ?? ""),
791
796
  theme: "dark",
792
797
  "preview-theme": "github",
793
798
  "code-theme": "github",
@@ -795,8 +800,8 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
795
800
  }, null, 8, ["model-value"])
796
801
  ])) : u("", !0)
797
802
  ], 64)),
798
- i.attachments && i.attachments.length > 0 ? (r(), o("div", un, [
799
- (r(!0), o(d, null, f(i.attachments, (n) => (r(), o("a", {
803
+ i.attachments && i.attachments.length > 0 ? (r(), o("div", hn, [
804
+ (r(!0), o(d, null, m(i.attachments, (n) => (r(), o("a", {
800
805
  key: n.id,
801
806
  class: "thinking-bar-attachment",
802
807
  href: n.url,
@@ -808,78 +813,78 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
808
813
  class: "thinking-bar-attachment-image",
809
814
  src: n.url,
810
815
  alt: n.name || "图表预览"
811
- }, null, 8, hn)) : u("", !0),
812
- s("div", gn, [
813
- s("span", kn, a(n.name || n.url), 1),
814
- s("span", bn, a(n.type === "image" ? "图片预览" : n.type === "html" ? "打开图表" : "打开文件"), 1)
816
+ }, null, 8, kn)) : u("", !0),
817
+ s("div", bn, [
818
+ s("span", fn, a(n.name || n.url), 1),
819
+ s("span", mn, a(n.type === "image" ? "图片预览" : n.type === "html" ? "打开图表" : "打开文件"), 1)
815
820
  ])
816
- ], 8, dn))), 128))
821
+ ], 8, gn))), 128))
817
822
  ])) : u("", !0),
818
- i.files && i.files.length > 0 ? (r(), o("div", fn, [
823
+ i.files && i.files.length > 0 ? (r(), o("div", pn, [
819
824
  t[22] || (t[22] = s("div", { class: "thinking-bar-workspace-title" }, "状态工作台", -1)),
820
- s("div", mn, [
821
- s("div", pn, [
825
+ s("div", yn, [
826
+ s("div", _n, [
822
827
  t[21] || (t[21] = s("div", { class: "thinking-bar-file-tree-head" }, "文件系统", -1)),
823
- s("div", yn, [
824
- (r(!0), o(d, null, f(Nt(i.id, i.files), (n) => (r(), o(d, {
828
+ s("div", vn, [
829
+ (r(!0), o(d, null, m(Nt(i.id, i.files), (n) => (r(), o(d, {
825
830
  key: `${i.id}:${n.path}`
826
831
  }, [
827
- n.type === "directory" ? (r(), o("div", _n, [
832
+ n.type === "directory" ? (r(), o("div", wn, [
828
833
  s("button", {
829
834
  type: "button",
830
835
  class: "thinking-bar-tree-row thinking-bar-tree-row--directory",
831
- style: bt({
836
+ style: ft({
832
837
  paddingLeft: `${n.depth * 14 + 10}px`
833
838
  }),
834
- onClick: (l) => Ht(i.id, n.path)
839
+ onClick: (l) => Mt(i.id, n.path)
835
840
  }, [
836
- s("span", wn, a(ct(i.id, n.path) ? "▾" : "▸"), 1),
841
+ s("span", Sn, a(ut(i.id, n.path) ? "▾" : "▸"), 1),
837
842
  t[20] || (t[20] = s("span", { class: "thinking-bar-tree-icon" }, "📁", -1)),
838
- s("span", Tn, a(n.name), 1)
839
- ], 12, vn)
843
+ s("span", xn, a(n.name), 1)
844
+ ], 12, Tn)
840
845
  ])) : (r(), o("button", {
841
846
  key: 1,
842
847
  type: "button",
843
- class: C(["thinking-bar-tree-row thinking-bar-tree-row--file", {
844
- active: g(i)?.id === n.file?.id
848
+ class: B(["thinking-bar-tree-row thinking-bar-tree-row--file", {
849
+ active: k(i)?.id === n.file?.id
845
850
  }]),
846
- style: bt({ paddingLeft: `${n.depth * 14 + 26}px` }),
847
- onClick: (l) => zt(i.id, n.file)
851
+ style: ft({ paddingLeft: `${n.depth * 14 + 26}px` }),
852
+ onClick: (l) => Dt(i.id, n.file)
848
853
  }, [
849
- s("span", xn, a(ht(n.file?.path || "")), 1),
850
- s("span", $n, a(n.name), 1)
851
- ], 14, Sn))
854
+ s("span", An, a(gt(n.file?.path || "")), 1),
855
+ s("span", Bn, a(n.name), 1)
856
+ ], 14, $n))
852
857
  ], 64))), 128))
853
858
  ])
854
859
  ]),
855
- s("div", An, [
856
- g(i) ? (r(), o(d, { key: 0 }, [
857
- s("div", Cn, [
858
- s("div", Bn, [
859
- s("span", En, a(ht(g(i)?.path || "")), 1),
860
- s("span", null, a(g(i)?.path), 1)
860
+ s("div", Cn, [
861
+ k(i) ? (r(), o(d, { key: 0 }, [
862
+ s("div", Rn, [
863
+ s("div", En, [
864
+ s("span", Fn, a(gt(k(i)?.path || "")), 1),
865
+ s("span", null, a(k(i)?.path), 1)
861
866
  ]),
862
- U(g(i)?.path || "") ? (r(), o("span", Rn, " HTML 预览 ")) : u("", !0)
867
+ U(k(i)?.path || "") ? (r(), o("span", On, " HTML 预览 ")) : u("", !0)
863
868
  ]),
864
- ut(g(i)?.path || "") ? (r(), o("div", Fn, [
865
- dt(g(i)) ? (r(), o("img", {
869
+ dt(k(i)?.path || "") ? (r(), o("div", zn, [
870
+ ht(k(i)) ? (r(), o("img", {
866
871
  key: 0,
867
872
  class: "thinking-bar-image-preview",
868
- src: dt(g(i)) || "",
869
- alt: g(i)?.name || "图片预览"
870
- }, null, 8, On)) : (r(), o("div", zn, " 当前图片文件没有可直接渲染的内容。 "))
871
- ])) : U(g(i)?.path || "") ? (r(), o("iframe", {
873
+ src: ht(k(i)) || "",
874
+ alt: k(i)?.name || "图片预览"
875
+ }, null, 8, Dn)) : (r(), o("div", Hn, " 当前图片文件没有可直接渲染的内容。 "))
876
+ ])) : U(k(i)?.path || "") ? (r(), o("iframe", {
872
877
  key: 1,
873
878
  class: "thinking-bar-html-preview",
874
- srcdoc: J(g(i)),
875
- title: g(i)?.path,
879
+ srcdoc: J(k(i)),
880
+ title: k(i)?.path,
876
881
  sandbox: ""
877
- }, null, 8, Dn)) : (r(), o("pre", Hn, a(J(g(i))), 1))
878
- ], 64)) : (r(), o("div", Nn, " 还没选中文件,左边点一个看看。 "))
882
+ }, null, 8, Mn)) : (r(), o("pre", Nn, a(J(k(i))), 1))
883
+ ], 64)) : (r(), o("div", Ln, " 还没选中文件,左边点一个看看。 "))
879
884
  ])
880
885
  ])
881
886
  ])) : u("", !0)
882
- ], 40, oe)
887
+ ], 40, ae)
883
888
  ])
884
889
  ])
885
890
  ], 2))), 128))
@@ -888,5 +893,5 @@ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-s
888
893
  }
889
894
  });
890
895
  export {
891
- Jn as default
896
+ Wn as default
892
897
  };