diff --git a/crates/debugger_ui/src/new_process_modal.rs b/crates/debugger_ui/src/new_process_modal.rs index a4d7c04dc30d65370c6389f3d3bc895d9d440c6c..921568156dd6be56eb0ec612808ac52c257a80b6 100644 --- a/crates/debugger_ui/src/new_process_modal.rs +++ b/crates/debugger_ui/src/new_process_modal.rs @@ -1168,15 +1168,35 @@ impl DebugDelegate { } let dap_registry = cx.global::(); + let hide_vscode = scenarios.iter().any(|(kind, _)| match kind { + TaskSourceKind::Worktree { + id: _, + directory_in_worktree: dir, + id_base: _, + } => dir.ends_with(".zed"), + _ => false, + }); self.candidates = recent .into_iter() .map(|scenario| Self::get_scenario_kind(&languages, &dap_registry, scenario)) - .chain(scenarios.into_iter().map(|(kind, scenario)| { - let (language, scenario) = - Self::get_scenario_kind(&languages, &dap_registry, scenario); - (language.or(Some(kind)), scenario) - })) + .chain( + scenarios + .into_iter() + .filter(|(kind, _)| match kind { + TaskSourceKind::Worktree { + id: _, + directory_in_worktree: dir, + id_base: _, + } => !(hide_vscode && dir.ends_with(".vscode")), + _ => true, + }) + .map(|(kind, scenario)| { + let (language, scenario) = + Self::get_scenario_kind(&languages, &dap_registry, scenario); + (language.or(Some(kind)), scenario) + }), + ) .collect(); } }