merge: preserve multilingual UI with main-agent fixes
This commit is contained in:
+185
-181
File diff suppressed because it is too large
Load Diff
+70
-15
@@ -57,6 +57,8 @@ GF_MAS_ROOT = Path(os.environ.get("GF_MAS_ROOT", "/home/xzq/gene-family-mas-v2")
|
||||
if GF_MAS_ROOT.exists() and str(GF_MAS_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(GF_MAS_ROOT))
|
||||
PLANTAI_RAG_ROOT = Path(os.environ.get("PLANTAI_RAG_ROOT", "/home/xzq/PlantAI-rag")).expanduser()
|
||||
|
||||
DEFAULT_AGENT_LANG = "zh"
|
||||
if PLANTAI_RAG_ROOT.exists() and str(PLANTAI_RAG_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(PLANTAI_RAG_ROOT))
|
||||
|
||||
@@ -16426,6 +16428,7 @@ class AgentChatRequest(BaseModel):
|
||||
session_id: str = ""
|
||||
job_id: str = "" # 当前 job_id,用于查询已完成 stages
|
||||
history: list = []
|
||||
language: str = DEFAULT_AGENT_LANG # "zh" or "en"
|
||||
|
||||
|
||||
methodology_sandbox_registry_cache: Dict[str, str] = {}
|
||||
@@ -17138,6 +17141,11 @@ async def _run_agent_chat(
|
||||
executes analysis stages here.
|
||||
"""
|
||||
session_id = request.session_id or f"session_{int(time.time())}"
|
||||
# Inject language instruction for non-Chinese languages
|
||||
if request.language and request.language != DEFAULT_AGENT_LANG:
|
||||
lang_map = {"en": "Please respond in English."}
|
||||
lang_instruction = lang_map.get(request.language, f"Please respond in {request.language}.")
|
||||
request.message = f"{lang_instruction}\n\n{request.message}"
|
||||
completed_stages: list[str] = []
|
||||
if request.job_id:
|
||||
final_dir = PROJECT_ROOT / "workspace" / request.job_id / "final"
|
||||
@@ -17443,6 +17451,7 @@ async def _run_agent_chat(
|
||||
"history": list(request.history or []),
|
||||
"session_id": session_id,
|
||||
"job_id": request.job_id,
|
||||
"language": request.language,
|
||||
}
|
||||
if router_goal_ledger is not None:
|
||||
payload["goal_ledger"] = router_goal_ledger
|
||||
@@ -17693,25 +17702,47 @@ async def agent_chat(request: AgentChatRequest):
|
||||
AGENT_CHAT_HEARTBEAT_SECONDS = 5.0
|
||||
|
||||
_AGENT_CHAT_TOOL_PROGRESS = {
|
||||
"inspect_project_context": ("正在读取当前 job 的项目状态……", "当前 job 状态读取完成,主 Agent 正在继续处理……"),
|
||||
"inspect_analysis_results": ("正在读取当前 job 的分析结果……", "分析结果读取完成,主 Agent 正在继续处理……"),
|
||||
"inspect_job_file": ("正在读取当前 job 中的文件……", "文件读取完成,主 Agent 正在继续处理……"),
|
||||
"query_plantai_rag": ("正在检索知识库……", "知识库检索完成,主 Agent 正在继续处理……"),
|
||||
"recognize_analysis_intent": ("正在识别分析需求……", "分析需求识别完成,主 Agent 正在继续处理……"),
|
||||
"recognize_utility_intent": ("正在识别工具需求……", "工具需求识别完成,主 Agent 正在继续处理……"),
|
||||
"inspect_project_context": {
|
||||
"zh": ("正在读取当前 job 的项目状态……", "当前 job 状态读取完成,主 Agent 正在继续处理……"),
|
||||
"en": ("Reading current job project status...", "Job status read complete; agent continuing..."),
|
||||
},
|
||||
"inspect_analysis_results": {
|
||||
"zh": ("正在读取当前 job 的分析结果……", "分析结果读取完成,主 Agent 正在继续处理……"),
|
||||
"en": ("Reading current job analysis results...", "Analysis results read complete; agent continuing..."),
|
||||
},
|
||||
"inspect_job_file": {
|
||||
"zh": ("正在读取当前 job 中的文件……", "文件读取完成,主 Agent 正在继续处理……"),
|
||||
"en": ("Reading current job files...", "File read complete; agent continuing..."),
|
||||
},
|
||||
"query_plantai_rag": {
|
||||
"zh": ("正在检索知识库……", "知识库检索完成,主 Agent 正在继续处理……"),
|
||||
"en": ("Searching knowledge base...", "Knowledge base search complete; agent continuing..."),
|
||||
},
|
||||
"recognize_analysis_intent": {
|
||||
"zh": ("正在识别分析需求……", "分析需求识别完成,主 Agent 正在继续处理……"),
|
||||
"en": ("Recognizing analysis intent...", "Analysis intent recognized; agent continuing..."),
|
||||
},
|
||||
"recognize_utility_intent": {
|
||||
"zh": ("正在识别工具需求……", "工具需求识别完成,主 Agent 正在继续处理……"),
|
||||
"en": ("Recognizing utility intent...", "Utility intent recognized; agent continuing..."),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _agent_chat_progress_payload(event: dict, elapsed_seconds: int) -> dict:
|
||||
def _agent_chat_progress_payload(event: dict, elapsed_seconds: int, language: str = "zh") -> dict:
|
||||
stage = str(event.get("stage") or "")
|
||||
tool = str(event.get("tool") or "")
|
||||
messages = _AGENT_CHAT_TOOL_PROGRESS.get(tool)
|
||||
pair = _AGENT_CHAT_TOOL_PROGRESS.get(tool, {})
|
||||
messages = pair.get(language) or pair.get("zh")
|
||||
if stage == "tool_started" and messages:
|
||||
message = messages[0]
|
||||
elif stage == "tool_completed" and messages:
|
||||
message = messages[1]
|
||||
else:
|
||||
message = "主 Agent 正在处理请求……"
|
||||
message = {
|
||||
"zh": "主 Agent 正在处理请求……",
|
||||
"en": "Main Agent is processing your request...",
|
||||
}.get(language, "主 Agent 正在处理请求……")
|
||||
return {
|
||||
"stage": stage or "agent_running",
|
||||
"tool": tool,
|
||||
@@ -17726,6 +17757,8 @@ def _agent_chat_sse(event_name: str, payload: dict) -> str:
|
||||
|
||||
@app.post("/api/agent/chat/stream")
|
||||
async def agent_chat_stream(request: AgentChatRequest, http_request: Request):
|
||||
lang = request.language or DEFAULT_AGENT_LANG
|
||||
|
||||
async def event_stream():
|
||||
started_at = time.monotonic()
|
||||
progress_queue: asyncio.Queue[dict] = asyncio.Queue()
|
||||
@@ -17740,7 +17773,10 @@ async def agent_chat_stream(request: AgentChatRequest, http_request: Request):
|
||||
"progress",
|
||||
{
|
||||
"stage": "agent_started",
|
||||
"message": "正在理解你的问题并确定所需信息……",
|
||||
"message": {
|
||||
"zh": "正在理解你的问题并确定所需信息……",
|
||||
"en": "Understanding your question and determining required information...",
|
||||
}.get(lang, "正在理解你的问题并确定所需信息……"),
|
||||
"elapsed_seconds": 0,
|
||||
},
|
||||
)
|
||||
@@ -17760,7 +17796,10 @@ async def agent_chat_stream(request: AgentChatRequest, http_request: Request):
|
||||
"heartbeat",
|
||||
{
|
||||
"stage": "agent_running",
|
||||
"message": f"主 Agent 仍在处理,已用时 {elapsed} 秒……",
|
||||
"message": {
|
||||
"zh": f"主 Agent 仍在处理,已用时 {elapsed} 秒……",
|
||||
"en": f"Main Agent is still processing, {elapsed} s elapsed...",
|
||||
}.get(lang, f"主 Agent 仍在处理,已用时 {elapsed} 秒……"),
|
||||
"elapsed_seconds": elapsed,
|
||||
},
|
||||
)
|
||||
@@ -17768,7 +17807,7 @@ async def agent_chat_stream(request: AgentChatRequest, http_request: Request):
|
||||
elapsed = int(time.monotonic() - started_at)
|
||||
yield _agent_chat_sse(
|
||||
"progress",
|
||||
_agent_chat_progress_payload(event, elapsed),
|
||||
_agent_chat_progress_payload(event, elapsed, language=lang),
|
||||
)
|
||||
|
||||
result = await runner
|
||||
@@ -18213,6 +18252,7 @@ class AgentExecuteRequest(BaseModel):
|
||||
model: str = "kimi"
|
||||
history: list = []
|
||||
auto_execute: bool = True # 是否自动执行分析
|
||||
language: str = DEFAULT_AGENT_LANG # "zh" or "en"
|
||||
|
||||
class AgentStatusResponse(BaseModel):
|
||||
"""Agent状态响应"""
|
||||
@@ -18232,12 +18272,20 @@ async def agent_execute(request: AgentExecuteRequest, background_tasks: Backgrou
|
||||
与/agent/chat不同,此接口会实际执行分析流程
|
||||
"""
|
||||
task_id = f"agent_task_{int(time.time())}_{uuid.uuid4().hex[:8]}"
|
||||
|
||||
|
||||
# Inject language instruction for non-Chinese languages
|
||||
message = request.message
|
||||
lang = getattr(request, "language", DEFAULT_AGENT_LANG)
|
||||
if lang and lang != DEFAULT_AGENT_LANG:
|
||||
lang_map = {"en": "Please respond in English."}
|
||||
lang_instruction = lang_map.get(lang, f"Please respond in {lang}.")
|
||||
message = f"{lang_instruction}\n\n{request.message}"
|
||||
|
||||
# 初始化任务状态
|
||||
agent_tasks[task_id] = {
|
||||
"task_id": task_id,
|
||||
"status": "pending",
|
||||
"message": request.message,
|
||||
"message": message,
|
||||
"job_id": request.job_id,
|
||||
"prefix": request.prefix,
|
||||
"current_stage": "",
|
||||
@@ -18276,7 +18324,7 @@ async def agent_execute(request: AgentExecuteRequest, background_tasks: Backgrou
|
||||
# 提交任务到Celery队列
|
||||
celery_task = execute_agent_task.delay(
|
||||
task_id=task_id,
|
||||
message=request.message,
|
||||
message=message,
|
||||
session_id=request.session_id or task_id,
|
||||
job_id=request.job_id, # 传入选中的 job_id
|
||||
history=request.history if request.history else [],
|
||||
@@ -18503,6 +18551,7 @@ class AgentPlanRequest(BaseModel):
|
||||
prefix: str = ""
|
||||
history: list = []
|
||||
intent: dict = {} # 前端可传入已有的intent,避免重复调用IntentAgentV2
|
||||
language: str = DEFAULT_AGENT_LANG # "zh" or "en"
|
||||
|
||||
|
||||
def _authorized_workflow_action_stages(intent: Dict[str, Any]) -> List[str]:
|
||||
@@ -20529,6 +20578,11 @@ async def agent_plan(request: AgentPlanRequest):
|
||||
"""
|
||||
try:
|
||||
session_id = request.session_id or f"session_{int(time.time())}"
|
||||
# Inject language instruction for non-Chinese languages
|
||||
if request.language and request.language != DEFAULT_AGENT_LANG:
|
||||
lang_map = {"en": "Please respond in English."}
|
||||
lang_instruction = lang_map.get(request.language, f"Please respond in {request.language}.")
|
||||
request.message = f"{lang_instruction}\n\n{request.message}"
|
||||
methodology_plan, methodology_intent, methodology_params = _load_methodology_plan_for_agent_request(request)
|
||||
if methodology_plan == {}:
|
||||
return {
|
||||
@@ -23822,6 +23876,7 @@ class GenerateInterpretationRequest(BaseModel):
|
||||
strict_identity: bool = True
|
||||
use_rag_support: bool = False
|
||||
refresh_rag: bool = False
|
||||
language: str = DEFAULT_AGENT_LANG # "zh" or "en"
|
||||
|
||||
@app.post("/api/agent/interpret")
|
||||
async def generate_interpretation(request: GenerateInterpretationRequest):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// ===== Agent 多语言:卡片 + Agent 消息英文翻译 =====
|
||||
// key 为中文原文,value 为英文翻译
|
||||
// 使用 t(key) 获取翻译,tp(key, params) 处理动态占位符
|
||||
|
||||
window.__I18N_EN__ = {
|
||||
"Agent状态": "AgentStatus",
|
||||
"Self-RAG反思": "Self-RAG Reflection",
|
||||
@@ -375,6 +379,339 @@ window.__I18N_EN__ = {
|
||||
"亚家族确认 - Reference Classification": "Subfamily Confirmation - Reference Classification",
|
||||
"这会停止当前 profile 的 Celery worker 并重新启动。若有任务正在运行,后端会默认拒绝执行。": "This will stop and restart the Celery worker for the current profile. Running tasks will be rejected by default.",
|
||||
"Celery 已重启并完成队列检查": "Celery restarted and queue check complete",
|
||||
"Celery 重启未完成": "Celery restart incomplete"
|
||||
"Celery 重启未完成": "Celery restart incomplete",
|
||||
// ---- Card status_label (8) ----
|
||||
"失败": "Failed",
|
||||
"运行中": "Running",
|
||||
"待确认": "Pending",
|
||||
"待执行": "Pending",
|
||||
"待核对": "Review",
|
||||
"待授权": "Authorize",
|
||||
"已取消": "Cancelled",
|
||||
// ---- Card title (10) ----
|
||||
"拓展分析候选核对": "Extension Candidate Review",
|
||||
"拓展分析说明生成失败": "Description Generation Failed",
|
||||
"正在生成拓展分析": "Generating Extension",
|
||||
"运行结果核对": "Result Review",
|
||||
"输入文件和参数": "Input Files & Parameters",
|
||||
"正在恢复拓展分析状态": "Restoring Extension State",
|
||||
// ---- Card purpose/summary (15) ----
|
||||
"原始命令、测试数据和执行事实已经保留;这里只重新生成说明,不会重新运行原始命令。": "Raw command, test data and execution facts are preserved; only regenerate description without re-running.",
|
||||
"可以直接重试,或取消后检查错误原因。": "Retry or cancel and check error cause.",
|
||||
"这张卡用于核对系统从真实执行中锁定的命令、输入、参数和输出。": "Review system-locked command, inputs, parameters and outputs from real execution.",
|
||||
"系统正在确定执行入口,并运行上传的代码和测试数据,提取不可修改的执行事实。": "Determining entry point, running uploaded code/test data, extracting immutable execution facts.",
|
||||
"原始包可复现检查中…": "Checking reproducibility of original package…",
|
||||
"这张卡用于用同一份测试数据执行已确认的工具,并生成可核对的结果。": "Run confirmed tool with same test data; generate verifiable results.",
|
||||
"确认无误后点击“开始验证”。": "Click \"Start Validation\" after confirming.",
|
||||
"这张卡用于查看实际命令、输出与日志;核对无误后才允许授权发布。": "View actual command, output and logs; publication requires review confirmation.",
|
||||
"这张卡用于确认将已经验证的工具发布为可复用的拓展分析。": "Confirm publishing validated tool as reusable extension.",
|
||||
"确认后才会发布;不会自动发布。": "Publication requires explicit confirmation; not automatic.",
|
||||
"这张卡用于确认本次新数据运行的输入文件和原始命令已有参数;确认后立即执行,不会再次弹出确认。": "Confirm input files and parameters for this run; executes immediately without re-confirmation.",
|
||||
"这张卡展示本次新数据运行生成的文件、标准输出和日志。": "Files, stdout and logs generated by this run.",
|
||||
"页面已恢复;系统继续轮询同一个操作,不会重复提交。": "Page restored; continuing to poll the same operation without re-submitting.",
|
||||
"请在页面下方的主对话输入框说明需要修订的内容,然后发送。命令和真实执行事实不会被修改。": "Describe revisions in the main chat input below. Commands and execution facts are immutable.",
|
||||
"已取消;没有提交后续执行。": "Cancelled; no further execution submitted.",
|
||||
// ---- Card rows labels (13) ----
|
||||
"实际命令": "Actual Command",
|
||||
"输出文件": "Output Files",
|
||||
"标准输出": "Standard Output",
|
||||
"见执行日志": "See execution log",
|
||||
"功能": "Function",
|
||||
"输入文件": "Input Files",
|
||||
"可改参数": "Configurable Parameters",
|
||||
"标准输出(直接展示)": "Stdout (direct display)",
|
||||
"(无文件输出)": "(No file output)",
|
||||
"(无)": "(None)",
|
||||
// ---- Card error/misc (25+) ----
|
||||
"操作失败": "Operation failed",
|
||||
"读取拓展分析说明失败": "Failed to read extension help",
|
||||
"读取拓展分析状态失败": "Failed to read extension status",
|
||||
"阶段:": "Phase: ",
|
||||
"原因:": "Cause: ",
|
||||
"无法读取操作状态": "Cannot read operation status",
|
||||
"提交失败": "Submission failed",
|
||||
"原始包可复现检查提交失败": "Reproducibility check submission failed",
|
||||
"阶段:upload": "Phase: Upload",
|
||||
"已恢复修订;请核对最新候选。": "Revision restored; please review latest candidate.",
|
||||
"✓ 语义说明已重新生成;执行命令未重新运行。": "✓ Description regenerated; command not re-run.",
|
||||
"✓ 执行入口已成功复现;候选信息已生成。": "✓ Entry point reproduced successfully; candidate info generated.",
|
||||
"✓ 验证已完成;结果核对卡已生成。": "✓ Validation complete; result review card generated.",
|
||||
"✓ 已核对运行结果。": "✓ Results reviewed.",
|
||||
"✓ 已显式授权并发布。": "✓ Explicitly authorized and published.",
|
||||
"✓ 已确认输入与参数;本次运行已完成。": "✓ Inputs and parameters confirmed; run completed.",
|
||||
"✓ 已恢复并完成;候选核对卡已生成。": "✓ Restored and completed; candidate review card generated.",
|
||||
"✓ 已恢复确认;可以开始验证。": "✓ Confirmation restored; ready to validate.",
|
||||
"✓ 已恢复验证;结果核对卡已生成。": "✓ Validation restored; result review card generated.",
|
||||
"✓ 已恢复结果核对;可以授权发布。": "✓ Review restored; ready to publish.",
|
||||
"✓ 已恢复并发布。": "✓ Restored and published.",
|
||||
"✓ 已恢复运行;本次结果卡已生成。": "✓ Run restored; result card generated.",
|
||||
"✓ 已确认候选|未作修订": "✓ Candidate confirmed | no revision",
|
||||
"✓ 已确认候选|已修订:": "✓ Candidate confirmed | revised: ",
|
||||
"文件上传成功,已开始生成并验收": "Upload successful; generation and validation started",
|
||||
"请填写名称并提供测试数据文件或服务器路径;原始命令和原始代码至少提供一项。": "Please provide name and test data files or server path; at least command or code is required.",
|
||||
"请写明修订意见。": "Please specify revision feedback.",
|
||||
"读取验证结果失败": "Failed to read validation results",
|
||||
"读取运行说明失败": "Failed to read run help",
|
||||
"请先选择实际运行 Job。": "Please select a job first.",
|
||||
"请填写每个输入文件。": "Please fill in each input file.",
|
||||
"已修订:": "Revised: ",
|
||||
"正在恢复 ": "Restoring ",
|
||||
"…": "…",
|
||||
" 提交失败": " submission failed",
|
||||
" 原始包可复现检查提交失败": " Reproducibility check submission failed",
|
||||
"执行入口已在隔离环境运行。请核对系统记录的事实与说明;确认后才会验证。": "Entry point ran in isolated environment. Review system-recorded facts and descriptions; validation proceeds after confirmation.",
|
||||
// ---- Agent message: status/confirm/cancel (10) ----
|
||||
"config.xlsx 已确认,继续当前目标:": "config.xlsx confirmed; continuing current goal: ",
|
||||
"✅ 已确认使用拟南芥作为 PPI/KaKs 的显式兜底参考;该选择只写入 Ortholog/PPI/KaKs 专用参数,其它常规阶段不受影响。": "✅ Arabidopsis confirmed as PPI/KaKs explicit fallback reference; affects only Ortholog/PPI/KaKs parameters.",
|
||||
"✅ 已确认自动注释,正在重新提交": "✅ Auto-annotation confirmed; re-submitting",
|
||||
"✅ 已选择项目参考物种": "✅ Project reference species selected",
|
||||
"已停止等待,本次未继续获取回答。": "Stopped waiting; no further response.",
|
||||
"抱歉,我没有理解你的意思。请尝试更详细地描述。": "Sorry, I didn't understand. Please try describing in more detail.",
|
||||
"抱歉,服务暂时不可用,请稍后重试。": "Sorry, service temporarily unavailable. Please try again later.",
|
||||
// ---- Agent message: pause/block/skip (13) ----
|
||||
"⏸️ PPI/KaKs 前置数据检查未通过,已暂停批量执行;请补齐参考注释包或确认参考物种后重新执行。": "⏸️ PPI/KaKs prerequisite check failed; batch paused. Add reference annotation or confirm reference species.",
|
||||
"⏸️ identify 已完成,但方法学链路需要先确认基因家族成员表;保存成员确认后再继续 phylogeny。": "⏸️ identify completed; methodology chain requires confirmed gene family members before continuing phylogeny.",
|
||||
"⏸️ 已打开 identify 成员初筛确认表;保存后会生成 curated_members,再继续亚家族证据阶段。": "⏸️ identify member confirmation table opened; save to generate curated_members, then continue subfamily evidence stages.",
|
||||
"⏸️ 当前已有前台批次执行中;WGS 规划已保留,请在当前批次结束后重新执行。": "⏸️ Foreground batch in progress; WGS plan saved. Re-run after current batch finishes.",
|
||||
",其它阶段继续执行。": ", other stages continue.",
|
||||
"⏸️ 已按选择先暂停 Ortholog/PPI/KaKs,其它阶段继续执行。": "⏸️ Paused Ortholog/PPI/KaKs as selected; other stages continue.",
|
||||
"⏹️ 后端预检失败,当前批次已停止;请重新拉取规划后继续。": "⏹️ Backend pre-check failed; batch stopped. Re-pull plan to continue.",
|
||||
// ---- Agent message: replan/continue (5) ----
|
||||
"🔁 亚家族标签已确认,正在重新规划确认后常规基因家族分析...": "🔁 Subfamily labels confirmed; re-planning post-confirmation gene family analysis...",
|
||||
"确认后常规分析没有新的可执行阶段。": "No new executable stages after confirmation.",
|
||||
// ---- Agent message: submit/execute (7) ----
|
||||
"⚙️ 提交阶段: ": "⚙️ Submitting stage: ",
|
||||
"按 per_species 拆分 ": "Split by per_species ",
|
||||
// ---- Agent message: complete/success (7) ----
|
||||
"✅ PPI/KaKs 前置数据检查通过:当前批次已有 Ortholog,将先生成同源映射再继续下游分析。": "✅ PPI/KaKs check passed: Ortholog exists in current batch; generating mapping first.",
|
||||
// ---- Agent message: download/background (5) ----
|
||||
"⬇️ 正在提交推荐近源参考物种注释包后台下载;Ortholog/PPI/KaKs 将等待参考数据,其它阶段继续执行。": "⬇️ Submitting reference annotation download; Ortholog/PPI/KaKs wait for data, other stages continue.",
|
||||
// ---- Agent message: autofill (2) ----
|
||||
"已根据上传文件生成 samples.yaml 草稿。请在弹窗中核对 run、sample_id、condition、replicate、链特异性和分组角色,确认后再写入正式 samples.yaml。": "samples.yaml draft generated. Review run, sample_id, condition, replicate, strand specificity and group roles in the dialog, then confirm to write.",
|
||||
"已根据上传文件生成 config.xlsx 草稿。请在弹窗中核对物种代码、文件类型、物种角色和 Gene_Family,确认后再写入正式 config.xlsx。": "config.xlsx draft generated. Review species code, file type, species role and Gene_Family in the dialog, then confirm to write.",
|
||||
// ---- Agent message: methodology (4) ----
|
||||
"已保存方法学方案到当前 job。下一步请上传/填写目标物种和参考物种数据,并确认 config.xlsx 后再执行方法学流程。": "Methodology plan saved. Next: upload target/reference species data, confirm config.xlsx, then execute.",
|
||||
"❌ 方法学执行规划失败:": "❌ Methodology execution planning failed: ",
|
||||
// ---- Agent message: replot/revision (4 to fix) ----
|
||||
"进化树图重绘已提交:": "Phylogeny tree redraw submitted: ",
|
||||
"进化树图重绘失败:": "Phylogeny tree redraw failed: ",
|
||||
"Combo 图修订已提交:": "Combo plot revision submitted: ",
|
||||
"Combo 图修订失败:": "Combo plot revision failed: ",
|
||||
// ---- Agent message: failure/interrupt (10) ----
|
||||
"无法执行分析:": "Cannot execute analysis: ",
|
||||
"服务暂时不可用:": "Service temporarily unavailable: ",
|
||||
"⚠️ 批量执行完成:成功 ": "⚠️ Batch complete: success ",
|
||||
"⚠️ 以下阶段因依赖失败被跳过: ": "⚠️ Stages skipped due to dependency failure: ",
|
||||
"⚠️ 以下阶段等待上游暂停项处理后继续: ": "⚠️ Stages waiting for upstream paused items: ",
|
||||
"未生成可执行阶段。未检测到当前 scope 的完成结果时,不再把空计划解释为已完成;请检查阶段名称或前置依赖。": "No executable stages generated. Empty plan is not interpreted as completed. Check stage names or dependencies.",
|
||||
// ---- Agent message: extension analysis (6) ----
|
||||
"拓展分析阶段:": "Extension stage: ",
|
||||
"拓展分析阶段失败:": "Extension stage failed: ",
|
||||
"已执行拓展分析阶段:": "Extension stage executed: ",
|
||||
"拓展分析阶段执行失败:": "Extension stage execution failed: ",
|
||||
"拓展分析帮助暂时不可用:": "Extension help temporarily unavailable: ",
|
||||
"上传可执行代码、测试数据和原始命令,核对候选后验证并授权发布;发布后可指定输入和原命令已有参数运行。": "Upload executable code, test data and original command; review candidate, validate, then authorize publishing.",
|
||||
// ---- Agent message: other (5) ----
|
||||
"📌 当前已有前台批次执行中,新任务已转为后台执行:": "📌 Foreground batch running; new task moved to background: ",
|
||||
"已识别到 RNA-seq/FASTQ 和参考资源": "RNA-seq/FASTQ and reference resources detected",
|
||||
"已把目录中的可识别参考资源导入当前 job": "Reference resources imported into current job",
|
||||
"我识别到你是在提供数据路径,但该路径下没有发现": "Data path detected but no usable files found",
|
||||
"已选择:": "Selected: ",
|
||||
// ---- Agent message: remaining dynamic patterns ----
|
||||
"❌ 批量执行已取消": "❌ Batch execution cancelled",
|
||||
"⏭️ 跳过阶段: ": "⏭️ Skipped stage: ",
|
||||
"🚀 准备提交依赖驱动执行,共 ": "🚀 Preparing dependency-driven execution: ",
|
||||
"🎉 批量执行完成!成功: ": "🎉 Batch complete! Success: ",
|
||||
",失败 ": ", failed ",
|
||||
"跳过阶段: ": "Skipped stage: ",
|
||||
" 暂停:需要先准备参考物种 PEP/CDS 或 Ortholog 映射。": " paused: prepare reference species PEP/CDS or Ortholog mapping first.",
|
||||
" 已暂停依赖 confirmed_subfamily.tsv 的后续阶段;请在亚家族确认表中保存后重新拉取规划继续执行。": " paused subsequent stages depending on confirmed_subfamily.tsv; save the subfamily confirmation table and re-pull the plan.",
|
||||
"参考数据已就绪": "Reference data ready",
|
||||
" 已恢复为待执行,将随当前批次继续调度。": " restored as pending; will continue with current batch.",
|
||||
" 开始续跑 Ortholog/PPI/KaKs。": " resuming Ortholog/PPI/KaKs.",
|
||||
" 重新提交(自动注释背景)": " re-submit (auto-annotation background)",
|
||||
" 已提交后端,task_id=": " submitted to backend, task_id=",
|
||||
" 准备执行 ": " preparing to execute ",
|
||||
" 个阶段,请确认参数": " stages; please confirm parameters",
|
||||
" 个阶段...": " stages...",
|
||||
" 个分析阶段,请确认参数": " analysis stages; please confirm parameters",
|
||||
"亚家族确认后已规划 ": "Post-subfamily-confirmation plan: ",
|
||||
" 个常规分析阶段": " regular analysis stages",
|
||||
"PPI/KaKs 前置数据检查通过:检测到已下载近源参考 ": "PPI/KaKs check passed: downloaded reference ",
|
||||
",将用该参考先生成 Ortholog mapping。": ", generating Ortholog mapping first.",
|
||||
"PPI/KaKs 前置数据检查通过:检测到已有 Ortholog 映射(": "PPI/KaKs check passed: Ortholog mapping exists (",
|
||||
"),将复用该映射执行 ": "), reusing mapping for ",
|
||||
"),将直接执行 ": "), executing directly ",
|
||||
"),已自动插入 Ortholog,将先生成 mapping 再执行 ": "), Ortholog auto-inserted; generating mapping then executing ",
|
||||
",已自动插入 Ortholog": ", Ortholog auto-inserted",
|
||||
"推荐参考数据下载完成:": "Reference download complete: ",
|
||||
")。已写入 Ortholog/PPI/Ka/Ks 专用参考物种。": "). Written to Ortholog/PPI/Ka/Ks specific reference species.",
|
||||
" 已按用户确认使用 bcftools 完成": " completed with bcftools as confirmed by user",
|
||||
" 前端连接短暂中断,正在按后端产物状态恢复": " frontend connection interrupted; recovering from backend state",
|
||||
"亚家族确认已完成,但后端当前 workflowPhase 为 ": "Subfamily confirmation completed; backend workflowPhase is ",
|
||||
",未自动打开常规分析。": "; no auto-analysis opened.",
|
||||
"亚家族分类已完成预测,但确认表尚未保存;": "Subfamily classification predicted; confirmation table not yet saved; ",
|
||||
"已调出": "Opened ",
|
||||
"亚家族分类确认表。你可以在弹窗中修订 confirmed_subfamily,点击\"确认亚家族标签\"后保存。": " subfamily classification confirmation table. Revise confirmed_subfamily in the dialog, then click \"Confirm Subfamily Labels\" to save.",
|
||||
"亚家族分类确认表没有打开:未找到可确认的分类结果。请先确认该物种已完成 reference_classification。": " subfamily classification confirmation table not opened: no confirmable results found. Confirm the species has completed reference_classification.",
|
||||
"确认后常规分析没有新的可执行阶段。": "No new executable stages after confirmation.",
|
||||
"⚠️ 检测到 ": "⚠️ Detected ",
|
||||
",将在确认后启动本地自动注释。": "; auto-annotation will start after confirmation.",
|
||||
"🧬 自动背景注释与 ": "🧬 Auto-background annotation and ",
|
||||
" 已提交后端,task_id=": " submitted to backend, task_id=",
|
||||
"⚠️ 亚家族确认后自动续跑规划失败:": "⚠️ Post-subfamily-confirm auto-plan failed: ",
|
||||
"; Ortholog/PPI/KaKs ": "; Ortholog/PPI/KaKs ",
|
||||
"推荐参考数据下载已转入后台:": "Reference download moved to background: ",
|
||||
",task_id=": ", task_id=",
|
||||
"后台批次完成:成功 ": "Background batch complete: success ",
|
||||
"后台执行阶段: ": "Background stage: ",
|
||||
"后台阶段 ": "Background stage ",
|
||||
" 完成": " done",
|
||||
"已保存方法学方案,但暂不执行:": "Methodology plan saved, not executing: ",
|
||||
"。请在 config.xlsx 自动识别弹窗中核对/补齐数据,确认写入正式配置后再点击\"确认并执行\"。": ". Review/fill data in the config.xlsx auto-detect dialog, confirm to write then click \"Confirm & Execute\".",
|
||||
"当前已有前台批次执行中;WGS 规划已保留,请在当前批次结束后重新执行。": "Foreground batch in progress; WGS plan saved. Re-run after current batch finishes.",
|
||||
"拓展分析阶段执行失败:": "Extension stage execution failed: ",
|
||||
"已把路径中的 ": "Soft-linked ",
|
||||
" 个可识别文件软链接到当前 job": " recognizable files to current job",
|
||||
" 个可识别文件软链接到当前 job,但没有发现需要自动填写 config.xlsx 或 samples.yaml 的文件类型;请检查目录或继续补充文件。": " recognizable files linked to current job; no files found for config.xlsx/samples.yaml auto-fill. Check directory or add more files.",
|
||||
"前": " ago",
|
||||
"秒前": "sec ago",
|
||||
"分钟前": "min ago",
|
||||
"小时前": "hr ago",
|
||||
"天前": "d ago",
|
||||
"待机": "Idle",
|
||||
"分析中": "Analyzing",
|
||||
"检索中": "Retrieving",
|
||||
"反思中": "Reflecting",
|
||||
"生成中": "Generating",
|
||||
"完成": "Complete",
|
||||
"错误": "Error",
|
||||
"处理中...": "Processing...",
|
||||
"发送": "Send",
|
||||
"任务列表": "Tasks",
|
||||
" 个常规分析阶段,请确认参数": " regular analysis stages; please confirm parameters",
|
||||
" 亚家族分类已完成预测,但确认表尚未保存;后续会继续显示为待确认。": " subfamily classification predicted; confirmation table not yet saved; will show as pending.",
|
||||
" 到后端;系统会先生成 ": " to backend; system will generate ",
|
||||
" 前端连接短暂中断,正在按后端产物状态恢复,不会立即判定阶段失败": " frontend connection interrupted; recovering from backend artifact state. Stage will not be marked as failed.",
|
||||
" 已有同一分析范围的有效结果,无需重复执行。": " already has valid results for the same analysis scope. No need to re-execute.",
|
||||
" 的依赖尚未完成": " dependency not yet completed",
|
||||
" 重新提交(自动注释背景)...": " re-submitting (auto-annotation background)...",
|
||||
" 提交失败": " submission failed",
|
||||
" 原始包可复现检查提交失败": " reproducibility check submission failed",
|
||||
"Combo 图修订已提交:task_id=": "Combo plot revision submitted: task_id=",
|
||||
"⏳ 推荐参考数据下载已转入后台:": "⏳ Reference download moved to background: ",
|
||||
"⏸️ 以下阶段等待上游暂停项处理后继续: ": "⏸️ Stages waiting for upstream paused items: ",
|
||||
"⚙️ 亚家族确认后已规划 ": "⚙️ Post-subfamily-confirm plan: ",
|
||||
"⚙️ 准备执行 ": "⚙️ Preparing to execute ",
|
||||
"⚙️ 后台执行阶段: ": "⚙️ Background stage: ",
|
||||
"⚠️ 后台批次中以下阶段因依赖失败被跳过: ": "⚠️ Background batch stages skipped due to dependency failure: ",
|
||||
"✅ PPI/KaKs 前置数据检查通过:检测到已下载近源参考 ": "✅ PPI/KaKs check passed: downloaded reference ",
|
||||
"✅ PPI/KaKs 前置数据检查通过:检测到已有 Ortholog 映射(": "✅ PPI/KaKs check passed: Ortholog mapping found (",
|
||||
"✅ 后台阶段 ": "✅ Background stage ",
|
||||
"✅ 已确认自动注释,正在重新提交 ": "✅ Auto-annotation confirmed; re-submitting ",
|
||||
"✅ 已选择项目参考物种 ": "✅ Selected project reference species: ",
|
||||
"✅ 推荐参考数据下载完成:": "✅ Reference download complete: ",
|
||||
"✅ 阶段 ": "✅ Stage ",
|
||||
"☒ 已恢复并完成。": "☒ Restored and completed.",
|
||||
"❌ 无法执行分析:": "❌ Cannot execute analysis: ",
|
||||
"❌ 服务暂时不可用:": "❌ Service temporarily unavailable: ",
|
||||
"。结果已写入当前 job workspace,输出:": ". Results written to current job workspace, output: ",
|
||||
"。请在 config.xlsx 自动识别弹窗中核对/补齐数据,确认写入正式配置后再点击“确认并执行”。": ". Review/fill data in the config.xlsx auto-detect dialog; confirm to write then click \"Confirm & Execute\".",
|
||||
"亚家族分类确认表。你可以在弹窗中修订 confirmed_subfamily,点击“确认亚家族标签”后保存。": "subfamily classification confirmation table. Revise confirmed_subfamily in the dialog, then click \"Confirm Subfamily Labels\" to save.",
|
||||
"亚家族标签确认被跳过,已停止依赖 confirmed_subfamily.tsv 的后续阶段;如需普通无亚家族标签分析,请重新发起并明确说明\"不需要亚家族\"。": "Subfamily label confirmation skipped; subsequent stages depending on confirmed_subfamily.tsv have been stopped. For regular analysis without subfamily labels, please restart and explicitly state \"no subfamily\".",
|
||||
"发送\"按已保存的方法学方案继续执行\"": "Send \"Continue with saved methodology plan\"",
|
||||
"后台批次无法继续:": "Background batch cannot continue: ",
|
||||
"已打开 config.xlsx 自动识别表。你可以直接修订单行,或用批量修订区筛选、预览、Apply。": "Opened config.xlsx auto-identification table. You can edit individual rows, or use the batch revision area to filter, preview, and Apply.",
|
||||
"已打开 samples.yaml 自动识别表。你可以直接修订样本、分组、重复和对照组。": "Opened samples.yaml auto-identification table. You can revise samples, groups, replicates and controls directly.",
|
||||
"已把目录中的可识别参考资源导入当前 job,并生成 config.xlsx 草稿。请在弹窗中核对和修订,点击“确认并写入正式配置”后再执行正式分析。": "Imported recognizable reference resources into current job and generated config.xlsx draft. Please review and revise in the dialog, then click \"Confirm & Write to Official Config\" before executing.",
|
||||
"已识别到 RNA-seq FASTQ 和参考资源,优先打开 samples.yaml 草稿供你核对样本、分组和对照;config.xlsx 草稿也已生成。": "RNA-seq FASTQ and reference resources detected; opening samples.yaml draft for sample/group/control review. config.xlsx draft also generated.",
|
||||
"已识别到 RNA-seq/FASTQ 数据并生成 samples.yaml 草稿。请在弹窗中核对 run、sample_id、condition、replicate、control_group 后再写入正式 samples.yaml。": "RNA-seq/FASTQ data detected and samples.yaml draft generated. Review run, sample_id, condition, replicate, control_group in the dialog, then confirm to write.",
|
||||
"已重新识别并生成 config.xlsx 草稿。请在弹窗中核对并修订,确认后才会写入正式 config.xlsx。": "Re-identified and generated config.xlsx draft. Review and revise in the dialog; writes to official config.xlsx only after confirmation.",
|
||||
"已重新识别并生成 samples.yaml 草稿。请确认 run、sample_id、condition、replicate 和 control_group 后再写入正式 samples.yaml。": "Re-identified and generated samples.yaml draft. Confirm run, sample_id, condition, replicate, and control_group before writing to official samples.yaml.",
|
||||
"没有找到可展示的结果。": "No displayable results found.",
|
||||
"点击\"浏览\"上传文献": "Click \"Browse\" to upload paper",
|
||||
"点击\"知识图谱\"查看关系": "Click \"Knowledge Graph\" to view relations",
|
||||
"请先核对 config.xlsx 草稿。": "Please review the config.xlsx draft first.",
|
||||
"请补充你的需求。": "Please clarify your requirements.",
|
||||
"进化树图重绘已提交:task_id=": "Phylogeny tree redraw submitted: task_id=",
|
||||
"选择输入框上方\"Analysis\"": "Select \"Analysis\" above the input box",
|
||||
"选择输入框上方\"RAG\"": "Select \"RAG\" above the input box",
|
||||
",再继续富集分析。": ", then continue enrichment analysis.",
|
||||
",将用该参考先生成 Ortholog mapping。": ", will generate Ortholog mapping from this reference first.",
|
||||
";Ortholog/PPI/KaKs 已恢复为待执行,将随当前批次继续调度。": "; Ortholog/PPI/KaKs restored as pending; will continue with current batch.",
|
||||
",将按该参考检查或生成 Ortholog,并执行 ": "; will check or generate Ortholog from this reference, and execute ",
|
||||
";开始续跑 Ortholog/PPI/KaKs。": "; resuming Ortholog/PPI/KaKs.",
|
||||
"),将复用该映射执行 ": "), will reuse this mapping and execute ",
|
||||
"),将直接执行 ": "), will execute directly ",
|
||||
",已自动插入 Ortholog,将先生成 mapping 再执行 ": ", Ortholog auto-inserted; generating mapping first then executing ",
|
||||
")。已写入 Ortholog/PPI/Ka/Ks 专用参考物种。": "). Written to Ortholog/PPI/Ka/Ks specific reference species.",
|
||||
" 已按用户确认使用 bcftools 完成": " completed with bcftools as user confirmed",
|
||||
" 已暂停依赖 confirmed_subfamily.tsv 的后续阶段;请在亚家族确认表中保存后重新拉取规划继续执行。": " has paused subsequent stages depending on confirmed_subfamily.tsv; save the subfamily confirmation table and re-pull the plan.",
|
||||
" 暂停:需要先准备参考物种 PEP/CDS 或 Ortholog 映射。": "paused: prepare reference species PEP/CDS or Ortholog mapping first.",
|
||||
" 个分析阶段,请确认参数": " analysis stages, please confirm parameters",
|
||||
"📦 后台批次完成:成功 ": "📦 Background batch complete: success ",
|
||||
"🔄 阶段 ": "🔄 Stage ",
|
||||
"🚀 阶段 ": "🚀 Stage ",
|
||||
"config.xlsx 已确认,继续当前目标:": "config.xlsx confirmed; continuing current goal: ",
|
||||
"按 per_species 拆分 ": "Split by per_species ",
|
||||
"⚠️ 检测到 ": "⚠️ Detected ",
|
||||
",将在确认后启动本地自动注释。": "; auto-annotation will start after confirmation.",
|
||||
"。已写入 Ortholog/PPI/Ka/Ks 专用参考物种。": ". Written to Ortholog/PPI/Ka/Ks specific reference species.",
|
||||
"🚀 准备提交依赖驱动执行,共 ": "🚀 Preparing dependency-driven execution: ",
|
||||
" 个阶段...": " stages...",
|
||||
"⚠️ 批量执行完成:成功 ": "⚠️ Batch complete: success ",
|
||||
",失败 ": ", failed ",
|
||||
"🎉 批量执行完成!成功: ": "🎉 Batch complete! Success: ",
|
||||
"⏭️ 跳过阶段: ": "⏭️ Skipped stage: ",
|
||||
"⚙️ 提交阶段: ": "⚙️ Submitting stage: ",
|
||||
"⏭️ ": "⏭️ ",
|
||||
" 已提交后端,task_id=": " submitted to backend, task_id=",
|
||||
" 完成": " complete",
|
||||
",task_id=": ", task_id=",
|
||||
"⚠️ 亚家族确认后自动续跑规划失败:": "⚠️ Post-subfamily-confirm auto-plan failed: ",
|
||||
"亚家族确认已完成,但后端当前 workflowPhase 为 ": "Subfamily confirmation complete; backend workflowPhase is ",
|
||||
",未自动打开常规分析。": "; no auto-analysis opened.",
|
||||
"已调出": "Opened: ",
|
||||
"亚家族分类确认表没有打开:未找到可确认的分类结果。请先确认该物种已完成 reference_classification。": "Subfamily classification confirmation table not opened: no confirmable results found. Confirm the species has completed reference_classification.",
|
||||
"拓展分析帮助暂时不可用:": "Extension help temporarily unavailable: ",
|
||||
"已保存方法学方案,但暂不执行:": "Methodology plan saved; not executing: ",
|
||||
"🧬 自动背景注释与 ": "🧬 Auto-background annotation and ",
|
||||
"参考数据已就绪": "Reference data ready",
|
||||
"Combo 图修订失败:": "Combo plot revision failed: ",
|
||||
"进化树图重绘失败:": "Phylogeny tree redraw failed: ",
|
||||
",其它阶段继续执行。": ", other stages continue.",
|
||||
" 个阶段,请确认参数": " stages, please confirm parameters",
|
||||
"—": "—",
|
||||
"✓ 已恢复并完成。": "✓ Restored and completed.",
|
||||
"后台批次完成:成功 ": "Background batch complete: success ",
|
||||
"后台执行阶段: ": "Background stage: ",
|
||||
"拓展分析阶段执行失败:": "Extension stage execution failed: ",
|
||||
"拓展分析阶段:": "Extension stage: ",
|
||||
"已执行拓展分析阶段:": "Extension stage executed: ",
|
||||
"拓展分析阶段失败:": "Extension stage failed: ",
|
||||
"MSA区间重绘已提交": "MSA replot submitted",
|
||||
"MSA区间重绘失败": "MSA replot failed",
|
||||
"已选择:": "Selected: ",
|
||||
"📌 当前已有前台批次执行中,新任务已转为后台执行:": "📌 Foreground batch running; new task moved to background: ",
|
||||
",已自动插入 Ortholog,将先生成 mapping 再执行": ", Ortholog auto-inserted; generating mapping first then executing",
|
||||
"推荐参考数据下载完成:": "Reference download complete: ",
|
||||
"ABORTED": "ABORTED",
|
||||
"的依赖尚未完成": "dependency not yet completed",
|
||||
"亚家族标签确认被跳过,已停止依赖 confirmed_subfamily.tsv 的后续阶段;如需普通无亚家族标签分析,请重新发起并明确说明": "Subfamily label confirmation skipped; stages depending on confirmed_subfamily.tsv stopped. For regular analysis without subfamily labels, restart and explicitly state: ",
|
||||
"不需要亚家族": "no subfamily",
|
||||
"。": ".",
|
||||
",将复用该映射执行 ": ", will reuse this mapping and execute ",
|
||||
";将按该参考检查或生成 Ortholog,并执行 ": "; will check or generate Ortholog from this reference, and execute ",
|
||||
"⚠️ 以下阶段因依赖失败被跳过: ": "⚠️ Stages skipped due to dependency failure: ",
|
||||
"⚠️ 以下阶段等待上游暂停项处理后继续: ": "⚠️ Stages waiting for upstream paused items: ",
|
||||
"启动子自定义绘图已提交": "Promoter custom plot submitted",
|
||||
"启动子自定义绘图失败": "Promoter custom plot failed",
|
||||
"种内共线性 Circos 重绘已提交": "Intraspecies Circos replot submitted",
|
||||
"种内共线性 Circos 重绘失败": "Intraspecies Circos replot failed",
|
||||
" 重新提交(自动注释背景)": " re-submit (auto-annotation background)",
|
||||
" 已暂停依赖 confirmed_subfamily.tsv": " has paused stages depending on confirmed_subfamily.tsv",
|
||||
";": ";",
|
||||
" 个分析阶段": " analysis stages",
|
||||
" 个阶段": " stages"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user