diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index 9589d37d8ae2786053bb450a117608df52de73bf..725b7a9cc24321399c464ee51908916c090e8774 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -3777,7 +3777,16 @@ impl AgentPanel { let agent_server_store = agent_server_store; Rc::new(move |window, cx| { - telemetry::event!("New Thread Clicked"); + use settings::{NewThreadLocation, Settings}; + let thread_location = match AgentSettings::get_global(cx).new_thread_location { + NewThreadLocation::LocalProject => "current_worktree", + NewThreadLocation::NewWorktree => "new_worktree", + }; + telemetry::event!( + "New Thread Clicked", + source = "agent_panel", + thread_location = thread_location + ); let active_thread = active_thread.clone(); Some(ContextMenu::build(window, cx, |menu, _window, cx| { diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs index 807808bb4d566f2faf6616f7491790daa8d46bfc..56e71d4f9818131283b1420cd4e67913cf570f3b 100644 --- a/crates/sidebar/src/sidebar.rs +++ b/crates/sidebar/src/sidebar.rs @@ -30,7 +30,7 @@ use remote::RemoteConnectionOptions; use ui::utils::platform_title_bar_height; use serde::{Deserialize, Serialize}; -use settings::Settings as _; +use settings::{NewThreadLocation, Settings as _}; use std::collections::{HashMap, HashSet}; use std::mem; use std::rc::Rc; @@ -3171,6 +3171,16 @@ impl Sidebar { return; }; + let thread_location = match AgentSettings::get_global(cx).new_thread_location { + NewThreadLocation::LocalProject => "current_worktree", + NewThreadLocation::NewWorktree => "new_worktree", + }; + telemetry::event!( + "New Thread Clicked", + source = "sidebar", + thread_location = thread_location + ); + self.active_entry = Some(ActiveEntry::Draft(workspace.clone())); multi_workspace.update(cx, |multi_workspace, cx| {