Skip to content

Commit e26b47e

Browse files
committed
chore: show windows unsupported warning only once
1 parent 148a9ea commit e26b47e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/util/GlobalContext.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export type GlobalContextType = {
3939
*/
4040
hasDismissedConfigTsNoticeJetBrains: boolean;
4141
hasAlreadyCreatedAPromptFile: boolean;
42+
hasShownUnsupportedPlatformWarning: boolean;
4243
showConfigUpdateToast: boolean;
4344
isSupportedLanceDbCpuTargetForLinux: boolean;
4445
sharedConfig: SharedConfigSchema;

extensions/vscode/src/activation/activate.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ import { VsCodeExtension } from "../extension/VsCodeExtension";
66
import registerQuickFixProvider from "../lang-server/codeActions";
77
import { getExtensionVersion, isUnsupportedPlatform } from "../util/util";
88

9+
import { GlobalContext } from "core/util/GlobalContext";
910
import { VsCodeContinueApi } from "./api";
1011
import setupInlineTips from "./InlineTipManager";
1112

1213
export async function activateExtension(context: vscode.ExtensionContext) {
1314
const platformCheck = isUnsupportedPlatform();
14-
if (platformCheck.isUnsupported) {
15-
// const platformTarget = `${getPlatform()}-${getArchitecture()}`;
15+
const globalContext = new GlobalContext();
16+
const hasShownUnsupportedPlatformWarning = globalContext.get(
17+
"hasShownUnsupportedPlatformWarning",
18+
);
19+
20+
if (platformCheck.isUnsupported && !hasShownUnsupportedPlatformWarning) {
1621
const platformTarget = "windows-arm64";
1722

23+
globalContext.update("hasShownUnsupportedPlatformWarning", true);
1824
void vscode.window.showInformationMessage(
1925
`Continue detected that you are using ${platformTarget}. Due to native dependencies, Continue may not be able to start`,
2026
);

0 commit comments

Comments
 (0)