agent: Review edits in single-file editors (#29820)
Enables reviewing agent edits from single-file editors in addition to the multibuffer experience we already had. https://github.com/user-attachments/assets/a2c287f0-51d6-43a1-8537-821498b91983 This feature can be turned off by setting `assistant.single_file_review: false`. Release Notes: - agent: Review edits in single-file editors
This commit is contained in:
parent
04772bf17d
commit
64316309aa
13 changed files with 1396 additions and 254 deletions
|
@ -2636,6 +2636,11 @@ impl MultiBuffer {
|
|||
self.snapshot.borrow().all_diff_hunks_expanded
|
||||
}
|
||||
|
||||
pub fn set_all_diff_hunks_collapsed(&mut self, cx: &mut Context<Self>) {
|
||||
self.snapshot.borrow_mut().all_diff_hunks_expanded = false;
|
||||
self.expand_or_collapse_diff_hunks(vec![Anchor::min()..Anchor::max()], false, cx);
|
||||
}
|
||||
|
||||
pub fn has_multiple_hunks(&self, cx: &App) -> bool {
|
||||
self.read(cx)
|
||||
.diff_hunks_in_range(Anchor::min()..Anchor::max())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue