agent: Move focus to the panel after sending a user message edit (#33049)

Follow up to https://github.com/zed-industries/zed/pull/31611.
Closes https://github.com/zed-industries/zed/issues/33005.

Release Notes:

- agent: Fixed a bug where, after confirming editing a previous user
message while zoomed in, the focus went to the buffer and the panel got
closed.
This commit is contained in:
Danilo Leal 2025-06-19 14:38:37 -03:00 committed by GitHub
parent 61abfd5930
commit 5c7e90d494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1618,6 +1618,14 @@ impl ActiveThread {
})
.log_err();
}));
if let Some(workspace) = self.workspace.upgrade() {
workspace.update(cx, |workspace, cx| {
if let Some(panel) = workspace.panel::<AgentPanel>(cx) {
panel.focus_handle(cx).focus(window);
}
});
}
}
fn messages_after(&self, message_id: MessageId) -> &[MessageId] {