Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: only initialize vscode bindings when url param is passed (#1844)

Myles Scolnick8ae66e4404fd
diff --git a/frontend/src/core/vscode/vscode-bindings.ts b/frontend/src/core/vscode/vscode-bindings.ts
index 19d28add0d..64b4d90064 100644
--- a/frontend/src/core/vscode/vscode-bindings.ts
+++ b/frontend/src/core/vscode/vscode-bindings.ts
@@ -12,9 +12,15 @@ export const isEmbedded =
// we have to dispatch keyboard events in the parent window.
// See https://github.com/microsoft/vscode/issues/65452#issuecomment-586036474
export function maybeRegisterVSCodeBindings() {
+ const isVscode = new URLSearchParams(window.location.search).has("vscode");
+ if (!isVscode) {
+ return;
+ }
+
if (!isEmbedded || isWasm()) {
return;
}
+
Logger.log("Registering VS Code bindings");
registerKeyboard();
registerCopyPaste();