ZIm/crates/context_server/src
Agus Zubiaga 47a89ad243
assistant: Edit files tool (#26506)
Exposes a new "edit files" tool that the model can use to apply
modifications to files in the project. The main model provides
instructions and the tool uses a separate "editor" model (Claude 3.5 by
default) to generate search/replace blocks like Aider does:

````markdown
mathweb/flask/app.py
```python
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
````

The search/replace blocks are parsed and applied as they stream in. If a
block fails to parse, the tool will apply the other edits and report an
error pointing to the part of the input where it occurred. This should
allow the model to fix it.


Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2025-03-12 12:30:47 +00:00
..
transport context_server: Abstract server transport (#24528) 2025-02-26 17:19:19 +00:00
client.rs context_server: Abstract server transport (#24528) 2025-02-26 17:19:19 +00:00
context_server.rs context_server: Abstract server transport (#24528) 2025-02-26 17:19:19 +00:00
context_server_tool.rs assistant: Edit files tool (#26506) 2025-03-12 12:30:47 +00:00
extension_context_server.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
manager.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00
protocol.rs Factor tool definitions out of assistant (#21189) 2024-11-25 18:26:34 -05:00
registry.rs Fix missed renames in #22632 (#23688) 2025-01-26 23:37:34 +00:00
transport.rs context_server: Abstract server transport (#24528) 2025-02-26 17:19:19 +00:00
types.rs context_server: Add missing types for MCP spec to protocol 2024-11-05 (#21498) 2024-12-04 10:45:25 -05:00