debugger: Fix gutter tasks display for users without the debugger feature flag (#29056)

This commit is contained in:
Kirill Bulatov 2025-04-18 10:22:26 -06:00 committed by GitHub
parent 502a0f6535
commit 7badd6053d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 23 deletions

View file

@ -5013,15 +5013,15 @@ impl Editor {
None => None,
};
let resolved_tasks =
tasks.zip(task_context).map(|(tasks, task_context)| {
Rc::new(ResolvedTasks {
tasks
.zip(task_context)
.map(|(tasks, task_context)| ResolvedTasks {
templates: tasks.resolve(&task_context).collect(),
position: snapshot.buffer_snapshot.anchor_before(Point::new(
multibuffer_point.row,
tasks.column,
)),
})
});
});
let spawn_straight_away = resolved_tasks.as_ref().map_or(false, |tasks| {
tasks
.templates
@ -5042,10 +5042,11 @@ impl Editor {
*editor.context_menu.borrow_mut() =
Some(CodeContextMenu::CodeActions(CodeActionsMenu {
buffer,
actions: CodeActionContents {
tasks: resolved_tasks,
actions: code_actions,
},
actions: CodeActionContents::new(
resolved_tasks,
code_actions,
cx,
),
selected_item: Default::default(),
scroll_handle: UniformListScrollHandle::default(),
deployed_from_indicator,