Skip to content

Commit 256478f

Browse files
committed
Remove comments and improve wording
1 parent a49af4f commit 256478f

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/lib/vscode.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { type QuickPickItem, window } from "vscode";
22

3-
// import { ref } from "reactive-vscode";
4-
53
type QuickPickWithCallbackOptions = {
64
executeCallbackOnInputChange?: boolean;
75
};
@@ -10,13 +8,11 @@ export function quickPickWithCallback<T>(
108
placeholder: string,
119
callback: (input: string) => Promise<T[]>,
1210
transformer: (items: T[]) => QuickPickItem[],
13-
onSelect: (selectedItem: QuickPickItem /* , results: T[] | null */) => void,
11+
onSelect: (selectedItem: QuickPickItem) => void,
1412
options: QuickPickWithCallbackOptions = {
1513
executeCallbackOnInputChange: false,
1614
}
1715
) {
18-
// const results = ref<T[] | null>(null);
19-
2016
const quickPick = window.createQuickPick();
2117

2218
quickPick.placeholder = placeholder;
@@ -31,20 +27,13 @@ export function quickPickWithCallback<T>(
3127

3228
quickPick.busy = true;
3329

34-
// console.log(value);
35-
3630
try {
3731
const callbackResults = await callback(value || "");
3832

39-
// console.log(callbackResults);
40-
4133
const transformedResults = callbackResults
4234
? transformer(callbackResults)
4335
: [];
4436

45-
// const callbackResults = await callback(value || "");
46-
47-
// results.value = callbackResults;
4837
quickPick.items = transformedResults;
4938
} catch (error) {
5039
console.error(error);
@@ -111,5 +100,5 @@ export async function pasteContentAtCursor(
111100
editBuilder.insert(editor.selection.active, content);
112101
});
113102

114-
window.showInformationMessage("Content pasted successfully.");
103+
window.showInformationMessage("Snippet pasted successfully.");
115104
}

0 commit comments

Comments
 (0)