@inupedia/spotlight-vue 0.9.1 → 0.9.2
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 +337 -191
- package/dist/remote/runPipeline.d.ts.map +1 -1
- package/dist/remote/runPipeline.js +103 -97
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +15 -13
- package/dist/store/modelStore.d.ts +16 -0
- package/dist/store/modelStore.d.ts.map +1 -0
- package/dist/store/modelStore.js +63 -0
- package/package.json +4 -3
|
@@ -1,32 +1,50 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { defineComponent as j, ref as v, computed as J, onMounted as X, toRef as B, openBlock as i, createElementBlock as n, Fragment as y, createElementVNode as t, withModifiers as f, unref as e, normalizeClass as g, createBlock as H, createCommentVNode as u, toDisplayString as r, createVNode as w, withCtx as Z, withDirectives as K, withKeys as x, vModelText as A, renderList as R, Teleport as ee, nextTick as P } from "vue";
|
|
2
|
+
import { Settings2 as te } from "lucide-vue-next";
|
|
3
|
+
import { storeToRefs as oe } from "pinia";
|
|
4
|
+
import { useSpotlightStore as se } from "../store/spotlightStore.js";
|
|
5
|
+
import { useSpotlightMemoryPreferenceStore as le } from "../store/memoryPreferenceStore.js";
|
|
6
|
+
import { useSpotlightModelStore as ie } from "../store/modelStore.js";
|
|
7
|
+
import { getSpotlightMemoryPreferenceCopy as I, SPOTLIGHT_MEMORY_PREFERENCE_LABEL as ne } from "../store/memoryPreferenceCopy.js";
|
|
8
|
+
import { useSpotlightPanelUi as de } from "../composables/useSpotlightPanelUi.js";
|
|
9
|
+
import ae from "./InspiraCardSpotlight.js";
|
|
10
|
+
import N from "./OfficialBorderBeam.js";
|
|
11
|
+
const re = ["inert"], ce = ["aria-modal"], pe = { class: "spotlight-command-deck" }, ge = { class: "spotlight-command-deck-meta" }, ue = {
|
|
10
12
|
key: 0,
|
|
11
13
|
class: "spotlight-command-deck-kicker"
|
|
12
|
-
},
|
|
14
|
+
}, me = { class: "spotlight-command-deck-status" }, he = { class: "spotlight-command-deck-actions" }, ve = ["aria-checked", "aria-label", "title"], fe = { class: "spotlight-memory-label" }, be = ["aria-expanded", "aria-label", "title"], ke = {
|
|
13
15
|
key: 1,
|
|
14
16
|
class: "spotlight-permission-banner",
|
|
15
17
|
role: "alertdialog",
|
|
16
18
|
"aria-label": "Skill 权限确认"
|
|
17
|
-
},
|
|
19
|
+
}, ye = { class: "spotlight-permission-banner-body" }, Pe = { class: "spotlight-permission-banner-actions" }, Se = { class: "spotlight-voice-text" }, Ce = ["placeholder"], _e = {
|
|
18
20
|
key: 2,
|
|
19
21
|
class: "spotlight-list-shell"
|
|
20
|
-
},
|
|
22
|
+
}, Me = {
|
|
21
23
|
class: "spotlight-list",
|
|
22
24
|
role: "listbox"
|
|
23
|
-
},
|
|
25
|
+
}, we = ["aria-selected", "onClick"], xe = { class: "spotlight-item-label" }, Re = {
|
|
24
26
|
key: 0,
|
|
25
27
|
class: "spotlight-list-divider"
|
|
26
|
-
},
|
|
28
|
+
}, Le = ["aria-selected", "onClick"], $e = { class: "spotlight-item-label" }, Ee = {
|
|
27
29
|
key: 1,
|
|
28
30
|
class: "spotlight-item spotlight-item--empty"
|
|
29
|
-
},
|
|
31
|
+
}, Qe = { class: "spotlight-model-dialog-content" }, Te = { class: "spotlight-model-search" }, Be = {
|
|
32
|
+
class: "spotlight-model-dialog-status",
|
|
33
|
+
"aria-live": "polite"
|
|
34
|
+
}, He = { key: 0 }, Ke = {
|
|
35
|
+
key: 1,
|
|
36
|
+
class: "is-error"
|
|
37
|
+
}, Ae = { key: 2 }, Ie = { key: 3 }, Ne = ["disabled"], De = {
|
|
38
|
+
class: "spotlight-model-results",
|
|
39
|
+
"aria-label": "可用模型"
|
|
40
|
+
}, ze = ["aria-pressed", "onClick"], Oe = { class: "spotlight-model-option-copy" }, Ve = { class: "spotlight-model-option-name" }, Fe = { class: "spotlight-model-option-provider" }, Ue = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "spotlight-model-option-check",
|
|
43
|
+
"aria-hidden": "true"
|
|
44
|
+
}, Ge = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "spotlight-model-empty"
|
|
47
|
+
}, st = /* @__PURE__ */ j({
|
|
30
48
|
__name: "SpotlightCommandPanel",
|
|
31
49
|
props: {
|
|
32
50
|
deckKicker: { default: "" },
|
|
@@ -34,192 +52,320 @@ const _ = { class: "spotlight-command-deck" }, j = { class: "spotlight-command-d
|
|
|
34
52
|
speechPending: { type: Boolean, default: !1 },
|
|
35
53
|
voiceKeyLabel: { default: "`" }
|
|
36
54
|
},
|
|
37
|
-
setup(
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
voiceHoldActive: P(u, "voiceHoldActive"),
|
|
44
|
-
speechPending: P(u, "speechPending"),
|
|
45
|
-
voiceKeyLabel: u.voiceKeyLabel
|
|
55
|
+
setup(c, { expose: D }) {
|
|
56
|
+
const S = c, s = se(), m = le(), d = ie(), { loading: z, pipelinePhase: O, lastMemoryReplay: V, lastMemoryDecision: F } = oe(s), C = v(null), h = v(!1), k = v(""), _ = v(null), L = v(null), $ = v(null), M = J(() => {
|
|
57
|
+
const a = k.value.trim().toLocaleLowerCase();
|
|
58
|
+
return a ? d.models.filter(
|
|
59
|
+
(o) => o.id.toLocaleLowerCase().includes(a)
|
|
60
|
+
) : d.models;
|
|
46
61
|
});
|
|
47
|
-
|
|
48
|
-
|
|
62
|
+
X(() => {
|
|
63
|
+
d.loadModels();
|
|
64
|
+
});
|
|
65
|
+
function U() {
|
|
66
|
+
const a = _.value;
|
|
67
|
+
!a || a.open || (h.value = !0, k.value = "", a.showModal(), P(() => L.value?.focus()));
|
|
68
|
+
}
|
|
69
|
+
function b() {
|
|
70
|
+
const a = _.value;
|
|
71
|
+
a?.open && a.close(), h.value = !1, P(() => $.value?.focus());
|
|
49
72
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
73
|
+
function G(a) {
|
|
74
|
+
d.selectModel(a), b();
|
|
52
75
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
const { uiState: E, placeholder: q, badgeLabel: Q } = de({
|
|
77
|
+
pipelinePhase: O,
|
|
78
|
+
loading: z,
|
|
79
|
+
memoryReplay: V,
|
|
80
|
+
memoryDecision: F,
|
|
81
|
+
voiceHoldActive: B(S, "voiceHoldActive"),
|
|
82
|
+
speechPending: B(S, "speechPending"),
|
|
83
|
+
voiceKeyLabel: S.voiceKeyLabel
|
|
84
|
+
});
|
|
85
|
+
function T(a) {
|
|
86
|
+
s.fillPromptWithRecent(a), P(() => C.value?.focus());
|
|
87
|
+
}
|
|
88
|
+
function W() {
|
|
89
|
+
P(() => C.value?.focus());
|
|
90
|
+
}
|
|
91
|
+
return D({ focusInput: W }), (a, o) => (i(), n(y, null, [
|
|
92
|
+
t("div", {
|
|
93
|
+
class: "spotlight-backdrop",
|
|
94
|
+
inert: h.value,
|
|
95
|
+
onClick: o[7] || (o[7] = f(
|
|
96
|
+
//@ts-ignore
|
|
97
|
+
(...l) => e(s).close && e(s).close(...l),
|
|
98
|
+
["self"]
|
|
99
|
+
))
|
|
66
100
|
}, [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
t("div", {
|
|
102
|
+
class: g(["spotlight-panel", { "is-memory-on": e(m).enabled }]),
|
|
103
|
+
role: "dialog",
|
|
104
|
+
"aria-modal": h.value ? "false" : "true",
|
|
105
|
+
"aria-label": "指令面板"
|
|
106
|
+
}, [
|
|
107
|
+
e(m).enabled ? (i(), H(N, {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: "spotlight-panel-beam",
|
|
110
|
+
size: 120,
|
|
111
|
+
duration: 22,
|
|
112
|
+
"border-width": 1.5,
|
|
113
|
+
"color-from": "#5eead4",
|
|
114
|
+
"color-to": "#38bdf8"
|
|
115
|
+
})) : u("", !0),
|
|
116
|
+
t("div", pe, [
|
|
117
|
+
t("div", ge, [
|
|
118
|
+
c.deckKicker ? (i(), n("span", ue, r(c.deckKicker), 1)) : u("", !0),
|
|
119
|
+
t("span", me, r(e(Q)), 1)
|
|
120
|
+
]),
|
|
121
|
+
t("div", he, [
|
|
122
|
+
t("button", {
|
|
123
|
+
type: "button",
|
|
124
|
+
class: "spotlight-memory-dot-btn",
|
|
125
|
+
role: "switch",
|
|
126
|
+
"aria-checked": e(m).enabled,
|
|
127
|
+
"aria-label": e(I)(e(m).enabled).ariaLabel,
|
|
128
|
+
title: e(I)(e(m).enabled).title,
|
|
129
|
+
onClick: o[0] || (o[0] = (l) => e(m).toggle())
|
|
130
|
+
}, [
|
|
131
|
+
t("span", fe, r(e(ne)), 1),
|
|
132
|
+
t("span", {
|
|
133
|
+
class: g(["spotlight-memory-dot", { "is-on": e(m).enabled }])
|
|
134
|
+
}, null, 2)
|
|
135
|
+
], 8, ve),
|
|
136
|
+
t("button", {
|
|
137
|
+
ref_key: "modelTriggerRef",
|
|
138
|
+
ref: $,
|
|
139
|
+
type: "button",
|
|
140
|
+
class: "spotlight-model-settings",
|
|
141
|
+
"aria-haspopup": "dialog",
|
|
142
|
+
"aria-expanded": h.value,
|
|
143
|
+
"aria-controls": "spotlight-model-dialog",
|
|
144
|
+
"aria-label": e(d).selectedModel ? `模型设置,当前 ${e(d).selectedModel}` : "模型设置",
|
|
145
|
+
title: e(d).error || "模型设置",
|
|
146
|
+
onClick: U
|
|
147
|
+
}, [
|
|
148
|
+
w(e(te), {
|
|
149
|
+
size: 17,
|
|
150
|
+
"stroke-width": 1.8,
|
|
151
|
+
"aria-hidden": "true"
|
|
152
|
+
})
|
|
153
|
+
], 8, be)
|
|
154
|
+
])
|
|
100
155
|
]),
|
|
101
|
-
s("div",
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
156
|
+
e(s).pendingSkillPermission ? (i(), n("div", ke, [
|
|
157
|
+
t("div", ye, [
|
|
158
|
+
t("strong", null, r(e(s).pendingSkillPermission.displayName ?? e(s).pendingSkillPermission.skillName), 1),
|
|
159
|
+
t("span", null, r(e(s).pendingSkillPermission.reason), 1)
|
|
160
|
+
]),
|
|
161
|
+
t("div", Pe, [
|
|
162
|
+
t("button", {
|
|
163
|
+
type: "button",
|
|
164
|
+
class: "spotlight-permission-btn is-approve",
|
|
165
|
+
onClick: o[1] || (o[1] = (l) => e(s).approvePendingSkillPermission())
|
|
166
|
+
}, " 允许 "),
|
|
167
|
+
t("button", {
|
|
168
|
+
type: "button",
|
|
169
|
+
class: "spotlight-permission-btn is-dismiss",
|
|
170
|
+
onClick: o[2] || (o[2] = (l) => e(s).clearPendingSkillPermission())
|
|
171
|
+
}, " 取消 ")
|
|
172
|
+
])
|
|
173
|
+
])) : u("", !0),
|
|
174
|
+
w(ae, {
|
|
175
|
+
class: "spotlight-input-shell",
|
|
176
|
+
"gradient-size": 260,
|
|
177
|
+
"gradient-color": "rgba(45, 212, 191, 0.14)",
|
|
178
|
+
"gradient-opacity": 1
|
|
179
|
+
}, {
|
|
180
|
+
default: Z(() => [
|
|
181
|
+
c.voiceHoldActive || c.speechPending ? (i(), n("div", {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: g(["spotlight-voice-shell", {
|
|
184
|
+
"is-recording": c.voiceHoldActive,
|
|
185
|
+
"is-transcribing": c.speechPending
|
|
186
|
+
}])
|
|
187
|
+
}, [
|
|
188
|
+
w(N, {
|
|
189
|
+
class: "spotlight-voice-beam",
|
|
190
|
+
size: 86,
|
|
191
|
+
duration: 6,
|
|
192
|
+
"border-width": 1.5,
|
|
193
|
+
"color-from": "#c9a25d",
|
|
194
|
+
"color-to": "#5d8f9b"
|
|
195
|
+
}),
|
|
196
|
+
o[11] || (o[11] = t("div", {
|
|
197
|
+
class: "spotlight-voice-mic",
|
|
198
|
+
"aria-hidden": "true"
|
|
199
|
+
}, [
|
|
200
|
+
t("span", { class: "spotlight-voice-mic-icon" }, [
|
|
201
|
+
t("span", { class: "spotlight-voice-mic-body" }),
|
|
202
|
+
t("span", { class: "spotlight-voice-mic-stem" })
|
|
203
|
+
])
|
|
204
|
+
], -1)),
|
|
205
|
+
t("div", Se, r(c.voiceHoldActive ? `正在录音,松开 ${c.voiceKeyLabel} 结束` : "语音识别中,请稍候…"), 1)
|
|
206
|
+
], 2)) : (i(), n("div", {
|
|
207
|
+
key: 1,
|
|
208
|
+
class: g(["spotlight-input-wrap", `is-${e(E)}`])
|
|
139
209
|
}, [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
210
|
+
K(t("input", {
|
|
211
|
+
ref_key: "inputRef",
|
|
212
|
+
ref: C,
|
|
213
|
+
"onUpdate:modelValue": o[3] || (o[3] = (l) => e(s).prompt = l),
|
|
214
|
+
class: "spotlight-input",
|
|
215
|
+
type: "text",
|
|
216
|
+
placeholder: e(q),
|
|
217
|
+
onKeydown: [
|
|
218
|
+
o[4] || (o[4] = x(f(
|
|
219
|
+
//@ts-ignore
|
|
220
|
+
(...l) => e(s).handleEnter && e(s).handleEnter(...l),
|
|
221
|
+
["prevent"]
|
|
222
|
+
), ["enter"])),
|
|
223
|
+
o[5] || (o[5] = x(f(
|
|
224
|
+
//@ts-ignore
|
|
225
|
+
(...l) => e(s).selectNext && e(s).selectNext(...l),
|
|
226
|
+
["prevent"]
|
|
227
|
+
), ["down"])),
|
|
228
|
+
o[6] || (o[6] = x(f(
|
|
229
|
+
//@ts-ignore
|
|
230
|
+
(...l) => e(s).selectPrev && e(s).selectPrev(...l),
|
|
231
|
+
["prevent"]
|
|
232
|
+
), ["up"]))
|
|
233
|
+
]
|
|
234
|
+
}, null, 40, Ce), [
|
|
235
|
+
[A, e(s).prompt]
|
|
236
|
+
]),
|
|
237
|
+
t("div", {
|
|
238
|
+
class: g(["spotlight-agent-badge", `is-${e(E)}`])
|
|
239
|
+
}, [
|
|
240
|
+
o[12] || (o[12] = t("span", { class: "spotlight-agent-badge-dot" }, null, -1)),
|
|
241
|
+
t("span", null, r(e(Q)), 1)
|
|
242
|
+
], 2)
|
|
243
|
+
], 2))
|
|
244
|
+
]),
|
|
245
|
+
_: 1
|
|
246
|
+
}),
|
|
247
|
+
!e(s).prompt.trim() && !e(s).loading && !c.voiceHoldActive && !c.speechPending ? (i(), n("div", _e, [
|
|
248
|
+
t("ul", Me, [
|
|
249
|
+
(i(!0), n(y, null, R(e(s).suggestedQuestions, (l, p) => (i(), n("li", {
|
|
250
|
+
key: `suggested-${p}`,
|
|
251
|
+
class: g(["spotlight-item", { "is-selected": e(s).selectedIndex === p }]),
|
|
252
|
+
role: "option",
|
|
253
|
+
"aria-selected": e(s).selectedIndex === p,
|
|
254
|
+
onClick: (Y) => T(p)
|
|
255
|
+
}, [
|
|
256
|
+
t("span", xe, r(l), 1),
|
|
257
|
+
o[13] || (o[13] = t("span", { class: "spotlight-item-hint" }, "推荐", -1))
|
|
258
|
+
], 10, we))), 128)),
|
|
259
|
+
e(s).suggestedQuestions.length > 0 && e(s).recentQuestions.length > 0 ? (i(), n("li", Re, [...o[14] || (o[14] = [
|
|
260
|
+
t("span", null, "历史问题", -1)
|
|
261
|
+
])])) : u("", !0),
|
|
262
|
+
(i(!0), n(y, null, R(e(s).recentQuestions, (l, p) => (i(), n("li", {
|
|
263
|
+
key: `recent-${p}`,
|
|
264
|
+
class: g(["spotlight-item", {
|
|
265
|
+
"is-selected": e(s).selectedIndex === p + e(s).suggestedQuestions.length
|
|
266
|
+
}]),
|
|
267
|
+
role: "option",
|
|
268
|
+
"aria-selected": e(s).selectedIndex === p + e(s).suggestedQuestions.length,
|
|
269
|
+
onClick: (Y) => T(p + e(s).suggestedQuestions.length)
|
|
270
|
+
}, [
|
|
271
|
+
t("span", $e, r(l), 1),
|
|
272
|
+
o[15] || (o[15] = t("span", { class: "spotlight-item-hint" }, "历史", -1))
|
|
273
|
+
], 10, Le))), 128)),
|
|
274
|
+
e(s).suggestedQuestions.length === 0 && e(s).recentQuestions.length === 0 ? (i(), n("li", Ee, [...o[16] || (o[16] = [
|
|
275
|
+
t("span", { class: "spotlight-item-label" }, "暂无推荐问法", -1)
|
|
276
|
+
])])) : u("", !0)
|
|
277
|
+
])
|
|
278
|
+
])) : u("", !0)
|
|
279
|
+
], 10, ce)
|
|
280
|
+
], 8, re),
|
|
281
|
+
(i(), H(ee, { to: "body" }, [
|
|
282
|
+
t("dialog", {
|
|
283
|
+
id: "spotlight-model-dialog",
|
|
284
|
+
ref_key: "modelDialogRef",
|
|
285
|
+
ref: _,
|
|
286
|
+
class: "spotlight-model-dialog",
|
|
287
|
+
"aria-labelledby": "spotlight-model-title",
|
|
288
|
+
"aria-describedby": "spotlight-model-description",
|
|
289
|
+
onCancel: f(b, ["prevent"]),
|
|
290
|
+
onClick: f(b, ["self"]),
|
|
291
|
+
onClose: o[10] || (o[10] = (l) => h.value = !1)
|
|
292
|
+
}, [
|
|
293
|
+
t("section", Qe, [
|
|
294
|
+
t("header", { class: "spotlight-model-dialog-header" }, [
|
|
295
|
+
o[18] || (o[18] = t("div", { class: "spotlight-model-dialog-heading" }, [
|
|
296
|
+
t("span", { class: "spotlight-model-dialog-eyebrow" }, "SPOTLIGHT 设置"),
|
|
297
|
+
t("h2", { id: "spotlight-model-title" }, "选择模型"),
|
|
298
|
+
t("p", { id: "spotlight-model-description" }, " 选择后将用于接下来的 Spotlight 请求。 ")
|
|
144
299
|
], -1)),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
300
|
+
t("button", {
|
|
301
|
+
type: "button",
|
|
302
|
+
class: "spotlight-model-dialog-close",
|
|
303
|
+
"aria-label": "关闭模型选择",
|
|
304
|
+
onClick: b
|
|
305
|
+
}, [...o[17] || (o[17] = [
|
|
306
|
+
t("span", { "aria-hidden": "true" }, "×", -1)
|
|
307
|
+
])])
|
|
308
|
+
]),
|
|
309
|
+
t("label", Te, [
|
|
310
|
+
o[19] || (o[19] = t("span", {
|
|
311
|
+
class: "spotlight-model-search-icon",
|
|
312
|
+
"aria-hidden": "true"
|
|
313
|
+
}, "⌕", -1)),
|
|
314
|
+
o[20] || (o[20] = t("span", { class: "spotlight-sr-only" }, "搜索模型", -1)),
|
|
315
|
+
K(t("input", {
|
|
316
|
+
id: "spotlight-model-search",
|
|
317
|
+
ref_key: "modelSearchRef",
|
|
318
|
+
ref: L,
|
|
319
|
+
"onUpdate:modelValue": o[8] || (o[8] = (l) => k.value = l),
|
|
320
|
+
type: "search",
|
|
321
|
+
autocomplete: "off",
|
|
322
|
+
placeholder: "搜索模型名称"
|
|
323
|
+
}, null, 512), [
|
|
324
|
+
[A, k.value]
|
|
325
|
+
])
|
|
326
|
+
]),
|
|
327
|
+
t("div", Be, [
|
|
328
|
+
e(d).loading ? (i(), n("span", He, "正在同步模型列表…")) : e(d).error ? (i(), n("span", Ke, r(e(d).error), 1)) : M.value.length ? (i(), n("span", Ae, r(M.value.length) + " 个可用模型 ", 1)) : (i(), n("span", Ie, "没有找到匹配的模型")),
|
|
329
|
+
t("button", {
|
|
330
|
+
type: "button",
|
|
331
|
+
class: "spotlight-model-refresh",
|
|
332
|
+
disabled: e(d).loading,
|
|
333
|
+
onClick: o[9] || (o[9] = (l) => e(d).loadModels(!0))
|
|
334
|
+
}, r(e(d).loading ? "同步中…" : "刷新列表"), 9, Ne)
|
|
335
|
+
]),
|
|
336
|
+
t("div", De, [
|
|
337
|
+
(i(!0), n(y, null, R(M.value, (l) => (i(), n("button", {
|
|
338
|
+
key: l.id,
|
|
339
|
+
type: "button",
|
|
340
|
+
class: g(["spotlight-model-option", { "is-selected": l.id === e(d).selectedModel }]),
|
|
341
|
+
"aria-pressed": l.id === e(d).selectedModel,
|
|
342
|
+
onClick: (p) => G(l.id)
|
|
179
343
|
}, [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
]
|
|
199
|
-
e(t).suggestedQuestions.length > 0 && e(t).recentQuestions.length > 0 ? (l(), n("li", de, [...i[11] || (i[11] = [
|
|
200
|
-
s("span", null, "历史问题", -1)
|
|
201
|
-
])])) : g("", !0),
|
|
202
|
-
(l(!0), n(C, null, x(e(t).recentQuestions, (o, r) => (l(), n("li", {
|
|
203
|
-
key: `recent-${r}`,
|
|
204
|
-
class: p(["spotlight-item", {
|
|
205
|
-
"is-selected": e(t).selectedIndex === r + e(t).suggestedQuestions.length
|
|
206
|
-
}]),
|
|
207
|
-
role: "option",
|
|
208
|
-
"aria-selected": e(t).selectedIndex === r + e(t).suggestedQuestions.length,
|
|
209
|
-
onClick: (M) => f(r + e(t).suggestedQuestions.length)
|
|
210
|
-
}, [
|
|
211
|
-
s("span", pe, d(o), 1),
|
|
212
|
-
i[12] || (i[12] = s("span", { class: "spotlight-item-hint" }, "历史", -1))
|
|
213
|
-
], 10, ce))), 128)),
|
|
214
|
-
e(t).suggestedQuestions.length === 0 && e(t).recentQuestions.length === 0 ? (l(), n("li", ge, [...i[13] || (i[13] = [
|
|
215
|
-
s("span", { class: "spotlight-item-label" }, "暂无推荐问法", -1)
|
|
216
|
-
])])) : g("", !0)
|
|
344
|
+
t("span", Oe, [
|
|
345
|
+
t("span", Ve, r(l.id), 1),
|
|
346
|
+
t("span", Fe, r(l.ownedBy || "SiliconFlow"), 1)
|
|
347
|
+
]),
|
|
348
|
+
l.id === e(d).selectedModel ? (i(), n("span", Ue, " ✓ ")) : u("", !0)
|
|
349
|
+
], 10, ze))), 128)),
|
|
350
|
+
!e(d).loading && e(d).models.length === 0 ? (i(), n("div", Ge, [...o[21] || (o[21] = [
|
|
351
|
+
t("strong", null, "暂时无法获取模型", -1),
|
|
352
|
+
t("span", null, "请检查 Spotlight Server 与模型服务商连接后重试。", -1)
|
|
353
|
+
])])) : u("", !0)
|
|
354
|
+
]),
|
|
355
|
+
t("footer", { class: "spotlight-model-dialog-footer" }, [
|
|
356
|
+
o[22] || (o[22] = t("span", null, "当前选择会保存在此项目的浏览器中。", -1)),
|
|
357
|
+
t("button", {
|
|
358
|
+
type: "button",
|
|
359
|
+
class: "spotlight-model-done",
|
|
360
|
+
onClick: b
|
|
361
|
+
}, " 完成 ")
|
|
362
|
+
])
|
|
217
363
|
])
|
|
218
|
-
]
|
|
219
|
-
]
|
|
220
|
-
]));
|
|
364
|
+
], 544)
|
|
365
|
+
]))
|
|
366
|
+
], 64));
|
|
221
367
|
}
|
|
222
368
|
});
|
|
223
369
|
export {
|
|
224
|
-
|
|
370
|
+
st as default
|
|
225
371
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runPipeline.d.ts","sourceRoot":"","sources":["../../src/remote/runPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAGlB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"runPipeline.d.ts","sourceRoot":"","sources":["../../src/remote/runPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAGlB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAetC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,EAA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