MCPcopy Create free account
hub / github.com/microsoft/vscode-extension-samples / pickRuntime

Function pickRuntime

quickinput-sample/src/multiStepInput.ts:91–104  ·  view source on GitHub ↗
(input: MultiStepInput, state: Partial<State>)

Source from the content-addressed store, hash-verified

89 }
90
91 async function pickRuntime(input: MultiStepInput, state: Partial<State>) {
92 const additionalSteps = typeof state.resourceGroup === 'string' ? 1 : 0;
93 const runtimes = await getAvailableRuntimes(state.resourceGroup!, undefined /* TODO: token */);
94 // TODO: Remember currently active item when navigating back.
95 state.runtime = await input.showQuickPick({
96 title,
97 step: 3 + additionalSteps,
98 totalSteps: 3 + additionalSteps,
99 placeholder: 'Pick a runtime',
100 items: runtimes,
101 activeItem: state.runtime,
102 shouldResume: shouldResume
103 });
104 }
105
106 function shouldResume() {
107 // Could show a notification with the option to resume.

Callers 1

inputNameFunction · 0.85

Calls 2

getAvailableRuntimesFunction · 0.85
showQuickPickMethod · 0.80

Tested by

no test coverage detected