Get user input from input box in visual studio code

1 · Adrian Matei · July 5, 2021, 5:46 a.m.
Use vscode.window.showInputBox - the returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK. const searchQuery = await vscode.window.showInputBox({ placeHolder: "Search query", prompt: "Search my snippets on Codever", value: selectedText }); if(searchQuery === ''){ console.log(searchQuery); vscode.window....