From ddab1cbd71dea28aa0e4c0eb6c3e8dcd68f7d07a Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Thu, 26 Jun 2025 14:23:39 -0300 Subject: [PATCH] Fix notify and margin Co-authored-by: Smit Barmase --- crates/agent2/src/agent2.rs | 1 + crates/agent2/src/thread_element.rs | 13 +++++++------ crates/agent_ui/src/agent_panel.rs | 3 +-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/agent2/src/agent2.rs b/crates/agent2/src/agent2.rs index 28031f1e055d41a35275b2d5e86e9f05f8c1c1b1..43ee7bc2ee7fee0c3ffbede5d2acf35aa8804cab 100644 --- a/crates/agent2/src/agent2.rs +++ b/crates/agent2/src/agent2.rs @@ -228,6 +228,7 @@ impl Thread { { // todo! merge with last chunk if same type chunks.push(chunk); + cx.notify(); return; } } diff --git a/crates/agent2/src/thread_element.rs b/crates/agent2/src/thread_element.rs index 71b8bde8fd258cf6c471c9caaf5e0e2f6ff53f51..3c075ee60a6a7387161f84d5bc0190e29a39a9af 100644 --- a/crates/agent2/src/thread_element.rs +++ b/crates/agent2/src/thread_element.rs @@ -140,11 +140,10 @@ impl Render for ThreadElement { let focus_handle = self.message_editor.focus_handle(cx); v_flex() - .p_2() .key_context("MessageEditor") .on_action(cx.listener(Self::chat)) .child( - v_flex().h_full().gap_1().children( + v_flex().p_2().h_full().gap_1().children( self.thread .read(cx) .entries() @@ -153,10 +152,12 @@ impl Render for ThreadElement { ), ) .when(self.send_task.is_some(), |this| { - this.my_1().child( - Label::new("Generating...") - .color(Color::Muted) - .size(LabelSize::Small), + this.child( + div().p_2().child( + Label::new("Generating...") + .color(Color::Muted) + .size(LabelSize::Small), + ), ) }) .child( diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index 7ca0057c738c3357a93c41eb2ed31ac5db49fda9..7de916301c6b409f38830cbba321b58439891c68 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -897,8 +897,7 @@ impl AgentPanel { .next() .map(|worktree| worktree.read(cx).abs_path()) else { - // todo! handle no project - return; + todo!(); }; let cli_path =