fix(config): 优雅处理 Provider 未配置错误

- 添加 ConfigurationError 类替代 process.exit(1)
- Server 端捕获配置错误并返回友好消息
- UI 端支持 config_error 类型的 WebSocket 消息
- 服务器不再因配置缺失而崩溃
This commit is contained in:
2025-12-14 22:24:51 +08:00
parent c307cd3a7c
commit 32064a3531
6 changed files with 107 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
export { Agent } from './core/agent.js';
export { toolRegistry, todoManager, initTaskContext, updateTaskDescription, updateSkillDescription } from './tools/index.js';
export { loadConfig, saveConfig, getConfig, loadVisionConfig } from './utils/config.js';
export { loadConfig, saveConfig, getConfig, loadVisionConfig, ConfigurationError } from './utils/config.js';
export type { VisionConfig } from './utils/config.js';
// Context compression