Commit ac1146f1 authored by AI-甘富林's avatar AI-甘富林

feat(experts): add sales champion shortcut entry

parent c6ebeedf
......@@ -15,6 +15,13 @@
"promptFile": "zhihu.md",
"description": "负责知乎回答、文章、选题与知乎平台表达方式优化。"
},
{
"id": "sales-champion",
"name": "销售冠军",
"entryMode": "home-chat-shortcut",
"description": "跳转到首页对话,继续处理销售目标拆解、成交话术、异议处理与转化推进。",
"starterPrompt": "我想以销售冠军的方式推进成交,请帮我梳理目标客户、沟通话术、异议处理和转化动作。"
},
{
"id": "wechat-official-account",
"name": "公众号专家",
......
......@@ -457,6 +457,17 @@ function LeadsExpertIcon() {
);
}
function SalesChampionExpertIcon() {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M8 5.25h8v2.1a4 4 0 0 1-3 3.88v2.02h2.1a1.4 1.4 0 0 1 1.4 1.4V16H7.5v-1.35a1.4 1.4 0 0 1 1.4-1.4H11v-2.02a4 4 0 0 1-3-3.88v-2.1Z" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.8" />
<path d="M8 6.2H5.9A1.65 1.65 0 0 0 4.25 7.85c0 1.74 1.41 3.15 3.15 3.15H8m8-4.8h2.1a1.65 1.65 0 0 1 1.65 1.65c0 1.74-1.41 3.15-3.15 3.15H16" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.6" />
<path d="M9.8 19h4.4M8.9 16h6.2v3H8.9z" fill="currentColor" opacity="0.18" />
<path d="m12 7.55.68 1.38 1.52.22-1.1 1.07.26 1.51L12 11.03l-1.36.7.26-1.51-1.1-1.07 1.52-.22L12 7.55Z" fill="currentColor" />
</svg>
);
}
function renderExpertIcon(expertKey: ExpertVisualKey): ReactNode {
switch (expertKey) {
case "xiaohongshu":
......@@ -479,6 +490,8 @@ function renderExpertIcon(expertKey: ExpertVisualKey): ReactNode {
return <GeoExpertIcon />;
case "leads":
return <LeadsExpertIcon />;
case "sales":
return <SalesChampionExpertIcon />;
case "browser":
return <BrowserExpertIcon />;
default:
......@@ -763,6 +776,15 @@ const mockExpertDefinitions: ExpertDefinition[] = [
promptAvailable: true,
projectMatchKeywords: ["geo"]
},
{
id: "sales-champion",
name: "销售冠军",
entryMode: "home-chat-shortcut",
description: "从首页对话继续处理销售目标拆解、成交话术、异议处理与转化推进。",
starterPrompt: "我想以销售冠军的方式推进成交,请帮我梳理目标客户、沟通话术、异议处理和转化动作。",
promptAvailable: true,
projectMatchKeywords: ["销售冠军", "销冠", "sales champion", "sales-champion"]
},
{
id: "precision-leads",
name: "平台精准线索专家",
......@@ -1293,7 +1315,8 @@ type ExpertVisualKey =
| "tiktok"
| "poster"
| "geo"
| "leads";
| "leads"
| "sales";
function SendRocketIcon() {
return (
......@@ -1630,8 +1653,9 @@ function renderMarkdownContent(
const SIDEBAR_EXPERT_ENTRY_ORDER = new Map<string, number>([
["xhs", 20],
["douyin", 21],
["content-account-planning", 22],
["zhihu", 23],
["sales-champion", 22],
["content-account-planning", 23],
["zhihu", 24],
["wechat-official-account", 30],
["x-platform", 31],
["tiktok", 32],
......@@ -1774,6 +1798,9 @@ function resolveExpertVisualKey(project?: ExpertProject, definition?: ExpertDefi
if (/precision-leads|线索|lead/.test(seed)) {
return "leads";
}
if (/sales-champion|销售冠军|销冠|sales champion/.test(seed)) {
return "sales";
}
if (/poster|海报/.test(seed)) {
return "poster";
}
......
......@@ -119,7 +119,7 @@ const standaloneIds = Array.isArray(experts.standaloneIds) ? experts.standaloneI
const homeShortcutIds = Array.isArray(experts.homeShortcutIds) ? experts.homeShortcutIds.map((value) => String(value || '')).sort() : [];
const standalonePromptAvailableIds = Array.isArray(experts.standalonePromptAvailableIds) ? experts.standalonePromptAvailableIds.map((value) => String(value || '')).sort() : [];
const expectedStandaloneIds = ['content-account-planning', 'zhihu'];
const expectedHomeShortcutIds = ['geo', 'poster', 'precision-leads', 'tiktok', 'wechat-official-account', 'x-platform'];
const expectedHomeShortcutIds = ['geo', 'poster', 'precision-leads', 'sales-champion', 'tiktok', 'wechat-official-account', 'x-platform'];
if (String(sendResult.smokeExpertEntryId || '') !== expectedExpertEntryId) {
throw new Error('Smoke did not report the expected expert entry id: ' + String(sendResult.smokeExpertEntryId || ''));
}
......@@ -129,7 +129,7 @@ if (String(expertEntry.expertId || '') !== expectedExpertEntryId) {
if (standaloneIds.length !== 2) {
throw new Error('Unexpected standalone expert count: ' + standaloneIds.length);
}
if (homeShortcutIds.length !== 6) {
if (homeShortcutIds.length !== 7) {
throw new Error('Unexpected home shortcut count: ' + homeShortcutIds.length);
}
if (standalonePromptAvailableIds.length !== 2) {
......@@ -232,3 +232,4 @@ Invoke-ExpertEntryScenario -ScenarioName 'home-shortcut-tiktok' -SmokeExpertEntr
Invoke-ExpertEntryScenario -ScenarioName 'home-shortcut-poster' -SmokeExpertEntryId 'poster' -BaseOutputDir $BaseOutputDir -ElectronSmokeScript $electronSmokeScript -SmokePort $SmokePort -SmokeToken $SmokeToken -TimeoutSeconds $TimeoutSeconds
Invoke-ExpertEntryScenario -ScenarioName 'home-shortcut-geo' -SmokeExpertEntryId 'geo' -BaseOutputDir $BaseOutputDir -ElectronSmokeScript $electronSmokeScript -SmokePort $SmokePort -SmokeToken $SmokeToken -TimeoutSeconds $TimeoutSeconds
Invoke-ExpertEntryScenario -ScenarioName 'home-shortcut-precision-leads' -SmokeExpertEntryId 'precision-leads' -BaseOutputDir $BaseOutputDir -ElectronSmokeScript $electronSmokeScript -SmokePort $SmokePort -SmokeToken $SmokeToken -TimeoutSeconds $TimeoutSeconds
Invoke-ExpertEntryScenario -ScenarioName 'home-shortcut-sales-champion' -SmokeExpertEntryId 'sales-champion' -BaseOutputDir $BaseOutputDir -ElectronSmokeScript $electronSmokeScript -SmokePort $SmokePort -SmokeToken $SmokeToken -TimeoutSeconds $TimeoutSeconds
......@@ -428,8 +428,8 @@ if (smokeViewMode === 'skills') {
if (standaloneIds.length !== 2) {
throw new Error('Expert-entry smoke did not expose exactly 2 standalone experts: ' + JSON.stringify(standaloneIds));
}
if (homeShortcutIds.length !== 6) {
throw new Error('Expert-entry smoke did not expose exactly 6 home shortcuts: ' + JSON.stringify(homeShortcutIds));
if (homeShortcutIds.length !== 7) {
throw new Error('Expert-entry smoke did not expose exactly 7 home shortcuts: ' + JSON.stringify(homeShortcutIds));
}
if (standalonePromptAvailableIds.length !== 2) {
throw new Error('Expert-entry smoke did not expose prompt availability for both standalone experts: ' + JSON.stringify(standalonePromptAvailableIds));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment