diff --git a/packages/amazonq/.changes/next-release/Removal-c259464a-0437-47e6-be6c-8df023ad477c.json b/packages/amazonq/.changes/next-release/Removal-c259464a-0437-47e6-be6c-8df023ad477c.json deleted file mode 100644 index a97df091840..00000000000 --- a/packages/amazonq/.changes/next-release/Removal-c259464a-0437-47e6-be6c-8df023ad477c.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "Removal", - "description": "Minimum required VSCode version is now 1.83" -} diff --git a/packages/amazonq/package.json b/packages/amazonq/package.json index 7662b0ed006..5d474ff04b3 100644 --- a/packages/amazonq/package.json +++ b/packages/amazonq/package.json @@ -1046,6 +1046,6 @@ }, "engines": { "npm": "^10.1.0", - "vscode": "^1.83.0" + "vscode": "^1.68.0" } } diff --git a/packages/amazonq/src/app/chat/activation.ts b/packages/amazonq/src/app/chat/activation.ts index 82cc92f7b3a..64b73e338b9 100644 --- a/packages/amazonq/src/app/chat/activation.ts +++ b/packages/amazonq/src/app/chat/activation.ts @@ -65,7 +65,6 @@ function registerApps(appInitContext: amazonq.AmazonQAppInitContext) { amazonq.featureDevChatAppInit(appInitContext) amazonq.gumbyChatAppInit(appInitContext) } - /** * Display a notification to user for Log In. * diff --git a/packages/core/package.json b/packages/core/package.json index c549bbd9e53..74d0eb2011d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "engines": { "npm": "^10.1.0", - "vscode": "^1.83.0" + "vscode": "^1.68.0" }, "exports": { ".": "./dist/src/extension.js", diff --git a/packages/core/src/extension.ts b/packages/core/src/extension.ts index 468aa6c61a9..c34a849deb8 100644 --- a/packages/core/src/extension.ts +++ b/packages/core/src/extension.ts @@ -12,7 +12,6 @@ import vscode from 'vscode' import * as nls from 'vscode-nls' - import globals, { initialize, isWeb } from './shared/extensionGlobals' import { join } from 'path' import { Commands } from './shared/vscode/commands2' @@ -51,6 +50,7 @@ import { Auth } from './auth' import { AuthFormId } from './login/webview/vue/types' import { getTelemetryMetadataForConn, isSsoConnection } from './auth/connection' import { registerCommands } from './commands' +import * as semver from 'semver' // In web mode everything must be in a single file, so things like the endpoints file will not be available. // The following imports the endpoints file, which causes webpack to bundle it in the final output file @@ -171,7 +171,7 @@ export async function activateCommon( uriHandler: globals.uriHandler, credentialsStore: globals.loginManager.store, } - + void setupVscodeVersionNotification() await activateViewsShared(extContext.extensionContext) return extContext @@ -304,3 +304,32 @@ export async function emitUserState() { }) }) } + +// TODO: remove once version bump to 1.83.0 is complete. +function setupVscodeVersionNotification() { + let notificationDisplayed = false + tryShowNotification() + + function tryShowNotification() { + // Do not show the notification if the IDE version will continue to be supported. + if (!semver.gte(vscode.version, '1.83.0')) { + return + } + + if (notificationDisplayed) { + return + } + + notificationDisplayed = true + + telemetry.toolkit_showNotification.emit({ + component: 'editor', + id: 'versionNotification', + reason: 'unsupportedVersion', + result: 'Succeeded', + }) + void vscode.window.showWarningMessage( + 'Update VS Code to version 1.83.0+, support for previous versions will be dropped soon. ' + ) + } +} diff --git a/packages/toolkit/.changes/next-release/Breaking Change-91df9fbf-ea4b-4087-b43f-77f35253c525.json b/packages/toolkit/.changes/next-release/Breaking Change-91df9fbf-ea4b-4087-b43f-77f35253c525.json deleted file mode 100644 index 205db3ae630..00000000000 --- a/packages/toolkit/.changes/next-release/Breaking Change-91df9fbf-ea4b-4087-b43f-77f35253c525.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "Breaking Change", - "description": "Bumping VS Code minimum version to 1.83.0" -} diff --git a/packages/toolkit/.changes/next-release/Removal-cf2f67d7-fd40-4834-960c-bbd57508a7f4.json b/packages/toolkit/.changes/next-release/Removal-cf2f67d7-fd40-4834-960c-bbd57508a7f4.json deleted file mode 100644 index a97df091840..00000000000 --- a/packages/toolkit/.changes/next-release/Removal-cf2f67d7-fd40-4834-960c-bbd57508a7f4.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "Removal", - "description": "Minimum required VSCode version is now 1.83" -} diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 3e957178a01..5d2fe80b1f4 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -53,7 +53,7 @@ "browser": "./dist/src/extensionWeb", "engines": { "npm": "^10.1.0", - "vscode": "^1.83.0" + "vscode": "^1.68.0" }, "scripts": { "vscode:prepublish": "npm run clean && npm run buildScripts && webpack --mode production",