feat(errors): 错误消息面向最终用户友好化

- memory::MemoryError 英文 → 中文 + 操作建议(namespace 拼写 / 后端存储 / 数据兼容性)
- llm::LlmError 各变体补充修复建议(API key / 超时 / 上下文压缩)
- tools::ToolError 各变体补充修复指引(注册工具 / 检查 Schema / 调权限 / MCP 握手)
- prompt::PromptError 各变体补充修复指引(注册子模板 / 检查语法 / 调深度限制)
- agent::AgentError::Config 中文化 + 提示需调用的 builder 方法名
This commit is contained in:
徐涛
2026-07-04 06:21:31 +08:00
parent 9f5e8702a2
commit 4fdc62754c
6 changed files with 53 additions and 43 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ mod tests {
#[test]
fn config_not_recoverable() {
assert!(!AgentError::Config("missing provider".into()).is_recoverable());
assert!(!AgentError::Config("缺少 provider".into()).is_recoverable());
}
#[test]