Skip to content

Commit

Permalink
Don't show kind in kernel MRU quick pick (#173754)
Browse files Browse the repository at this point in the history
Don't use kind in kernel MRU quick pick

For #168535

As discussed, we will stop showing the `kind` in the new MRU kernel quick pick
  • Loading branch information
mjbvz authored Feb 8, 2023
1 parent 5b79b91 commit f3901eb
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,25 +661,14 @@ export class KernelPickerMRUStrategy extends KernelPickerStrategyBase {

protected _getKernelPickerQuickPickItems(notebookTextModel: NotebookTextModel, matchResult: INotebookKernelMatchResult, notebookKernelService: INotebookKernelService, scopedContextKeyService: IContextKeyService): QuickPickInput<KernelQuickPickItem>[] {
const quickPickItems: QuickPickInput<KernelQuickPickItem>[] = [];
let previousKind = '';

if (matchResult.selected) {
const kernelItem = toKernelQuickPick(matchResult.selected, matchResult.selected);
const kind = matchResult.selected.kind || '';
if (kind) {
previousKind = kind;
quickPickItems.push({ type: 'separator', label: kind });
}
quickPickItems.push(kernelItem);
}

matchResult.suggestions.filter(kernel => kernel.id !== matchResult.selected?.id).map(kernel => toKernelQuickPick(kernel, matchResult.selected))
.forEach(kernel => {
const kind = kernel.kernel.kind || '';
if (kind && kind !== previousKind) {
previousKind = kind;
quickPickItems.push({ type: 'separator', label: kind });
}
quickPickItems.push(kernel);
});

Expand Down

0 comments on commit f3901eb

Please sign in to comment.