From 35a877cef1cfc76a12e0ee3fa54f946f49bb84e8 Mon Sep 17 00:00:00 2001 From: Sergei Shmakov Date: Thu, 29 Aug 2024 19:07:12 +0200 Subject: [PATCH 1/2] Fix connecting rich integrations on login to GK Dev GLVSC-631 #3501 --- src/plus/integrations/integration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plus/integrations/integration.ts b/src/plus/integrations/integration.ts index 280b0e2de6201..d889bb3d6dddc 100644 --- a/src/plus/integrations/integration.ts +++ b/src/plus/integrations/integration.ts @@ -261,7 +261,7 @@ export abstract class IntegrationBase< await this.ensureSession({ createIfNeeded: forceSync }); break; case 'disconnected': - await this.disconnect({ silent: true }); + await this.reset(); break; } } From 036fbc3daccbaff943a180cd9f4c97016c73bb9e Mon Sep 17 00:00:00 2001 From: Ramin Tadayon Date: Fri, 30 Aug 2024 13:21:52 -0700 Subject: [PATCH 2/2] Prevents setting disconnected key on silent disconnect --- src/plus/integrations/integration.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plus/integrations/integration.ts b/src/plus/integrations/integration.ts index d889bb3d6dddc..802eb2f959a3e 100644 --- a/src/plus/integrations/integration.ts +++ b/src/plus/integrations/integration.ts @@ -193,8 +193,9 @@ export abstract class IntegrationBase< this._session = null; if (connected) { - // Don't store the disconnected flag if this only for this current VS Code session (will be re-connected on next restart) - if (!options?.currentSessionOnly) { + // Don't store the disconnected flag if silently disconnecting or disconnecting this only for + // this current VS Code session (will be re-connected on next restart) + if (!options?.currentSessionOnly && !options?.silent) { void this.container.storage.storeWorkspace(this.connectedKey, false); } @@ -261,7 +262,7 @@ export abstract class IntegrationBase< await this.ensureSession({ createIfNeeded: forceSync }); break; case 'disconnected': - await this.reset(); + await this.disconnect({ silent: true }); break; } }