assistant_tools.rs

 1mod bash_tool;
 2mod batch_tool;
 3mod code_symbols_tool;
 4mod copy_path_tool;
 5mod create_directory_tool;
 6mod create_file_tool;
 7mod delete_path_tool;
 8mod diagnostics_tool;
 9mod fetch_tool;
10mod find_replace_file_tool;
11mod list_directory_tool;
12mod move_path_tool;
13mod now_tool;
14mod open_tool;
15mod path_search_tool;
16mod read_file_tool;
17mod regex_search_tool;
18mod replace;
19mod schema;
20mod symbol_info_tool;
21mod thinking_tool;
22
23use std::sync::Arc;
24
25use assistant_tool::ToolRegistry;
26use copy_path_tool::CopyPathTool;
27use gpui::App;
28use http_client::HttpClientWithUrl;
29use move_path_tool::MovePathTool;
30
31use crate::bash_tool::BashTool;
32use crate::batch_tool::BatchTool;
33use crate::code_symbols_tool::CodeSymbolsTool;
34use crate::create_directory_tool::CreateDirectoryTool;
35use crate::create_file_tool::CreateFileTool;
36use crate::delete_path_tool::DeletePathTool;
37use crate::diagnostics_tool::DiagnosticsTool;
38use crate::fetch_tool::FetchTool;
39use crate::find_replace_file_tool::FindReplaceFileTool;
40use crate::list_directory_tool::ListDirectoryTool;
41use crate::now_tool::NowTool;
42use crate::open_tool::OpenTool;
43use crate::path_search_tool::PathSearchTool;
44use crate::read_file_tool::ReadFileTool;
45use crate::regex_search_tool::RegexSearchTool;
46use crate::symbol_info_tool::SymbolInfoTool;
47use crate::thinking_tool::ThinkingTool;
48
49pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
50    assistant_tool::init(cx);
51
52    let registry = ToolRegistry::global(cx);
53    registry.register_tool(BashTool);
54    registry.register_tool(BatchTool);
55    registry.register_tool(CreateDirectoryTool);
56    registry.register_tool(CreateFileTool);
57    registry.register_tool(CopyPathTool);
58    registry.register_tool(DeletePathTool);
59    registry.register_tool(FindReplaceFileTool);
60    registry.register_tool(SymbolInfoTool);
61    registry.register_tool(MovePathTool);
62    registry.register_tool(DiagnosticsTool);
63    registry.register_tool(ListDirectoryTool);
64    registry.register_tool(NowTool);
65    registry.register_tool(OpenTool);
66    registry.register_tool(CodeSymbolsTool);
67    registry.register_tool(PathSearchTool);
68    registry.register_tool(ReadFileTool);
69    registry.register_tool(RegexSearchTool);
70    registry.register_tool(ThinkingTool);
71    registry.register_tool(FetchTool::new(http_client));
72}