fix(dictionary): 修复 AI 编排系统的错误处理和超时控制
- 修复 orchestrator 中 throw 字符串的问题,改为 throw LookUpError - 为 zhipu.ts 添加 30 秒超时控制,防止 LLM 调用卡死 - stage1 添加 isEmpty 和 isNaturalLanguage 字段验证 - stage2 改为降级处理而非直接失败,提升用户体验 - types.ts 添加 canMap 字段 - AGENTS.md 添加禁止擅自运行 pnpm dev 的说明
This commit is contained in:
@@ -53,7 +53,7 @@ export async function executeDictionaryLookup(
|
||||
|
||||
if (!standardFormResult.standardForm) {
|
||||
log.error("[Stage 3] Standard form is empty");
|
||||
throw "无法生成标准形式";
|
||||
throw new LookUpError("无法生成标准形式");
|
||||
}
|
||||
|
||||
log.debug("[Stage 3] Standard form complete", { standardFormResult });
|
||||
|
||||
Reference in New Issue
Block a user