Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Clear original agent prompt when creating a new worktree (#51839)
Anthony Eid7b9df57a354b
diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rsindex 7e7aca1c25a..41f2092f251 100644--- a/crates/agent_ui/src/agent_panel.rs+++ b/crates/agent_ui/src/agent_panel.rs@@ -3021,8 +3021,17 @@ impl AgentPanel {multi_workspace.activate(new_workspace.clone(), cx);})?;- this.update_in(cx, |this, _window, cx| {+ this.update_in(cx, |this, window, cx| {this.worktree_creation_status = None;++ if let Some(thread_view) = this.active_thread_view(cx) {+ thread_view.update(cx, |thread_view, cx| {+ thread_view+ .message_editor+ .update(cx, |editor, cx| editor.clear(window, cx));+ });+ }+cx.notify();})?;