Systematically optimize agentic editing performance (#28961)
Now that we've established a proper eval in tree, this PR is reboots of our agent loop back to a set of minimal tools and simpler prompts. We should aim to get this branch feeling subjectively competitive with what's on main and then merge it, and build from there. Let's invest in our eval and use it to drive better performance of the agent loop. How you can help: Pick an example, and then make the outcome faster or better. It's fine to even use your own subjective judgment, as our evaluation criteria likely need tuning as well at this point. Focus on making the agent work better in your own subjective experience first. Let's focus on simple/practical improvements to make this thing work better, then determine how we can craft our judgment criteria to lock those improvements in. Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev> Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Agus <agus@zed.dev> Co-authored-by: Richard <richard@zed.dev> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Michael Sloan <mgsloan@gmail.com>
This commit is contained in:
parent
8102a16747
commit
bab28560ef
68 changed files with 1575 additions and 478 deletions
|
@ -806,6 +806,23 @@ impl Worktree {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn file_exists(&self, path: &Path, cx: &Context<Worktree>) -> Task<Result<bool>> {
|
||||
match self {
|
||||
Worktree::Local(this) => {
|
||||
let fs = this.fs.clone();
|
||||
let path = this.absolutize(path);
|
||||
cx.background_spawn(async move {
|
||||
let path = path?;
|
||||
let metadata = fs.metadata(&path).await?;
|
||||
Ok(metadata.map_or(false, |metadata| !metadata.is_dir))
|
||||
})
|
||||
}
|
||||
Worktree::Remote(_) => Task::ready(Err(anyhow!(
|
||||
"remote worktrees can't yet check file existence"
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn load_file(&self, path: &Path, cx: &Context<Worktree>) -> Task<Result<LoadedFile>> {
|
||||
match self {
|
||||
Worktree::Local(this) => this.load_file(path, cx),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue