Repository: stateful/vscode-runme (ts)

Issue:
Open notebook documents in runme mode necessarily
We should replace instances of `commands.executeCommand('vscode.open', ...` with `commands.executeCommand('vscode.openWith', ..., Kernel.type)`

Currently this affects opening the readme file downloaded from a `vscode://...` uri

Pull request description:
Prefer `vscode.openWith` over `vscode.open`
Fixes #432 

Patch:
diff --git a/src/extension/extension.ts b/src/extension/extension.ts
index 2af20597..5f40717d 100644
--- a/src/extension/extension.ts
+++ b/src/extension/extension.ts
@@ -144,7 +144,7 @@ export class RunmeExtension {
         const bootFile = new TextDecoder().decode(await workspace.fs.readFile(startupFileUri))
         const bootFileUri = Uri.joinPath(workspace.workspaceFolders[0].uri, bootFile)
         await workspace.fs.delete(startupFileUri)
-        await commands.executeCommand('vscode.open', bootFileUri)
+        await commands.executeCommand('vscode.openWith', bootFileUri, Kernel.type)
       }
     }
   }


Test patch:
diff --git a/tests/extension/extension.test.ts b/tests/extension/extension.test.ts
index 0e241f98..06b33ba9 100644
--- a/tests/extension/extension.test.ts
+++ b/tests/extension/extension.test.ts
@@ -58,7 +58,7 @@ test('initializes all providers', async () => {
   expect(window.registerTreeDataProvider).toBeCalledTimes(1)
   expect(window.registerUriHandler).toBeCalledTimes(1)
 
-  expect(commands.executeCommand).toBeCalledWith('vscode.open', '/foo/bar')
+  expect(commands.executeCommand).toBeCalledWith('vscode.openWith', '/foo/bar', 'runme')
   expect(workspace.fs.stat).toBeCalledWith('/foo/bar')
   expect(workspace.fs.delete).toBeCalledWith('/foo/bar')
 })