feat(errors): 错误消息面向最终用户友好化
- memory::MemoryError 英文 → 中文 + 操作建议(namespace 拼写 / 后端存储 / 数据兼容性) - llm::LlmError 各变体补充修复建议(API key / 超时 / 上下文压缩) - tools::ToolError 各变体补充修复指引(注册工具 / 检查 Schema / 调权限 / MCP 握手) - prompt::PromptError 各变体补充修复指引(注册子模板 / 检查语法 / 调深度限制) - agent::AgentError::Config 中文化 + 提示需调用的 builder 方法名
This commit is contained in:
+1
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user