@inupedia/spotlight-vue 0.2.14 → 0.2.15

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,4 +1,4 @@
1
- import { defineComponent as Lt, ref as D, onMounted as jt, nextTick as kt, onBeforeUnmount as Pt, computed as M, watch as bt, openBlock as r, createElementBlock as o, normalizeClass as A, createElementVNode as s, toDisplayString as a, createCommentVNode as u, Fragment as d, renderList as m, unref as N, createVNode as W, normalizeStyle as ft } from "vue";
1
+ import { defineComponent as Lt, ref as O, onMounted as jt, nextTick as kt, onBeforeUnmount as Pt, computed as M, watch as bt, openBlock as r, createElementBlock as o, normalizeClass as A, createElementVNode as s, toDisplayString as a, createCommentVNode as u, Fragment as h, renderList as m, unref as N, createVNode as W, normalizeStyle as ft } from "vue";
2
2
  import { MdPreview as mt } from "md-editor-v3";
3
3
  import "md-editor-v3/lib/preview.css";
4
4
  import It from "./SpotlightMarkdownPreview.vue.js";
@@ -35,7 +35,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
35
35
  }, Te = {
36
36
  key: 0,
37
37
  class: "thinking-bar-tool-result-image-shell"
38
- }, xe = ["src", "alt"], Se = ["srcdoc", "title"], $e = {
38
+ }, Se = ["src", "alt"], xe = ["srcdoc", "title"], $e = {
39
39
  key: 2,
40
40
  class: "thinking-bar-tool-result-table-wrap"
41
41
  }, Ae = { class: "thinking-bar-tool-result-table" }, Ce = {
@@ -47,10 +47,10 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
47
47
  }, Re = { class: "thinking-bar-tool-call-pre" }, Ee = {
48
48
  key: 4,
49
49
  class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--error"
50
- }, Fe = { class: "thinking-bar-tool-call-pre" }, ze = {
50
+ }, Fe = { class: "thinking-bar-tool-call-pre" }, De = {
51
51
  key: 5,
52
52
  class: "thinking-bar-nested-tools"
53
- }, Oe = { class: "thinking-bar-tool-call-head" }, De = { class: "thinking-bar-tool-call-head-main" }, Me = { class: "thinking-bar-tool-call-name" }, Ne = { class: "thinking-bar-tool-call-head-side" }, He = { class: "thinking-bar-tool-call-body" }, Le = {
53
+ }, ze = { class: "thinking-bar-tool-call-head" }, Oe = { class: "thinking-bar-tool-call-head-main" }, Me = { class: "thinking-bar-tool-call-name" }, Ne = { class: "thinking-bar-tool-call-head-side" }, He = { class: "thinking-bar-tool-call-body" }, Le = {
54
54
  key: 0,
55
55
  class: "thinking-bar-tool-call-block"
56
56
  }, je = { class: "thinking-bar-tool-call-pre" }, Pe = {
@@ -89,7 +89,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
89
89
  }, bn = { class: "thinking-bar-workspace-shell" }, fn = { class: "thinking-bar-file-tree-pane" }, mn = { class: "thinking-bar-file-tree-body" }, pn = {
90
90
  key: 0,
91
91
  class: "thinking-bar-tree-node"
92
- }, yn = ["onClick"], _n = { class: "thinking-bar-tree-caret" }, vn = { class: "thinking-bar-tree-label" }, wn = ["onClick"], Tn = { class: "thinking-bar-tree-icon" }, xn = { class: "thinking-bar-tree-label" }, Sn = { class: "thinking-bar-file-preview" }, $n = { class: "thinking-bar-file-preview-head" }, An = { class: "thinking-bar-file-preview-title" }, Cn = { class: "thinking-bar-tree-icon" }, Bn = {
92
+ }, yn = ["onClick"], _n = { class: "thinking-bar-tree-caret" }, vn = { class: "thinking-bar-tree-label" }, wn = ["onClick"], Tn = { class: "thinking-bar-tree-icon" }, Sn = { class: "thinking-bar-tree-label" }, xn = { class: "thinking-bar-file-preview" }, $n = { class: "thinking-bar-file-preview-head" }, An = { class: "thinking-bar-file-preview-title" }, Cn = { class: "thinking-bar-tree-icon" }, Bn = {
93
93
  key: 0,
94
94
  class: "thinking-bar-preview-chip"
95
95
  }, Rn = {
@@ -98,10 +98,10 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
98
98
  }, En = ["src", "alt"], Fn = {
99
99
  key: 1,
100
100
  class: "thinking-bar-empty-preview"
101
- }, zn = ["srcdoc", "title"], On = {
101
+ }, Dn = ["srcdoc", "title"], zn = {
102
102
  key: 2,
103
103
  class: "thinking-bar-file-preview-body"
104
- }, Dn = {
104
+ }, On = {
105
105
  key: 1,
106
106
  class: "thinking-bar-empty-preview"
107
107
  }, Vn = /* @__PURE__ */ Lt({
@@ -110,12 +110,13 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
110
110
  steps: {},
111
111
  embedded: { type: Boolean },
112
112
  centered: { type: Boolean },
113
- memoryReplay: {}
113
+ memoryReplay: {},
114
+ memoryDecision: {}
114
115
  },
115
- emits: ["close"],
116
- setup(w) {
117
- const G = D(!1), L = D(null), _ = D({}), T = /* @__PURE__ */ new Map();
118
- let B = null, x = null;
116
+ emits: ["close", "force-refresh"],
117
+ setup(_) {
118
+ const G = O(!1), L = O(null), v = O({}), T = /* @__PURE__ */ new Map();
119
+ let B = null, S = null;
119
120
  function j(e) {
120
121
  K(e), requestAnimationFrame(() => {
121
122
  K(e);
@@ -123,40 +124,40 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
123
124
  }
124
125
  function vt(e, t) {
125
126
  const i = T.get(e);
126
- i && x && x.unobserve(i);
127
+ i && S && S.unobserve(i);
127
128
  const n = t instanceof HTMLElement ? t : null;
128
- n ? (T.set(e, n), x?.observe(n)) : T.delete(e);
129
+ n ? (T.set(e, n), S?.observe(n)) : T.delete(e);
129
130
  }
130
131
  function Q(e) {
131
132
  return e.scrollHeight - e.scrollTop - e.clientHeight <= 96;
132
133
  }
133
134
  function wt(e, t) {
134
135
  const i = t.target;
135
- B != null && window.clearTimeout(B), _.value = {
136
- ..._.value,
136
+ B != null && window.clearTimeout(B), v.value = {
137
+ ...v.value,
137
138
  [e]: Q(i)
138
139
  }, B = window.setTimeout(() => {
139
- _.value = {
140
- ..._.value,
140
+ v.value = {
141
+ ...v.value,
141
142
  [e]: Q(i)
142
143
  };
143
144
  }, 120);
144
145
  }
145
146
  function Tt() {
146
- const e = h.steps.find((i) => i.status === "active");
147
+ const e = d.steps.find((i) => i.status === "active");
147
148
  if (e) return [e.id];
148
- const t = h.steps[h.steps.length - 1];
149
+ const t = d.steps[d.steps.length - 1];
149
150
  return t ? [t.id] : [];
150
151
  }
151
152
  function X(e, t) {
152
- return t ? !0 : _.value[e] !== !1;
153
+ return t ? !0 : v.value[e] !== !1;
153
154
  }
154
155
  jt(() => {
155
- typeof ResizeObserver < "u" && (x = new ResizeObserver(() => {
156
+ typeof ResizeObserver < "u" && (S = new ResizeObserver(() => {
156
157
  K();
157
158
  }), kt(() => {
158
159
  T.forEach((e) => {
159
- x?.observe(e);
160
+ S?.observe(e);
160
161
  });
161
162
  })), requestAnimationFrame(() => {
162
163
  G.value = !0;
@@ -164,18 +165,23 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
164
165
  j(!0);
165
166
  });
166
167
  }), Pt(() => {
167
- B != null && window.clearTimeout(B), x?.disconnect(), x = null, T.clear();
168
+ B != null && window.clearTimeout(B), S?.disconnect(), S = null, T.clear();
168
169
  });
169
- const h = w, xt = M(() => h.steps.length > 0 && h.steps.every((t) => t.status === "done" || t.status === "error") ? "执行完成" : "思考中"), Y = M(() => h.memoryReplay ? h.memoryReplay.source === "semantic" ? "语义缓存" : h.memoryReplay.source === "exact" ? "Memory 缓存" : "Session 缓存" : ""), St = M(
170
- () => h.steps.some(
170
+ const d = _, St = M(() => d.steps.length > 0 && d.steps.every((t) => t.status === "done" || t.status === "error") ? "执行完成" : "思考中"), Y = M(() => d.memoryDecision ? {
171
+ reuse: "已复用项目记忆",
172
+ augment: "已结合项目记忆",
173
+ refresh: "已重新验证资料",
174
+ ignore: ""
175
+ }[d.memoryDecision.action] : d.memoryReplay ? d.memoryReplay.source === "semantic" ? "语义缓存" : d.memoryReplay.source === "exact" ? "Memory 缓存" : "Session 缓存" : ""), xt = M(
176
+ () => d.steps.some(
171
177
  (e) => e.status === "active" || e.status === "pending" || e.toolCalls?.some(
172
178
  (t) => t.status === "pending" || t.status === "running"
173
179
  )
174
180
  )
175
181
  ), $t = M(
176
- () => h.steps.filter((e) => e.status === "active").length
182
+ () => d.steps.filter((e) => e.status === "active").length
177
183
  ), At = M(
178
- () => h.steps.filter((e) => e.status === "done").length
184
+ () => d.steps.filter((e) => e.status === "done").length
179
185
  );
180
186
  function Ct(e) {
181
187
  return e.name.trim().toLowerCase();
@@ -251,7 +257,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
251
257
  return null;
252
258
  }
253
259
  }
254
- function S(e) {
260
+ function x(e) {
255
261
  const t = Ct(e), i = e.resultText?.trim() || "";
256
262
  if (!i) return "";
257
263
  if (t === "list_kbs") {
@@ -336,7 +342,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
336
342
  return null;
337
343
  }
338
344
  function at(e) {
339
- const t = S(e), i = e.summary?.trim();
345
+ const t = x(e), i = e.summary?.trim();
340
346
  return t && i && t.trim() === i ? !1 : !!(E(e) || F(e) || y(e) || t);
341
347
  }
342
348
  function ct(e) {
@@ -381,12 +387,12 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
381
387
  }, 120);
382
388
  }
383
389
  bt(
384
- () => h.steps,
390
+ () => d.steps,
385
391
  () => {
386
- if (St.value) {
387
- const e = h.steps.find((t) => t.status === "active");
388
- e && !(e.id in _.value) && (_.value = {
389
- ..._.value,
392
+ if (xt.value) {
393
+ const e = d.steps.find((t) => t.status === "active");
394
+ e && !(e.id in v.value) && (v.value = {
395
+ ...v.value,
390
396
  [e.id]: !0
391
397
  }), j(!1);
392
398
  return;
@@ -395,40 +401,40 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
395
401
  },
396
402
  { deep: !0 }
397
403
  );
398
- const z = D({}), C = D({});
404
+ const D = O({}), C = O({});
399
405
  bt(
400
- () => h.steps,
406
+ () => d.steps,
401
407
  (e) => {
402
- const t = { ...z.value }, i = { ...C.value };
408
+ const t = { ...D.value }, i = { ...C.value };
403
409
  for (const n of e) {
404
410
  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) {
405
411
  const l = new Set(i[n.id] || []);
406
412
  for (const c of n.files)
407
- Dt(c.path).forEach(
413
+ Ot(c.path).forEach(
408
414
  (f) => l.add(f)
409
415
  );
410
416
  i[n.id] = [...l];
411
417
  }
412
418
  !n.files?.length && i[n.id] && delete i[n.id];
413
419
  }
414
- z.value = t, C.value = i;
420
+ D.value = t, C.value = i;
415
421
  },
416
422
  { deep: !0, immediate: !0 }
417
423
  );
418
- function zt(e, t) {
419
- z.value = {
420
- ...z.value,
424
+ function Dt(e, t) {
425
+ D.value = {
426
+ ...D.value,
421
427
  [e]: t
422
428
  };
423
429
  }
424
- function Ot(e, t) {
425
- t && zt(e, t.id);
430
+ function zt(e, t) {
431
+ t && Dt(e, t.id);
426
432
  }
427
433
  function k(e) {
428
- const t = z.value[e.id];
434
+ const t = D.value[e.id];
429
435
  return e.files?.find((i) => i.id === t) ?? e.files?.[0] ?? null;
430
436
  }
431
- function Dt(e) {
437
+ function Ot(e) {
432
438
  const t = e.split("/").filter(Boolean), i = [];
433
439
  let n = "";
434
440
  return t.slice(0, -1).forEach((l) => {
@@ -446,29 +452,29 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
446
452
  };
447
453
  }
448
454
  function Nt(e, t) {
449
- const i = /* @__PURE__ */ new Map(), n = (p, $, v) => (i.has(p) || i.set(p, {
455
+ const i = /* @__PURE__ */ new Map(), n = (p, $, w) => (i.has(p) || i.set(p, {
450
456
  path: p,
451
457
  name: $,
452
- depth: v,
458
+ depth: w,
453
459
  directoryChildren: [],
454
460
  files: []
455
461
  }), i.get(p)), l = n("", "root", -1);
456
462
  for (const p of t) {
457
463
  const $ = p.path.split("/").filter(Boolean);
458
- let v = "", O = l;
464
+ let w = "", z = l;
459
465
  $.slice(0, -1).forEach((b, g) => {
460
- v += `/${b}`;
461
- const Ht = n(v, b, g);
462
- O.directoryChildren.includes(v) || O.directoryChildren.push(v), O = Ht;
463
- }), O.files.push(p);
466
+ w += `/${b}`;
467
+ const Ht = n(w, b, g);
468
+ z.directoryChildren.includes(w) || z.directoryChildren.push(w), z = Ht;
469
+ }), z.files.push(p);
464
470
  }
465
471
  const c = [], f = (p) => {
466
472
  const $ = i.get(p);
467
473
  if (!$) return;
468
- const v = [...$.directoryChildren].sort(
474
+ const w = [...$.directoryChildren].sort(
469
475
  (b, g) => b.localeCompare(g, "zh-CN")
470
476
  );
471
- for (const b of v) {
477
+ for (const b of w) {
472
478
  const g = i.get(b);
473
479
  g && (c.push({
474
480
  type: "directory",
@@ -515,41 +521,47 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
515
521
  }
516
522
  return (e, t) => (r(), o("div", {
517
523
  class: A(["thinking-bar", [
518
- { "thinking-bar--embedded": w.embedded },
524
+ { "thinking-bar--embedded": _.embedded },
519
525
  { "thinking-bar--open": G.value },
520
- { "thinking-bar--centered": w.centered },
521
- { "thinking-bar--corner": !w.centered && !w.embedded }
526
+ { "thinking-bar--centered": _.centered },
527
+ { "thinking-bar--corner": !_.centered && !_.embedded }
522
528
  ]])
523
529
  }, [
524
- t[23] || (t[23] = s("div", {
530
+ t[24] || (t[24] = s("div", {
525
531
  class: "thinking-bar-grid",
526
532
  "aria-hidden": "true"
527
533
  }, null, -1)),
528
534
  s("div", Ut, [
529
535
  s("div", Wt, [
530
- t[1] || (t[1] = s("span", { class: "thinking-bar-kicker" }, "Spotlight", -1)),
531
- s("span", Gt, a(xt.value), 1),
532
- Y.value ? (r(), o("span", Qt, a(Y.value), 1)) : u("", !0)
536
+ t[2] || (t[2] = s("span", { class: "thinking-bar-kicker" }, "Spotlight", -1)),
537
+ s("span", Gt, a(St.value), 1),
538
+ Y.value ? (r(), o("span", Qt, a(Y.value), 1)) : u("", !0),
539
+ _.memoryDecision?.canForceRefresh ? (r(), o("button", {
540
+ key: 1,
541
+ type: "button",
542
+ class: "thinking-bar-memory-refresh",
543
+ onClick: t[0] || (t[0] = (i) => e.$emit("force-refresh"))
544
+ }, " 重新查询 ")) : u("", !0)
533
545
  ]),
534
546
  s("div", Xt, [
535
547
  s("span", Yt, [
536
- s("strong", null, a(w.steps.length), 1),
537
- t[2] || (t[2] = s("em", null, "阶段", -1))
548
+ s("strong", null, a(_.steps.length), 1),
549
+ t[3] || (t[3] = s("em", null, "阶段", -1))
538
550
  ]),
539
551
  s("span", Zt, [
540
552
  s("strong", null, a($t.value), 1),
541
- t[3] || (t[3] = s("em", null, "运行", -1))
553
+ t[4] || (t[4] = s("em", null, "运行", -1))
542
554
  ]),
543
555
  s("span", te, [
544
556
  s("strong", null, a(At.value), 1),
545
- t[4] || (t[4] = s("em", null, "完成", -1))
557
+ t[5] || (t[5] = s("em", null, "完成", -1))
546
558
  ])
547
559
  ]),
548
560
  s("button", {
549
561
  type: "button",
550
562
  class: "thinking-bar-close",
551
563
  "aria-label": "关闭",
552
- onClick: t[0] || (t[0] = (i) => e.$emit("close"))
564
+ onClick: t[1] || (t[1] = (i) => e.$emit("close"))
553
565
  }, " × ")
554
566
  ]),
555
567
  s("div", {
@@ -557,7 +569,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
557
569
  ref: L,
558
570
  class: "thinking-bar-steps"
559
571
  }, [
560
- (r(!0), o(d, null, m(w.steps, (i) => (r(), o("div", {
572
+ (r(!0), o(h, null, m(_.steps, (i) => (r(), o("div", {
561
573
  key: i.id,
562
574
  class: A(["thinking-bar-step", [i.status]])
563
575
  }, [
@@ -577,13 +589,13 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
577
589
  N(Vt)(i.id) ? (r(), o("div", re, [
578
590
  Et(i) ? (r(), o("details", oe, [
579
591
  s("summary", le, [
580
- t[5] || (t[5] = s("span", { class: "thinking-bar-execution-details-title" }, "调用工具", -1)),
592
+ t[6] || (t[6] = s("span", { class: "thinking-bar-execution-details-title" }, "调用工具", -1)),
581
593
  s("span", ae, a(Ft(i)), 1),
582
- t[6] || (t[6] = s("span", { class: "thinking-bar-execution-details-caret" }, "▾", -1))
594
+ t[7] || (t[7] = s("span", { class: "thinking-bar-execution-details-caret" }, "▾", -1))
583
595
  ]),
584
596
  s("div", ce, [
585
597
  P(i) ? (r(), o("pre", ue, a(P(i)), 1)) : u("", !0),
586
- (r(!0), o(d, null, m(I(i), (n) => (r(), o("details", {
598
+ (r(!0), o(h, null, m(I(i), (n) => (r(), o("details", {
587
599
  key: n.id,
588
600
  class: "thinking-bar-tool-call",
589
601
  open: rt(n)
@@ -597,46 +609,46 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
597
609
  s("span", {
598
610
  class: A(["thinking-bar-tool-call-status", `is-${n.status}`])
599
611
  }, a(it(n.status)), 3),
600
- t[7] || (t[7] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
612
+ t[8] || (t[8] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
601
613
  ])
602
614
  ]),
603
615
  s("div", me, [
604
616
  n.argsText?.trim() ? (r(), o("div", pe, [
605
- t[8] || (t[8] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
617
+ t[9] || (t[9] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
606
618
  s("pre", ye, a(n.argsText), 1)
607
619
  ])) : u("", !0),
608
620
  n.summary?.trim() ? (r(), o("div", _e, [
609
- t[9] || (t[9] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行摘要 ", -1)),
621
+ t[10] || (t[10] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行摘要 ", -1)),
610
622
  s("pre", ve, a(n.summary), 1)
611
623
  ])) : u("", !0),
612
624
  at(n) ? (r(), o("div", we, [
613
- t[10] || (t[10] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
625
+ t[11] || (t[11] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
614
626
  E(n) ? (r(), o("div", Te, [
615
627
  s("img", {
616
628
  class: "thinking-bar-tool-result-image",
617
629
  src: E(n) || "",
618
630
  alt: n.name
619
- }, null, 8, xe)
631
+ }, null, 8, Se)
620
632
  ])) : F(n) ? (r(), o("iframe", {
621
633
  key: 1,
622
634
  class: "thinking-bar-tool-result-html",
623
635
  srcdoc: F(n) || "",
624
636
  title: n.name,
625
637
  sandbox: ""
626
- }, null, 8, Se)) : y(n) ? (r(), o("div", $e, [
638
+ }, null, 8, xe)) : y(n) ? (r(), o("div", $e, [
627
639
  s("table", Ae, [
628
640
  s("thead", null, [
629
641
  s("tr", null, [
630
- (r(!0), o(d, null, m(y(
642
+ (r(!0), o(h, null, m(y(
631
643
  n
632
644
  )?.columns, (l) => (r(), o("th", { key: l }, a(l), 1))), 128))
633
645
  ])
634
646
  ]),
635
647
  s("tbody", null, [
636
- (r(!0), o(d, null, m(y(n)?.rows, (l, c) => (r(), o("tr", {
648
+ (r(!0), o(h, null, m(y(n)?.rows, (l, c) => (r(), o("tr", {
637
649
  key: `${n.id}-${c}`
638
650
  }, [
639
- (r(!0), o(d, null, m(y(
651
+ (r(!0), o(h, null, m(y(
640
652
  n
641
653
  )?.columns, (f) => (r(), o("td", {
642
654
  key: `${n.id}-${c}-${f}`
@@ -644,43 +656,43 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
644
656
  ]))), 128))
645
657
  ])
646
658
  ])
647
- ])) : S(n) ? (r(), o("pre", Ce, a(S(n)), 1)) : u("", !0)
659
+ ])) : x(n) ? (r(), o("pre", Ce, a(x(n)), 1)) : u("", !0)
648
660
  ])) : u("", !0),
649
661
  st(n.trace) ? (r(), o("div", Be, [
650
- t[11] || (t[11] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行轨迹 ", -1)),
662
+ t[12] || (t[12] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行轨迹 ", -1)),
651
663
  s("pre", Re, a(st(n.trace)), 1)
652
664
  ])) : u("", !0),
653
665
  n.errorCode ? (r(), o("div", Ee, [
654
- t[12] || (t[12] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 错误码 ", -1)),
666
+ t[13] || (t[13] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 错误码 ", -1)),
655
667
  s("pre", Fe, a(n.errorCode), 1)
656
668
  ])) : u("", !0),
657
- Bt(n) && nt(i).length > 0 ? (r(), o("div", ze, [
658
- t[16] || (t[16] = s("div", { class: "thinking-bar-nested-tools-label" }, " 知识库内部步骤 ", -1)),
659
- (r(!0), o(d, null, m(nt(
669
+ Bt(n) && nt(i).length > 0 ? (r(), o("div", De, [
670
+ t[17] || (t[17] = s("div", { class: "thinking-bar-nested-tools-label" }, " 知识库内部步骤 ", -1)),
671
+ (r(!0), o(h, null, m(nt(
660
672
  i
661
673
  ), (l) => (r(), o("details", {
662
674
  key: l.id,
663
675
  class: "thinking-bar-tool-call thinking-bar-tool-call--nested"
664
676
  }, [
665
- s("summary", Oe, [
666
- s("div", De, [
677
+ s("summary", ze, [
678
+ s("div", Oe, [
667
679
  s("span", Me, a(H(l)), 1)
668
680
  ]),
669
681
  s("div", Ne, [
670
682
  s("span", {
671
683
  class: A(["thinking-bar-tool-call-status", `is-${l.status}`])
672
684
  }, a(it(l.status)), 3),
673
- t[13] || (t[13] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
685
+ t[14] || (t[14] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
674
686
  ])
675
687
  ]),
676
688
  s("div", He, [
677
689
  l.argsText?.trim() ? (r(), o("div", Le, [
678
- t[14] || (t[14] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
690
+ t[15] || (t[15] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
679
691
  s("pre", je, a(l.argsText), 1)
680
692
  ])) : u("", !0),
681
- S(l) ? (r(), o("div", Pe, [
682
- t[15] || (t[15] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
683
- s("pre", Ie, a(S(l)), 1)
693
+ x(l) ? (r(), o("div", Pe, [
694
+ t[16] || (t[16] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
695
+ s("pre", Ie, a(x(l)), 1)
684
696
  ])) : u("", !0)
685
697
  ])
686
698
  ]))), 128))
@@ -690,7 +702,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
690
702
  ])
691
703
  ])) : u("", !0),
692
704
  Z(i) ? (r(), o("section", Ve, [
693
- t[17] || (t[17] = s("div", { class: "thinking-bar-step-section-label" }, "回答", -1)),
705
+ t[18] || (t[18] = s("div", { class: "thinking-bar-step-section-label" }, "回答", -1)),
694
706
  s("div", qe, [
695
707
  W(It, {
696
708
  "model-value": Z(i),
@@ -698,9 +710,9 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
698
710
  }, null, 8, ["model-value"])
699
711
  ])
700
712
  ])) : u("", !0)
701
- ])) : (r(), o(d, { key: 1 }, [
713
+ ])) : (r(), o(h, { key: 1 }, [
702
714
  i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ke, [
703
- (r(!0), o(d, null, m(i.chatItems, (n) => (r(), o("div", {
715
+ (r(!0), o(h, null, m(i.chatItems, (n) => (r(), o("div", {
704
716
  key: n.id,
705
717
  class: "thinking-bar-chat-item"
706
718
  }, [
@@ -725,12 +737,12 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
725
737
  s("span", {
726
738
  class: A(["thinking-bar-tool-call-status", `is-${n.toolCall.status}`])
727
739
  }, a(n.toolCall.status === "done" ? "已完成" : n.toolCall.status === "error" ? "失败" : n.toolCall.status === "running" ? "执行中" : "待执行"), 3),
728
- t[18] || (t[18] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
740
+ t[19] || (t[19] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
729
741
  ])
730
742
  ]),
731
743
  s("div", Ye, [
732
744
  at(n.toolCall) ? (r(), o("div", Ze, [
733
- t[19] || (t[19] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 结果 ", -1)),
745
+ t[20] || (t[20] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 结果 ", -1)),
734
746
  E(n.toolCall) ? (r(), o("div", tn, [
735
747
  s("img", {
736
748
  class: "thinking-bar-tool-result-image",
@@ -747,18 +759,18 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
747
759
  s("table", rn, [
748
760
  s("thead", null, [
749
761
  s("tr", null, [
750
- (r(!0), o(d, null, m(y(
762
+ (r(!0), o(h, null, m(y(
751
763
  n.toolCall
752
764
  )?.columns, (l) => (r(), o("th", { key: l }, a(l), 1))), 128))
753
765
  ])
754
766
  ]),
755
767
  s("tbody", null, [
756
- (r(!0), o(d, null, m(y(
768
+ (r(!0), o(h, null, m(y(
757
769
  n.toolCall
758
770
  )?.rows, (l, c) => (r(), o("tr", {
759
771
  key: `${n.toolCall.id}-${c}`
760
772
  }, [
761
- (r(!0), o(d, null, m(y(
773
+ (r(!0), o(h, null, m(y(
762
774
  n.toolCall
763
775
  )?.columns, (f) => (r(), o("td", {
764
776
  key: `${n.toolCall.id}-${c}-${f}`
@@ -766,7 +778,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
766
778
  ]))), 128))
767
779
  ])
768
780
  ])
769
- ])) : S(n.toolCall) ? (r(), o("pre", on, a(S(n.toolCall)), 1)) : u("", !0)
781
+ ])) : x(n.toolCall) ? (r(), o("pre", on, a(x(n.toolCall)), 1)) : u("", !0)
770
782
  ])) : u("", !0)
771
783
  ])
772
784
  ], 8, Ue)) : u("", !0)
@@ -782,7 +794,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
782
794
  ])) : u("", !0)
783
795
  ], 64)),
784
796
  i.attachments && i.attachments.length > 0 ? (r(), o("div", an, [
785
- (r(!0), o(d, null, m(i.attachments, (n) => (r(), o("a", {
797
+ (r(!0), o(h, null, m(i.attachments, (n) => (r(), o("a", {
786
798
  key: n.id,
787
799
  class: "thinking-bar-attachment",
788
800
  href: n.url,
@@ -802,12 +814,12 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
802
814
  ], 8, cn))), 128))
803
815
  ])) : u("", !0),
804
816
  i.files && i.files.length > 0 ? (r(), o("div", kn, [
805
- t[22] || (t[22] = s("div", { class: "thinking-bar-workspace-title" }, "状态工作台", -1)),
817
+ t[23] || (t[23] = s("div", { class: "thinking-bar-workspace-title" }, "状态工作台", -1)),
806
818
  s("div", bn, [
807
819
  s("div", fn, [
808
- t[21] || (t[21] = s("div", { class: "thinking-bar-file-tree-head" }, "文件系统", -1)),
820
+ t[22] || (t[22] = s("div", { class: "thinking-bar-file-tree-head" }, "文件系统", -1)),
809
821
  s("div", mn, [
810
- (r(!0), o(d, null, m(Nt(i.id, i.files), (n) => (r(), o(d, {
822
+ (r(!0), o(h, null, m(Nt(i.id, i.files), (n) => (r(), o(h, {
811
823
  key: `${i.id}:${n.path}`
812
824
  }, [
813
825
  n.type === "directory" ? (r(), o("div", pn, [
@@ -820,7 +832,7 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
820
832
  onClick: (l) => Mt(i.id, n.path)
821
833
  }, [
822
834
  s("span", _n, a(ut(i.id, n.path) ? "▾" : "▸"), 1),
823
- t[20] || (t[20] = s("span", { class: "thinking-bar-tree-icon" }, "📁", -1)),
835
+ t[21] || (t[21] = s("span", { class: "thinking-bar-tree-icon" }, "📁", -1)),
824
836
  s("span", vn, a(n.name), 1)
825
837
  ], 12, yn)
826
838
  ])) : (r(), o("button", {
@@ -830,16 +842,16 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
830
842
  active: k(i)?.id === n.file?.id
831
843
  }]),
832
844
  style: ft({ paddingLeft: `${n.depth * 14 + 26}px` }),
833
- onClick: (l) => Ot(i.id, n.file)
845
+ onClick: (l) => zt(i.id, n.file)
834
846
  }, [
835
847
  s("span", Tn, a(gt(n.file?.path || "")), 1),
836
- s("span", xn, a(n.name), 1)
848
+ s("span", Sn, a(n.name), 1)
837
849
  ], 14, wn))
838
850
  ], 64))), 128))
839
851
  ])
840
852
  ]),
841
- s("div", Sn, [
842
- k(i) ? (r(), o(d, { key: 0 }, [
853
+ s("div", xn, [
854
+ k(i) ? (r(), o(h, { key: 0 }, [
843
855
  s("div", $n, [
844
856
  s("div", An, [
845
857
  s("span", Cn, a(gt(k(i)?.path || "")), 1),
@@ -860,8 +872,8 @@ const Ut = { class: "thinking-bar-header" }, Wt = { class: "thinking-bar-title-s
860
872
  srcdoc: J(k(i)),
861
873
  title: k(i)?.path,
862
874
  sandbox: ""
863
- }, null, 8, zn)) : (r(), o("pre", On, a(J(k(i))), 1))
864
- ], 64)) : (r(), o("div", Dn, " 还没选中文件,左边点一个看看。 "))
875
+ }, null, 8, Dn)) : (r(), o("pre", zn, a(J(k(i))), 1))
876
+ ], 64)) : (r(), o("div", On, " 还没选中文件,左边点一个看看。 "))
865
877
  ])
866
878
  ])
867
879
  ])) : u("", !0)
@@ -1,4 +1,5 @@
1
1
  import { type Ref } from "vue";
2
+ import type { SpotlightMemoryDecision } from "@inupedia/spotlight-protocol";
2
3
  export type SpotlightPanelUiState = "idle" | "running" | "done" | "error";
3
4
  export type UseSpotlightPanelUiOptions = {
4
5
  pipelinePhase: Ref<string>;
@@ -8,6 +9,7 @@ export type UseSpotlightPanelUiOptions = {
8
9
  entryId: string;
9
10
  kind: string;
10
11
  } | null>;
12
+ memoryDecision?: Ref<SpotlightMemoryDecision | null>;
11
13
  voiceHoldActive?: Ref<boolean>;
12
14
  speechPending?: Ref<boolean>;
13
15
  voiceKeyLabel?: string;
@@ -15,6 +17,6 @@ export type UseSpotlightPanelUiOptions = {
15
17
  export declare function useSpotlightPanelUi(options: UseSpotlightPanelUiOptions): {
16
18
  uiState: import("vue").ComputedRef<SpotlightPanelUiState>;
17
19
  placeholder: import("vue").ComputedRef<string>;
18
- badgeLabel: import("vue").ComputedRef<"语音录制中" | "语音识别中" | "Agent 执行中" | "语义缓存命中" | "Memory 缓存命中" | "已完成" | "执行异常" | "等待提问">;
20
+ badgeLabel: import("vue").ComputedRef<string>;
19
21
  };
20
22
  //# sourceMappingURL=useSpotlightPanelUi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSpotlightPanelUi.d.ts","sourceRoot":"","sources":["../../src/composables/useSpotlightPanelUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1E,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,YAAY,CAAC,EAAE,GAAG,CAAC;QACjB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;QACzC,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,IAAI,CAAC,CAAC;IACV,eAAe,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;;EAgDtE"}
1
+ {"version":3,"file":"useSpotlightPanelUi.d.ts","sourceRoot":"","sources":["../../src/composables/useSpotlightPanelUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1E,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,YAAY,CAAC,EAAE,GAAG,CAAC;QACjB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;QACzC,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,IAAI,CAAC,CAAC;IACV,cAAc,CAAC,EAAE,GAAG,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACrD,eAAe,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;;EAyDtE"}