Skip to content
Open
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
44 changes: 37 additions & 7 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@
"icon": "$(clippy)"
},
{
"command": "aspire-vscode.copyPid",
"title": "%command.copyPid%",
"command": "aspire-vscode.viewAppHostSource",
"title": "%command.viewAppHostSource%",
"category": "Aspire",
"icon": "$(clippy)"
"icon": "$(json)"
},
{
"command": "aspire-vscode.switchToGlobalView",
Expand Down Expand Up @@ -412,6 +412,18 @@
"title": "%command.expandAll%",
"category": "Aspire",
"icon": "$(expand-all)"
},
{
"command": "aspire-vscode.viewAppHostLogFile",
"title": "%command.viewAppHostLogFile%",
"category": "Aspire",
"icon": "$(output)"
},
{
"command": "aspire-vscode.copyLogFilePath",
"title": "%command.copyLogFilePath%",
"category": "Aspire",
"icon": "$(clippy)"
}
],
"jsonValidation": [
Expand Down Expand Up @@ -551,12 +563,20 @@
"when": "false"
},
{
"command": "aspire-vscode.copyPid",
"command": "aspire-vscode.viewAppHostSource",
"when": "false"
},
{
"command": "aspire-vscode.expandAll",
"when": "false"
},
{
"command": "aspire-vscode.viewAppHostLogFile",
"when": "false"
},
{
"command": "aspire-vscode.copyLogFilePath",
"when": "false"
}
],
"view/title": [
Expand Down Expand Up @@ -648,9 +668,19 @@
"group": "3_info@2"
},
{
"command": "aspire-vscode.copyPid",
"when": "view == aspire-vscode.runningAppHosts && viewItem == pidItem",
"group": "1_clipboard@1"
"command": "aspire-vscode.viewAppHostSource",
"when": "view == aspire-vscode.runningAppHosts && viewItem =~ /^(appHost|workspaceResources)$/",
"group": "1_open@2"
},
{
"command": "aspire-vscode.viewAppHostLogFile",
"when": "view == aspire-vscode.runningAppHosts && viewItem == logFileItem",
"group": "1_open@1"
},
{
"command": "aspire-vscode.copyLogFilePath",
"when": "view == aspire-vscode.runningAppHosts && viewItem == logFileItem",
"group": "3_clipboard@1"
}
]
},
Expand Down
4 changes: 3 additions & 1 deletion extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"command.openInIntegratedBrowser": "Open in VS Code",
"command.copyAppHostPath": "Copy AppHost path",
"command.copyResourceName": "Copy resource name",
"command.copyPid": "Copy ID",
"command.viewAppHostSource": "View source",
"command.switchToGlobalView": "Show all running AppHosts",
"command.switchToWorkspaceView": "Show workspace AppHost",
"command.installCliStable": "Install Aspire CLI (stable)",
Expand All @@ -168,6 +168,8 @@
"command.codeLensViewLogs": "View Aspire resource logs",
"command.codeLensOpenDashboard": "Open Aspire Dashboard",
"command.codeLensViewAppHostLogs": "View Aspire AppHost logs",
"command.viewAppHostLogFile": "Open AppHost logs file",
"command.copyLogFilePath": "Copy Path",
"command.expandAll": "Expand all resources",
"walkthrough.getStarted.title": "Get started with Aspire",
"walkthrough.getStarted.description": "Learn how to create, run, and monitor distributed applications with Aspire.",
Expand Down
6 changes: 4 additions & 2 deletions extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ export async function activate(context: vscode.ExtensionContext) {
const openInExternalBrowserRegistration = vscode.commands.registerCommand('aspire-vscode.openInExternalBrowser', (element) => appHostTreeProvider.openInExternalBrowser(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));
const viewAppHostSourceRegistration = vscode.commands.registerCommand('aspire-vscode.viewAppHostSource', (element) => appHostTreeProvider.viewAppHostSource(element));
const viewAppHostLogFileRegistration = vscode.commands.registerCommand('aspire-vscode.viewAppHostLogFile', (element) => appHostTreeProvider.viewAppHostLogFile(element));
const copyLogFilePathRegistration = vscode.commands.registerCommand('aspire-vscode.copyLogFilePath', (element) => appHostTreeProvider.copyLogFilePath(element));
const expandAllRegistration = vscode.commands.registerCommand('aspire-vscode.expandAll', (element) => appHostTreeProvider.expandAll(element));

// Set initial context for welcome view
Expand All @@ -129,7 +131,7 @@ export async function activate(context: vscode.ExtensionContext) {
// Activate the data repository. Workspace describe watching and global polling begin when the panel is visible.
dataRepository.activate();

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(); } });
context.subscriptions.push(appHostTreeView, refreshRunningAppHostsRegistration, switchToGlobalViewRegistration, switchToWorkspaceViewRegistration, openDashboardRegistration, openAppHostSourceRegistration, stopAppHostRegistration, stopResourceRegistration, startResourceRegistration, restartResourceRegistration, viewResourceLogsRegistration, executeResourceCommandRegistration, copyEndpointUrlRegistration, openInExternalBrowserRegistration, openInIntegratedBrowserRegistration, copyResourceNameRegistration, copyAppHostPathRegistration, viewAppHostSourceRegistration, viewAppHostLogFileRegistration, copyLogFilePathRegistration, expandAllRegistration, { dispose: () => { appHostTreeProvider.dispose(); dataRepository.dispose(); } });

// CodeLens provider — shows Debug on pipeline steps, resource state on resources
const codeLensProvider = new AspireCodeLensProvider(appHostTreeProvider, dataRepository);
Expand Down
4 changes: 2 additions & 2 deletions extension/src/loc/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ export const processExceptionOccurred = (error: string, command: string) => vsco
// Aspire panel strings
export const pidDescription = (pid: number) => vscode.l10n.t('PID: {0}', pid);
export const dashboardLabel = vscode.l10n.t('Dashboard');
export const cliPidLabel = (pid: number) => vscode.l10n.t('CLI PID: {0}', pid);
export const appHostPidLabel = (pid: number) => vscode.l10n.t('AppHost PID: {0}', pid);
export const errorFetchingAppHosts = (error: string) => vscode.l10n.t('Error fetching running AppHosts: {0}', error);
export const aspireDescribeMinimumVersion = '13.2.0';
export const aspireCliDescribeNotSupported = (version: string) => vscode.l10n.t('Workspace resources require Aspire CLI {0} or newer. Update the Aspire CLI and refresh the Aspire panel.', version);
Expand Down Expand Up @@ -129,6 +127,8 @@ export const selectFileTitle = vscode.l10n.t('Select file');
export const enterPipelineStep = vscode.l10n.t('Enter the pipeline step to execute');
export const appHostSourceNotFound = vscode.l10n.t('Could not determine the AppHost source file to open.');
export const appHostSourceOpenFailed = (path: string) => vscode.l10n.t('Failed to open AppHost source file: {0}', path);
export const logFileOpenFailed = (path: string) => vscode.l10n.t('Failed to open AppHost log file: {0}', path);
export const logFileLabel = vscode.l10n.t('AppHost logs');

// CodeLens strings.
// The "\u200A" between the codicon and the label is U+200A HAIR SPACE; it adds
Expand Down
Loading
Loading