@inupedia/spotlight-vue 0.5.17 → 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/components/SpotlightThinking.vue.d.ts.map +1 -1
- package/dist/components/SpotlightThinking.vue.js +1 -1
- package/dist/components/SpotlightThinking2.vue.js +353 -340
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -57
- package/dist/store/pipeline/displayText.d.ts +11 -0
- package/dist/store/pipeline/displayText.d.ts.map +1 -1
- package/dist/store/pipeline/displayText.js +74 -48
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { useSpotlightMemoryPreferenceStore, readSpotlightMemoryEnabled, } from "
|
|
|
10
10
|
export { getSkillsPoolForRun, loadBundledSkillsFromGlob, parseSpotlightSkillMarkdown, formatSkillsWithinBudget, getBypassMatchedSkills, getModelInvokableSkills, } from "./skills/index.js";
|
|
11
11
|
export { cancelRemoteSpotlightRunForSignal, runRemoteSpotlightPipeline, warmupSpotlightRemoteContext, ensureSpotlightMeta, getSpotlightUiPrompts, spotlightSynthesizeSpeech, spotlightTranscribeAudio, extractTranscriptionText, normalizeSpeakText, postSpotlightJson, getSpotlightJson, type SpotlightUiPrompts, type SpotlightPipelineRunOutcome, } from "./remote/index.js";
|
|
12
12
|
export { TOOL_NAMES } from "./constants/toolNames.js";
|
|
13
|
-
export { getIntentStepDisplayContent, humanizeSpotlightStepContent, isAnswerStep, isToolExecutionStep, sanitizeToolStepAnswerText, splitToolStepContent, composeToolStepContent, isLoopPlanningChunk, splitIntentStepContent, } from "./store/pipeline/displayText.js";
|
|
13
|
+
export { getIntentStepDisplayContent, humanizeSpotlightStepContent, isAnswerStep, isToolExecutionStep, parseGatherProcessDisplay, formatGatherProcessText, sanitizeToolStepAnswerText, splitToolStepContent, composeToolStepContent, isLoopPlanningChunk, splitIntentStepContent, } from "./store/pipeline/displayText.js";
|
|
14
14
|
export { partitionToolCalls } from "./store/pipeline/toolDisplay.js";
|
|
15
15
|
export { isInternalKnowledgeEvidenceTool, isUserFacingKnowledgeTool, } from "./store/pipeline/toolDisplay.js";
|
|
16
16
|
export { TOOL_STEP_ANSWER_DELIMITER } from "./store/pipeline/displayText.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,GAC/B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,+BAA+B,GACrC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,O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ChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACxE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { SPOTLIGHT_CONFIG_KEY as e, defineSpotlightConfig as r } from "./config.js";
|
|
2
|
-
import { readSpotlightEnv as
|
|
2
|
+
import { readSpotlightEnv as p } from "./env.js";
|
|
3
3
|
import { mergeSpotlightSkills as i } from "./host/mergeSkills.js";
|
|
4
|
-
import { SPOTLIGHT_CLIENT_TOOLS_KEY as
|
|
5
|
-
import { useSpotlightStore as
|
|
6
|
-
import { INVESTMENT_SUB_INTENT_LABELS as I, InvestmentSubIntent as _, PROGRESS_SUB_INTENT_LABELS as u, ProgressSubIntent as L, QUALITY_SUB_INTENT_LABELS as
|
|
7
|
-
import { useSpotlightRuntimeStore as
|
|
4
|
+
import { SPOTLIGHT_CLIENT_TOOLS_KEY as s, SPOTLIGHT_HTTP_KEY as g, SpotlightVue as T, getSpotlightClientTools as m, getSpotlightConfig as a, getSpotlightHttp as h } from "./plugin.js";
|
|
5
|
+
import { useSpotlightStore as E } from "./store/spotlightStore.js";
|
|
6
|
+
import { INVESTMENT_SUB_INTENT_LABELS as I, InvestmentSubIntent as _, PROGRESS_SUB_INTENT_LABELS as u, ProgressSubIntent as L, QUALITY_SUB_INTENT_LABELS as P, QualitySubIntent as d, SAFETY_SUB_INTENT_LABELS as N, SPOTLIGHT_INTENT_LABELS as c, SUB_INTENT_CONFIG as C, SafetySubIntent as O, SpotlightCommandDomain as k, SpotlightCommandScope as A, SpotlightIntent as B } from "./store/types.js";
|
|
7
|
+
import { useSpotlightRuntimeStore as w } from "./store/runtimeStore.js";
|
|
8
8
|
import { useAgentSessionStore as R } from "./session/agentSession.js";
|
|
9
|
-
import { readSpotlightMemoryEnabled as
|
|
9
|
+
import { readSpotlightMemoryEnabled as H, useSpotlightMemoryPreferenceStore as U } from "./store/memoryPreferenceStore.js";
|
|
10
10
|
import { getSkillsPoolForRun as F, loadBundledSkillsFromGlob as K } from "./skills/index.js";
|
|
11
|
-
import { cancelRemoteSpotlightRunForSignal as
|
|
11
|
+
import { cancelRemoteSpotlightRunForSignal as D, runRemoteSpotlightPipeline as Y, warmupSpotlightRemoteContext as z } from "./remote/runPipeline.js";
|
|
12
12
|
import { ensureSpotlightMeta as J, getSpotlightUiPrompts as V } from "./remote/meta.js";
|
|
13
13
|
import { extractTranscriptionText as j, normalizeSpeakText as q, spotlightSynthesizeSpeech as X, spotlightTranscribeAudio as Z } from "./remote/audio.js";
|
|
14
14
|
import { getSpotlightJson as tt, postSpotlightJson as ot } from "./remote/serverJson.js";
|
|
15
15
|
import { TOOL_NAMES as rt } from "./constants/toolNames.js";
|
|
16
|
-
import { TOOL_STEP_ANSWER_DELIMITER as
|
|
17
|
-
import { isInternalKnowledgeEvidenceTool as
|
|
18
|
-
import { SPOTLIGHT_PIPELINE_STEP_IDS as
|
|
19
|
-
import { formatSpotlightKnowledgeMarkdown as
|
|
20
|
-
import { formatToolFailure as
|
|
21
|
-
import { getSuggestedQuestions as
|
|
22
|
-
import { useSpotlightPanelUi as
|
|
23
|
-
import { useSpotlightCommandShortcuts as
|
|
24
|
-
import { isGenericHostExecutionReply as
|
|
25
|
-
import { formatSkillsWithinBudget as
|
|
26
|
-
import { getBypassMatchedSkills as
|
|
27
|
-
import { parseSpotlightSkillMarkdown as
|
|
16
|
+
import { TOOL_STEP_ANSWER_DELIMITER as pt, composeToolStepContent as nt, formatGatherProcessText as it, getIntentStepDisplayContent as lt, humanizeSpotlightStepContent as st, isAnswerStep as gt, isLoopPlanningChunk as Tt, isToolExecutionStep as mt, parseGatherProcessDisplay as at, sanitizeToolStepAnswerText as ht, splitIntentStepContent as ft, splitToolStepContent as Et } from "./store/pipeline/displayText.js";
|
|
17
|
+
import { isInternalKnowledgeEvidenceTool as It, isUserFacingKnowledgeTool as _t, partitionToolCalls as ut } from "./store/pipeline/toolDisplay.js";
|
|
18
|
+
import { SPOTLIGHT_PIPELINE_STEP_IDS as Pt, SPOTLIGHT_PIPELINE_STEP_LABELS as dt } from "./store/pipeline/constants.js";
|
|
19
|
+
import { formatSpotlightKnowledgeMarkdown as ct, initSpotlightMarkdownPreview as Ct, preprocessKnowledgeMarkdown as Ot } from "./store/pipeline/spotlightMarkdown.js";
|
|
20
|
+
import { formatToolFailure as At } from "./store/pipeline/errors.js";
|
|
21
|
+
import { getSuggestedQuestions as Gt } from "./store/capabilities.js";
|
|
22
|
+
import { useSpotlightPanelUi as Mt } from "./composables/useSpotlightPanelUi.js";
|
|
23
|
+
import { useSpotlightCommandShortcuts as yt } from "./composables/useSpotlightCommandShortcuts.js";
|
|
24
|
+
import { isGenericHostExecutionReply as Ut } from "./avatar/speech/live2dAnswerSpeechPolicy.js";
|
|
25
|
+
import { formatSkillsWithinBudget as Ft } from "./skills/skillListing.js";
|
|
26
|
+
import { getBypassMatchedSkills as vt, getModelInvokableSkills as Dt } from "./skills/matching.js";
|
|
27
|
+
import { parseSpotlightSkillMarkdown as zt } from "./skills/parser.js";
|
|
28
28
|
export {
|
|
29
29
|
I as INVESTMENT_SUB_INTENT_LABELS,
|
|
30
30
|
_ as InvestmentSubIntent,
|
|
31
31
|
u as PROGRESS_SUB_INTENT_LABELS,
|
|
32
32
|
L as ProgressSubIntent,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
P as QUALITY_SUB_INTENT_LABELS,
|
|
34
|
+
d as QualitySubIntent,
|
|
35
35
|
N as SAFETY_SUB_INTENT_LABELS,
|
|
36
|
-
|
|
36
|
+
s as SPOTLIGHT_CLIENT_TOOLS_KEY,
|
|
37
37
|
e as SPOTLIGHT_CONFIG_KEY,
|
|
38
|
-
|
|
38
|
+
g as SPOTLIGHT_HTTP_KEY,
|
|
39
39
|
c as SPOTLIGHT_INTENT_LABELS,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
Pt as SPOTLIGHT_PIPELINE_STEP_IDS,
|
|
41
|
+
dt as SPOTLIGHT_PIPELINE_STEP_LABELS,
|
|
42
42
|
C as SUB_INTENT_CONFIG,
|
|
43
43
|
O as SafetySubIntent,
|
|
44
44
|
k as SpotlightCommandDomain,
|
|
@@ -46,53 +46,55 @@ export {
|
|
|
46
46
|
B as SpotlightIntent,
|
|
47
47
|
T as SpotlightVue,
|
|
48
48
|
rt as TOOL_NAMES,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
pt as TOOL_STEP_ANSWER_DELIMITER,
|
|
50
|
+
D as cancelRemoteSpotlightRunForSignal,
|
|
51
|
+
nt as composeToolStepContent,
|
|
52
52
|
r as defineSpotlightConfig,
|
|
53
53
|
J as ensureSpotlightMeta,
|
|
54
54
|
j as extractTranscriptionText,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
it as formatGatherProcessText,
|
|
56
|
+
Ft as formatSkillsWithinBudget,
|
|
57
|
+
ct as formatSpotlightKnowledgeMarkdown,
|
|
58
|
+
At as formatToolFailure,
|
|
59
|
+
vt as getBypassMatchedSkills,
|
|
60
|
+
lt as getIntentStepDisplayContent,
|
|
61
|
+
Dt as getModelInvokableSkills,
|
|
61
62
|
F as getSkillsPoolForRun,
|
|
62
63
|
m as getSpotlightClientTools,
|
|
63
64
|
a as getSpotlightConfig,
|
|
64
65
|
h as getSpotlightHttp,
|
|
65
66
|
tt as getSpotlightJson,
|
|
66
67
|
V as getSpotlightUiPrompts,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
Gt as getSuggestedQuestions,
|
|
69
|
+
st as humanizeSpotlightStepContent,
|
|
70
|
+
Ct as initSpotlightMarkdownPreview,
|
|
70
71
|
gt as isAnswerStep,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
Ut as isGenericHostExecutionReply,
|
|
73
|
+
It as isInternalKnowledgeEvidenceTool,
|
|
74
|
+
Tt as isLoopPlanningChunk,
|
|
75
|
+
mt as isToolExecutionStep,
|
|
76
|
+
_t as isUserFacingKnowledgeTool,
|
|
76
77
|
K as loadBundledSkillsFromGlob,
|
|
77
78
|
i as mergeSpotlightSkills,
|
|
78
79
|
q as normalizeSpeakText,
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
at as parseGatherProcessDisplay,
|
|
81
|
+
zt as parseSpotlightSkillMarkdown,
|
|
82
|
+
ut as partitionToolCalls,
|
|
81
83
|
ot as postSpotlightJson,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
Ot as preprocessKnowledgeMarkdown,
|
|
85
|
+
p as readSpotlightEnv,
|
|
86
|
+
H as readSpotlightMemoryEnabled,
|
|
87
|
+
Y as runRemoteSpotlightPipeline,
|
|
88
|
+
ht as sanitizeToolStepAnswerText,
|
|
89
|
+
ft as splitIntentStepContent,
|
|
90
|
+
Et as splitToolStepContent,
|
|
89
91
|
X as spotlightSynthesizeSpeech,
|
|
90
92
|
Z as spotlightTranscribeAudio,
|
|
91
93
|
R as useAgentSessionStore,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
yt as useSpotlightCommandShortcuts,
|
|
95
|
+
U as useSpotlightMemoryPreferenceStore,
|
|
96
|
+
Mt as useSpotlightPanelUi,
|
|
97
|
+
w as useSpotlightRuntimeStore,
|
|
98
|
+
E as useSpotlightStore,
|
|
99
|
+
z as warmupSpotlightRemoteContext
|
|
98
100
|
};
|
|
@@ -14,6 +14,17 @@ 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;
|
|
18
29
|
export declare function isAnswerStep(stepId: string): boolean;
|
|
19
30
|
/** 判断是否为 query loop 写入的规划摘要块(「第 N 轮:…」)。 */
|
|
@@ -1 +1 @@
|
|
|
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,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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,96 +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
|
-
|
|
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;
|
|
62
86
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
65
|
-
|
|
87
|
+
function D(t) {
|
|
88
|
+
return m.test(
|
|
89
|
+
o(t).trimStart()
|
|
66
90
|
);
|
|
67
91
|
}
|
|
68
|
-
function
|
|
69
|
-
const n =
|
|
92
|
+
function k(t) {
|
|
93
|
+
const n = o(t).trim();
|
|
70
94
|
if (!n) return { intent: "", misplacedPlanning: "" };
|
|
71
95
|
const e = n.search(/\n\n第 \d+ 轮:/u);
|
|
72
96
|
return e >= 0 ? {
|
|
73
97
|
intent: n.slice(0, e).trim(),
|
|
74
98
|
misplacedPlanning: n.slice(e).trim()
|
|
75
|
-
} :
|
|
99
|
+
} : m.test(n) ? { intent: "", misplacedPlanning: n } : { intent: n, misplacedPlanning: "" };
|
|
76
100
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
101
|
+
function x(t) {
|
|
102
|
+
return k(t).intent;
|
|
79
103
|
}
|
|
80
|
-
function
|
|
81
|
-
const n =
|
|
82
|
-
return n ? n.replace(
|
|
104
|
+
function B(t) {
|
|
105
|
+
const n = o(t).trim();
|
|
106
|
+
return n ? n.replace(L, "").trim() : "";
|
|
83
107
|
}
|
|
84
108
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
96
122
|
};
|
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",
|