refactor(i18n): 全工程面向国际用户与全球现代商务重构,彻底清理出海跨境等单向视角表达并对齐自动化测试
这个提交包含在:
@@ -54,13 +54,13 @@ describe('T31 DeepSeek 大模型集成与适配服务 (deepseek.ts)', () => {
|
||||
it('2.1 buildSystemPrompt 组装名片主、人设与知识库切片', () => {
|
||||
const card = {
|
||||
name: '张总',
|
||||
company: '华强出海科技',
|
||||
title: '海外商务总监',
|
||||
company: '华强全球科技',
|
||||
title: '国际商务总监',
|
||||
};
|
||||
const concierge = {
|
||||
personaType: 'trade_expert' as const,
|
||||
toneStyle: 'professional' as const,
|
||||
promptTemplate: '你是一名资深出海贸易专家,精通中东与东南亚市场。',
|
||||
promptTemplate: '你是一名资深国际贸易专家,精通中东与东南亚市场。',
|
||||
};
|
||||
const chunks = [
|
||||
{ index: 1, content: '支持信用证结算与 FOB 迪拜港条款。' },
|
||||
@@ -70,9 +70,9 @@ describe('T31 DeepSeek 大模型集成与适配服务 (deepseek.ts)', () => {
|
||||
const systemPrompt = service.buildSystemPrompt(card, concierge, chunks);
|
||||
|
||||
expect(systemPrompt).toContain('张总');
|
||||
expect(systemPrompt).toContain('华强出海科技');
|
||||
expect(systemPrompt).toContain('海外商务总监');
|
||||
expect(systemPrompt).toContain('你是一名资深出海贸易专家');
|
||||
expect(systemPrompt).toContain('华强全球科技');
|
||||
expect(systemPrompt).toContain('国际商务总监');
|
||||
expect(systemPrompt).toContain('你是一名资深国际贸易专家');
|
||||
expect(systemPrompt).toContain('支持信用证结算与 FOB 迪拜港条款。');
|
||||
expect(systemPrompt).toContain('最小起订量 (MOQ) 为 500 台。');
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ function localizeReq(
|
||||
};
|
||||
}
|
||||
|
||||
describe('T39: AI 出海润色 (modules/ai localize)', () => {
|
||||
describe('T39: AI 多语言本地化润色 (modules/ai localize)', () => {
|
||||
describe('1. AiLocalizeService.localize 入参校验', () => {
|
||||
let service: AiLocalizeService;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ describe('Point 47: AI 销售潜客智能跟进邮件/消息地道草拟引擎',
|
||||
service = new AiOutreachDraftService();
|
||||
});
|
||||
|
||||
describe('1. formatOutreachPrompt (出海商务邮件地道提示词组装)', () => {
|
||||
describe('1. formatOutreachPrompt (全球商务邮件地道提示词组装)', () => {
|
||||
it('英语场景应包含地道商务开场、兴趣针对性提及与日程预约呼吁', () => {
|
||||
const req: OutreachDraftRequest = {
|
||||
leadName: 'Arthur Pendelton',
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('Point 07: AI 知识库分块切片与召回沙盒 (modules/ai knowledg
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
content: '雷达系统支持出海 CRM 访客轨迹追踪、停留时长与意向度自动评分。',
|
||||
content: '雷达系统支持智能 CRM 访客轨迹追踪、停留时长与意向度自动评分。',
|
||||
length: 33,
|
||||
},
|
||||
{
|
||||
@@ -150,10 +150,10 @@ describe('Point 07: AI 知识库分块切片与召回沙盒 (modules/ai knowledg
|
||||
|
||||
it('应兼容接收纯字符串数组 chunks', () => {
|
||||
const stringChunks = [
|
||||
'出海多语言支持英文、中文、阿拉伯语',
|
||||
'国际多语言支持英文、中文、阿拉伯语',
|
||||
'国内网络环境配置说明',
|
||||
];
|
||||
const results = service.simulateRetrieval('阿拉伯语 出海', stringChunks, 2);
|
||||
const results = service.simulateRetrieval('阿拉伯语 国际多语言', stringChunks, 2);
|
||||
expect(results.length).toBe(1);
|
||||
expect(results[0].content).toContain('阿拉伯语');
|
||||
expect(results[0].score).toBeGreaterThan(0);
|
||||
|
||||
@@ -12,7 +12,7 @@ describe('Point 61 (P1): AI 对话客商意图与情绪极性分析引擎', () =
|
||||
analyzer = new AiSentimentIntentAnalyzer();
|
||||
});
|
||||
|
||||
describe('1. analyzeConversationIntent (出海商务意图识别)', () => {
|
||||
describe('1. analyzeConversationIntent (商务意图识别)', () => {
|
||||
it('包含价格、报价、起订量或购买关键词应识别为 PURCHASE_INTENT', () => {
|
||||
const msgs = [
|
||||
'Hello, what is the MOQ for 500 NFC metal cards?',
|
||||
|
||||
在新工单中引用
屏蔽一个用户