From e26b47e96ca2af2d4fce5136dadd258cc1b5962a Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 19 Aug 2025 16:02:23 +0530 Subject: [PATCH] chore: show windows unsupported warning only once --- core/util/GlobalContext.ts | 1 + extensions/vscode/src/activation/activate.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/util/GlobalContext.ts b/core/util/GlobalContext.ts index ab4d507fe..59daf21c9 100644 --- a/core/util/GlobalContext.ts +++ b/core/util/GlobalContext.ts @@ -39,6 +39,7 @@ export type GlobalContextType = { */ hasDismissedConfigTsNoticeJetBrains: boolean; hasAlreadyCreatedAPromptFile: boolean; + hasShownUnsupportedPlatformWarning: boolean; showConfigUpdateToast: boolean; isSupportedLanceDbCpuTargetForLinux: boolean; sharedConfig: SharedConfigSchema; diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 464f9f4f0..19be7545e 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -6,15 +6,21 @@ import { VsCodeExtension } from "../extension/VsCodeExtension"; import registerQuickFixProvider from "../lang-server/codeActions"; import { getExtensionVersion, isUnsupportedPlatform } from "../util/util"; +import { GlobalContext } from "core/util/GlobalContext"; import { VsCodeContinueApi } from "./api"; import setupInlineTips from "./InlineTipManager"; export async function activateExtension(context: vscode.ExtensionContext) { const platformCheck = isUnsupportedPlatform(); - if (platformCheck.isUnsupported) { - // const platformTarget = `${getPlatform()}-${getArchitecture()}`; + const globalContext = new GlobalContext(); + const hasShownUnsupportedPlatformWarning = globalContext.get( + "hasShownUnsupportedPlatformWarning", + ); + + if (platformCheck.isUnsupported && !hasShownUnsupportedPlatformWarning) { const platformTarget = "windows-arm64"; + globalContext.update("hasShownUnsupportedPlatformWarning", true); void vscode.window.showInformationMessage( `Continue detected that you are using ${platformTarget}. Due to native dependencies, Continue may not be able to start`, );