Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

agent: Make clicking on the backdrop to dismiss message editing more reliable (#31614)

Danilo Leal68724ea99edb
diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs
index de8553e1ccf..71fd524ead3 100644
--- a/crates/agent/src/active_thread.rs
+++ b/crates/agent/src/active_thread.rs
@@ -1831,6 +1831,7 @@ impl ActiveThread {
let colors = cx.theme().colors();
let editor_bg_color = colors.editor_background;
+ let panel_bg = colors.panel_background;
let open_as_markdown = IconButton::new(("open-as-markdown", ix), IconName::DocumentText)
.icon_size(IconSize::XSmall)
@@ -1851,7 +1852,6 @@ impl ActiveThread {
const RESPONSE_PADDING_X: Pixels = px(19.);
let show_feedback = thread.is_turn_end(ix);
-
let feedback_container = h_flex()
.group("feedback_container")
.mt_1()
@@ -2148,16 +2148,14 @@ impl ActiveThread {
message_id > *editing_message_id
});
- let panel_background = cx.theme().colors().panel_background;
-
let backdrop = div()
- .id("backdrop")
- .stop_mouse_events_except_scroll()
+ .id(("backdrop", ix))
+ .size_full()
.absolute()
.inset_0()
- .size_full()
- .bg(panel_background)
+ .bg(panel_bg)
.opacity(0.8)
+ .stop_mouse_events_except_scroll()
.on_click(cx.listener(Self::handle_cancel_click));
v_flex()