Skip to content

Commit 166c1e5

Browse files
author
Tyler Deemer
committed
Open studio extension pages in web browser
1 parent ae57d80 commit 166c1e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/commands/studio.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as vscode from "vscode";
22
import { AtelierAPI } from "../api";
3-
import { FILESYSTEM_SCHEMA } from "../extension";
3+
import { config, FILESYSTEM_SCHEMA } from "../extension";
44
import { outputChannel } from "../utils";
55

66
interface StudioAction extends vscode.QuickPickItem {
@@ -36,7 +36,10 @@ class StudioActions {
3636
.showWarningMessage(target, { modal: true }, "Yes", "No")
3737
.then(answer => (answer === "Yes" ? "1" : answer === "No" ? "0" : "2"));
3838
case 2: // Run a CSP page/Template. The Target is the full url to the CSP page/Template
39-
throw new Error("Not suppoorted");
39+
const conn = config().conn;
40+
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse(`http://${conn.host}:${conn.port}${target}`));
41+
break;
42+
// throw new Error("Not suppoorted");
4043
case 3: // Run an EXE on the client.
4144
throw new Error("Not suppoorted");
4245
case 4: // Insert the text in Target in the current document at the current selection point

0 commit comments

Comments
 (0)