From 720fe2f437719bdb5fc1cb84cd79d68db189e241 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 15:49:02 +0200 Subject: [PATCH] agent: Don't stop following after edits (cherry-pick #32606) (#32608) Cherry-picked agent: Don't stop following after edits (#32606) This is reverting a change from #32071 which caused agent following to stop after the file was edited. This will reintroduce the behavior that the keyboard shortcuts don't work until the model is done generating, but we will revisit that afterwards. Co-authored-by: Bennet Bo Fenner Release Notes: - agent: Fix a regression in agent following behavior after file edits Co-authored-by: Bennet Bo Fenner Co-authored-by: Ben Brandt Co-authored-by: Bennet Bo Fenner --- crates/agent/src/agent_diff.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/agent/src/agent_diff.rs b/crates/agent/src/agent_diff.rs index 34ff249e95777bb02f87e755aa337e5e89710f12..1516cd02287d4cbb72e382804f7b440368b35efa 100644 --- a/crates/agent/src/agent_diff.rs +++ b/crates/agent/src/agent_diff.rs @@ -1513,7 +1513,7 @@ impl AgentDiff { multibuffer.add_diff(diff_handle.clone(), cx); }); - let new_state = if thread.read(cx).has_pending_edit_tool_uses() { + let new_state = if thread.read(cx).is_generating() { EditorState::Generating } else { EditorState::Reviewing