@inupedia/spotlight-vue 0.5.17 → 0.5.19

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