From 022a110f8e8490f256513722926b4239d1f19efc Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Thu, 17 Apr 2025 10:20:24 -0300 Subject: [PATCH] agent: Fix "open thread as markdown" button (#28962) Just now realized that the reason this button wasn't working reliably is because we weren't passing the index to it. It's now fixed. Release Notes: - N/A --- crates/agent/src/active_thread.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs index fea66c3dea..ed7c4ee073 100644 --- a/crates/agent/src/active_thread.rs +++ b/crates/agent/src/active_thread.rs @@ -1491,12 +1491,12 @@ impl ActiveThread { let editor_bg_color = colors.editor_background; let bg_user_message_header = editor_bg_color.blend(active_color.opacity(0.25)); - let open_as_markdown = IconButton::new("open-as-markdown", IconName::FileCode) + let open_as_markdown = IconButton::new(("open-as-markdown", ix), IconName::FileCode) .shape(ui::IconButtonShape::Square) .icon_size(IconSize::XSmall) .icon_color(Color::Ignored) .tooltip(Tooltip::text("Open Thread as Markdown")) - .on_click(|_event, window, cx| { + .on_click(|_, window, cx| { window.dispatch_action(Box::new(OpenActiveThreadAsMarkdown), cx) });