Encourage editing over re-creating a file from scratch (#29870)
I also introduced a new eval to prove the encouragement actually makes a difference. Release Notes: - Improved agent behavior when streaming edits, encouraging it to editing files as opposed to creating them from scratch
This commit is contained in:
parent
ca1dc821cf
commit
4d51602e7b
4 changed files with 67 additions and 0 deletions
|
@ -54,6 +54,7 @@ pub use edit_file_tool::{EditFileTool, EditFileToolInput};
|
|||
pub use find_path_tool::FindPathToolInput;
|
||||
pub use open_tool::OpenTool;
|
||||
pub use read_file_tool::ReadFileToolInput;
|
||||
pub use streaming_edit_file_tool::StreamingEditFileToolInput;
|
||||
pub use terminal_tool::TerminalTool;
|
||||
|
||||
pub fn init(http_client: Arc<HttpClientWithUrl>, cx: &mut App) {
|
||||
|
|
|
@ -61,6 +61,9 @@ pub struct StreamingEditFileToolInput {
|
|||
|
||||
/// If true, this tool will recreate the file from scratch.
|
||||
/// If false, this tool will produce granular edits to an existing file.
|
||||
///
|
||||
/// When a file already exists or you just created it, always prefer editing
|
||||
/// it as opposed to recreating it from scratch.
|
||||
pub create_or_overwrite: bool,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue