Add find-replace-file tool, use it by default over edit-files-tool (#27438)

@agu-z and paired on trying out a "one tool call per edit" approach for
editing files. (The previous approach is still available, it's just
unchecked by default for now.)

Release Notes:

- N/A

---------

Co-authored-by: Agus <agus@zed.dev>
This commit is contained in:
Richard Feldman 2025-03-25 13:12:50 -04:00 committed by GitHub
parent cd1e56d6c7
commit bf255486c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 239 additions and 4 deletions

View file

@ -1,7 +1,7 @@
mod edit_action;
pub mod log;
mod replace;
use crate::replace::{replace_exact, replace_with_flexible_indent};
use anyhow::{anyhow, Context, Result};
use assistant_tool::{ActionLog, Tool};
use collections::HashSet;
@ -13,7 +13,6 @@ use language_model::{
};
use log::{EditToolLog, EditToolRequestId};
use project::Project;
use replace::{replace_exact, replace_with_flexible_indent};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::fmt::Write;