diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index 7e7aca1c25a0db1acf97be92c7889049ab05b339..41f2092f251c95ab2964a24557ffd24753ddfdb5 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(); })?;