Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion extension/loc/xlf/aspire-vscode.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@
"icon": "$(link-external)"
},
{
"command": "aspire-vscode.openInSimpleBrowser",
"title": "%command.openInSimpleBrowser%",
"command": "aspire-vscode.openInIntegratedBrowser",
"title": "%command.openInIntegratedBrowser%",
"category": "Aspire",
"icon": "$(browser)"
},
Expand Down Expand Up @@ -505,7 +505,7 @@
"when": "false"
},
{
"command": "aspire-vscode.openInSimpleBrowser",
"command": "aspire-vscode.openInIntegratedBrowser",
"when": "false"
},
{
Expand Down Expand Up @@ -599,7 +599,7 @@
"group": "1_open@1"
},
{
"command": "aspire-vscode.openInSimpleBrowser",
"command": "aspire-vscode.openInIntegratedBrowser",
"when": "view == aspire-vscode.runningAppHosts && viewItem == endpointUrl",
"group": "1_open@2"
},
Expand Down Expand Up @@ -679,14 +679,16 @@
"type": "string",
"enum": [
"openExternalBrowser",
"integratedBrowser",
"debugChrome",
"debugEdge",
"debugFirefox"
],
"default": "openExternalBrowser",
"default": "integratedBrowser",
"description": "%configuration.aspire.dashboardBrowser%",
"enumDescriptions": [
"%configuration.aspire.dashboardBrowser.openExternalBrowser%",
"%configuration.aspire.dashboardBrowser.integratedBrowser%",
"%configuration.aspire.dashboardBrowser.debugChrome%",
"%configuration.aspire.dashboardBrowser.debugEdge%",
"%configuration.aspire.dashboardBrowser.debugFirefox%"
Expand Down
3 changes: 2 additions & 1 deletion extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"configuration.aspire.enableAspireDashboardAutoLaunch.off": "Do nothing — the dashboard URL is still printed in the terminal.",
"configuration.aspire.dashboardBrowser": "The browser to use when auto-launching the Aspire Dashboard.",
"configuration.aspire.dashboardBrowser.openExternalBrowser": "Use the system default browser (cannot auto-close).",
"configuration.aspire.dashboardBrowser.integratedBrowser": "Open in VS Code's integrated browser (does not auto-close).",
"configuration.aspire.dashboardBrowser.debugChrome": "Launch Chrome as a debug session (auto-closes when debugging ends).",
"configuration.aspire.dashboardBrowser.debugEdge": "Launch Microsoft Edge as a debug session (auto-closes when debugging ends).",
"configuration.aspire.dashboardBrowser.debugFirefox": "Launch Firefox as a debug session (requires Firefox Debugger extension).",
Expand Down Expand Up @@ -144,7 +145,7 @@
"command.executeResourceCommand": "Execute resource command",
"command.copyEndpointUrl": "Copy URL",
"command.openInExternalBrowser": "Open in browser",
"command.openInSimpleBrowser": "Open in VS Code",
"command.openInIntegratedBrowser": "Open in VS Code",
"command.copyAppHostPath": "Copy AppHost path",
"command.copyResourceName": "Copy resource name",
"command.copyPid": "Copy ID",
Expand Down
6 changes: 5 additions & 1 deletion extension/src/debugger/AspireDebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import path from "path";
import os from "os";
import { EnvironmentVariables } from "../utils/environment";

export type DashboardBrowserType = 'openExternalBrowser' | 'debugChrome' | 'debugEdge' | 'debugFirefox';
export type DashboardBrowserType = 'openExternalBrowser' | 'integratedBrowser' | 'debugChrome' | 'debugEdge' | 'debugFirefox';

export class AspireDebugSession implements vscode.DebugAdapter {
private readonly _onDidSendMessage = new EventEmitter<any>();
Expand Down Expand Up @@ -391,6 +391,10 @@ export class AspireDebugSession implements vscode.DebugAdapter {
await this.launchDebugBrowser(url, 'firefox');
break;

case 'integratedBrowser':
await vscode.commands.executeCommand('simpleBrowser.show', url);
break;

case 'openExternalBrowser':
default:
// Use VS Code's default external browser handling
Expand Down
4 changes: 2 additions & 2 deletions extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export async function activate(context: vscode.ExtensionContext) {
const executeResourceCommandRegistration = vscode.commands.registerCommand('aspire-vscode.executeResourceCommand', (element) => appHostTreeProvider.executeResourceCommand(element));
const copyEndpointUrlRegistration = vscode.commands.registerCommand('aspire-vscode.copyEndpointUrl', (element) => appHostTreeProvider.copyEndpointUrl(element));
const openInExternalBrowserRegistration = vscode.commands.registerCommand('aspire-vscode.openInExternalBrowser', (element) => appHostTreeProvider.openInExternalBrowser(element));
const openInSimpleBrowserRegistration = vscode.commands.registerCommand('aspire-vscode.openInSimpleBrowser', (element) => appHostTreeProvider.openInSimpleBrowser(element));
const openInIntegratedBrowserRegistration = vscode.commands.registerCommand('aspire-vscode.openInIntegratedBrowser', (element) => appHostTreeProvider.openInIntegratedBrowser(element));
const copyResourceNameRegistration = vscode.commands.registerCommand('aspire-vscode.copyResourceName', (element) => appHostTreeProvider.copyResourceName(element));
const copyPidRegistration = vscode.commands.registerCommand('aspire-vscode.copyPid', (element) => appHostTreeProvider.copyPid(element));
const copyAppHostPathRegistration = vscode.commands.registerCommand('aspire-vscode.copyAppHostPath', (element) => appHostTreeProvider.copyAppHostPath(element));
Expand All @@ -121,7 +121,7 @@ export async function activate(context: vscode.ExtensionContext) {
// Activate the data repository (starts workspace describe --follow; global polling begins when the panel is visible)
dataRepository.activate();

context.subscriptions.push(appHostTreeView, refreshRunningAppHostsRegistration, switchToGlobalViewRegistration, switchToWorkspaceViewRegistration, openDashboardRegistration, openAppHostSourceRegistration, stopAppHostRegistration, stopResourceRegistration, startResourceRegistration, restartResourceRegistration, viewResourceLogsRegistration, executeResourceCommandRegistration, copyEndpointUrlRegistration, openInExternalBrowserRegistration, openInSimpleBrowserRegistration, copyResourceNameRegistration, copyPidRegistration, copyAppHostPathRegistration, expandAllRegistration, { dispose: () => { appHostTreeProvider.dispose(); dataRepository.dispose(); } });
context.subscriptions.push(appHostTreeView, refreshRunningAppHostsRegistration, switchToGlobalViewRegistration, switchToWorkspaceViewRegistration, openDashboardRegistration, openAppHostSourceRegistration, stopAppHostRegistration, stopResourceRegistration, startResourceRegistration, restartResourceRegistration, viewResourceLogsRegistration, executeResourceCommandRegistration, copyEndpointUrlRegistration, openInExternalBrowserRegistration, openInIntegratedBrowserRegistration, copyResourceNameRegistration, copyPidRegistration, copyAppHostPathRegistration, expandAllRegistration, { dispose: () => { appHostTreeProvider.dispose(); dataRepository.dispose(); } });

// CodeLens provider — shows Debug on pipeline steps, resource state on resources
const codeLensProvider = new AspireCodeLensProvider(appHostTreeProvider);
Expand Down
2 changes: 1 addition & 1 deletion extension/src/views/AspireAppHostTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export class AspireAppHostTreeProvider implements vscode.TreeDataProvider<TreeEl
vscode.env.openExternal(vscode.Uri.parse(element.url));
}

openInSimpleBrowser(element: EndpointUrlItem): void {
openInIntegratedBrowser(element: EndpointUrlItem): void {
vscode.commands.executeCommand('simpleBrowser.show', element.url);
}

Expand Down
Loading