From af90ec199e2739e8cd1c56c263fde678e39b5095 Mon Sep 17 00:00:00 2001 From: Ehab Younes Date: Fri, 12 Sep 2025 10:42:44 +0300 Subject: [PATCH 1/2] Automatically start workspace if started and not running --- src/remote.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/remote.ts b/src/remote.ts index b5165b4a..25c00541 100644 --- a/src/remote.ts +++ b/src/remote.ts @@ -54,18 +54,6 @@ export class Remote { private readonly mode: vscode.ExtensionMode, ) {} - private async confirmStart(workspaceName: string): Promise { - const action = await this.vscodeProposed.window.showInformationMessage( - `Unable to connect to the workspace ${workspaceName} because it is not running. Start the workspace?`, - { - useCustom: true, - modal: true, - }, - "Start", - ); - return action === "Start"; - } - /** * Try to get the workspace running. Return undefined if the user canceled. */ @@ -132,9 +120,6 @@ export class Remote { ); break; case "stopped": - if (!(await this.confirmStart(workspaceName))) { - return undefined; - } writeEmitter = initWriteEmitterAndTerminal(); this.storage.output.info(`Starting ${workspaceName}...`); workspace = await startWorkspaceIfStoppedOrFailed( @@ -150,9 +135,6 @@ export class Remote { // On a first attempt, we will try starting a failed workspace // (for example canceling a start seems to cause this state). if (attempts === 1) { - if (!(await this.confirmStart(workspaceName))) { - return undefined; - } writeEmitter = initWriteEmitterAndTerminal(); this.storage.output.info(`Starting ${workspaceName}...`); workspace = await startWorkspaceIfStoppedOrFailed( From 96109ed2ddc437d57acc71aee87112f9f3127ac1 Mon Sep 17 00:00:00 2001 From: Ehab Younes Date: Mon, 15 Sep 2025 11:19:30 +0300 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67957fe6..5e6ea7b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed - Always enable verbose (`-v`) flag when a log directory is configured (`coder.proxyLogDir`). +- Automatically start a workspace if it is opened but not running. ### Added