- BFF 薄适配层(FastAPI,8090):QA 代理/SSE 中继/Neo4j 直连/抽取代理/会话持久化 - Vue3 前端:五相位检索流水线、文献来源与证据链、知识图谱、提取任务四 tab - 四档响应式(桌面/笔记本/平板/手机)、深浅主题 - 81 个 FR 全部实现,测试追溯矩阵 81/81,后端 121 测/前端 156 测 - 真实凭据已脱敏,运行时配置在 backend/.env(不入 git) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
179 lines
5.9 KiB
JavaScript
179 lines
5.9 KiB
JavaScript
// i18n/labels.js —— 全局中文文案与映射表(PM 独占,只读)
|
||
// 所有组件文案从本文件引用,组件内不写死中文字符串(后端返回的 error.message 除外)
|
||
|
||
export const APP_NAME = '海古纪 PlantAI';
|
||
export const APP_TITLE = '知识工作台';
|
||
export const VERSION = 'PlantAI RAG v0.1';
|
||
|
||
export const STATUS_LABEL = {
|
||
running: '运行中',
|
||
done: '已完成',
|
||
error: '失败',
|
||
idle: '排队中',
|
||
ready: '就绪',
|
||
};
|
||
|
||
export const PHASE_LABEL = {
|
||
planning: '规划',
|
||
retrieval: '检索',
|
||
evidence: '证据',
|
||
generation: '生成',
|
||
done: '完成',
|
||
};
|
||
|
||
export const PHASE_COLOR_VAR = {
|
||
planning: '--pa-t-planning',
|
||
retrieval: '--pa-t-execution',
|
||
evidence: '--pa-t-knowledge',
|
||
generation: '--pa-t-validation',
|
||
done: '--pa-t-done',
|
||
};
|
||
|
||
export const PHASE_DESC = {
|
||
planning: '意图理解与实体识别',
|
||
retrieval: '多路检索与子问题召回',
|
||
evidence: '证据筛选与交叉验证',
|
||
generation: '答案生成与引用锚定',
|
||
done: '检索完成',
|
||
};
|
||
|
||
// SSE stage → 相位映射(与 BFF sse_relay 保持一致;BFF 已算 phase,此表仅作校验与调试兜底)
|
||
export const STAGE_PHASE = {
|
||
understanding_started: 'planning',
|
||
entities_identified: 'planning',
|
||
related_search_started: 'planning',
|
||
concepts_found: 'retrieval',
|
||
subquestion_retrieved: 'retrieval',
|
||
agent_review_started: 'retrieval',
|
||
subquestion_retry_started: 'retrieval',
|
||
evidence_accepted: 'evidence',
|
||
evidence_review_completed: 'evidence',
|
||
answer_generation_started: 'generation',
|
||
completed: 'done',
|
||
};
|
||
|
||
export const BENCH_TABS = [
|
||
{ key: 'retrieval', label: '检索过程' },
|
||
{ key: 'sources', label: '文献来源' },
|
||
{ key: 'extract', label: '提取任务' },
|
||
{ key: 'kg', label: '知识图谱' },
|
||
];
|
||
|
||
export const TOOL_FILTERS = [
|
||
{ key: 'all', label: '全部' },
|
||
{ key: 'planning', label: '规划' },
|
||
{ key: 'retrieval', label: '检索' },
|
||
{ key: 'evidence', label: '证据' },
|
||
{ key: 'generation', label: '生成' },
|
||
];
|
||
|
||
export const MODES = [
|
||
{ key: 'ask', label: '问答' },
|
||
{ key: 'plan', label: '方案' },
|
||
{ key: 'search', label: '检索' },
|
||
];
|
||
|
||
export const SESSION_GROUPS = ['今天', '昨天', '更早'];
|
||
|
||
export const SUGGEST_CARDS = [
|
||
{
|
||
icon: '🧬',
|
||
name: '基因家族功能',
|
||
desc: '查询 SPL / MADS-box / WRKY 等家族的功能与调控网络',
|
||
text: '水稻SPL基因家族的功能研究有哪些关键进展?',
|
||
},
|
||
{
|
||
icon: '🌳',
|
||
name: '家族鉴定与进化',
|
||
desc: '某物种中某家族的成员数量与系统发育关系',
|
||
text: '拟南芥HD-ZIP转录因子家族的成员组成与进化关系?',
|
||
},
|
||
{
|
||
icon: '📊',
|
||
name: '表达与证据链',
|
||
desc: '基因在不同组织中的表达模式与文献证据',
|
||
text: 'OsSPL14 在水稻穗部的表达模式及其调控网络证据?',
|
||
},
|
||
];
|
||
|
||
export const T = {
|
||
newTask: '新建会话',
|
||
searchPlaceholder: '搜索会话…',
|
||
noMatch: '无匹配会话',
|
||
railSession: '会话',
|
||
railKg: '知识图谱',
|
||
railSettings: '设置',
|
||
composerPlaceholder: '输入你的问题,例如:水稻SPL基因家族的功能研究有哪些关键进展?',
|
||
composerHint: 'Enter 换行 · ⌘/Ctrl + Enter 发送',
|
||
send: '发送',
|
||
stop: '停止',
|
||
skipReveal: '跳过',
|
||
backToLatest: '回到最新',
|
||
assistantName: 'PlantAI 智能体',
|
||
pipelineTitle: '⚙ 检索流水线',
|
||
stepDone: '已完成',
|
||
stepRunning: '运行中',
|
||
stepWaiting: '等待',
|
||
interrupted: '已中断',
|
||
stopped: '已停止',
|
||
retry: '重试',
|
||
disconnected: '连接中断,请检查网络后重试',
|
||
timeoutMsg: '检索超时,请重试',
|
||
citationError: '引用校验失败,请重试',
|
||
qaDown: '知识问答服务当前不可用,请稍后重试',
|
||
kgDown: '知识图谱服务离线,实体搜索与邻域浏览暂不可用',
|
||
extractionDown: '提取任务服务离线',
|
||
sourcesTitle: '文献来源',
|
||
sourceEmpty: '本次检索未命中文献',
|
||
retrievalEmpty: '发起提问后,这里会实时展示检索过程',
|
||
retrievalPlanTitle: '检索计划',
|
||
pipelineInfoTitle: '检索流水线(QA v1.1.73)',
|
||
extractEmpty: '暂无抽取任务',
|
||
extractUpload: '上传论文 PDF',
|
||
extractUploadLimit: '仅支持 PDF,单文件 ≤50MB',
|
||
extractUploadFail: '上传失败:',
|
||
kgEmpty: '本次检索未产生图谱关系,可使用下方搜索浏览知识库',
|
||
kgSearchPlaceholder: '搜索实体名,如 OsSPL14',
|
||
chainBadge: '跳',
|
||
sessionEmptyTitle: '海古纪 PlantAI 知识工作台',
|
||
sessionEmptySub: '基于文献知识库的基因家族问答 —— 每一次提问都有证据锚定',
|
||
independentQuestionNote: '每次提问独立检索,不携带上文语境',
|
||
confirmDeleteTitle: '删除会话',
|
||
confirmDeleteBody: '删除后会话与全部消息不可恢复,确认删除?',
|
||
confirm: '确认',
|
||
cancel: '取消',
|
||
renamePlaceholder: '会话标题',
|
||
loading: '加载中…',
|
||
streamEvents: '阶段事件',
|
||
sourceCount: '来源',
|
||
score: '分数',
|
||
sessionSources: '本次回答',
|
||
sessionAllSources: '本会话全部',
|
||
labelGroup: '分组',
|
||
kgNeighborhood: '邻域',
|
||
kgDepth: '深度',
|
||
kgEntityDetail: '实体详情',
|
||
upstreamError: '服务暂时不可用',
|
||
// —— 工作台文案(原 B3 benchLabels.js 合并,2026-08-25)——
|
||
extractRunLog: '运行日志',
|
||
kgSearch: '搜索',
|
||
kgDepth2SlowHint: '(深度 2 较慢,约 13s)',
|
||
kgDepth2NeighborhoodSlow: '(深度 2 检索较慢)',
|
||
kgDegradedListPrefix: '节点数超过',
|
||
kgDegradedListSuffix: ',已降级为列表视图(仍可搜索实体浏览邻域)',
|
||
kgNodeUnit: '节点',
|
||
kgEdgeUnit: '边',
|
||
kgRelationUnit: '关系',
|
||
benchExpand: '展开工作台',
|
||
benchCollapse: '折叠工作台',
|
||
close: '关闭',
|
||
resetView: '复位视图',
|
||
stageLabel: '阶段',
|
||
paramsLabel: '参数',
|
||
// —— B2 补充(2026-08-25 PM 集成)——
|
||
toolParams: '参数',
|
||
toolResult: '输出',
|
||
toolLog: '日志',
|
||
graphSummary: '知识图谱',
|
||
};
|