@inupedia/spotlight-vue 0.2.14 → 0.2.16
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.
- package/dist/assets/spotlight-vue.css +1 -1
- package/dist/components/SpotlightCommandPanel.vue.d.ts.map +1 -1
- package/dist/components/SpotlightCommandPanel.vue.js +1 -1
- package/dist/components/SpotlightCommandPanel2.vue.js +88 -85
- package/dist/components/SpotlightRoot.vue.d.ts.map +1 -1
- package/dist/components/SpotlightRoot.vue.js +21 -19
- package/dist/components/SpotlightThinking.vue.d.ts +3 -0
- package/dist/components/SpotlightThinking.vue.d.ts.map +1 -1
- package/dist/components/SpotlightThinking.vue.js +2 -2
- package/dist/components/SpotlightThinking2.vue.js +126 -114
- package/dist/composables/useSpotlightPanelUi.d.ts +3 -1
- package/dist/composables/useSpotlightPanelUi.d.ts.map +1 -1
- package/dist/composables/useSpotlightPanelUi.js +8 -3
- package/dist/remote/runPipeline.d.ts +3 -1
- package/dist/remote/runPipeline.d.ts.map +1 -1
- package/dist/remote/runPipeline.js +149 -133
- package/dist/remote/types.d.ts +2 -0
- package/dist/remote/types.d.ts.map +1 -1
- package/dist/store/memoryPreferenceCopy.d.ts +6 -0
- package/dist/store/memoryPreferenceCopy.d.ts.map +1 -0
- package/dist/store/memoryPreferenceCopy.js +14 -0
- package/dist/store/spotlightStore.d.ts +68 -2
- package/dist/store/spotlightStore.d.ts.map +1 -1
- package/dist/store/spotlightStore.js +130 -124
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Lt, ref as
|
|
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
|
-
},
|
|
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" },
|
|
50
|
+
}, Fe = { class: "thinking-bar-tool-call-pre" }, De = {
|
|
51
51
|
key: 5,
|
|
52
52
|
class: "thinking-bar-nested-tools"
|
|
53
|
-
},
|
|
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" },
|
|
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
|
-
},
|
|
101
|
+
}, Dn = ["srcdoc", "title"], zn = {
|
|
102
102
|
key: 2,
|
|
103
103
|
class: "thinking-bar-file-preview-body"
|
|
104
|
-
},
|
|
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(
|
|
117
|
-
const G =
|
|
118
|
-
let B = 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 &&
|
|
127
|
+
i && S && S.unobserve(i);
|
|
127
128
|
const n = t instanceof HTMLElement ? t : null;
|
|
128
|
-
n ? (T.set(e, n),
|
|
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),
|
|
136
|
-
...
|
|
136
|
+
B != null && window.clearTimeout(B), v.value = {
|
|
137
|
+
...v.value,
|
|
137
138
|
[e]: Q(i)
|
|
138
139
|
}, B = window.setTimeout(() => {
|
|
139
|
-
|
|
140
|
-
...
|
|
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 =
|
|
147
|
+
const e = d.steps.find((i) => i.status === "active");
|
|
147
148
|
if (e) return [e.id];
|
|
148
|
-
const t =
|
|
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 :
|
|
153
|
+
return t ? !0 : v.value[e] !== !1;
|
|
153
154
|
}
|
|
154
155
|
jt(() => {
|
|
155
|
-
typeof ResizeObserver < "u" && (
|
|
156
|
+
typeof ResizeObserver < "u" && (S = new ResizeObserver(() => {
|
|
156
157
|
K();
|
|
157
158
|
}), kt(() => {
|
|
158
159
|
T.forEach((e) => {
|
|
159
|
-
|
|
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),
|
|
168
|
+
B != null && window.clearTimeout(B), S?.disconnect(), S = null, T.clear();
|
|
168
169
|
});
|
|
169
|
-
const
|
|
170
|
-
|
|
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
|
-
() =>
|
|
182
|
+
() => d.steps.filter((e) => e.status === "active").length
|
|
177
183
|
), At = M(
|
|
178
|
-
() =>
|
|
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
|
|
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 =
|
|
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
|
-
() =>
|
|
390
|
+
() => d.steps,
|
|
385
391
|
() => {
|
|
386
|
-
if (
|
|
387
|
-
const e =
|
|
388
|
-
e && !(e.id in
|
|
389
|
-
...
|
|
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
|
|
404
|
+
const D = O({}), C = O({});
|
|
399
405
|
bt(
|
|
400
|
-
() =>
|
|
406
|
+
() => d.steps,
|
|
401
407
|
(e) => {
|
|
402
|
-
const t = { ...
|
|
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
|
-
|
|
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
|
-
|
|
420
|
+
D.value = t, C.value = i;
|
|
415
421
|
},
|
|
416
422
|
{ deep: !0, immediate: !0 }
|
|
417
423
|
);
|
|
418
|
-
function
|
|
419
|
-
|
|
420
|
-
...
|
|
424
|
+
function Dt(e, t) {
|
|
425
|
+
D.value = {
|
|
426
|
+
...D.value,
|
|
421
427
|
[e]: t
|
|
422
428
|
};
|
|
423
429
|
}
|
|
424
|
-
function
|
|
425
|
-
t &&
|
|
430
|
+
function zt(e, t) {
|
|
431
|
+
t && Dt(e, t.id);
|
|
426
432
|
}
|
|
427
433
|
function k(e) {
|
|
428
|
-
const t =
|
|
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
|
|
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, $,
|
|
455
|
+
const i = /* @__PURE__ */ new Map(), n = (p, $, w) => (i.has(p) || i.set(p, {
|
|
450
456
|
path: p,
|
|
451
457
|
name: $,
|
|
452
|
-
depth:
|
|
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
|
|
464
|
+
let w = "", z = l;
|
|
459
465
|
$.slice(0, -1).forEach((b, g) => {
|
|
460
|
-
|
|
461
|
-
const Ht = n(
|
|
462
|
-
|
|
463
|
-
}),
|
|
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
|
|
474
|
+
const w = [...$.directoryChildren].sort(
|
|
469
475
|
(b, g) => b.localeCompare(g, "zh-CN")
|
|
470
476
|
);
|
|
471
|
-
for (const b of
|
|
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":
|
|
524
|
+
{ "thinking-bar--embedded": _.embedded },
|
|
519
525
|
{ "thinking-bar--open": G.value },
|
|
520
|
-
{ "thinking-bar--centered":
|
|
521
|
-
{ "thinking-bar--corner": !
|
|
526
|
+
{ "thinking-bar--centered": _.centered },
|
|
527
|
+
{ "thinking-bar--corner": !_.centered && !_.embedded }
|
|
522
528
|
]])
|
|
523
529
|
}, [
|
|
524
|
-
t[
|
|
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[
|
|
531
|
-
s("span", Gt, a(
|
|
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(
|
|
537
|
-
t[
|
|
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[
|
|
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[
|
|
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[
|
|
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(
|
|
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[
|
|
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[
|
|
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(
|
|
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[
|
|
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[
|
|
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[
|
|
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[
|
|
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,
|
|
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,
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
])) :
|
|
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[
|
|
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[
|
|
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",
|
|
658
|
-
t[
|
|
659
|
-
(r(!0), o(
|
|
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",
|
|
666
|
-
s("div",
|
|
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[
|
|
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[
|
|
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
|
-
|
|
682
|
-
t[
|
|
683
|
-
s("pre", Ie, a(
|
|
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[
|
|
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(
|
|
713
|
+
])) : (r(), o(h, { key: 1 }, [
|
|
702
714
|
i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ke, [
|
|
703
|
-
(r(!0), o(
|
|
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[
|
|
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[
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
])) :
|
|
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(
|
|
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[
|
|
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[
|
|
820
|
+
t[22] || (t[22] = s("div", { class: "thinking-bar-file-tree-head" }, "文件系统", -1)),
|
|
809
821
|
s("div", mn, [
|
|
810
|
-
(r(!0), o(
|
|
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[
|
|
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) =>
|
|
845
|
+
onClick: (l) => zt(i.id, n.file)
|
|
834
846
|
}, [
|
|
835
847
|
s("span", Tn, a(gt(n.file?.path || "")), 1),
|
|
836
|
-
s("span",
|
|
848
|
+
s("span", Sn, a(n.name), 1)
|
|
837
849
|
], 14, wn))
|
|
838
850
|
], 64))), 128))
|
|
839
851
|
])
|
|
840
852
|
]),
|
|
841
|
-
s("div",
|
|
842
|
-
k(i) ? (r(), o(
|
|
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,
|
|
864
|
-
], 64)) : (r(), o("div",
|
|
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<
|
|
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;
|
|
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"}
|