From 72cb6d43ca1e2e03b74c20a34cd09cadc1738280 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 9 Mar 2023 13:30:51 -0600 Subject: [PATCH] fix: show when a workspace is stopping and prompt to start This fixes the "Agent not found" error. --- src/remote.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/remote.ts b/src/remote.ts index e9cd16bd..76a534d9 100644 --- a/src/remote.ts +++ b/src/remote.ts @@ -146,7 +146,8 @@ export class Remote { // watch what's going on! if ( this.storage.workspace.latest_build.status === "pending" || - this.storage.workspace.latest_build.status === "starting" + this.storage.workspace.latest_build.status === "starting" || + this.storage.workspace.latest_build.status === "stopping" ) { const writeEmitter = new vscode.EventEmitter() // We use a terminal instead of an output channel because it feels more @@ -208,6 +209,23 @@ export class Remote { if (buildComplete) { buildComplete() } + + if (this.storage.workspace.latest_build.status === "stopped") { + const result = await this.vscodeProposed.window.showInformationMessage( + `This workspace is stopped!`, + { + modal: true, + detail: `Click below to start and open ${parts[0]}/${parts[1]}.`, + useCustom: true, + }, + "Start Workspace", + ) + if (!result) { + await this.closeRemote() + } + await this.reloadWindow() + return + } } const agents = this.storage.workspace.latest_build.resources.reduce((acc, resource) => { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy