MCPcopy Index your code
hub / github.com/VSpaceCode/VSpaceCode / confirmWrapper

Function confirmWrapper

src/messages.ts:11–23  ·  view source on GitHub ↗
(title: string, fn: () => Thenable<any>)

Source from the content-addressed store, hash-verified

9 "Configuration may change the format of your settings.json and keybindings.json file. Are you sure?";
10
11export function confirmWrapper(title: string, fn: () => Thenable<any>) {
12 return async () => {
13 const confirmText = "Sure";
14 const cancelText = "Cancel";
15 const selection = await window.showQuickPick(
16 [confirmText, cancelText],
17 { title }
18 );
19 if (selection === confirmText) {
20 await fn();
21 }
22 };
23}
24
25export async function showUpdateMessage(cur: string, prev: string) {
26 if (Version.compare(cur, prev) === ComparisonResult.Newer) {

Callers 1

activateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected