@inupedia/spotlight-vue 0.2.4 → 0.2.6

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,111 +1,110 @@
1
- import { defineComponent as jt, ref as D, onMounted as It, nextTick as kt, onBeforeUnmount as Pt, computed as M, 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 N, createVNode as W, normalizeStyle as ft } from "vue";
1
+ import { defineComponent as Lt, ref as D, onMounted as jt, nextTick as kt, onBeforeUnmount as Pt, computed as M, watch as bt, openBlock as r, createElementBlock as o, normalizeClass as A, createElementVNode as s, toDisplayString as a, createCommentVNode as u, Fragment as d, renderList as m, unref as N, createVNode as W, normalizeStyle as ft } from "vue";
2
2
  import { MdPreview as mt } from "md-editor-v3";
3
3
  import "md-editor-v3/lib/preview.css";
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";
4
+ import It from "./SpotlightMarkdownPreview.vue.js";
5
+ import { isToolExecutionStep as Vt, humanizeSpotlightStepContent as qt, getIntentStepDisplayContent as Kt, splitToolStepContent as pt, sanitizeToolStepAnswerText as yt } from "../store/pipeline/displayText.js";
6
6
  import { partitionToolCalls as _t } from "../store/pipeline/toolDisplay.js";
7
- import { TOOL_NAMES as Wt } from "../constants/toolNames.js";
8
- import Gt from "./OfficialBorderBeam.js";
9
- const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-stack" }, Yt = { class: "thinking-bar-title" }, Zt = {
7
+ import { TOOL_NAMES as Jt } from "../constants/toolNames.js";
8
+ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-stack" }, Gt = { class: "thinking-bar-title" }, Qt = {
10
9
  key: 0,
11
10
  class: "thinking-bar-memory-badge"
12
- }, te = {
11
+ }, Xt = {
13
12
  class: "thinking-bar-metrics",
14
13
  "aria-label": "执行状态概览"
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 = {
14
+ }, Yt = { class: "thinking-bar-metric" }, Zt = { class: "thinking-bar-metric" }, te = { class: "thinking-bar-metric" }, ee = { class: "thinking-bar-step-inner" }, ne = { class: "thinking-bar-step-column" }, ie = { class: "thinking-bar-step-label" }, se = ["onScrollPassive"], re = {
16
15
  key: 0,
17
16
  class: "thinking-bar-tool-step-flow"
18
- }, ue = {
17
+ }, oe = {
19
18
  key: 0,
20
19
  class: "thinking-bar-execution-details"
21
- }, de = { class: "thinking-bar-execution-details-summary" }, he = { class: "thinking-bar-execution-details-meta" }, ge = { class: "thinking-bar-execution-details-body" }, ke = {
20
+ }, le = { class: "thinking-bar-execution-details-summary" }, ae = { class: "thinking-bar-execution-details-meta" }, ce = { class: "thinking-bar-execution-details-body" }, ue = {
22
21
  key: 0,
23
22
  class: "thinking-bar-execution-planning"
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 = {
23
+ }, de = ["open"], he = { class: "thinking-bar-tool-call-head" }, ge = { class: "thinking-bar-tool-call-head-main" }, ke = { class: "thinking-bar-tool-call-name" }, be = {
25
24
  key: 0,
26
25
  class: "thinking-bar-tool-call-id"
27
- }, _e = { class: "thinking-bar-tool-call-head-side" }, ve = { class: "thinking-bar-tool-call-body" }, we = {
26
+ }, fe = { class: "thinking-bar-tool-call-head-side" }, me = { class: "thinking-bar-tool-call-body" }, pe = {
28
27
  key: 0,
29
28
  class: "thinking-bar-tool-call-block"
30
- }, Te = { class: "thinking-bar-tool-call-pre" }, xe = {
29
+ }, ye = { class: "thinking-bar-tool-call-pre" }, _e = {
31
30
  key: 1,
32
31
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
33
- }, Se = { class: "thinking-bar-tool-call-pre" }, $e = {
32
+ }, ve = { class: "thinking-bar-tool-call-pre" }, we = {
34
33
  key: 2,
35
34
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
36
- }, Ae = {
35
+ }, Te = {
37
36
  key: 0,
38
37
  class: "thinking-bar-tool-result-image-shell"
39
- }, Be = ["src", "alt"], Ce = ["srcdoc", "title"], Re = {
38
+ }, xe = ["src", "alt"], Se = ["srcdoc", "title"], $e = {
40
39
  key: 2,
41
40
  class: "thinking-bar-tool-result-table-wrap"
42
- }, Ee = { class: "thinking-bar-tool-result-table" }, Fe = {
41
+ }, Ae = { class: "thinking-bar-tool-result-table" }, Ce = {
43
42
  key: 3,
44
43
  class: "thinking-bar-tool-call-pre"
45
- }, ze = {
44
+ }, Be = {
46
45
  key: 3,
47
46
  class: "thinking-bar-tool-call-block"
48
- }, Oe = { class: "thinking-bar-tool-call-pre" }, De = {
47
+ }, Re = { class: "thinking-bar-tool-call-pre" }, Ee = {
49
48
  key: 4,
50
49
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--error"
51
- }, Me = { class: "thinking-bar-tool-call-pre" }, Ne = {
50
+ }, Fe = { class: "thinking-bar-tool-call-pre" }, ze = {
52
51
  key: 5,
53
52
  class: "thinking-bar-nested-tools"
54
- }, He = { class: "thinking-bar-tool-call-head" }, Le = { class: "thinking-bar-tool-call-head-main" }, je = { class: "thinking-bar-tool-call-name" }, Ie = { class: "thinking-bar-tool-call-head-side" }, Pe = { class: "thinking-bar-tool-call-body" }, Ve = {
53
+ }, Oe = { class: "thinking-bar-tool-call-head" }, De = { class: "thinking-bar-tool-call-head-main" }, Me = { class: "thinking-bar-tool-call-name" }, Ne = { class: "thinking-bar-tool-call-head-side" }, He = { class: "thinking-bar-tool-call-body" }, Le = {
55
54
  key: 0,
56
55
  class: "thinking-bar-tool-call-block"
57
- }, qe = { class: "thinking-bar-tool-call-pre" }, Ke = {
56
+ }, je = { class: "thinking-bar-tool-call-pre" }, Pe = {
58
57
  key: 1,
59
58
  class: "thinking-bar-tool-call-block"
60
- }, Je = { class: "thinking-bar-tool-call-pre" }, Ue = {
59
+ }, Ie = { class: "thinking-bar-tool-call-pre" }, Ve = {
61
60
  key: 1,
62
61
  class: "thinking-bar-step-answer-section"
63
- }, We = { class: "thinking-bar-step-text thinking-bar-step-markdown thinking-bar-step-answer" }, Ge = {
62
+ }, qe = { class: "thinking-bar-step-text thinking-bar-step-markdown thinking-bar-step-answer" }, Ke = {
64
63
  key: 0,
65
64
  class: "thinking-bar-chat-items"
66
- }, Qe = {
65
+ }, Je = {
67
66
  key: 0,
68
67
  class: "thinking-bar-step-text thinking-bar-step-markdown"
69
- }, Xe = ["open"], Ye = { 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 = {
68
+ }, Ue = ["open"], We = { class: "thinking-bar-tool-call-head" }, Ge = { class: "thinking-bar-tool-call-head-main" }, Qe = { class: "thinking-bar-tool-call-name" }, Xe = { class: "thinking-bar-tool-call-head-side" }, Ye = { class: "thinking-bar-tool-call-body" }, Ze = {
70
69
  key: 0,
71
70
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
72
- }, rn = {
71
+ }, tn = {
73
72
  key: 0,
74
73
  class: "thinking-bar-tool-result-image-shell"
75
- }, on = ["src", "alt"], ln = ["srcdoc", "title"], an = {
74
+ }, en = ["src", "alt"], nn = ["srcdoc", "title"], sn = {
76
75
  key: 2,
77
76
  class: "thinking-bar-tool-result-table-wrap"
78
- }, cn = { class: "thinking-bar-tool-result-table" }, un = {
77
+ }, rn = { class: "thinking-bar-tool-result-table" }, on = {
79
78
  key: 3,
80
79
  class: "thinking-bar-tool-call-pre"
81
- }, dn = {
80
+ }, ln = {
82
81
  key: 1,
83
82
  class: "thinking-bar-step-text thinking-bar-step-markdown"
84
- }, hn = {
83
+ }, an = {
85
84
  key: 2,
86
85
  class: "thinking-bar-attachments"
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 = {
86
+ }, cn = ["href"], un = ["src", "alt"], dn = { class: "thinking-bar-attachment-meta" }, hn = { class: "thinking-bar-attachment-name" }, gn = { class: "thinking-bar-attachment-type" }, kn = {
88
87
  key: 3,
89
88
  class: "thinking-bar-workspace"
90
- }, yn = { class: "thinking-bar-workspace-shell" }, _n = { class: "thinking-bar-file-tree-pane" }, vn = { class: "thinking-bar-file-tree-body" }, wn = {
89
+ }, bn = { class: "thinking-bar-workspace-shell" }, fn = { class: "thinking-bar-file-tree-pane" }, mn = { class: "thinking-bar-file-tree-body" }, pn = {
91
90
  key: 0,
92
91
  class: "thinking-bar-tree-node"
93
- }, Tn = ["onClick"], xn = { class: "thinking-bar-tree-caret" }, Sn = { 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" }, zn = {
92
+ }, yn = ["onClick"], _n = { class: "thinking-bar-tree-caret" }, vn = { class: "thinking-bar-tree-label" }, wn = ["onClick"], Tn = { class: "thinking-bar-tree-icon" }, xn = { class: "thinking-bar-tree-label" }, Sn = { class: "thinking-bar-file-preview" }, $n = { class: "thinking-bar-file-preview-head" }, An = { class: "thinking-bar-file-preview-title" }, Cn = { class: "thinking-bar-tree-icon" }, Bn = {
94
93
  key: 0,
95
94
  class: "thinking-bar-preview-chip"
96
- }, On = {
95
+ }, Rn = {
97
96
  key: 0,
98
97
  class: "thinking-bar-image-shell"
99
- }, Dn = ["src", "alt"], Mn = {
98
+ }, En = ["src", "alt"], Fn = {
100
99
  key: 1,
101
100
  class: "thinking-bar-empty-preview"
102
- }, Nn = ["srcdoc", "title"], Hn = {
101
+ }, zn = ["srcdoc", "title"], On = {
103
102
  key: 2,
104
103
  class: "thinking-bar-file-preview-body"
105
- }, Ln = {
104
+ }, Dn = {
106
105
  key: 1,
107
106
  class: "thinking-bar-empty-preview"
108
- }, Wn = /* @__PURE__ */ jt({
107
+ }, Vn = /* @__PURE__ */ Lt({
109
108
  __name: "SpotlightThinking",
110
109
  props: {
111
110
  steps: {},
@@ -116,7 +115,7 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
116
115
  emits: ["close"],
117
116
  setup(w) {
118
117
  const G = D(!1), L = D(null), _ = D({}), T = /* @__PURE__ */ new Map();
119
- let C = null, x = null;
118
+ let B = null, x = null;
120
119
  function j(e) {
121
120
  K(e), requestAnimationFrame(() => {
122
121
  K(e);
@@ -133,10 +132,10 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
133
132
  }
134
133
  function wt(e, t) {
135
134
  const i = t.target;
136
- C != null && window.clearTimeout(C), _.value = {
135
+ B != null && window.clearTimeout(B), _.value = {
137
136
  ..._.value,
138
137
  [e]: Q(i)
139
- }, C = window.setTimeout(() => {
138
+ }, B = window.setTimeout(() => {
140
139
  _.value = {
141
140
  ..._.value,
142
141
  [e]: Q(i)
@@ -152,7 +151,7 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
152
151
  function X(e, t) {
153
152
  return t ? !0 : _.value[e] !== !1;
154
153
  }
155
- It(() => {
154
+ jt(() => {
156
155
  typeof ResizeObserver < "u" && (x = new ResizeObserver(() => {
157
156
  K();
158
157
  }), kt(() => {
@@ -165,7 +164,7 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
165
164
  j(!0);
166
165
  });
167
166
  }), Pt(() => {
168
- C != null && window.clearTimeout(C), x?.disconnect(), x = null, T.clear();
167
+ B != null && window.clearTimeout(B), x?.disconnect(), x = null, T.clear();
169
168
  });
170
169
  const h = w, xt = M(() => h.steps.length > 0 && h.steps.every((t) => t.status === "done" || t.status === "error") ? "执行完成" : "思考中"), Y = M(() => h.memoryReplay ? h.memoryReplay.source === "semantic" ? "语义缓存" : h.memoryReplay.source === "exact" ? "Memory 缓存" : "Session 缓存" : ""), St = M(
171
170
  () => h.steps.some(
@@ -178,25 +177,13 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
178
177
  ), At = M(
179
178
  () => h.steps.filter((e) => e.status === "done").length
180
179
  );
181
- function Bt(e) {
182
- switch (e) {
183
- case "active":
184
- return "⋯";
185
- case "done":
186
- return "✓";
187
- case "error":
188
- return "✕";
189
- default:
190
- return "·";
191
- }
192
- }
193
180
  function Ct(e) {
194
181
  return e.name.trim().toLowerCase();
195
182
  }
196
183
  function H(e) {
197
184
  return e.displayName?.trim() || e.name;
198
185
  }
199
- function I(e) {
186
+ function P(e) {
200
187
  return pt(e.content ?? "").planning;
201
188
  }
202
189
  function Z(e) {
@@ -216,23 +203,23 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
216
203
  (t) => t.type === "tool"
217
204
  ).map((t) => t.toolCall);
218
205
  }
219
- function P(e) {
206
+ function I(e) {
220
207
  return _t(et(e)).visible;
221
208
  }
222
209
  function nt(e) {
223
210
  return _t(et(e)).nestedKnowledge;
224
211
  }
212
+ function Bt(e) {
213
+ return Rt(e.name) === Jt.knowledge.answer;
214
+ }
225
215
  function Rt(e) {
226
- return Et(e.name) === Wt.knowledge.answer;
216
+ return e.trim().toLowerCase();
227
217
  }
228
218
  function Et(e) {
229
- return e.trim().toLowerCase();
219
+ return !!(P(e).trim() || I(e).length > 0);
230
220
  }
231
221
  function Ft(e) {
232
- return !!(I(e).trim() || P(e).length > 0);
233
- }
234
- function zt(e) {
235
- const t = P(e).length;
222
+ const t = I(e).length;
236
223
  return t > 0 ? `${t} 个工具调用` : "规划记录";
237
224
  }
238
225
  function it(e) {
@@ -408,40 +395,40 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
408
395
  },
409
396
  { deep: !0 }
410
397
  );
411
- const z = D({}), A = D({});
398
+ const z = D({}), C = D({});
412
399
  bt(
413
400
  () => h.steps,
414
401
  (e) => {
415
- const t = { ...z.value }, i = { ...A.value };
402
+ const t = { ...z.value }, i = { ...C.value };
416
403
  for (const n of e) {
417
404
  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) {
418
405
  const l = new Set(i[n.id] || []);
419
406
  for (const c of n.files)
420
- Mt(c.path).forEach(
407
+ Dt(c.path).forEach(
421
408
  (f) => l.add(f)
422
409
  );
423
410
  i[n.id] = [...l];
424
411
  }
425
412
  !n.files?.length && i[n.id] && delete i[n.id];
426
413
  }
427
- z.value = t, A.value = i;
414
+ z.value = t, C.value = i;
428
415
  },
429
416
  { deep: !0, immediate: !0 }
430
417
  );
431
- function Ot(e, t) {
418
+ function zt(e, t) {
432
419
  z.value = {
433
420
  ...z.value,
434
421
  [e]: t
435
422
  };
436
423
  }
437
- function Dt(e, t) {
438
- t && Ot(e, t.id);
424
+ function Ot(e, t) {
425
+ t && zt(e, t.id);
439
426
  }
440
427
  function k(e) {
441
428
  const t = z.value[e.id];
442
429
  return e.files?.find((i) => i.id === t) ?? e.files?.[0] ?? null;
443
430
  }
444
- function Mt(e) {
431
+ function Dt(e) {
445
432
  const t = e.split("/").filter(Boolean), i = [];
446
433
  let n = "";
447
434
  return t.slice(0, -1).forEach((l) => {
@@ -449,16 +436,16 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
449
436
  }), i;
450
437
  }
451
438
  function ut(e, t) {
452
- return (A.value[e] || []).includes(t);
439
+ return (C.value[e] || []).includes(t);
453
440
  }
454
- function Nt(e, t) {
455
- const i = new Set(A.value[e] || []);
456
- i.has(t) ? i.delete(t) : i.add(t), A.value = {
457
- ...A.value,
441
+ function Mt(e, t) {
442
+ const i = new Set(C.value[e] || []);
443
+ i.has(t) ? i.delete(t) : i.add(t), C.value = {
444
+ ...C.value,
458
445
  [e]: [...i]
459
446
  };
460
447
  }
461
- function Ht(e, t) {
448
+ function Nt(e, t) {
462
449
  const i = /* @__PURE__ */ new Map(), n = (p, $, v) => (i.has(p) || i.set(p, {
463
450
  path: p,
464
451
  name: $,
@@ -471,8 +458,8 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
471
458
  let v = "", O = l;
472
459
  $.slice(0, -1).forEach((b, g) => {
473
460
  v += `/${b}`;
474
- const Lt = n(v, b, g);
475
- O.directoryChildren.includes(v) || O.directoryChildren.push(v), O = Lt;
461
+ const Ht = n(v, b, g);
462
+ O.directoryChildren.includes(v) || O.directoryChildren.push(v), O = Ht;
476
463
  }), O.files.push(p);
477
464
  }
478
465
  const c = [], f = (p) => {
@@ -527,7 +514,7 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
527
514
  return dt(e) ? "🖼" : U(e) ? "🌐" : /\.md$/i.test(e) ? "📝" : /\.(csv|xlsx?)$/i.test(e) ? "📊" : /\.(json|ya?ml|xml)$/i.test(e) ? "🧩" : "📄";
528
515
  }
529
516
  return (e, t) => (r(), o("div", {
530
- class: B(["thinking-bar", [
517
+ class: A(["thinking-bar", [
531
518
  { "thinking-bar--embedded": w.embedded },
532
519
  { "thinking-bar--open": G.value },
533
520
  { "thinking-bar--centered": w.centered },
@@ -538,22 +525,22 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
538
525
  class: "thinking-bar-grid",
539
526
  "aria-hidden": "true"
540
527
  }, null, -1)),
541
- s("div", Qt, [
542
- s("div", Xt, [
528
+ s("div", Ut, [
529
+ s("div", Wt, [
543
530
  t[1] || (t[1] = s("span", { class: "thinking-bar-kicker" }, "Spotlight", -1)),
544
- s("span", Yt, a(xt.value), 1),
545
- Y.value ? (r(), o("span", Zt, a(Y.value), 1)) : u("", !0)
531
+ s("span", Gt, a(xt.value), 1),
532
+ Y.value ? (r(), o("span", Qt, a(Y.value), 1)) : u("", !0)
546
533
  ]),
547
- s("div", te, [
548
- s("span", ee, [
534
+ s("div", Xt, [
535
+ s("span", Yt, [
549
536
  s("strong", null, a(w.steps.length), 1),
550
537
  t[2] || (t[2] = s("em", null, "阶段", -1))
551
538
  ]),
552
- s("span", ne, [
539
+ s("span", Zt, [
553
540
  s("strong", null, a($t.value), 1),
554
541
  t[3] || (t[3] = s("em", null, "运行", -1))
555
542
  ]),
556
- s("span", ie, [
543
+ s("span", te, [
557
544
  s("strong", null, a(At.value), 1),
558
545
  t[4] || (t[4] = s("em", null, "完成", -1))
559
546
  ])
@@ -572,78 +559,72 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
572
559
  }, [
573
560
  (r(!0), o(d, null, m(w.steps, (i) => (r(), o("div", {
574
561
  key: i.id,
575
- class: B(["thinking-bar-step", [i.status]])
562
+ class: A(["thinking-bar-step", [i.status]])
576
563
  }, [
577
- i.status === "active" ? (r(), Vt(Gt, {
578
- key: 0,
579
- class: "thinking-bar-step-beam",
580
- size: 100,
581
- duration: 8,
582
- "border-width": 2,
583
- "color-from": "#14b8a6",
584
- "color-to": "#0ea5e9"
585
- })) : u("", !0),
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),
564
+ s("div", ee, [
565
+ s("span", {
566
+ class: A(["thinking-bar-step-status", `is-${i.status}`]),
567
+ "aria-hidden": "true"
568
+ }, null, 2),
569
+ s("div", ne, [
570
+ s("span", ie, a(i.label), 1),
590
571
  s("div", {
591
572
  ref_for: !0,
592
573
  ref: (n) => vt(i.id, n),
593
574
  class: "thinking-bar-step-body",
594
575
  onScrollPassive: (n) => wt(i.id, n)
595
576
  }, [
596
- N(Kt)(i.id) ? (r(), o("div", ce, [
597
- Ft(i) ? (r(), o("details", ue, [
598
- s("summary", de, [
577
+ N(Vt)(i.id) ? (r(), o("div", re, [
578
+ Et(i) ? (r(), o("details", oe, [
579
+ s("summary", le, [
599
580
  t[5] || (t[5] = s("span", { class: "thinking-bar-execution-details-title" }, "调用工具", -1)),
600
- s("span", he, a(zt(i)), 1),
581
+ s("span", ae, a(Ft(i)), 1),
601
582
  t[6] || (t[6] = s("span", { class: "thinking-bar-execution-details-caret" }, "▾", -1))
602
583
  ]),
603
- s("div", ge, [
604
- I(i) ? (r(), o("pre", ke, a(I(i)), 1)) : u("", !0),
605
- (r(!0), o(d, null, m(P(i), (n) => (r(), o("details", {
584
+ s("div", ce, [
585
+ P(i) ? (r(), o("pre", ue, a(P(i)), 1)) : u("", !0),
586
+ (r(!0), o(d, null, m(I(i), (n) => (r(), o("details", {
606
587
  key: n.id,
607
588
  class: "thinking-bar-tool-call",
608
589
  open: rt(n)
609
590
  }, [
610
- s("summary", fe, [
611
- s("div", me, [
612
- s("span", pe, a(H(n)), 1),
613
- n.name !== H(n) ? (r(), o("span", ye, a(n.name), 1)) : u("", !0)
591
+ s("summary", he, [
592
+ s("div", ge, [
593
+ s("span", ke, a(H(n)), 1),
594
+ n.name !== H(n) ? (r(), o("span", be, a(n.name), 1)) : u("", !0)
614
595
  ]),
615
- s("div", _e, [
596
+ s("div", fe, [
616
597
  s("span", {
617
- class: B(["thinking-bar-tool-call-status", `is-${n.status}`])
598
+ class: A(["thinking-bar-tool-call-status", `is-${n.status}`])
618
599
  }, a(it(n.status)), 3),
619
600
  t[7] || (t[7] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
620
601
  ])
621
602
  ]),
622
- s("div", ve, [
623
- n.argsText?.trim() ? (r(), o("div", we, [
603
+ s("div", me, [
604
+ n.argsText?.trim() ? (r(), o("div", pe, [
624
605
  t[8] || (t[8] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
625
- s("pre", Te, a(n.argsText), 1)
606
+ s("pre", ye, a(n.argsText), 1)
626
607
  ])) : u("", !0),
627
- n.summary?.trim() ? (r(), o("div", xe, [
608
+ n.summary?.trim() ? (r(), o("div", _e, [
628
609
  t[9] || (t[9] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行摘要 ", -1)),
629
- s("pre", Se, a(n.summary), 1)
610
+ s("pre", ve, a(n.summary), 1)
630
611
  ])) : u("", !0),
631
- at(n) ? (r(), o("div", $e, [
612
+ at(n) ? (r(), o("div", we, [
632
613
  t[10] || (t[10] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
633
- E(n) ? (r(), o("div", Ae, [
614
+ E(n) ? (r(), o("div", Te, [
634
615
  s("img", {
635
616
  class: "thinking-bar-tool-result-image",
636
617
  src: E(n) || "",
637
618
  alt: n.name
638
- }, null, 8, Be)
619
+ }, null, 8, xe)
639
620
  ])) : F(n) ? (r(), o("iframe", {
640
621
  key: 1,
641
622
  class: "thinking-bar-tool-result-html",
642
623
  srcdoc: F(n) || "",
643
624
  title: n.name,
644
625
  sandbox: ""
645
- }, null, 8, Ce)) : y(n) ? (r(), o("div", Re, [
646
- s("table", Ee, [
626
+ }, null, 8, Se)) : y(n) ? (r(), o("div", $e, [
627
+ s("table", Ae, [
647
628
  s("thead", null, [
648
629
  s("tr", null, [
649
630
  (r(!0), o(d, null, m(y(
@@ -663,17 +644,17 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
663
644
  ]))), 128))
664
645
  ])
665
646
  ])
666
- ])) : S(n) ? (r(), o("pre", Fe, a(S(n)), 1)) : u("", !0)
647
+ ])) : S(n) ? (r(), o("pre", Ce, a(S(n)), 1)) : u("", !0)
667
648
  ])) : u("", !0),
668
- st(n.trace) ? (r(), o("div", ze, [
649
+ st(n.trace) ? (r(), o("div", Be, [
669
650
  t[11] || (t[11] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行轨迹 ", -1)),
670
- s("pre", Oe, a(st(n.trace)), 1)
651
+ s("pre", Re, a(st(n.trace)), 1)
671
652
  ])) : u("", !0),
672
- n.errorCode ? (r(), o("div", De, [
653
+ n.errorCode ? (r(), o("div", Ee, [
673
654
  t[12] || (t[12] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 错误码 ", -1)),
674
- s("pre", Me, a(n.errorCode), 1)
655
+ s("pre", Fe, a(n.errorCode), 1)
675
656
  ])) : u("", !0),
676
- Rt(n) && nt(i).length > 0 ? (r(), o("div", Ne, [
657
+ Bt(n) && nt(i).length > 0 ? (r(), o("div", ze, [
677
658
  t[16] || (t[16] = s("div", { class: "thinking-bar-nested-tools-label" }, " 知识库内部步骤 ", -1)),
678
659
  (r(!0), o(d, null, m(nt(
679
660
  i
@@ -681,51 +662,51 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
681
662
  key: l.id,
682
663
  class: "thinking-bar-tool-call thinking-bar-tool-call--nested"
683
664
  }, [
684
- s("summary", He, [
685
- s("div", Le, [
686
- s("span", je, a(H(l)), 1)
665
+ s("summary", Oe, [
666
+ s("div", De, [
667
+ s("span", Me, a(H(l)), 1)
687
668
  ]),
688
- s("div", Ie, [
669
+ s("div", Ne, [
689
670
  s("span", {
690
- class: B(["thinking-bar-tool-call-status", `is-${l.status}`])
671
+ class: A(["thinking-bar-tool-call-status", `is-${l.status}`])
691
672
  }, a(it(l.status)), 3),
692
673
  t[13] || (t[13] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
693
674
  ])
694
675
  ]),
695
- s("div", Pe, [
696
- l.argsText?.trim() ? (r(), o("div", Ve, [
676
+ s("div", He, [
677
+ l.argsText?.trim() ? (r(), o("div", Le, [
697
678
  t[14] || (t[14] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
698
- s("pre", qe, a(l.argsText), 1)
679
+ s("pre", je, a(l.argsText), 1)
699
680
  ])) : u("", !0),
700
- S(l) ? (r(), o("div", Ke, [
681
+ S(l) ? (r(), o("div", Pe, [
701
682
  t[15] || (t[15] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
702
- s("pre", Je, a(S(l)), 1)
683
+ s("pre", Ie, a(S(l)), 1)
703
684
  ])) : u("", !0)
704
685
  ])
705
686
  ]))), 128))
706
687
  ])) : u("", !0)
707
688
  ])
708
- ], 8, be))), 128))
689
+ ], 8, de))), 128))
709
690
  ])
710
691
  ])) : u("", !0),
711
- Z(i) ? (r(), o("section", Ue, [
692
+ Z(i) ? (r(), o("section", Ve, [
712
693
  t[17] || (t[17] = s("div", { class: "thinking-bar-step-section-label" }, "回答", -1)),
713
- s("div", We, [
714
- W(qt, {
694
+ s("div", qe, [
695
+ W(It, {
715
696
  "model-value": Z(i),
716
697
  "format-knowledge": ""
717
698
  }, null, 8, ["model-value"])
718
699
  ])
719
700
  ])) : u("", !0)
720
701
  ])) : (r(), o(d, { key: 1 }, [
721
- i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ge, [
702
+ i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ke, [
722
703
  (r(!0), o(d, null, m(i.chatItems, (n) => (r(), o("div", {
723
704
  key: n.id,
724
705
  class: "thinking-bar-chat-item"
725
706
  }, [
726
- n.type === "text" && n.text.trim() ? (r(), o("div", Qe, [
707
+ n.type === "text" && n.text.trim() ? (r(), o("div", Je, [
727
708
  W(N(mt), {
728
- "model-value": N(Jt)(n.text),
709
+ "model-value": N(qt)(n.text),
729
710
  theme: "dark",
730
711
  "preview-theme": "github",
731
712
  "code-theme": "github",
@@ -736,34 +717,34 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
736
717
  class: "thinking-bar-tool-call",
737
718
  open: rt(n.toolCall)
738
719
  }, [
739
- s("summary", Ye, [
740
- s("div", Ze, [
741
- s("span", tn, a(H(n.toolCall)), 1)
720
+ s("summary", We, [
721
+ s("div", Ge, [
722
+ s("span", Qe, a(H(n.toolCall)), 1)
742
723
  ]),
743
- s("div", en, [
724
+ s("div", Xe, [
744
725
  s("span", {
745
- class: B(["thinking-bar-tool-call-status", `is-${n.toolCall.status}`])
726
+ class: A(["thinking-bar-tool-call-status", `is-${n.toolCall.status}`])
746
727
  }, a(n.toolCall.status === "done" ? "已完成" : n.toolCall.status === "error" ? "失败" : n.toolCall.status === "running" ? "执行中" : "待执行"), 3),
747
728
  t[18] || (t[18] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
748
729
  ])
749
730
  ]),
750
- s("div", nn, [
751
- at(n.toolCall) ? (r(), o("div", sn, [
731
+ s("div", Ye, [
732
+ at(n.toolCall) ? (r(), o("div", Ze, [
752
733
  t[19] || (t[19] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 结果 ", -1)),
753
- E(n.toolCall) ? (r(), o("div", rn, [
734
+ E(n.toolCall) ? (r(), o("div", tn, [
754
735
  s("img", {
755
736
  class: "thinking-bar-tool-result-image",
756
737
  src: E(n.toolCall) || "",
757
738
  alt: n.toolCall.name
758
- }, null, 8, on)
739
+ }, null, 8, en)
759
740
  ])) : F(n.toolCall) ? (r(), o("iframe", {
760
741
  key: 1,
761
742
  class: "thinking-bar-tool-result-html",
762
743
  srcdoc: F(n.toolCall) || "",
763
744
  title: n.toolCall.name,
764
745
  sandbox: ""
765
- }, null, 8, ln)) : y(n.toolCall) ? (r(), o("div", an, [
766
- s("table", cn, [
746
+ }, null, 8, nn)) : y(n.toolCall) ? (r(), o("div", sn, [
747
+ s("table", rn, [
767
748
  s("thead", null, [
768
749
  s("tr", null, [
769
750
  (r(!0), o(d, null, m(y(
@@ -785,14 +766,14 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
785
766
  ]))), 128))
786
767
  ])
787
768
  ])
788
- ])) : S(n.toolCall) ? (r(), o("pre", un, a(S(n.toolCall)), 1)) : u("", !0)
769
+ ])) : S(n.toolCall) ? (r(), o("pre", on, a(S(n.toolCall)), 1)) : u("", !0)
789
770
  ])) : u("", !0)
790
771
  ])
791
- ], 8, Xe)) : u("", !0)
772
+ ], 8, Ue)) : u("", !0)
792
773
  ]))), 128))
793
- ])) : i.content ? (r(), o("div", dn, [
774
+ ])) : i.content ? (r(), o("div", ln, [
794
775
  W(N(mt), {
795
- "model-value": N(Ut)(i.content ?? ""),
776
+ "model-value": N(Kt)(i.content ?? ""),
796
777
  theme: "dark",
797
778
  "preview-theme": "github",
798
779
  "code-theme": "github",
@@ -800,7 +781,7 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
800
781
  }, null, 8, ["model-value"])
801
782
  ])) : u("", !0)
802
783
  ], 64)),
803
- i.attachments && i.attachments.length > 0 ? (r(), o("div", hn, [
784
+ i.attachments && i.attachments.length > 0 ? (r(), o("div", an, [
804
785
  (r(!0), o(d, null, m(i.attachments, (n) => (r(), o("a", {
805
786
  key: n.id,
806
787
  class: "thinking-bar-attachment",
@@ -813,78 +794,78 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
813
794
  class: "thinking-bar-attachment-image",
814
795
  src: n.url,
815
796
  alt: n.name || "图表预览"
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)
797
+ }, null, 8, un)) : u("", !0),
798
+ s("div", dn, [
799
+ s("span", hn, a(n.name || n.url), 1),
800
+ s("span", gn, a(n.type === "image" ? "图片预览" : n.type === "html" ? "打开图表" : "打开文件"), 1)
820
801
  ])
821
- ], 8, gn))), 128))
802
+ ], 8, cn))), 128))
822
803
  ])) : u("", !0),
823
- i.files && i.files.length > 0 ? (r(), o("div", pn, [
804
+ i.files && i.files.length > 0 ? (r(), o("div", kn, [
824
805
  t[22] || (t[22] = s("div", { class: "thinking-bar-workspace-title" }, "状态工作台", -1)),
825
- s("div", yn, [
826
- s("div", _n, [
806
+ s("div", bn, [
807
+ s("div", fn, [
827
808
  t[21] || (t[21] = s("div", { class: "thinking-bar-file-tree-head" }, "文件系统", -1)),
828
- s("div", vn, [
829
- (r(!0), o(d, null, m(Ht(i.id, i.files), (n) => (r(), o(d, {
809
+ s("div", mn, [
810
+ (r(!0), o(d, null, m(Nt(i.id, i.files), (n) => (r(), o(d, {
830
811
  key: `${i.id}:${n.path}`
831
812
  }, [
832
- n.type === "directory" ? (r(), o("div", wn, [
813
+ n.type === "directory" ? (r(), o("div", pn, [
833
814
  s("button", {
834
815
  type: "button",
835
816
  class: "thinking-bar-tree-row thinking-bar-tree-row--directory",
836
817
  style: ft({
837
818
  paddingLeft: `${n.depth * 14 + 10}px`
838
819
  }),
839
- onClick: (l) => Nt(i.id, n.path)
820
+ onClick: (l) => Mt(i.id, n.path)
840
821
  }, [
841
- s("span", xn, a(ut(i.id, n.path) ? "▾" : "▸"), 1),
822
+ s("span", _n, a(ut(i.id, n.path) ? "▾" : "▸"), 1),
842
823
  t[20] || (t[20] = s("span", { class: "thinking-bar-tree-icon" }, "📁", -1)),
843
- s("span", Sn, a(n.name), 1)
844
- ], 12, Tn)
824
+ s("span", vn, a(n.name), 1)
825
+ ], 12, yn)
845
826
  ])) : (r(), o("button", {
846
827
  key: 1,
847
828
  type: "button",
848
- class: B(["thinking-bar-tree-row thinking-bar-tree-row--file", {
829
+ class: A(["thinking-bar-tree-row thinking-bar-tree-row--file", {
849
830
  active: k(i)?.id === n.file?.id
850
831
  }]),
851
832
  style: ft({ paddingLeft: `${n.depth * 14 + 26}px` }),
852
- onClick: (l) => Dt(i.id, n.file)
833
+ onClick: (l) => Ot(i.id, n.file)
853
834
  }, [
854
- s("span", An, a(gt(n.file?.path || "")), 1),
855
- s("span", Bn, a(n.name), 1)
856
- ], 14, $n))
835
+ s("span", Tn, a(gt(n.file?.path || "")), 1),
836
+ s("span", xn, a(n.name), 1)
837
+ ], 14, wn))
857
838
  ], 64))), 128))
858
839
  ])
859
840
  ]),
860
- s("div", Cn, [
841
+ s("div", Sn, [
861
842
  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),
843
+ s("div", $n, [
844
+ s("div", An, [
845
+ s("span", Cn, a(gt(k(i)?.path || "")), 1),
865
846
  s("span", null, a(k(i)?.path), 1)
866
847
  ]),
867
- U(k(i)?.path || "") ? (r(), o("span", zn, " HTML 预览 ")) : u("", !0)
848
+ U(k(i)?.path || "") ? (r(), o("span", Bn, " HTML 预览 ")) : u("", !0)
868
849
  ]),
869
- dt(k(i)?.path || "") ? (r(), o("div", On, [
850
+ dt(k(i)?.path || "") ? (r(), o("div", Rn, [
870
851
  ht(k(i)) ? (r(), o("img", {
871
852
  key: 0,
872
853
  class: "thinking-bar-image-preview",
873
854
  src: ht(k(i)) || "",
874
855
  alt: k(i)?.name || "图片预览"
875
- }, null, 8, Dn)) : (r(), o("div", Mn, " 当前图片文件没有可直接渲染的内容。 "))
856
+ }, null, 8, En)) : (r(), o("div", Fn, " 当前图片文件没有可直接渲染的内容。 "))
876
857
  ])) : U(k(i)?.path || "") ? (r(), o("iframe", {
877
858
  key: 1,
878
859
  class: "thinking-bar-html-preview",
879
860
  srcdoc: J(k(i)),
880
861
  title: k(i)?.path,
881
862
  sandbox: ""
882
- }, null, 8, Nn)) : (r(), o("pre", Hn, a(J(k(i))), 1))
883
- ], 64)) : (r(), o("div", Ln, " 还没选中文件,左边点一个看看。 "))
863
+ }, null, 8, zn)) : (r(), o("pre", On, a(J(k(i))), 1))
864
+ ], 64)) : (r(), o("div", Dn, " 还没选中文件,左边点一个看看。 "))
884
865
  ])
885
866
  ])
886
867
  ])) : u("", !0)
887
- ], 40, ae)
868
+ ], 40, se)
888
869
  ])
889
870
  ])
890
871
  ], 2))), 128))
@@ -893,5 +874,5 @@ const Qt = { class: "thinking-bar-header" }, Xt = { class: "thinking-bar-title-s
893
874
  }
894
875
  });
895
876
  export {
896
- Wn as default
877
+ Vn as default
897
878
  };