@inupedia/spotlight-vue 0.5.17 → 0.5.18

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