MCPcopy Index your code
hub / github.com/PowerShell/vscode-powershell / showInner

Function showInner

src/controls/checkboxQuickPick.ts:50–81  ·  view source on GitHub ↗
(
    items: ICheckboxQuickPickItem[],
    options: ICheckboxQuickPickOptions,
)

Source from the content-addressed store, hash-verified

48}
49
50async function showInner(
51 items: ICheckboxQuickPickItem[],
52 options: ICheckboxQuickPickOptions,
53): Promise<vscode.QuickPickItem | undefined> {
54 const selection = await vscode.window.showQuickPick(
55 getQuickPickItems(items),
56 {
57 ignoreFocusOut: true,
58 matchOnDescription: true,
59 placeHolder: options.confirmPlaceHolder,
60 },
61 );
62
63 if (selection === undefined) {
64 return undefined;
65 }
66
67 if (selection.label === confirmItemLabel) {
68 return selection;
69 }
70
71 const index: number = getItemIndex(items, selection.label);
72 if (index >= 0) {
73 toggleSelection(items[index]);
74 } else {
75 console.log(
76 `Couldn't find CheckboxQuickPickItem for label '${selection.label}'`,
77 );
78 }
79
80 return showInner(items, options);
81}
82
83function getItemIndex(
84 items: ICheckboxQuickPickItem[],

Callers 1

showCheckboxQuickPickFunction · 0.85

Calls 4

getQuickPickItemsFunction · 0.85
getItemIndexFunction · 0.85
toggleSelectionFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected