mirror of
https://github.com/coder/code-server.git
synced 2025-08-01 19:30:05 +08:00
Update to VS Code 1.52.1
This commit is contained in:
@ -15,7 +15,7 @@ import {
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export function runSelectedScript() {
|
||||
export function runSelectedScript(context: vscode.ExtensionContext) {
|
||||
let editor = vscode.window.activeTextEditor;
|
||||
if (!editor) {
|
||||
return;
|
||||
@ -27,15 +27,15 @@ export function runSelectedScript() {
|
||||
|
||||
let script = findScriptAtPosition(contents, offset);
|
||||
if (script) {
|
||||
runScript(script, document);
|
||||
runScript(context, script, document);
|
||||
} else {
|
||||
let message = localize('noScriptFound', 'Could not find a valid npm script at the selection.');
|
||||
vscode.window.showErrorMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
export async function selectAndRunScriptFromFolder(selectedFolder: vscode.Uri) {
|
||||
let taskList: FolderTaskItem[] = await detectNpmScriptsForFolder(selectedFolder);
|
||||
export async function selectAndRunScriptFromFolder(context: vscode.ExtensionContext, selectedFolder: vscode.Uri) {
|
||||
let taskList: FolderTaskItem[] = await detectNpmScriptsForFolder(context, selectedFolder);
|
||||
|
||||
if (taskList && taskList.length > 0) {
|
||||
const quickPick = vscode.window.createQuickPick<FolderTaskItem>();
|
||||
|
Reference in New Issue
Block a user