Add the ability to follow the agent as it makes edits (#29839)

Nathan here: I also tacked on a bunch of UI refinement.

Release Notes:

- Introduced the ability to follow the agent around as it reads and
edits files.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Antonio Scandurra 2025-05-04 10:28:39 +02:00 committed by GitHub
parent 425f32e068
commit 545ae27079
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 1255 additions and 567 deletions

View file

@ -1143,7 +1143,7 @@ impl Vim {
&& !newest_selection_empty
&& self.mode == Mode::Normal
// When following someone, don't switch vim mode.
&& editor.leader_peer_id().is_none()
&& editor.leader_id().is_none()
{
if preserve_selection {
self.switch_mode(Mode::Visual, true, window, cx);
@ -1468,7 +1468,7 @@ impl Vim {
fn local_selections_changed(&mut self, window: &mut Window, cx: &mut Context<Self>) {
let Some(editor) = self.editor() else { return };
if editor.read(cx).leader_peer_id().is_some() {
if editor.read(cx).leader_id().is_some() {
return;
}