ZIm/crates/assistant_tools/src
Antonio Scandurra 019a14bcde
Replace async-watch with a custom watch (#32245)
The `async-watch` crate doesn't seem to be maintained and we noticed
several panics coming from it, such as:

```
[bug] failed to observe change after notificaton.
zed::reliability::init_panic_hook::{{closure}}::hea8cdcb6299fad6b+154543526
std::panicking::rust_panic_with_hook::h33b18b24045abff4+127578547
std::panicking::begin_panic_handler::{{closure}}::hf8313cc2fd0126bc+127577770
std::sys::backtrace::__rust_end_short_backtrace::h57fe07c8aea5c98a+127571385
__rustc[95feac21a9532783]::rust_begin_unwind+127576909
core::panicking::panic_fmt::hd54fb667be51beea+9433328
core::option::expect_failed::h8456634a3dada3e4+9433291
assistant_tools::edit_agent::EditAgent::apply_edit_chunks::{{closure}}::habe2e1a32b267fd4+26921553
gpui::app::async_context::AsyncApp::spawn::{{closure}}::h12f5f25757f572ea+25923441
async_task::raw::RawTask<F,T,S,M>::run::h3cca0d402690ccba+25186815
<gpui::platform::linux::x11::client::X11Client as gpui::platform::linux::platform::LinuxClient>::run::h26264aefbcfbc14b+73961666
gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run::hb12dcd4abad715b5+73562509
gpui::app::Application::run::h0f936a5f855a3f9f+150676820
zed::main::ha17f9a25fe257d35+154788471
std::sys::backtrace::__rust_begin_short_backtrace::h1edd02429370b2bd+154624579
std::rt::lang_start::{{closure}}::h3d2e300f10059b0a+154264777
std::rt::lang_start_internal::h418648f91f5be3a1+127502049
main+154806636
__libc_start_main+46051972301573
_start+12358494
```

I didn't find an executor-agnostic watch crate that was well maintained
(we already tried postage and async-watch), so decided to implement it
our own version.

Release Notes:

- Fixed a panic that could sometimes occur when the agent performed
edits.
2025-06-06 16:00:09 +00:00
..
copy_path_tool Add copy-path tool (#27371) 2025-03-24 21:21:55 -04:00
create_directory_tool Add Create Directory Tool (#27505) 2025-03-26 11:59:03 -04:00
delete_path_tool Delete tool uses paths instead of globs (#26715) 2025-03-16 11:58:25 +01:00
diagnostics_tool Systematically optimize agentic editing performance (#28961) 2025-04-19 02:47:59 +00:00
edit_agent ci: Check for broken links (#30844) 2025-06-06 09:39:35 +00:00
edit_file_tool Fix agent reading and editing files over SSH (#30144) 2025-05-07 17:07:01 +00:00
fetch_tool assistant_tools: Add fetch tool (#26999) 2025-03-18 16:25:51 +00:00
find_path_tool agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
grep_tool assistant: Partial fix for HTML entities in tools params (#32148) 2025-06-05 10:36:55 +00:00
list_directory_tool agent: Improve initial file search quality (#29317) 2025-04-23 21:24:41 -03:00
move_path_tool Add move_path tool (#27366) 2025-03-24 14:45:19 +00:00
open_tool Add eval for open_tool (#29801) 2025-05-02 15:56:07 +00:00
read_file_tool Systematically optimize agentic editing performance (#28961) 2025-04-19 02:47:59 +00:00
templates agent: Fix creating files with Gemini (#31439) 2025-05-26 16:36:21 +00:00
terminal_tool agent: Discourage long-running commands (#29627) 2025-04-29 19:21:16 -03:00
thinking_tool Add thinking tool (#26675) 2025-03-14 16:26:22 -04:00
ui agent: Display full terminal output without scrolling (#31922) 2025-06-03 10:54:25 -07:00
assistant_tools.rs assistant: Partial fix for HTML entities in tools params (#32148) 2025-06-05 10:36:55 +00:00
copy_path_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
create_directory_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
delete_path_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
diagnostics_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
edit_agent.rs Replace async-watch with a custom watch (#32245) 2025-06-06 16:00:09 +00:00
edit_file_tool.rs edit_file_tool: Fail when edit location is not unique (#32056) 2025-06-04 13:04:01 +03:00
fetch_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
find_path_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
grep_tool.rs Have tools respect private and excluded file settings (#32036) 2025-06-05 10:02:11 +02:00
list_directory_tool.rs Have tools respect private and excluded file settings (#32036) 2025-06-05 10:02:11 +02:00
move_path_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
now_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
open_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
read_file_tool.rs Have tools respect private and excluded file settings (#32036) 2025-06-05 10:02:11 +02:00
schema.rs agent: Improve compatibility when using MCP servers with Gemini models (#28700) 2025-04-14 21:55:25 +02:00
templates.rs Introduce a new StreamingEditFileTool (#29733) 2025-05-01 17:37:43 +02:00
terminal_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
thinking_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00
ui.rs agent: Display full terminal output without scrolling (#31922) 2025-06-03 10:54:25 -07:00
web_search_tool.rs agent: Allow to accept and reject all via the panel (#31971) 2025-06-03 15:20:25 -03:00