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.

thread view: Prevent user message controls to be cut-off (#36865)

Danilo Leal2b5a3029727f
diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs
index 5674b15c98c..25f2745f756 100644
--- a/crates/agent_ui/src/acp/thread_view.rs
+++ b/crates/agent_ui/src/acp/thread_view.rs
@@ -1305,14 +1305,23 @@ impl AcpThreadView {
None
};
+ let has_checkpoint_button = message
+ .checkpoint
+ .as_ref()
+ .is_some_and(|checkpoint| checkpoint.show);
+
let agent_name = self.agent.name();
v_flex()
.id(("user_message", entry_ix))
- .map(|this| if rules_item.is_some() {
- this.pt_3()
- } else {
- this.pt_2()
+ .map(|this| {
+ if entry_ix == 0 && !has_checkpoint_button && rules_item.is_none() {
+ this.pt_4()
+ } else if rules_item.is_some() {
+ this.pt_3()
+ } else {
+ this.pt_2()
+ }
})
.pb_4()
.px_2()