Automatically keep edits if they are included in a commit (#32093)
Release Notes: - Improved the review experience in the agent panel. Now, when you commit changes (generated by the AI agent) using Git, Zed will automatically dismiss the agent’s review UI for those changes. This means you won’t have to manually “keep” or approve changes twice—just commit, and you’re done.
This commit is contained in:
parent
8c1b549683
commit
4ac67ac5ae
11 changed files with 465 additions and 116 deletions
|
@ -741,6 +741,7 @@ mod tests {
|
|||
("a.txt".into(), "".into()),
|
||||
("b/c.txt".into(), "something-else".into()),
|
||||
],
|
||||
"deadbeef",
|
||||
);
|
||||
cx.executor().run_until_parked();
|
||||
cx.executor().advance_clock(Duration::from_secs(1));
|
||||
|
|
|
@ -6499,6 +6499,7 @@ async fn test_uncommitted_diff_for_buffer(cx: &mut gpui::TestAppContext) {
|
|||
("src/modification.rs".into(), committed_contents),
|
||||
("src/deletion.rs".into(), "// the-deleted-contents\n".into()),
|
||||
],
|
||||
"deadbeef",
|
||||
);
|
||||
fs.set_index_for_repo(
|
||||
Path::new("/dir/.git"),
|
||||
|
@ -6565,6 +6566,7 @@ async fn test_uncommitted_diff_for_buffer(cx: &mut gpui::TestAppContext) {
|
|||
("src/modification.rs".into(), committed_contents.clone()),
|
||||
("src/deletion.rs".into(), "// the-deleted-contents\n".into()),
|
||||
],
|
||||
"deadbeef",
|
||||
);
|
||||
|
||||
// Buffer now has an unstaged hunk.
|
||||
|
@ -7011,6 +7013,7 @@ async fn test_staging_hunks_with_delayed_fs_event(cx: &mut gpui::TestAppContext)
|
|||
fs.set_head_for_repo(
|
||||
"/dir/.git".as_ref(),
|
||||
&[("file.txt".into(), committed_contents.clone())],
|
||||
"deadbeef",
|
||||
);
|
||||
fs.set_index_for_repo(
|
||||
"/dir/.git".as_ref(),
|
||||
|
@ -7207,6 +7210,7 @@ async fn test_staging_random_hunks(
|
|||
fs.set_head_for_repo(
|
||||
path!("/dir/.git").as_ref(),
|
||||
&[("file.txt".into(), committed_text.clone())],
|
||||
"deadbeef",
|
||||
);
|
||||
fs.set_index_for_repo(
|
||||
path!("/dir/.git").as_ref(),
|
||||
|
@ -7318,6 +7322,7 @@ async fn test_single_file_diffs(cx: &mut gpui::TestAppContext) {
|
|||
fs.set_head_for_repo(
|
||||
Path::new("/dir/.git"),
|
||||
&[("src/main.rs".into(), committed_contents.clone())],
|
||||
"deadbeef",
|
||||
);
|
||||
fs.set_index_for_repo(
|
||||
Path::new("/dir/.git"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue