重构: tool_registry 声明式注册基础设施(declare_tool! 宏 + list_projects 试点,零回归)

This commit is contained in:
lxy
2026-08-01 12:56:19 +08:00
parent 438f9692f2
commit c002f0b352
6 changed files with 239 additions and 18 deletions
+5
View File
@@ -1,6 +1,11 @@
//! df-ai: AI 编排 — LLM Provider、Agent 协调、上下文管理、流式处理、工具注册
pub mod ai_tools;
// 声明式工具注册宏 `declare_tool!`(tool_registry 拆分第一步基础设施)。
// macro_rules + #[macro_export]:零新依赖,展开为等价 `register` 调用,与现有 48 工具并存。
// 试点:list_projects 已迁至声明式(commands/ai/tools/list_projects.rs),验证可行+零回归。
#[macro_use]
pub mod ai_tools_decl;
pub mod anthropic_compat;
pub mod anthropic_helpers;
pub mod context;