docs: update implementation log with tools registration
- Add tools registration section in session.rs - Add update log table with all commits
This commit is contained in:
parent
98bc9739c6
commit
02a7fa68c6
@ -297,6 +297,46 @@ fn exclusive(&self) -> bool { false } // 是否独占
|
|||||||
```bash
|
```bash
|
||||||
cargo test --lib # 所有测试
|
cargo test --lib # 所有测试
|
||||||
cargo test --lib tools::schema # SchemaCleanr
|
cargo test --lib tools::schema # SchemaCleanr
|
||||||
|
```
|
||||||
|
|
||||||
|
## 工具注册
|
||||||
|
|
||||||
|
工具在 `src/gateway/session.rs` 的 `default_tools()` 函数中注册:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
fn default_tools() -> ToolRegistry {
|
||||||
|
let mut registry = ToolRegistry::new();
|
||||||
|
registry.register(CalculatorTool::new());
|
||||||
|
registry.register(FileReadTool::new());
|
||||||
|
registry.register(FileWriteTool::new());
|
||||||
|
registry.register(FileEditTool::new());
|
||||||
|
registry.register(BashTool::new());
|
||||||
|
registry.register(HttpRequestTool::new(
|
||||||
|
vec!["*".to_string()], // 允许所有域名
|
||||||
|
1_000_000, // max_response_size
|
||||||
|
30, // timeout_secs
|
||||||
|
false, // allow_private_hosts
|
||||||
|
));
|
||||||
|
registry.register(WebFetchTool::new(50_000, 30));
|
||||||
|
registry
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
SessionManager 使用这些工具创建 AgentLoop 实例,所有工具自动对 LLM 可用。
|
||||||
|
|
||||||
|
## 更新日志
|
||||||
|
|
||||||
|
| 日期 | Commit | 变更 |
|
||||||
|
|------|--------|------|
|
||||||
|
| 2026-04-07 | `d5b6cd2` | feat: add SchemaCleanr |
|
||||||
|
| 2026-04-07 | `a9e7aab` | feat: add file_read tool |
|
||||||
|
| 2026-04-07 | `16b052b` | feat: add file_write tool |
|
||||||
|
| 2026-04-07 | `f3187ce` | feat: add file_edit tool |
|
||||||
|
| 2026-04-07 | `68e3663` | feat: add bash tool |
|
||||||
|
| 2026-04-07 | `1581732` | feat: add http_request tool |
|
||||||
|
| 2026-04-07 | `8936e70` | feat: add web_fetch tool |
|
||||||
|
| 2026-04-07 | `b13bb8c` | docs: add implementation log |
|
||||||
|
| 2026-04-08 | `98bc973` | feat: register all tools in SessionManager |
|
||||||
cargo test --lib tools::file_read # file_read
|
cargo test --lib tools::file_read # file_read
|
||||||
cargo test --lib tools::file_write # file_write
|
cargo test --lib tools::file_write # file_write
|
||||||
cargo test --lib tools::file_edit # file_edit
|
cargo test --lib tools::file_edit # file_edit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user