ZIm/assets/settings
Antonio Scandurra f891dfb358
Introduce a new StreamingEditFileTool (#29733)
This pull request introduces a new tool for streaming edits. The
short-term goal is for this tool to replace the existing `EditFileTool`,
but we want to get this out the door as soon as possible so that we can
start testing it.

`StreamingEditFileTool` is mutually exclusive with `EditFileTool`. It
will be enabled by default for anyone who has the `agent-stream-edits`
feature flag, as well as people that set `assistant.stream_edits` to
`true` in their settings.

### Implementation

Streaming is achieved by requesting a completion while the `edit_file`
tool gets called. We invoke the model by taking the existing
conversation with the agent and appending a prompt specifically tailored
for editing. In that prompt, we ask the model to produce a stream of
`<old_text>`/`<new_text>` tags. As the model streams text in, we
incrementally parse it and start editing as soon as we can.

### Evals

Note that, as part of this pull request, I also defined some new evals
that I used to drive the behavior of the recursive LLM call. To run
them, use this command:

```bash
cargo test --package=assistant_tools --features eval -- eval_extract_handle_command_output
```

Or comment out the `#[cfg_attr(not(feature = "eval"), ignore)]` macro.

I recommend running them one at a time, because right now we don't
really have a way of orchestrating of all these evals. I think we should
invest into that effort once the new agent panel goes live.

Release Notes:

- N/A

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
2025-05-01 17:37:43 +02:00
..
default.json Introduce a new StreamingEditFileTool (#29733) 2025-05-01 17:37:43 +02:00
initial_debug_tasks.json Debugger implementation (#13433) 2025-03-18 12:55:25 -04:00
initial_local_settings.json Fix broken link in initial settings (#15119) 2024-07-25 08:25:27 -04:00
initial_server_settings.json Add settings to remote servers, use XDG paths on remote, and enable node LSPs (#19176) 2024-10-15 23:32:44 -07:00
initial_tasks.json tasks: Add spawn option by tag (#25650) 2025-04-04 14:20:09 +00:00
initial_user_settings.json Note in initial_user_settings.json how to access the command palette (#17854) 2024-09-15 19:45:48 -04:00