From 0adde7fd44e9ecfc7874fca0051e49d7a3d691c3 Mon Sep 17 00:00:00 2001 From: Wasim Lorgat Date: Tue, 16 Apr 2024 15:35:16 +0200 Subject: [PATCH] fix recycling old variables instance for noteoboks (#2768) --- .../positronVariables/common/positronVariablesService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts b/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts index cb2e9026ab4..51ff69582fa 100644 --- a/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts +++ b/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts @@ -14,6 +14,7 @@ import { LanguageRuntimeSessionMode, formatLanguageRuntimeSession } from 'vs/wor import { ILanguageRuntimeSession, IRuntimeSessionService } from '../../runtimeSession/common/runtimeSessionService'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { RuntimeClientState } from 'vs/workbench/services/languageRuntime/common/languageRuntimeClientInstance'; +import { isEqual } from 'vs/base/common/resources'; /** * PositronVariablesService class. @@ -208,8 +209,7 @@ class PositronVariablesService extends Disposable implements IPositronVariablesS // Check the runtime ID and notebook URI for a match. return positronVariablesInstance.session.runtimeMetadata.runtimeId === session.runtimeMetadata.runtimeId && - positronVariablesInstance.session.metadata.notebookUri === - session.metadata.notebookUri; + isEqual(positronVariablesInstance.session.metadata.notebookUri, session.metadata.notebookUri); }); if (existingInstance) {