MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / getConfirmation

Function getConfirmation

src/util.ts:232–247  ·  view source on GitHub ↗
(prompt: string, confirmation?: string, detail?: string)

Source from the content-addressed store, hash-verified

230// shows a quick pick asking the user for confirmation
231// returns true if the user confirms, false if they cancel or dismiss the quickpick
232export async function getConfirmation(prompt: string, confirmation?: string, detail?: string): Promise<boolean> {
233 confirmation ||= 'Yes';
234 const items: vscode.QuickPickItem[] = [
235 {
236 label: confirmation,
237 detail: detail
238 },
239 {
240 label: 'Cancel'
241 }
242 ];
243 const answer = await vscode.window.showQuickPick(items, {
244 placeHolder: prompt
245 });
246 return answer === items[0];
247}
248
249// executes a given command as shell task
250// is more transparent than background processes without littering the integrated terminals

Callers 4

newDraftFunction · 0.90
removePackageMethod · 0.90
installPackagesMethod · 0.90
updatePackagesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected