Skip to content

Commit

Permalink
Add executeSelection method to the extension host cell executor
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed May 10, 2024
1 parent 0feb78c commit 01ffbbc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/vscode/src/host/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/

import { Uri, WebviewPanelOptions, WebviewOptions, ViewColumn } from 'vscode';
import { Uri, WebviewPanelOptions, WebviewOptions, ViewColumn, commands } from 'vscode';

import * as hooks from 'positron';

Expand Down Expand Up @@ -65,7 +65,10 @@ export function hooksExtensionHost() : ExtensionHost {
}
await hooksApi()?.runtime.executeCode(language, code, false);
}
}
},
executeSelection: async () : Promise<void> => {
await commands.executeCommand('workbench.action.positronConsole.executeCode', {languageId: language});
}
};

// delegate for other languages
Expand Down

0 comments on commit 01ffbbc

Please sign in to comment.