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
5 changes: 1 addition & 4 deletions extension/loc/xlf/aspire-vscode.xlf

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

2 changes: 1 addition & 1 deletion extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"viewsContainers.aspirePanel.title": "Aspire",
"views.runningAppHosts.name": "Running AppHosts",
"views.runningAppHosts.welcome": "No running Aspire apphost detected in this workspace.\n[Refresh](command:aspire-vscode.refreshRunningAppHosts)",
"views.runningAppHosts.errorWelcome": "The Aspire CLI is not installed or does not support this feature. Install or update the Aspire CLI to get started.\n[Update Aspire CLI](command:aspire-vscode.updateSelf)\n[Refresh](command:aspire-vscode.refreshRunningAppHosts)",
"views.runningAppHosts.errorWelcome": "The Aspire CLI is not installed or does not support this feature. Install or update the Aspire CLI and restart VS Code to get started.\n[Update Aspire CLI](command:aspire-vscode.updateSelf)\n[Refresh](command:aspire-vscode.refreshRunningAppHosts)",
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string was updated in package.nls.json, but the checked-in localization source XLF (extension/loc/xlf/aspire-vscode.xlf) is generated from package.nls.json (see gulpfile.js export task) and will be out of sync until it’s regenerated. Please re-run the l10n export/generation step and include the updated XLF so localization tooling and translators pick up the new source text.

Copilot uses AI. Check for mistakes.
"command.refreshRunningAppHosts": "Refresh running apphosts",
"command.openDashboard": "Open Dashboard",
"command.stopAppHost": "Stop",
Expand Down
41 changes: 27 additions & 14 deletions extension/src/views/AppHostDataRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class AppHostDataRepository {
private _describeRestarting = false;
private _describeRestartDelay = 5000;
private _describeRestartTimer: ReturnType<typeof setTimeout> | undefined;
private _describeReceivedData = false;

// ── Global mode state (ps polling) ──
private _appHosts: AppHostDisplayInfo[] = [];
Expand Down Expand Up @@ -145,6 +146,7 @@ export class AppHostDataRepository {
refresh(): void {
this._stopDescribeWatch();
this._workspaceResources.clear();
this._setError(undefined);
this._updateWorkspaceContext();
this._describeRestartDelay = 5000;
this._startDescribeWatch();
Expand Down Expand Up @@ -257,6 +259,7 @@ export class AppHostDataRepository {

extensionLogOutputChannel.info('Starting aspire describe --follow for workspace resources');

this._describeReceivedData = false;
this._describeProcess = spawnCliProcess(this._terminalProvider, cliPath, args, {
noExtensionVariables: true,
lineCallback: (line) => {
Expand All @@ -267,20 +270,29 @@ export class AppHostDataRepository {
this._describeProcess = undefined;

if (!this._disposed && !this._describeRestarting) {
this._workspaceResources.clear();
this._setError(undefined);
this._updateWorkspaceContext();

// Auto-restart with exponential backoff
const delay = this._describeRestartDelay;
this._describeRestartDelay = Math.min(this._describeRestartDelay * 2, this._getPollingIntervalMs());
extensionLogOutputChannel.info(`Restarting describe --follow in ${delay}ms`);
this._describeRestartTimer = setTimeout(() => {
this._describeRestartTimer = undefined;
if (!this._disposed) {
this._startDescribeWatch();
}
}, delay);
if (!this._describeReceivedData && code !== 0) {
// The process exited with a non-zero code without ever producing valid data.
// This likely means the CLI does not support the describe command.
extensionLogOutputChannel.warn('aspire describe --follow exited without producing data; the installed Aspire CLI may not support this feature.');
this._workspaceResources.clear();
this._setError(errorFetchingAppHosts(`exit code ${code}`));
this._updateWorkspaceContext();
} else {
this._workspaceResources.clear();
this._setError(undefined);
this._updateWorkspaceContext();

// Auto-restart with exponential backoff
const delay = this._describeRestartDelay;
this._describeRestartDelay = Math.min(this._describeRestartDelay * 2, this._getPollingIntervalMs());
extensionLogOutputChannel.info(`Restarting describe --follow in ${delay}ms`);
this._describeRestartTimer = setTimeout(() => {
this._describeRestartTimer = undefined;
if (!this._disposed) {
this._startDescribeWatch();
}
}, delay);
}
}
this._describeRestarting = false;
},
Expand Down Expand Up @@ -320,6 +332,7 @@ export class AppHostDataRepository {
const resource: ResourceJson = JSON.parse(trimmed);
if (resource.name) {
this._workspaceResources.set(resource.name, resource);
this._describeReceivedData = true;
this._setError(undefined);
this._describeRestartDelay = 5000; // Reset backoff on successful data
this._updateWorkspaceContext();
Expand Down
Loading