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