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
|
@ -1456,7 +1456,12 @@ impl FakeFs {
|
|||
.unwrap();
|
||||
}
|
||||
|
||||
pub fn set_head_for_repo(&self, dot_git: &Path, head_state: &[(RepoPath, String)]) {
|
||||
pub fn set_head_for_repo(
|
||||
&self,
|
||||
dot_git: &Path,
|
||||
head_state: &[(RepoPath, String)],
|
||||
sha: impl Into<String>,
|
||||
) {
|
||||
self.with_git_state(dot_git, true, |state| {
|
||||
state.head_contents.clear();
|
||||
state.head_contents.extend(
|
||||
|
@ -1464,6 +1469,7 @@ impl FakeFs {
|
|||
.iter()
|
||||
.map(|(path, content)| (path.clone(), content.clone())),
|
||||
);
|
||||
state.refs.insert("HEAD".into(), sha.into());
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue