@inupedia/spotlight-vue 0.6.0 → 0.7.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.
@@ -1 +1 @@
1
- {"version":3,"file":"skillFrontmatterParse.d.ts","sourceRoot":"","sources":["../../src/skills/skillFrontmatterParse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,cAAc,EAEf,MAAM,8BAA8B,CAAC;AAmOtC,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,cAAc,CAwEhB"}
1
+ {"version":3,"file":"skillFrontmatterParse.d.ts","sourceRoot":"","sources":["../../src/skills/skillFrontmatterParse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,cAAc,EAEf,MAAM,8BAA8B,CAAC;AAyRtC,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,cAAc,CA8EhB"}
@@ -1,116 +1,116 @@
1
- import { parse as F } from "yaml";
2
- function C(n) {
3
- return typeof n == "object" && n !== null && !Array.isArray(n);
1
+ import { parse as O } from "yaml";
2
+ function f(o) {
3
+ return typeof o == "object" && o !== null && !Array.isArray(o);
4
4
  }
5
- function B(n) {
6
- const e = n.replace(/\r\n/g, `
5
+ function P(o) {
6
+ const n = o.replace(/\r\n/g, `
7
7
  `).trim();
8
- if (!e.startsWith(`---
8
+ if (!n.startsWith(`---
9
9
  `))
10
- return { frontmatter: "", body: e };
11
- const t = e.indexOf(`
10
+ return { frontmatter: "", body: n };
11
+ const t = n.indexOf(`
12
12
  ---
13
13
  `, 4);
14
- return t === -1 ? { frontmatter: "", body: e } : {
15
- frontmatter: e.slice(4, t).trim(),
16
- body: e.slice(t + 5).trim()
14
+ return t === -1 ? { frontmatter: "", body: n } : {
15
+ frontmatter: n.slice(4, t).trim(),
16
+ body: n.slice(t + 5).trim()
17
17
  };
18
18
  }
19
- function M(n) {
20
- const e = n.trim();
21
- if (!e) return {};
19
+ function M(o) {
20
+ const n = o.trim();
21
+ if (!n) return {};
22
22
  try {
23
- const o = F(e);
24
- if (C(o)) return o;
23
+ const e = O(n);
24
+ if (f(e)) return e;
25
25
  } catch {
26
26
  }
27
27
  const t = {};
28
- for (const o of n.split(`
28
+ for (const e of o.split(`
29
29
  `)) {
30
- const r = o.trim();
30
+ const r = e.trim();
31
31
  if (!r || r.startsWith("#")) continue;
32
32
  const c = r.indexOf(":");
33
33
  if (c <= 0) continue;
34
- const l = r.slice(0, c).trim(), i = r.slice(c + 1).trim();
35
- t[l] = i;
34
+ const a = r.slice(0, c).trim(), i = r.slice(c + 1).trim();
35
+ t[a] = i;
36
36
  }
37
37
  return t;
38
38
  }
39
- function O(n) {
40
- const { frontmatter: e, body: t } = B(n);
41
- return { data: M(e), body: t };
39
+ function H(o) {
40
+ const { frontmatter: n, body: t } = P(o);
41
+ return { data: M(n), body: t };
42
42
  }
43
- function f(n) {
44
- return n.startsWith('"') && n.endsWith('"') || n.startsWith("'") && n.endsWith("'") ? n.slice(1, -1).trim() : n;
43
+ function p(o) {
44
+ return o.startsWith('"') && o.endsWith('"') || o.startsWith("'") && o.endsWith("'") ? o.slice(1, -1).trim() : o;
45
45
  }
46
- function s(n, ...e) {
47
- for (const t of e) {
48
- const o = n[t];
49
- if (typeof o == "string") {
50
- const r = f(o.trim());
46
+ function s(o, ...n) {
47
+ for (const t of n) {
48
+ const e = o[t];
49
+ if (typeof e == "string") {
50
+ const r = p(e.trim());
51
51
  if (r) return r;
52
52
  }
53
- if (typeof o == "number" && Number.isFinite(o)) return String(o);
53
+ if (typeof e == "number" && Number.isFinite(e)) return String(e);
54
54
  }
55
55
  }
56
- function D(n) {
57
- if (n != null) {
58
- if (Array.isArray(n)) {
59
- const e = n.filter((t) => typeof t == "string").map((t) => f(t.trim())).filter(Boolean);
60
- return e.length ? e : void 0;
56
+ function $(o) {
57
+ if (o != null) {
58
+ if (Array.isArray(o)) {
59
+ const n = o.filter((t) => typeof t == "string").map((t) => p(t.trim())).filter(Boolean);
60
+ return n.length ? n : void 0;
61
61
  }
62
- if (typeof n == "string") {
63
- const e = n.replace(/^\[/, "").replace(/\]$/, "").trim();
64
- if (!e) return;
65
- const t = e.split(",").map((o) => f(o.trim())).filter(Boolean);
62
+ if (typeof o == "string") {
63
+ const n = o.replace(/^\[/, "").replace(/\]$/, "").trim();
64
+ if (!n) return;
65
+ const t = n.split(",").map((e) => p(e.trim())).filter(Boolean);
66
66
  return t.length ? t : void 0;
67
67
  }
68
68
  }
69
69
  }
70
- function a(n, ...e) {
71
- for (const t of e) {
72
- const o = D(n[t]);
73
- if (o?.length) return o;
70
+ function l(o, ...n) {
71
+ for (const t of n) {
72
+ const e = $(o[t]);
73
+ if (e?.length) return e;
74
74
  }
75
75
  }
76
- function H(n) {
77
- const e = a(n, "tool-examples", "toolExamples");
78
- if (!e) return;
79
- const t = e.flatMap((o) => {
80
- const r = o.lastIndexOf("=>");
76
+ function j(o) {
77
+ const n = l(o, "tool-examples", "toolExamples");
78
+ if (!n) return;
79
+ const t = n.flatMap((e) => {
80
+ const r = e.lastIndexOf("=>");
81
81
  if (r <= 0) return [];
82
- const c = o.slice(0, r).trim(), l = o.slice(r + 2).trim();
83
- return c && l ? [{ example: c, toolName: l }] : [];
82
+ const c = e.slice(0, r).trim(), a = e.slice(r + 2).trim();
83
+ return c && a ? [{ example: c, toolName: a }] : [];
84
84
  });
85
85
  return t.length ? t : void 0;
86
86
  }
87
- function W(n, ...e) {
88
- for (const t of e) {
89
- const o = n[t];
90
- if (typeof o == "boolean") return o;
91
- if (typeof o == "string") {
92
- const r = o.trim().toLowerCase();
87
+ function u(o, ...n) {
88
+ for (const t of n) {
89
+ const e = o[t];
90
+ if (typeof e == "boolean") return e;
91
+ if (typeof e == "string") {
92
+ const r = e.trim().toLowerCase();
93
93
  if (r === "true" || r === "yes") return !0;
94
94
  if (r === "false" || r === "no") return !1;
95
95
  }
96
96
  }
97
97
  }
98
- const $ = /* @__PURE__ */ new Set([
98
+ const R = /* @__PURE__ */ new Set([
99
99
  "direct_answer",
100
100
  "tool_answer",
101
101
  "clarify"
102
102
  ]);
103
- function P(n) {
104
- const e = s(
105
- n,
103
+ function U(o) {
104
+ const n = s(
105
+ o,
106
106
  "spotlight-response-strategy",
107
107
  "response-strategy",
108
108
  "responseStrategy"
109
109
  );
110
- if (e)
111
- return $.has(e) ? e : void 0;
110
+ if (n)
111
+ return R.has(n) ? n : void 0;
112
112
  }
113
- const R = /* @__PURE__ */ new Set([
113
+ const z = /* @__PURE__ */ new Set([
114
114
  "video_channel",
115
115
  "bim_model",
116
116
  "device",
@@ -118,98 +118,148 @@ const R = /* @__PURE__ */ new Set([
118
118
  "panel",
119
119
  "scene_target"
120
120
  ]);
121
- function U(n) {
122
- const e = a(
123
- n,
121
+ function K(o) {
122
+ const n = l(
123
+ o,
124
124
  "spotlight-asset-types",
125
125
  "asset-types",
126
126
  "assetTypes"
127
127
  );
128
- if (!e) return;
129
- const t = e.filter(
130
- (o) => R.has(o)
128
+ if (!n) return;
129
+ const t = n.filter(
130
+ (e) => z.has(e)
131
131
  );
132
132
  return t.length ? Array.from(new Set(t)) : void 0;
133
133
  }
134
- function j(n) {
135
- const e = s(n, "context", "execution-context", "executionContext");
136
- if (!e) return;
137
- const t = e.toLowerCase();
134
+ function V(o) {
135
+ const n = s(o, "context", "execution-context", "executionContext");
136
+ if (!n) return;
137
+ const t = n.toLowerCase();
138
138
  if (t === "fork") return "fork";
139
139
  if (t === "inline") return "inline";
140
140
  }
141
- function z(n) {
142
- const e = n.hooks;
143
- if (C(e)) return e;
141
+ function Y(o) {
142
+ const n = o.hooks;
143
+ if (f(n)) return n;
144
+ }
145
+ function G(o) {
146
+ const n = o.dependencies;
147
+ if (!f(n) || !Array.isArray(n.tools)) return;
148
+ const t = [];
149
+ for (const e of n.tools) {
150
+ if (typeof e == "string" && e.trim()) {
151
+ t.push(e.trim());
152
+ continue;
153
+ }
154
+ if (!f(e)) continue;
155
+ const r = s(e, "value", "name");
156
+ r && t.push({
157
+ type: s(e, "type") ?? "browser",
158
+ value: r,
159
+ description: s(e, "description"),
160
+ transport: s(e, "transport"),
161
+ url: s(e, "url")
162
+ });
163
+ }
164
+ return t.length ? { tools: t } : void 0;
165
+ }
166
+ function Q(o) {
167
+ const n = o.policy;
168
+ if (!f(n)) return;
169
+ const t = u(
170
+ n,
171
+ "allow_implicit_invocation",
172
+ "allowImplicitInvocation"
173
+ );
174
+ return t === void 0 ? void 0 : { allowImplicitInvocation: t };
175
+ }
176
+ function q(o) {
177
+ const n = o.interface;
178
+ if (!f(n)) return;
179
+ const t = {
180
+ displayName: s(n, "display_name", "displayName"),
181
+ shortDescription: s(n, "short_description", "shortDescription"),
182
+ iconSmall: s(n, "icon_small", "iconSmall"),
183
+ iconLarge: s(n, "icon_large", "iconLarge"),
184
+ brandColor: s(n, "brand_color", "brandColor"),
185
+ defaultPrompt: s(n, "default_prompt", "defaultPrompt")
186
+ };
187
+ return Object.values(t).some(Boolean) ? t : void 0;
144
188
  }
145
- function K(n) {
146
- const e = n.replace(/\\/g, "/").split("/").filter(Boolean), t = e[e.length - 1];
147
- if (t && /^SKILL\.md$/iu.test(t) && e.length >= 2)
148
- return e[e.length - 2];
189
+ function J(o) {
190
+ const n = o.replace(/\\/g, "/").split("/").filter(Boolean), t = n[n.length - 1];
191
+ if (t && /^SKILL\.md$/iu.test(t) && n.length >= 2)
192
+ return n[n.length - 2];
149
193
  if (t?.toLowerCase().endsWith(".skill.md"))
150
194
  return t.replace(/\.SKILL\.md$/iu, "");
151
195
  }
152
- function V(n) {
153
- return n.split(`
196
+ function X(o) {
197
+ return o.split(`
154
198
  `).map((t) => t.trim()).find((t) => t && !t.startsWith("#")) ?? "未提供技能描述";
155
199
  }
156
- function G(n, e) {
157
- const { data: t, body: o } = O(n), r = s(t, "name"), c = s(t, "id") ?? K(e);
200
+ function tt(o, n) {
201
+ const { data: t, body: e } = H(o), r = s(t, "name"), c = s(t, "id") ?? J(n);
158
202
  if (!c)
159
- throw new Error(`技能文件缺少 id 且无法从路径推断:${e}`);
160
- const l = s(t, "description") ?? V(o), i = {
203
+ throw new Error(`技能文件缺少 id 且无法从路径推断:${n}`);
204
+ const a = s(t, "description") ?? X(e), i = {
161
205
  name: c,
162
- description: l
163
- }, u = o.trim();
164
- u && (i.skillInstructionBody = u), r && (i.displayName = r);
165
- const d = s(t, "when_to_use", "whenToUse");
166
- d && (i.whenToUse = d);
167
- const p = a(t, "allowed-tools", "allowedTools");
168
- p && (i.allowedTools = p);
169
- const m = s(t, "argument-hint", "argumentHint");
170
- m && (i.argumentHint = m);
171
- const y = a(
206
+ description: a
207
+ }, d = e.trim();
208
+ d && (i.skillInstructionBody = d), r && (i.displayName = r);
209
+ const m = s(t, "when_to_use", "whenToUse");
210
+ m && (i.whenToUse = m);
211
+ const y = l(t, "allowed-tools", "allowedTools");
212
+ y && (i.allowedTools = y);
213
+ const g = G(t);
214
+ g && (i.dependencies = g);
215
+ const h = Q(t);
216
+ h && (i.policy = h);
217
+ const v = q(t);
218
+ v && (i.interface = v);
219
+ const k = s(t, "argument-hint", "argumentHint");
220
+ k && (i.argumentHint = k);
221
+ const w = l(
172
222
  t,
173
223
  "arguments",
174
224
  "argument-names",
175
225
  "argumentNames"
176
226
  );
177
- y && (i.argNames = y);
178
- const g = a(t, "keywords");
179
- g && (i.keywords = g);
180
- const h = P(t);
181
- h && (i.responseStrategy = h);
182
- const k = U(t);
183
- k && (i.assetTypes = k);
184
- const x = a(t, "capability-examples", "capabilityExamples");
185
- x && (i.capabilityExamples = x);
186
- const v = H(t);
187
- v && (i.toolExamples = v);
188
- const S = s(t, "version");
189
- S && (i.version = S);
190
- const w = s(t, "model");
191
- w && (i.model = w);
192
- const b = W(
227
+ w && (i.argNames = w);
228
+ const x = l(t, "keywords");
229
+ x && (i.keywords = x);
230
+ const b = U(t);
231
+ b && (i.responseStrategy = b);
232
+ const S = K(t);
233
+ S && (i.assetTypes = S);
234
+ const I = l(t, "capability-examples", "capabilityExamples");
235
+ I && (i.capabilityExamples = I);
236
+ const _ = j(t);
237
+ _ && (i.toolExamples = _);
238
+ const E = s(t, "version");
239
+ E && (i.version = E);
240
+ const T = s(t, "model");
241
+ T && (i.model = T);
242
+ const L = u(
193
243
  t,
194
244
  "disable-model-invocation",
195
245
  "disableModelInvocation"
196
246
  );
197
- b !== void 0 && (i.disableModelInvocation = b);
198
- const E = W(t, "user-invocable", "userInvocable");
199
- E !== void 0 && (i.userInvocable = E);
200
- const T = a(t, "paths");
201
- T && (i.paths = T);
202
- const I = j(t);
203
- I && (i.executionContext = I);
204
- const L = s(t, "agent");
205
- L && (i.agent = L);
206
- const _ = s(t, "effort") ?? (typeof t.effort == "number" && Number.isFinite(t.effort) ? String(t.effort) : void 0);
207
- _ && (i.effort = _);
208
- const A = z(t);
209
- A && (i.hooks = A);
210
- const N = s(t, "shell");
211
- return N && (i.shell = N), i;
247
+ L !== void 0 && (i.disableModelInvocation = L);
248
+ const A = u(t, "user-invocable", "userInvocable");
249
+ A !== void 0 && (i.userInvocable = A);
250
+ const N = l(t, "paths");
251
+ N && (i.paths = N);
252
+ const C = V(t);
253
+ C && (i.executionContext = C);
254
+ const W = s(t, "agent");
255
+ W && (i.agent = W);
256
+ const B = s(t, "effort") ?? (typeof t.effort == "number" && Number.isFinite(t.effort) ? String(t.effort) : void 0);
257
+ B && (i.effort = B);
258
+ const D = Y(t);
259
+ D && (i.hooks = D);
260
+ const F = s(t, "shell");
261
+ return F && (i.shell = F), i;
212
262
  }
213
263
  export {
214
- G as parseSpotlightSkillMarkdownFields
264
+ tt as parseSpotlightSkillMarkdownFields
215
265
  };
@@ -1,23 +1,22 @@
1
- import { defineStore as f } from "pinia";
2
- import { getSpotlightConfig as g } from "../plugin.js";
1
+ import { defineStore as g } from "pinia";
2
+ import { getSpotlightConfig as S } from "../plugin.js";
3
3
  import { runRemoteSpotlightPipeline as y, warmupSpotlightRemoteContext as a, cancelRemoteSpotlightRunForSignal as T } from "../remote/runPipeline.js";
4
4
  import { ensureSpotlightMeta as E } from "../remote/meta.js";
5
- import { devWarn as I } from "../utils/devConsole.js";
5
+ import { devWarn as P } from "../utils/devConsole.js";
6
6
  import { useAgentSessionStore as p } from "../session/agentSession.js";
7
- import { useSpotlightRuntimeStore as _ } from "./runtimeStore.js";
8
- import { applyPipelineError as P } from "./pipeline/errors.js";
9
- import { SPOTLIGHT_PIPELINE_STEP_LABELS as R, SPOTLIGHT_PIPELINE_STEP_IDS as b } from "./pipeline/constants.js";
10
- import { setStepState as x } from "./pipeline/steps.js";
11
- import { typewriterAppendToStepContent as A, typewriterToStepContent as v } from "./pipeline/typing.js";
12
- import { addRecentQuestionToList as Q, persistRecentQuestions as L, loadRecentQuestions as C } from "./recent.js";
13
- import { getSuggestedQuestions as N } from "./capabilities.js";
14
- import { buildSpotlightStoreSink as w } from "./storeSink.js";
15
- import { INVESTMENT_SUB_INTENT_LABELS as te, InvestmentSubIntent as ie, PROGRESS_SUB_INTENT_LABELS as se, ProgressSubIntent as ne, QUALITY_SUB_INTENT_LABELS as re, QualitySubIntent as oe, SAFETY_SUB_INTENT_LABELS as le, SPOTLIGHT_INTENT_LABELS as ue, SUB_INTENT_CONFIG as ae, SafetySubIntent as pe, SpotlightIntent as he } from "./types.js";
7
+ import { useSpotlightRuntimeStore as x } from "./runtimeStore.js";
8
+ import { applyPipelineError as R } from "./pipeline/errors.js";
9
+ import { SPOTLIGHT_PIPELINE_STEP_LABELS as b, SPOTLIGHT_PIPELINE_STEP_IDS as I } from "./pipeline/constants.js";
10
+ import { setStepState as _ } from "./pipeline/steps.js";
11
+ import { typewriterAppendToStepContent as v, typewriterToStepContent as A } from "./pipeline/typing.js";
12
+ import { addRecentQuestionToList as Q, persistRecentQuestions as C, loadRecentQuestions as w } from "./recent.js";
13
+ import { getSuggestedQuestions as k } from "./capabilities.js";
14
+ import { buildSpotlightStoreSink as M } from "./storeSink.js";
16
15
  const m = "spotlight-telemetry-snapshots", l = 20;
17
16
  function h(e) {
18
17
  return e instanceof DOMException && e.name === "AbortError" ? !0 : e instanceof Error && e.name === "AbortError";
19
18
  }
20
- function k() {
19
+ function L() {
21
20
  try {
22
21
  const e = localStorage.getItem(m), i = e ? JSON.parse(e) : [];
23
22
  return Array.isArray(i) ? i.slice(0, l) : [];
@@ -37,7 +36,7 @@ function c(e) {
37
36
  function o(e) {
38
37
  return e.type === "step_sync" || e.type === "step_status" || e.type === "step_content" || e.type === "step_artifact";
39
38
  }
40
- function B(e) {
39
+ function D(e) {
41
40
  return e.failureClass === "tool" ? e.budgetUsage.failedToolCalls > 0 ? "tool_runtime" : "tool_failure_unrecoverable" : e.failureClass === "runtime" ? "runtime_error" : e.failureClass === "cancel" ? "cancelled" : e.stopReason === "max_turns_exhausted" ? "max_turns_exhausted" : e.stopReason === "tool_failure_unrecoverable" ? "tool_failure_unrecoverable" : "completed";
42
41
  }
43
42
  function d(e) {
@@ -61,7 +60,7 @@ function d(e) {
61
60
  (t, n) => n[0].at - t[0].at
62
61
  );
63
62
  }
64
- function S(e, i) {
63
+ function f(e, i) {
65
64
  const s = [...e].reverse().find(
66
65
  (n) => n.type === "turn_completed" && n.turnId === i
67
66
  );
@@ -73,21 +72,21 @@ function S(e, i) {
73
72
  turnId: s.turnId,
74
73
  stopReason: s.stopReason,
75
74
  failureClass: s.failureClass,
76
- category: B(s),
75
+ category: D(s),
77
76
  elapsedMs: s.elapsedMs,
78
77
  toolErrors: t
79
78
  };
80
79
  }
81
- function M(e) {
80
+ function N(e) {
82
81
  const i = [...e].reverse().find(
83
82
  (s) => s.type === "turn_completed"
84
83
  );
85
- return i ? S(e, i.turnId) : null;
84
+ return i ? f(e, i.turnId) : null;
86
85
  }
87
86
  function O(e, i) {
88
87
  return d(e).find((s) => s[0]?.turnId === i) ?? [];
89
88
  }
90
- const Z = f("spotlight", {
89
+ const Z = g("spotlight", {
91
90
  state: () => ({
92
91
  visible: !1,
93
92
  prompt: "",
@@ -107,7 +106,7 @@ const Z = f("spotlight", {
107
106
  lastMemoryReplay: null,
108
107
  lastMemoryDecision: null,
109
108
  lastSubmittedQuestion: "",
110
- telemetrySnapshots: k()
109
+ telemetrySnapshots: L()
111
110
  }),
112
111
  getters: {
113
112
  uiExecutionEvents(e) {
@@ -125,7 +124,7 @@ const Z = f("spotlight", {
125
124
  return this.turnTimelines[0] ?? [];
126
125
  },
127
126
  latestFailureSummary(e) {
128
- return M(e.executionEvents);
127
+ return N(e.executionEvents);
129
128
  },
130
129
  latestTelemetrySnapshot(e) {
131
130
  return e.telemetrySnapshots[0] ?? null;
@@ -139,7 +138,7 @@ const Z = f("spotlight", {
139
138
  turnId: e,
140
139
  recordedAt: Date.now(),
141
140
  timeline: i,
142
- failureSummary: S(
141
+ failureSummary: f(
143
142
  this.executionEvents,
144
143
  e
145
144
  )
@@ -167,13 +166,13 @@ const Z = f("spotlight", {
167
166
  this.pipelineAbortController && (T(this.pipelineAbortController.signal), this.pipelineAbortController.abort(), this.pipelineAbortController = null), this.loading && (this.loading = !1), this.pipelinePhase === "running" && (this.pipelinePhase = "cancelled");
168
167
  },
169
168
  setStep(e, i, s) {
170
- x(this.agentSteps, e, i, s);
169
+ _(this.agentSteps, e, i, s);
171
170
  },
172
171
  recordExecutionEvent(e) {
173
172
  this.executionEvents.push(e), this.executionEvents.length > 500 && this.executionEvents.splice(0, this.executionEvents.length - 500), e.type === "turn_completed" && this.persistTurnTelemetrySnapshot(e.turnId);
174
173
  },
175
174
  async typewriterToStep(e, i, s = 24, t) {
176
- return v(
175
+ return A(
177
176
  this.agentSteps,
178
177
  e,
179
178
  i,
@@ -182,7 +181,7 @@ const Z = f("spotlight", {
182
181
  );
183
182
  },
184
183
  async typewriterAppendToStep(e, i, s = 24, t) {
185
- return A(
184
+ return v(
186
185
  this.agentSteps,
187
186
  e,
188
187
  i,
@@ -201,22 +200,22 @@ const Z = f("spotlight", {
201
200
  this.loadRecentQuestions(), this.refreshSuggestedQuestions(), a(), this.selectedIndex = -1, this.prompt = "", this.error = "";
202
201
  },
203
202
  loadRecentQuestions() {
204
- this.recentQuestions = C();
203
+ this.recentQuestions = w();
205
204
  },
206
205
  addRecentQuestion(e) {
207
206
  this.recentQuestions = Q(
208
207
  this.recentQuestions,
209
208
  e
210
- ), L(this.recentQuestions);
209
+ ), C(this.recentQuestions);
211
210
  },
212
211
  async refreshSuggestedQuestions() {
213
212
  await E();
214
- const e = g(), i = e.getUiContext?.() ?? {}, s = _(), t = {
213
+ const e = S(), i = e.getUiContext?.() ?? {}, s = x(), t = {
215
214
  sceneLevel: i.sceneLevel ?? null,
216
215
  smallTab: i.smallTab ?? null,
217
216
  activeTarget: s.activeTarget
218
217
  };
219
- this.suggestedQuestions = e.getSuggestedQuestions?.(t) ?? N(t);
218
+ this.suggestedQuestions = e.getSuggestedQuestions?.(t) ?? k(t);
220
219
  },
221
220
  getSelectionQuestions() {
222
221
  return [...this.suggestedQuestions, ...this.recentQuestions];
@@ -252,7 +251,7 @@ const Z = f("spotlight", {
252
251
  /** 供 pipeline handlers 使用,不直接依赖 pinia 的 api 封装 */
253
252
  buildHandlerApi(e, i) {
254
253
  const s = () => this.isPipelineRunActive(e);
255
- return w({
254
+ return M({
256
255
  signal: i,
257
256
  isCurrentRun: s,
258
257
  getSteps: () => this.agentSteps,
@@ -320,7 +319,7 @@ const Z = f("spotlight", {
320
319
  this.pipelinePhase = "cancelled";
321
320
  return;
322
321
  }
323
- throw I("Spotlight", "远程流水线异常(将向上抛出)", r), r;
322
+ throw P("Spotlight", "远程流水线异常(将向上抛出)", r), r;
324
323
  }
325
324
  } catch (n) {
326
325
  if (!this.isPipelineRunActive(i)) return;
@@ -331,12 +330,12 @@ const Z = f("spotlight", {
331
330
  const r = n instanceof Error ? n.message : "解析失败";
332
331
  this.agentSteps.length === 0 && (this.agentSteps = [
333
332
  {
334
- id: b.understand,
335
- label: R.understand,
333
+ id: I.understand,
334
+ label: b.understand,
336
335
  status: "error",
337
336
  content: r
338
337
  }
339
- ]), P(this.buildHandlerApi(i, s.signal), r), this.pipelinePhase = "error";
338
+ ]), R(this.buildHandlerApi(i, s.signal), r), this.pipelinePhase = "error";
340
339
  } finally {
341
340
  const n = this.pipelinePhase;
342
341
  (this.isPipelineRunActive(i) || n === "done") && (this.loading = !1, this.pipelineAbortController = null, n === "running" && (this.pipelinePhase = "done"));
@@ -357,16 +356,5 @@ const Z = f("spotlight", {
357
356
  }
358
357
  });
359
358
  export {
360
- te as INVESTMENT_SUB_INTENT_LABELS,
361
- ie as InvestmentSubIntent,
362
- se as PROGRESS_SUB_INTENT_LABELS,
363
- ne as ProgressSubIntent,
364
- re as QUALITY_SUB_INTENT_LABELS,
365
- oe as QualitySubIntent,
366
- le as SAFETY_SUB_INTENT_LABELS,
367
- ue as SPOTLIGHT_INTENT_LABELS,
368
- ae as SUB_INTENT_CONFIG,
369
- pe as SafetySubIntent,
370
- he as SpotlightIntent,
371
359
  Z as useSpotlightStore
372
360
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inupedia/spotlight-vue",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Thin Vue runtime for Inupedia Spotlight Client Tools",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -91,8 +91,8 @@
91
91
  "dependencies": {
92
92
  "prettier": "^3.8.1",
93
93
  "yaml": "^2.8.4",
94
- "@inupedia/spotlight-protocol": "0.6.0",
95
- "@inupedia/spotlight-client": "0.6.0"
94
+ "@inupedia/spotlight-client": "0.7.0",
95
+ "@inupedia/spotlight-protocol": "0.7.0"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "@inspira-ui/plugins": "^0.0.2",