@inupedia/spotlight-vue 0.5.16 → 0.5.18
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/avatar/speech/live2dStreamSpeech.d.ts +2 -2
- package/dist/avatar/speech/live2dStreamSpeech.d.ts.map +1 -1
- package/dist/avatar/speech/live2dStreamSpeech.js +1 -1
- package/dist/components/SpotlightShell.vue.d.ts.map +1 -1
- package/dist/components/SpotlightShell2.vue.js +53 -53
- package/dist/components/SpotlightThinking.vue.d.ts.map +1 -1
- package/dist/components/SpotlightThinking.vue.js +2 -2
- package/dist/components/SpotlightThinking2.vue.js +386 -365
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -59
- package/dist/remote/runPipeline.d.ts +8 -5
- package/dist/remote/runPipeline.d.ts.map +1 -1
- package/dist/remote/runPipeline.js +308 -322
- package/dist/store/pipeline/constants.d.ts +13 -4
- package/dist/store/pipeline/constants.d.ts.map +1 -1
- package/dist/store/pipeline/constants.js +17 -8
- package/dist/store/pipeline/displayText.d.ts +12 -0
- package/dist/store/pipeline/displayText.d.ts.map +1 -1
- package/dist/store/pipeline/displayText.js +75 -45
- package/dist/store/pipeline/errors.d.ts.map +1 -1
- package/dist/store/pipeline/errors.js +10 -10
- package/dist/store/pipeline/toolLane.d.ts +10 -0
- package/dist/store/pipeline/toolLane.d.ts.map +1 -0
- package/dist/store/pipeline/toolLane.js +24 -0
- package/dist/store/spotlightStore.js +2 -2
- package/package.json +3 -3
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { AgentStep } from "../types";
|
|
2
2
|
export declare const SPOTLIGHT_PIPELINE_STEP_IDS: {
|
|
3
|
+
readonly understand: "understand";
|
|
4
|
+
readonly gather: "gather";
|
|
5
|
+
readonly act: "act";
|
|
6
|
+
readonly answer: "answer";
|
|
7
|
+
/** @deprecated 0.5.17 thinking-bar IA; kept for old event ids */
|
|
3
8
|
readonly breakdown: "1";
|
|
4
9
|
readonly intent: "2";
|
|
5
10
|
readonly tool: "3";
|
|
@@ -7,11 +12,15 @@ export declare const SPOTLIGHT_PIPELINE_STEP_IDS: {
|
|
|
7
12
|
readonly agent: "langgraph-agent";
|
|
8
13
|
};
|
|
9
14
|
export declare const SPOTLIGHT_PIPELINE_STEP_LABELS: {
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
15
|
+
readonly understand: "理解问题";
|
|
16
|
+
readonly gather: "获取信息";
|
|
17
|
+
readonly act: "操作页面";
|
|
18
|
+
readonly answer: "回答";
|
|
19
|
+
readonly breakdown: "理解问题";
|
|
20
|
+
readonly intent: "理解问题";
|
|
21
|
+
readonly tool: "获取信息";
|
|
13
22
|
readonly analysis: "数据分析";
|
|
14
|
-
readonly qa: "
|
|
23
|
+
readonly qa: "回答";
|
|
15
24
|
};
|
|
16
25
|
export declare function createBreakdownActiveStep(): AgentStep;
|
|
17
26
|
export declare function createIntentActiveStep(): AgentStep;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,2BAA2B;;;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,2BAA2B;;;;;IAKtC,iEAAiE;;;;;;CAMzD,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;CAUjC,CAAC;AAEX,wBAAgB,yBAAyB,IAAI,SAAS,CAMrD;AAED,wBAAgB,sBAAsB,IAAI,SAAS,CAMlD;AAED,wBAAgB,kBAAkB,IAAI,SAAS,CAM9C"}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
|
+
understand: "understand",
|
|
3
|
+
gather: "gather",
|
|
4
|
+
act: "act",
|
|
5
|
+
answer: "answer",
|
|
6
|
+
/** @deprecated 0.5.17 thinking-bar IA; kept for old event ids */
|
|
2
7
|
breakdown: "1",
|
|
3
8
|
intent: "2",
|
|
4
9
|
tool: "3",
|
|
5
10
|
analysis: "4",
|
|
6
11
|
agent: "langgraph-agent"
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
}, n = {
|
|
13
|
+
understand: "理解问题",
|
|
14
|
+
gather: "获取信息",
|
|
15
|
+
act: "操作页面",
|
|
16
|
+
answer: "回答",
|
|
17
|
+
breakdown: "理解问题",
|
|
18
|
+
intent: "理解问题",
|
|
19
|
+
tool: "获取信息",
|
|
11
20
|
analysis: "数据分析",
|
|
12
|
-
qa: "
|
|
21
|
+
qa: "回答"
|
|
13
22
|
};
|
|
14
23
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
a as SPOTLIGHT_PIPELINE_STEP_IDS,
|
|
25
|
+
n as SPOTLIGHT_PIPELINE_STEP_LABELS
|
|
17
26
|
};
|
|
@@ -14,7 +14,19 @@ export declare function composeToolStepContent(planning: string, answer: string)
|
|
|
14
14
|
* 最终回答和流式回答都必须经过这里,避免中途把内部材料渲染给用户。
|
|
15
15
|
*/
|
|
16
16
|
export declare function sanitizeToolStepAnswerText(content: string): string;
|
|
17
|
+
export interface GatherProcessDisplay {
|
|
18
|
+
headline: string;
|
|
19
|
+
items: string[];
|
|
20
|
+
note: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Turn a gather/search summary into a headline + numbered sources.
|
|
24
|
+
* Accepts both the new multiline `1. 2. 3.` form and the old `A;B;C` dump.
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseGatherProcessDisplay(content: string): GatherProcessDisplay | null;
|
|
27
|
+
export declare function formatGatherProcessText(content: string): string;
|
|
17
28
|
export declare function isToolExecutionStep(stepId: string): boolean;
|
|
29
|
+
export declare function isAnswerStep(stepId: string): boolean;
|
|
18
30
|
/** 判断是否为 query loop 写入的规划摘要块(「第 N 轮:…」)。 */
|
|
19
31
|
export declare function isLoopPlanningChunk(chunk: string): boolean;
|
|
20
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayText.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/displayText.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"displayText.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/displayText.ts"],"names":[],"mappings":"AAeA,kEAAkE;AAClE,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,8CAA8C;AAC9C,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOpE;AAoCD,yCAAyC;AACzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAeA;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,MAAM,CAOR;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAelE;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAMD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,GACd,oBAAoB,GAAG,IAAI,CAsC7B;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAM3D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,4CAA4C;AAC5C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAI1D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAiBA;AAED,uCAAuC;AACvC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,gCAAgC;AAChC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI/D"}
|
|
@@ -1,92 +1,122 @@
|
|
|
1
|
-
const
|
|
1
|
+
const S = {
|
|
2
2
|
call_tools: "调用工具",
|
|
3
3
|
respond: "生成回答",
|
|
4
4
|
fallback: "兜底回复"
|
|
5
|
-
},
|
|
5
|
+
}, _ = "3", T = "gather", h = "act", E = "answer", m = /^第 \d+ 轮:/u, L = /(?:\n\n+)?第 \d+ 轮:[\s\S]*?(?=\n\n第 \d+ 轮:|$)/gu, a = `
|
|
6
6
|
|
|
7
7
|
--- spotlight-answer ---
|
|
8
8
|
|
|
9
9
|
`;
|
|
10
|
-
function
|
|
10
|
+
function o(t) {
|
|
11
11
|
if (!t.trim()) return t;
|
|
12
12
|
let n = t;
|
|
13
|
-
for (const [e, i] of Object.entries(
|
|
13
|
+
for (const [e, i] of Object.entries(S))
|
|
14
14
|
n = n.replace(new RegExp(`\\b${e}\\b`, "g"), i);
|
|
15
15
|
return n;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
17
|
+
const f = /(?:\n\n+|^)(【(?:Skill 已(?:加|预加)载|会话 Skill 已恢复)】[\s\S]*?)(?=\n\n(?:第 \d+ 轮:|【(?:Skill 已(?:加|预加)载|会话 Skill 已恢复)】)|$)/gu, O = /【(?:Skill 已(?:加|预加)载|会话 Skill 已恢复)】/u;
|
|
18
|
+
function P(t) {
|
|
19
19
|
const n = [
|
|
20
20
|
...t.matchAll(/(?:^|\n\n)(第 \d+ 轮:[^\n]+\n原因:[^\n]+)/gu)
|
|
21
|
-
].map((
|
|
21
|
+
].map((s) => s[1]?.trim() ?? "").filter(Boolean), e = [...t.matchAll(f)].map((s) => s[1]?.trim() ?? "").filter(Boolean);
|
|
22
22
|
if (n.length === 0 && e.length === 0)
|
|
23
23
|
return { planning: "", answer: t };
|
|
24
24
|
let i = t;
|
|
25
|
-
for (const
|
|
26
|
-
i = i.replace(
|
|
25
|
+
for (const s of [...n, ...e])
|
|
26
|
+
i = i.replace(s, "");
|
|
27
27
|
return i = i.replace(/\n{3,}/g, `
|
|
28
28
|
|
|
29
29
|
`).trim(), { planning: [...n, ...e].join(`
|
|
30
30
|
|
|
31
31
|
`).trim(), answer: i };
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const n =
|
|
33
|
+
function A(t) {
|
|
34
|
+
const n = o(t).trim();
|
|
35
35
|
if (!n) return { planning: "", answer: "" };
|
|
36
|
-
const e = n.indexOf(
|
|
36
|
+
const e = n.indexOf(a);
|
|
37
37
|
return e >= 0 ? {
|
|
38
38
|
planning: n.slice(0, e).trim(),
|
|
39
|
-
answer: n.slice(e +
|
|
40
|
-
} :
|
|
39
|
+
answer: n.slice(e + a.length).trim()
|
|
40
|
+
} : P(n);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function C(t, n) {
|
|
43
43
|
const e = t.trim(), i = n.trim();
|
|
44
|
-
return e && i ? `${e}${
|
|
44
|
+
return e && i ? `${e}${a}${i}` : e || i;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const n =
|
|
46
|
+
function R(t) {
|
|
47
|
+
const n = o(t).trim();
|
|
48
48
|
if (!n) return "";
|
|
49
|
-
const { planning: e, answer: i } =
|
|
50
|
-
if (e.trim() && !n.includes(
|
|
49
|
+
const { planning: e, answer: i } = A(n);
|
|
50
|
+
if (e.trim() && !n.includes(a))
|
|
51
51
|
return "";
|
|
52
|
-
const
|
|
53
|
-
return !
|
|
52
|
+
const r = (i || (e.trim() ? "" : n)).trim();
|
|
53
|
+
return !r || O.test(r) ? "" : B(r).replace(f, "").replace(/\n{3,}/g, `
|
|
54
54
|
|
|
55
55
|
`).trim();
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
const u = "正在依据资料组织回答。", p = /^\s*\d+[.、]\s+(.+)$/u, N = /^(.*?命中\s+\d+\s+条资料)/u;
|
|
58
|
+
function I(t) {
|
|
59
|
+
const n = t.trim();
|
|
60
|
+
if (!n) return null;
|
|
61
|
+
let e = "", i = n;
|
|
62
|
+
i.includes(u) && (e = u, i = i.replace(u, "").trim());
|
|
63
|
+
const r = i.split(/\n/u).map((c) => c.match(p)?.[1]?.trim() ?? "").filter(Boolean);
|
|
64
|
+
if (r.length > 0)
|
|
65
|
+
return { headline: i.split(/\n/u).map((l) => l.trim()).find((l) => l && !p.test(l))?.replace(/[::]\s*$/u, "") ?? "", items: r, note: e };
|
|
66
|
+
const s = i.match(N);
|
|
67
|
+
if (s) {
|
|
68
|
+
const c = s[1].trim(), d = i.slice(s[0].length).replace(/^[::]\s*/u, "").trim().replace(/[。..]\s*$/u, "").split(/[;;]\s*/u).map((g) => g.trim()).filter(Boolean);
|
|
69
|
+
return { headline: c, items: d, note: e };
|
|
70
|
+
}
|
|
71
|
+
return { headline: i, items: [], note: e };
|
|
59
72
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
function $(t) {
|
|
74
|
+
const n = I(t);
|
|
75
|
+
if (!n) return "";
|
|
76
|
+
const e = [n.headline];
|
|
77
|
+
return n.items.length > 0 && e.push(n.items.map((i, r) => `${r + 1}. ${i}`).join(`
|
|
78
|
+
`)), n.note && e.push(n.note), e.filter(Boolean).join(`
|
|
79
|
+
`);
|
|
80
|
+
}
|
|
81
|
+
function w(t) {
|
|
82
|
+
return t === T || t === h || t === _;
|
|
83
|
+
}
|
|
84
|
+
function b(t) {
|
|
85
|
+
return t === E;
|
|
86
|
+
}
|
|
87
|
+
function D(t) {
|
|
88
|
+
return m.test(
|
|
89
|
+
o(t).trimStart()
|
|
63
90
|
);
|
|
64
91
|
}
|
|
65
|
-
function
|
|
66
|
-
const n =
|
|
92
|
+
function k(t) {
|
|
93
|
+
const n = o(t).trim();
|
|
67
94
|
if (!n) return { intent: "", misplacedPlanning: "" };
|
|
68
95
|
const e = n.search(/\n\n第 \d+ 轮:/u);
|
|
69
96
|
return e >= 0 ? {
|
|
70
97
|
intent: n.slice(0, e).trim(),
|
|
71
98
|
misplacedPlanning: n.slice(e).trim()
|
|
72
|
-
} :
|
|
99
|
+
} : m.test(n) ? { intent: "", misplacedPlanning: n } : { intent: n, misplacedPlanning: "" };
|
|
73
100
|
}
|
|
74
|
-
function
|
|
75
|
-
return
|
|
101
|
+
function x(t) {
|
|
102
|
+
return k(t).intent;
|
|
76
103
|
}
|
|
77
|
-
function
|
|
78
|
-
const n =
|
|
79
|
-
return n ? n.replace(
|
|
104
|
+
function B(t) {
|
|
105
|
+
const n = o(t).trim();
|
|
106
|
+
return n ? n.replace(L, "").trim() : "";
|
|
80
107
|
}
|
|
81
108
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
109
|
+
a as TOOL_STEP_ANSWER_DELIMITER,
|
|
110
|
+
C as composeToolStepContent,
|
|
111
|
+
$ as formatGatherProcessText,
|
|
112
|
+
x as getIntentStepDisplayContent,
|
|
113
|
+
o as humanizeSpotlightStepContent,
|
|
114
|
+
b as isAnswerStep,
|
|
115
|
+
D as isLoopPlanningChunk,
|
|
116
|
+
w as isToolExecutionStep,
|
|
117
|
+
I as parseGatherProcessDisplay,
|
|
118
|
+
R as sanitizeToolStepAnswerText,
|
|
119
|
+
k as splitIntentStepContent,
|
|
120
|
+
A as splitToolStepContent,
|
|
121
|
+
B as stripLoopPlanningBlocks
|
|
92
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/errors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC,EAC1D,GAAG,EAAE,MAAM,GACV,IAAI,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/errors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC,EAC1D,GAAG,EAAE,MAAM,GACV,IAAI,CAQN;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC,GACxD,MAAM,CAuCR"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SPOTLIGHT_PIPELINE_STEP_IDS as
|
|
1
|
+
import { SPOTLIGHT_PIPELINE_STEP_IDS as p } from "./constants.js";
|
|
2
2
|
import { findActiveStep as O } from "./steps.js";
|
|
3
|
-
function $(e,
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
function $(e, r) {
|
|
4
|
+
const o = O(e.getSteps());
|
|
5
|
+
o ? e.setStep(o.id, "error", r) : e.setStep(p.understand, "error", r), e.setError(r);
|
|
6
6
|
}
|
|
7
7
|
function d(e) {
|
|
8
|
-
const
|
|
8
|
+
const r = {
|
|
9
9
|
UNKNOWN_TOOL: "系统里还没有注册这个操作",
|
|
10
10
|
HOST_TOOL_NOT_MANIFEST: "该操作未在本页 host 工具清单中注册",
|
|
11
11
|
CIRCULAR_DEPENDENCY: "工具依赖配置存在循环",
|
|
@@ -13,15 +13,15 @@ function d(e) {
|
|
|
13
13
|
PRECONDITION_FAILED: "当前页面状态不满足执行条件",
|
|
14
14
|
TOOL_RUN_FAILED: "工具执行时发生运行错误",
|
|
15
15
|
TOOL_TIMEOUT: "工具执行超时"
|
|
16
|
-
},
|
|
16
|
+
}, o = e.errorCode ? r[e.errorCode] : "工具执行失败", c = e.error?.trim() || "未知错误", n = e.trace ?? [], t = n.at(-1), i = n.filter(
|
|
17
17
|
(l) => l.type === "retry_scheduled"
|
|
18
|
-
).length,
|
|
18
|
+
).length, E = n.some(
|
|
19
19
|
(l) => l.type === "rollback_applied"
|
|
20
20
|
), s = t ? t.detail ? `${t.type}:${t.tool}:${t.detail}` : `${t.type}:${t.tool}` : null, T = [
|
|
21
21
|
i > 0 ? `系统已自动重试 ${i} 次` : null,
|
|
22
|
-
|
|
23
|
-
].filter(Boolean).join(","),
|
|
24
|
-
return s ? `${
|
|
22
|
+
E ? "已执行回滚清理" : null
|
|
23
|
+
].filter(Boolean).join(","), a = T ? `。恢复动作:${T}` : "";
|
|
24
|
+
return s ? `${o}:${c}${a}。定位线索:${s}` : `${o}:${c}${a}`;
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
27
|
$ as applyPipelineError,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolSideEffectV1 } from "@inupedia/spotlight-protocol";
|
|
2
|
+
/**
|
|
3
|
+
* ChatGPT / Claude / Cursor: retrieve first, then act.
|
|
4
|
+
* `sideEffect === "none"` (getVideoInfo, lists) → 获取信息.
|
|
5
|
+
* `ui` / `external` (playVideoFullscreen, open/close) → 操作页面.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveToolLane(name: string, sideEffect?: ToolSideEffectV1): "gather" | "act";
|
|
8
|
+
export declare function toolLaneStepId(lane: "gather" | "act"): string;
|
|
9
|
+
export declare function toolLaneStepLabel(lane: "gather" | "act"): string;
|
|
10
|
+
//# sourceMappingURL=toolLane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolLane.d.ts","sourceRoot":"","sources":["../../../src/store/pipeline/toolLane.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAarE;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,gBAAgB,GAC5B,QAAQ,GAAG,KAAK,CAalB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAI7D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAEhE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SPOTLIGHT_PIPELINE_STEP_IDS as n } from "./constants.js";
|
|
2
|
+
import { normalizeToolName as o, isInternalKnowledgeSubtool as a } from "./toolDisplay.js";
|
|
3
|
+
const l = /* @__PURE__ */ new Set([
|
|
4
|
+
"web_search",
|
|
5
|
+
"project_knowledge_search",
|
|
6
|
+
"knowledge.searchweb",
|
|
7
|
+
"knowledge.answer",
|
|
8
|
+
"knowledge.synthesizeanswer"
|
|
9
|
+
]);
|
|
10
|
+
function s(e, r) {
|
|
11
|
+
const t = o(e);
|
|
12
|
+
return l.has(t) || a(e) || r === "none" ? "gather" : r === "ui" || r === "external" ? "act" : /^(get|list|search|query|count|read|inspect|lookup|find)/iu.test(t) ? "gather" : "act";
|
|
13
|
+
}
|
|
14
|
+
function c(e) {
|
|
15
|
+
return e === "gather" ? n.gather : n.act;
|
|
16
|
+
}
|
|
17
|
+
function g(e) {
|
|
18
|
+
return e === "gather" ? "获取信息" : "操作页面";
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
s as resolveToolLane,
|
|
22
|
+
c as toolLaneStepId,
|
|
23
|
+
g as toolLaneStepLabel
|
|
24
|
+
};
|
|
@@ -331,8 +331,8 @@ const Z = f("spotlight", {
|
|
|
331
331
|
const r = n instanceof Error ? n.message : "解析失败";
|
|
332
332
|
this.agentSteps.length === 0 && (this.agentSteps = [
|
|
333
333
|
{
|
|
334
|
-
id: b.
|
|
335
|
-
label: R.
|
|
334
|
+
id: b.understand,
|
|
335
|
+
label: R.understand,
|
|
336
336
|
status: "error",
|
|
337
337
|
content: r
|
|
338
338
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inupedia/spotlight-vue",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.18",
|
|
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-client": "0.5.
|
|
95
|
-
"@inupedia/spotlight-protocol": "0.5.
|
|
94
|
+
"@inupedia/spotlight-client": "0.5.18",
|
|
95
|
+
"@inupedia/spotlight-protocol": "0.5.18"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@inspira-ui/plugins": "^0.0.2",
|