From 2427e2b242a3ed182e39cfb06a742c49deb42814 Mon Sep 17 00:00:00 2001
From: Jonathan Breedlove
Date: Mon, 12 Jan 2026 11:29:56 -0800
Subject: [PATCH 001/196] Remove Q package and related code
---
.github/workflows/release_notes.md | 1 -
.gitignore | 2 -
CONTRIBUTING.md | 2 +-
buildspec/linuxE2ETests.yml | 2 +-
buildspec/linuxIntegrationTests.yml | 2 +-
buildspec/linuxTests.yml | 2 +-
codecov.yml | 2 -
docs/arch_runtime.md | 5 -
docs/icons.md | 2 +-
docs/lsp.md | 137 --
docs/web.md | 2 +-
package.json | 1 -
packages/amazonq/.c8rc.json | 6 -
packages/amazonq/.changes/1.0.0.json | 86 -
packages/amazonq/.changes/1.1.0.json | 18 -
packages/amazonq/.changes/1.10.0.json | 30 -
packages/amazonq/.changes/1.100.0.json | 5 -
packages/amazonq/.changes/1.101.0.json | 5 -
packages/amazonq/.changes/1.102.0.json | 5 -
packages/amazonq/.changes/1.103.0.json | 10 -
packages/amazonq/.changes/1.104.0.json | 5 -
packages/amazonq/.changes/1.105.0.json | 10 -
packages/amazonq/.changes/1.106.0.json | 5 -
packages/amazonq/.changes/1.107.0.json | 5 -
packages/amazonq/.changes/1.11.0.json | 26 -
packages/amazonq/.changes/1.12.0.json | 46 -
packages/amazonq/.changes/1.13.0.json | 14 -
packages/amazonq/.changes/1.14.0.json | 10 -
packages/amazonq/.changes/1.15.0.json | 18 -
packages/amazonq/.changes/1.16.0.json | 18 -
packages/amazonq/.changes/1.17.0.json | 18 -
packages/amazonq/.changes/1.18.0.json | 14 -
packages/amazonq/.changes/1.19.0.json | 26 -
packages/amazonq/.changes/1.2.0.json | 30 -
packages/amazonq/.changes/1.20.0.json | 22 -
packages/amazonq/.changes/1.21.0.json | 10 -
packages/amazonq/.changes/1.22.0.json | 26 -
packages/amazonq/.changes/1.23.0.json | 38 -
packages/amazonq/.changes/1.24.0.json | 34 -
packages/amazonq/.changes/1.25.0.json | 22 -
packages/amazonq/.changes/1.26.0.json | 34 -
packages/amazonq/.changes/1.27.0.json | 10 -
packages/amazonq/.changes/1.28.0.json | 18 -
packages/amazonq/.changes/1.29.0.json | 54 -
packages/amazonq/.changes/1.3.0.json | 30 -
packages/amazonq/.changes/1.30.0.json | 10 -
packages/amazonq/.changes/1.31.0.json | 34 -
packages/amazonq/.changes/1.32.0.json | 26 -
packages/amazonq/.changes/1.33.0.json | 10 -
packages/amazonq/.changes/1.34.0.json | 22 -
packages/amazonq/.changes/1.35.0.json | 18 -
packages/amazonq/.changes/1.36.0.json | 22 -
packages/amazonq/.changes/1.37.0.json | 50 -
packages/amazonq/.changes/1.38.0.json | 18 -
packages/amazonq/.changes/1.39.0.json | 34 -
packages/amazonq/.changes/1.4.0.json | 30 -
packages/amazonq/.changes/1.40.0.json | 66 -
packages/amazonq/.changes/1.41.0.json | 62 -
packages/amazonq/.changes/1.42.0.json | 58 -
packages/amazonq/.changes/1.43.0.json | 42 -
packages/amazonq/.changes/1.44.0.json | 50 -
.../amazonq/.changes/1.45.0-SNAPSHOT.json | 18 -
packages/amazonq/.changes/1.45.0.json | 18 -
packages/amazonq/.changes/1.46.0.json | 38 -
packages/amazonq/.changes/1.47.0.json | 38 -
packages/amazonq/.changes/1.48.0.json | 30 -
packages/amazonq/.changes/1.49.0.json | 26 -
packages/amazonq/.changes/1.5.0.json | 26 -
packages/amazonq/.changes/1.50.0.json | 34 -
packages/amazonq/.changes/1.51.0.json | 34 -
packages/amazonq/.changes/1.52.0.json | 50 -
packages/amazonq/.changes/1.53.0.json | 22 -
packages/amazonq/.changes/1.54.0.json | 38 -
packages/amazonq/.changes/1.55.0.json | 38 -
packages/amazonq/.changes/1.56.0.json | 14 -
packages/amazonq/.changes/1.57.0.json | 14 -
packages/amazonq/.changes/1.58.0.json | 22 -
packages/amazonq/.changes/1.59.0.json | 14 -
packages/amazonq/.changes/1.6.0.json | 18 -
packages/amazonq/.changes/1.60.0.json | 10 -
packages/amazonq/.changes/1.61.0.json | 14 -
packages/amazonq/.changes/1.62.0.json | 14 -
packages/amazonq/.changes/1.63.0.json | 14 -
packages/amazonq/.changes/1.64.0.json | 10 -
packages/amazonq/.changes/1.65.0.json | 14 -
packages/amazonq/.changes/1.66.0.json | 14 -
packages/amazonq/.changes/1.67.0.json | 14 -
packages/amazonq/.changes/1.68.0.json | 18 -
packages/amazonq/.changes/1.69.0.json | 14 -
packages/amazonq/.changes/1.7.0.json | 26 -
packages/amazonq/.changes/1.70.0.json | 10 -
packages/amazonq/.changes/1.71.0.json | 5 -
packages/amazonq/.changes/1.72.0.json | 10 -
packages/amazonq/.changes/1.73.0.json | 10 -
packages/amazonq/.changes/1.74.0.json | 5 -
packages/amazonq/.changes/1.75.0.json | 5 -
packages/amazonq/.changes/1.76.0.json | 18 -
packages/amazonq/.changes/1.77.0.json | 5 -
packages/amazonq/.changes/1.78.0.json | 10 -
packages/amazonq/.changes/1.79.0.json | 18 -
packages/amazonq/.changes/1.8.0.json | 26 -
packages/amazonq/.changes/1.80.0.json | 5 -
packages/amazonq/.changes/1.81.0.json | 10 -
packages/amazonq/.changes/1.82.0.json | 10 -
packages/amazonq/.changes/1.83.0.json | 18 -
packages/amazonq/.changes/1.84.0.json | 18 -
packages/amazonq/.changes/1.85.0.json | 5 -
packages/amazonq/.changes/1.86.0.json | 18 -
packages/amazonq/.changes/1.87.0.json | 5 -
packages/amazonq/.changes/1.88.0.json | 14 -
packages/amazonq/.changes/1.89.0.json | 5 -
packages/amazonq/.changes/1.9.0.json | 26 -
packages/amazonq/.changes/1.90.0.json | 5 -
packages/amazonq/.changes/1.91.0.json | 14 -
packages/amazonq/.changes/1.92.0.json | 18 -
packages/amazonq/.changes/1.93.0.json | 5 -
packages/amazonq/.changes/1.94.0.json | 5 -
packages/amazonq/.changes/1.95.0.json | 10 -
packages/amazonq/.changes/1.96.0.json | 10 -
packages/amazonq/.changes/1.97.0.json | 5 -
packages/amazonq/.changes/1.98.0.json | 5 -
packages/amazonq/.changes/1.99.0.json | 5 -
packages/amazonq/.vscode/launch.json | 168 --
packages/amazonq/.vscode/settings.json | 12 -
packages/amazonq/.vscode/tasks.json | 174 --
packages/amazonq/CHANGELOG.md | 744 --------
packages/amazonq/README.md | 58 -
packages/amazonq/package.json | 1506 -----------------
packages/amazonq/scripts/build/copyFiles.ts | 96 --
packages/amazonq/src/api.ts | 33 -
packages/amazonq/src/app/amazonqScan/app.ts | 70 -
.../amazonqScan/chat/controller/controller.ts | 372 ----
.../chat/controller/messenger/messenger.ts | 230 ---
.../controller/messenger/messengerUtils.ts | 19 -
.../app/amazonqScan/chat/session/session.ts | 25 -
.../amazonqScan/chat/storages/chatSession.ts | 54 -
.../chat/views/actions/uiMessageListener.ts | 126 --
.../chat/views/connector/connector.ts | 192 ---
packages/amazonq/src/app/amazonqScan/index.ts | 7 -
.../src/app/amazonqScan/models/constants.ts | 101 --
packages/amazonq/src/app/chat/activation.ts | 74 -
.../src/app/chat/node/activateAgents.ts | 16 -
.../src/app/inline/EditRendering/diffUtils.ts | 93 -
.../app/inline/EditRendering/displayImage.ts | 471 ------
.../app/inline/EditRendering/imageRenderer.ts | 210 ---
.../app/inline/EditRendering/stringUtils.ts | 28 -
.../app/inline/EditRendering/svgGenerator.ts | 519 ------
packages/amazonq/src/app/inline/activation.ts | 128 --
packages/amazonq/src/app/inline/completion.ts | 602 -------
.../src/app/inline/cursorUpdateManager.ts | 211 ---
.../src/app/inline/documentEventListener.ts | 69 -
.../src/app/inline/editSuggestionState.ts | 27 -
.../amazonq/src/app/inline/notebookUtil.ts | 98 --
.../src/app/inline/recommendationService.ts | 342 ----
.../amazonq/src/app/inline/sessionManager.ts | 186 --
.../app/inline/stateTracker/lineTracker.ts | 178 --
.../amazonq/src/app/inline/telemetryHelper.ts | 162 --
.../tutorials/inlineChatTutorialAnnotation.ts | 58 -
.../tutorials/inlineTutorialAnnotation.ts | 519 ------
.../amazonq/src/app/inline/webViewPanel.ts | 450 -----
packages/amazonq/src/commands.ts | 19 -
packages/amazonq/src/extension.ts | 202 ---
packages/amazonq/src/extensionNode.ts | 185 --
packages/amazonq/src/extensionWeb.ts | 17 -
packages/amazonq/src/inlineChat/activation.ts | 19 -
.../codeLenses/codeLenseProvider.ts | 76 -
.../command/registerInlineCommands.ts | 22 -
.../controller/inlineChatController.ts | 466 -----
.../src/inlineChat/controller/inlineTask.ts | 160 --
.../decorations/computeDecorations.ts | 32 -
.../inlineChat/decorations/inlineDecorator.ts | 38 -
.../src/inlineChat/output/computeDiff.ts | 115 --
.../inlineChat/output/responseTransformer.ts | 55 -
.../inlineChat/provider/inlineChatProvider.ts | 249 ---
packages/amazonq/src/lsp/activation.ts | 30 -
packages/amazonq/src/lsp/auth.ts | 180 --
packages/amazonq/src/lsp/chat/activation.ts | 104 --
.../src/lsp/chat/autoDebug/activation.ts | 78 -
.../lsp/chat/autoDebug/codeActionsProvider.ts | 119 --
.../src/lsp/chat/autoDebug/commands.ts | 177 --
.../src/lsp/chat/autoDebug/controller.ts | 206 ---
.../diagnostics/diagnosticsMonitor.ts | 22 -
.../autoDebug/diagnostics/errorContext.ts | 75 -
.../autoDebug/diagnostics/problemDetector.ts | 21 -
.../amazonq/src/lsp/chat/autoDebug/index.ts | 18 -
.../chat/autoDebug/lsp/autoDebugLspClient.ts | 75 -
.../chat/autoDebug/shared/diagnosticUtils.ts | 35 -
.../src/lsp/chat/autoDebug/telemetry.ts | 71 -
packages/amazonq/src/lsp/chat/commands.ts | 186 --
packages/amazonq/src/lsp/chat/error.ts | 23 -
packages/amazonq/src/lsp/chat/messages.ts | 856 ----------
.../amazonq/src/lsp/chat/webviewProvider.ts | 186 --
packages/amazonq/src/lsp/client.ts | 552 ------
packages/amazonq/src/lsp/config.ts | 110 --
packages/amazonq/src/lsp/encryption.ts | 34 -
packages/amazonq/src/lsp/lspInstaller.ts | 67 -
packages/amazonq/src/lsp/utils.ts | 26 -
packages/amazonq/src/util/clearCache.ts | 49 -
packages/amazonq/src/util/timeoutUtil.ts | 15 -
packages/amazonq/test/e2e/amazonq/assert.ts | 41 -
.../amazonq/test/e2e/amazonq/chat.test.ts | 86 -
.../test/e2e/amazonq/framework/framework.ts | 136 --
.../e2e/amazonq/framework/jsdomInjector.ts | 63 -
.../test/e2e/amazonq/framework/messenger.ts | 219 ---
.../test/e2e/amazonq/framework/text.ts | 29 -
.../amazonq/test/e2e/amazonq/review.test.ts | 611 -------
.../amazonq/test/e2e/amazonq/template.test.ts | 67 -
.../test/e2e/amazonq/transformByQ.test.ts | 407 -----
.../amazonq/test/e2e/amazonq/utils/setup.ts | 26 -
.../amazonq/test/e2e/amazonq/welcome.test.ts | 103 --
packages/amazonq/test/e2e/index.ts | 13 -
.../amazonq/test/e2e/inline/inline.test.ts | 244 ---
.../amazonq/test/e2e/lsp/amazonqLsp.test.ts | 31 -
.../amazonq/test/e2e/lsp/lspInstallerUtil.ts | 307 ----
.../unit/amazonq/apps/initContext.test.ts | 42 -
.../inline/EditRendering/stringUtils.test.ts | 47 -
.../amazonq/apps/inline/completion.test.ts | 428 -----
.../amazonq/apps/inline/inlineTracker.test.ts | 299 ----
.../apps/inline/recommendationService.test.ts | 400 -----
.../test/unit/amazonq/auth/controller.test.ts | 36 -
.../test/unit/amazonq/lsp/auth.test.ts | 33 -
.../test/unit/amazonq/lsp/chat/error.test.ts | 15 -
.../unit/amazonq/lsp/chat/messages.test.ts | 163 --
.../test/unit/amazonq/lsp/client.test.ts | 268 ---
.../test/unit/amazonq/lsp/config.test.ts | 227 ---
.../test/unit/amazonq/lsp/encryption.test.ts | 27 -
.../onboardingPage/walkthrough.test.ts | 22 -
.../unit/amazonqGumby/amazonQGumbyUtil.ts | 11 -
.../messenger/messengerUtils.test.ts | 45 -
.../humanInTheLoopManager.test.ts | 64 -
.../amazonqGumby/models/dependencies.test.ts | 48 -
.../resources/files/addedFile.diff | 6 -
.../dependency-updates-aggregate-report.xml | 35 -
.../downloadResults/manifest.json | 7 -
.../humanInTheLoop/downloadResults/pom.xml | 16 -
.../resources/files/modifiedFile.diff | 8 -
.../resources/mocks/transformFixtures.ts | 33 -
.../amazonqGumby/transformApiHandler.test.ts | 150 --
.../amazonqGumby/transformFileHandler.test.ts | 57 -
.../transformationResultsHandler.test.ts | 66 -
.../inline/EditRendering/diffUtils.test.ts | 83 -
.../inline/EditRendering/displayImage.test.ts | 421 -----
.../EditRendering/imageRenderer.test.ts | 270 ---
.../inline/EditRendering/svgGenerator.test.ts | 252 ---
.../test/unit/app/inline/completion.test.ts | 210 ---
.../app/inline/cursorUpdateManager.test.ts | 329 ----
.../test/unit/app/inline/notebookUtil.test.ts | 87 -
.../test/unit/app/inline/webViewPanel.test.ts | 153 --
.../commands/invokeRecommendation.test.ts | 43 -
.../commands/onAcceptance.test.ts | 64 -
.../commands/onInlineAcceptance.test.ts | 43 -
.../unit/codewhisperer/models/model.test.ts | 174 --
.../region/regionProfileManager.test.ts | 301 ----
.../service/codewhisperer.test.ts | 152 --
.../service/diagnosticsProvider.test.ts | 100 --
.../service/inlineCompletionService.test.ts | 173 --
.../service/keyStrokeHandler.test.ts | 237 ---
.../service/recommendationHandler.test.ts | 269 ---
.../service/referenceHoverProvider.test.ts | 56 -
.../service/referenceInlineProvider.test.ts | 32 -
.../service/referenceLogViewProvider.test.ts | 103 --
.../securityIssueCodeActionProvider.test.ts | 110 --
.../securityIssueHoverProvider.test.ts | 147 --
.../service/securityIssueProvider.test.ts | 132 --
.../securityIssueTreeViewProvider.test.ts | 177 --
.../service/securityScanHandler.test.ts | 326 ----
.../codewhisperer/service/telemetry.test.ts | 613 -------
.../codewhispererCodeCoverageTracker.test.ts | 560 ------
.../tracker/codewhispererTracker.test.ts | 104 --
.../codewhisperer/tracker/lineTracker.test.ts | 299 ----
.../tracker/userWrittenCodeTracker.test.ts | 194 ---
.../unit/codewhisperer/ui/prompters.test.ts | 45 -
.../unit/codewhisperer/util/authUtil.test.ts | 422 -----
.../test/unit/codewhisperer/util/bm25.test.ts | 117 --
.../util/codeParsingUtil.test.ts | 327 ----
.../codewhisperer/util/commonUtil.test.ts | 81 -
.../util/crossFileContextUtil.test.ts | 417 -----
.../util/diagnosticsUtil.test.ts | 92 -
.../codewhisperer/util/editorContext.test.ts | 392 -----
.../util/globalStateUtil.test.ts | 42 -
.../util/importAdderUtil.test.ts | 168 --
.../codewhisperer/util/licenseUtil.test.ts | 24 -
.../util/runtimeLanguageContext.test.ts | 449 -----
.../util/securityScanLanguageContext.test.ts | 143 --
.../codewhisperer/util/showSsoPrompt.test.ts | 46 -
.../util/supplemetalContextUtil.test.ts | 254 ---
.../util/telemetryHelper.test.ts | 285 ----
.../codewhisperer/util/userGroupUtil.test.ts | 68 -
.../unit/codewhisperer/util/utgUtils.test.ts | 63 -
.../views/securityPanelViewProvider.test.ts | 97 --
.../chat/chatRequest/converter.test.ts | 260 ---
.../focusArea/focusAreaExtractor.test.ts | 464 -----
packages/amazonq/test/unit/index.ts | 13 -
packages/amazonq/test/unit/validation.test.ts | 30 -
packages/amazonq/test/web/extension.test.ts | 13 -
.../amazonq/test/web/shared/crypto.test.ts | 28 -
packages/amazonq/test/web/shared/fs.test.ts | 21 -
.../web/shared/utilities/timeoutUtils.test.ts | 13 -
packages/amazonq/test/web/testRunner.ts | 66 -
packages/amazonq/test/web/utils.test.ts | 14 -
packages/amazonq/tsconfig.json | 9 -
packages/amazonq/webpack.config.js | 26 -
302 files changed, 6 insertions(+), 31443 deletions(-)
delete mode 100644 docs/lsp.md
delete mode 100644 packages/amazonq/.c8rc.json
delete mode 100644 packages/amazonq/.changes/1.0.0.json
delete mode 100644 packages/amazonq/.changes/1.1.0.json
delete mode 100644 packages/amazonq/.changes/1.10.0.json
delete mode 100644 packages/amazonq/.changes/1.100.0.json
delete mode 100644 packages/amazonq/.changes/1.101.0.json
delete mode 100644 packages/amazonq/.changes/1.102.0.json
delete mode 100644 packages/amazonq/.changes/1.103.0.json
delete mode 100644 packages/amazonq/.changes/1.104.0.json
delete mode 100644 packages/amazonq/.changes/1.105.0.json
delete mode 100644 packages/amazonq/.changes/1.106.0.json
delete mode 100644 packages/amazonq/.changes/1.107.0.json
delete mode 100644 packages/amazonq/.changes/1.11.0.json
delete mode 100644 packages/amazonq/.changes/1.12.0.json
delete mode 100644 packages/amazonq/.changes/1.13.0.json
delete mode 100644 packages/amazonq/.changes/1.14.0.json
delete mode 100644 packages/amazonq/.changes/1.15.0.json
delete mode 100644 packages/amazonq/.changes/1.16.0.json
delete mode 100644 packages/amazonq/.changes/1.17.0.json
delete mode 100644 packages/amazonq/.changes/1.18.0.json
delete mode 100644 packages/amazonq/.changes/1.19.0.json
delete mode 100644 packages/amazonq/.changes/1.2.0.json
delete mode 100644 packages/amazonq/.changes/1.20.0.json
delete mode 100644 packages/amazonq/.changes/1.21.0.json
delete mode 100644 packages/amazonq/.changes/1.22.0.json
delete mode 100644 packages/amazonq/.changes/1.23.0.json
delete mode 100644 packages/amazonq/.changes/1.24.0.json
delete mode 100644 packages/amazonq/.changes/1.25.0.json
delete mode 100644 packages/amazonq/.changes/1.26.0.json
delete mode 100644 packages/amazonq/.changes/1.27.0.json
delete mode 100644 packages/amazonq/.changes/1.28.0.json
delete mode 100644 packages/amazonq/.changes/1.29.0.json
delete mode 100644 packages/amazonq/.changes/1.3.0.json
delete mode 100644 packages/amazonq/.changes/1.30.0.json
delete mode 100644 packages/amazonq/.changes/1.31.0.json
delete mode 100644 packages/amazonq/.changes/1.32.0.json
delete mode 100644 packages/amazonq/.changes/1.33.0.json
delete mode 100644 packages/amazonq/.changes/1.34.0.json
delete mode 100644 packages/amazonq/.changes/1.35.0.json
delete mode 100644 packages/amazonq/.changes/1.36.0.json
delete mode 100644 packages/amazonq/.changes/1.37.0.json
delete mode 100644 packages/amazonq/.changes/1.38.0.json
delete mode 100644 packages/amazonq/.changes/1.39.0.json
delete mode 100644 packages/amazonq/.changes/1.4.0.json
delete mode 100644 packages/amazonq/.changes/1.40.0.json
delete mode 100644 packages/amazonq/.changes/1.41.0.json
delete mode 100644 packages/amazonq/.changes/1.42.0.json
delete mode 100644 packages/amazonq/.changes/1.43.0.json
delete mode 100644 packages/amazonq/.changes/1.44.0.json
delete mode 100644 packages/amazonq/.changes/1.45.0-SNAPSHOT.json
delete mode 100644 packages/amazonq/.changes/1.45.0.json
delete mode 100644 packages/amazonq/.changes/1.46.0.json
delete mode 100644 packages/amazonq/.changes/1.47.0.json
delete mode 100644 packages/amazonq/.changes/1.48.0.json
delete mode 100644 packages/amazonq/.changes/1.49.0.json
delete mode 100644 packages/amazonq/.changes/1.5.0.json
delete mode 100644 packages/amazonq/.changes/1.50.0.json
delete mode 100644 packages/amazonq/.changes/1.51.0.json
delete mode 100644 packages/amazonq/.changes/1.52.0.json
delete mode 100644 packages/amazonq/.changes/1.53.0.json
delete mode 100644 packages/amazonq/.changes/1.54.0.json
delete mode 100644 packages/amazonq/.changes/1.55.0.json
delete mode 100644 packages/amazonq/.changes/1.56.0.json
delete mode 100644 packages/amazonq/.changes/1.57.0.json
delete mode 100644 packages/amazonq/.changes/1.58.0.json
delete mode 100644 packages/amazonq/.changes/1.59.0.json
delete mode 100644 packages/amazonq/.changes/1.6.0.json
delete mode 100644 packages/amazonq/.changes/1.60.0.json
delete mode 100644 packages/amazonq/.changes/1.61.0.json
delete mode 100644 packages/amazonq/.changes/1.62.0.json
delete mode 100644 packages/amazonq/.changes/1.63.0.json
delete mode 100644 packages/amazonq/.changes/1.64.0.json
delete mode 100644 packages/amazonq/.changes/1.65.0.json
delete mode 100644 packages/amazonq/.changes/1.66.0.json
delete mode 100644 packages/amazonq/.changes/1.67.0.json
delete mode 100644 packages/amazonq/.changes/1.68.0.json
delete mode 100644 packages/amazonq/.changes/1.69.0.json
delete mode 100644 packages/amazonq/.changes/1.7.0.json
delete mode 100644 packages/amazonq/.changes/1.70.0.json
delete mode 100644 packages/amazonq/.changes/1.71.0.json
delete mode 100644 packages/amazonq/.changes/1.72.0.json
delete mode 100644 packages/amazonq/.changes/1.73.0.json
delete mode 100644 packages/amazonq/.changes/1.74.0.json
delete mode 100644 packages/amazonq/.changes/1.75.0.json
delete mode 100644 packages/amazonq/.changes/1.76.0.json
delete mode 100644 packages/amazonq/.changes/1.77.0.json
delete mode 100644 packages/amazonq/.changes/1.78.0.json
delete mode 100644 packages/amazonq/.changes/1.79.0.json
delete mode 100644 packages/amazonq/.changes/1.8.0.json
delete mode 100644 packages/amazonq/.changes/1.80.0.json
delete mode 100644 packages/amazonq/.changes/1.81.0.json
delete mode 100644 packages/amazonq/.changes/1.82.0.json
delete mode 100644 packages/amazonq/.changes/1.83.0.json
delete mode 100644 packages/amazonq/.changes/1.84.0.json
delete mode 100644 packages/amazonq/.changes/1.85.0.json
delete mode 100644 packages/amazonq/.changes/1.86.0.json
delete mode 100644 packages/amazonq/.changes/1.87.0.json
delete mode 100644 packages/amazonq/.changes/1.88.0.json
delete mode 100644 packages/amazonq/.changes/1.89.0.json
delete mode 100644 packages/amazonq/.changes/1.9.0.json
delete mode 100644 packages/amazonq/.changes/1.90.0.json
delete mode 100644 packages/amazonq/.changes/1.91.0.json
delete mode 100644 packages/amazonq/.changes/1.92.0.json
delete mode 100644 packages/amazonq/.changes/1.93.0.json
delete mode 100644 packages/amazonq/.changes/1.94.0.json
delete mode 100644 packages/amazonq/.changes/1.95.0.json
delete mode 100644 packages/amazonq/.changes/1.96.0.json
delete mode 100644 packages/amazonq/.changes/1.97.0.json
delete mode 100644 packages/amazonq/.changes/1.98.0.json
delete mode 100644 packages/amazonq/.changes/1.99.0.json
delete mode 100644 packages/amazonq/.vscode/launch.json
delete mode 100644 packages/amazonq/.vscode/settings.json
delete mode 100644 packages/amazonq/.vscode/tasks.json
delete mode 100644 packages/amazonq/CHANGELOG.md
delete mode 100644 packages/amazonq/README.md
delete mode 100644 packages/amazonq/package.json
delete mode 100644 packages/amazonq/scripts/build/copyFiles.ts
delete mode 100644 packages/amazonq/src/api.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/app.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/controller/controller.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messenger.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messengerUtils.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/session/session.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/storages/chatSession.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/views/actions/uiMessageListener.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/chat/views/connector/connector.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/index.ts
delete mode 100644 packages/amazonq/src/app/amazonqScan/models/constants.ts
delete mode 100644 packages/amazonq/src/app/chat/activation.ts
delete mode 100644 packages/amazonq/src/app/chat/node/activateAgents.ts
delete mode 100644 packages/amazonq/src/app/inline/EditRendering/diffUtils.ts
delete mode 100644 packages/amazonq/src/app/inline/EditRendering/displayImage.ts
delete mode 100644 packages/amazonq/src/app/inline/EditRendering/imageRenderer.ts
delete mode 100644 packages/amazonq/src/app/inline/EditRendering/stringUtils.ts
delete mode 100644 packages/amazonq/src/app/inline/EditRendering/svgGenerator.ts
delete mode 100644 packages/amazonq/src/app/inline/activation.ts
delete mode 100644 packages/amazonq/src/app/inline/completion.ts
delete mode 100644 packages/amazonq/src/app/inline/cursorUpdateManager.ts
delete mode 100644 packages/amazonq/src/app/inline/documentEventListener.ts
delete mode 100644 packages/amazonq/src/app/inline/editSuggestionState.ts
delete mode 100644 packages/amazonq/src/app/inline/notebookUtil.ts
delete mode 100644 packages/amazonq/src/app/inline/recommendationService.ts
delete mode 100644 packages/amazonq/src/app/inline/sessionManager.ts
delete mode 100644 packages/amazonq/src/app/inline/stateTracker/lineTracker.ts
delete mode 100644 packages/amazonq/src/app/inline/telemetryHelper.ts
delete mode 100644 packages/amazonq/src/app/inline/tutorials/inlineChatTutorialAnnotation.ts
delete mode 100644 packages/amazonq/src/app/inline/tutorials/inlineTutorialAnnotation.ts
delete mode 100644 packages/amazonq/src/app/inline/webViewPanel.ts
delete mode 100644 packages/amazonq/src/commands.ts
delete mode 100644 packages/amazonq/src/extension.ts
delete mode 100644 packages/amazonq/src/extensionNode.ts
delete mode 100644 packages/amazonq/src/extensionWeb.ts
delete mode 100644 packages/amazonq/src/inlineChat/activation.ts
delete mode 100644 packages/amazonq/src/inlineChat/codeLenses/codeLenseProvider.ts
delete mode 100644 packages/amazonq/src/inlineChat/command/registerInlineCommands.ts
delete mode 100644 packages/amazonq/src/inlineChat/controller/inlineChatController.ts
delete mode 100644 packages/amazonq/src/inlineChat/controller/inlineTask.ts
delete mode 100644 packages/amazonq/src/inlineChat/decorations/computeDecorations.ts
delete mode 100644 packages/amazonq/src/inlineChat/decorations/inlineDecorator.ts
delete mode 100644 packages/amazonq/src/inlineChat/output/computeDiff.ts
delete mode 100644 packages/amazonq/src/inlineChat/output/responseTransformer.ts
delete mode 100644 packages/amazonq/src/inlineChat/provider/inlineChatProvider.ts
delete mode 100644 packages/amazonq/src/lsp/activation.ts
delete mode 100644 packages/amazonq/src/lsp/auth.ts
delete mode 100644 packages/amazonq/src/lsp/chat/activation.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/activation.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/codeActionsProvider.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/commands.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/controller.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/diagnostics/diagnosticsMonitor.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/diagnostics/errorContext.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/diagnostics/problemDetector.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/index.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/lsp/autoDebugLspClient.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/shared/diagnosticUtils.ts
delete mode 100644 packages/amazonq/src/lsp/chat/autoDebug/telemetry.ts
delete mode 100644 packages/amazonq/src/lsp/chat/commands.ts
delete mode 100644 packages/amazonq/src/lsp/chat/error.ts
delete mode 100644 packages/amazonq/src/lsp/chat/messages.ts
delete mode 100644 packages/amazonq/src/lsp/chat/webviewProvider.ts
delete mode 100644 packages/amazonq/src/lsp/client.ts
delete mode 100644 packages/amazonq/src/lsp/config.ts
delete mode 100644 packages/amazonq/src/lsp/encryption.ts
delete mode 100644 packages/amazonq/src/lsp/lspInstaller.ts
delete mode 100644 packages/amazonq/src/lsp/utils.ts
delete mode 100644 packages/amazonq/src/util/clearCache.ts
delete mode 100644 packages/amazonq/src/util/timeoutUtil.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/assert.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/chat.test.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/framework/framework.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/framework/jsdomInjector.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/framework/messenger.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/framework/text.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/review.test.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/template.test.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/transformByQ.test.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/utils/setup.ts
delete mode 100644 packages/amazonq/test/e2e/amazonq/welcome.test.ts
delete mode 100644 packages/amazonq/test/e2e/index.ts
delete mode 100644 packages/amazonq/test/e2e/inline/inline.test.ts
delete mode 100644 packages/amazonq/test/e2e/lsp/amazonqLsp.test.ts
delete mode 100644 packages/amazonq/test/e2e/lsp/lspInstallerUtil.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/apps/initContext.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/apps/inline/EditRendering/stringUtils.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/apps/inline/completion.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/apps/inline/inlineTracker.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/apps/inline/recommendationService.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/auth/controller.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/lsp/auth.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/lsp/chat/error.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/lsp/chat/messages.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/lsp/client.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/lsp/config.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/lsp/encryption.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonq/onboardingPage/walkthrough.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/amazonQGumbyUtil.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/chat/controller/messenger/messengerUtils.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/humanInTheLoopManager.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/models/dependencies.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/resources/files/addedFile.diff
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/resources/files/humanInTheLoop/dependency-updates-aggregate-report.xml
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/resources/files/humanInTheLoop/downloadResults/manifest.json
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/resources/files/humanInTheLoop/downloadResults/pom.xml
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/resources/files/modifiedFile.diff
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/resources/mocks/transformFixtures.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/transformApiHandler.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/transformFileHandler.test.ts
delete mode 100644 packages/amazonq/test/unit/amazonqGumby/transformationResultsHandler.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/EditRendering/diffUtils.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/EditRendering/displayImage.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/EditRendering/imageRenderer.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/EditRendering/svgGenerator.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/completion.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/cursorUpdateManager.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/notebookUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/app/inline/webViewPanel.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/commands/invokeRecommendation.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/commands/onAcceptance.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/commands/onInlineAcceptance.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/models/model.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/region/regionProfileManager.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/codewhisperer.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/diagnosticsProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/inlineCompletionService.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/keyStrokeHandler.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/recommendationHandler.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/referenceHoverProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/referenceInlineProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/referenceLogViewProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/securityIssueCodeActionProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/securityIssueHoverProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/securityIssueProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/securityIssueTreeViewProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/service/telemetry.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/tracker/codewhispererCodeCoverageTracker.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/tracker/codewhispererTracker.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/tracker/lineTracker.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/tracker/userWrittenCodeTracker.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/ui/prompters.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/authUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/bm25.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/codeParsingUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/commonUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/crossFileContextUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/diagnosticsUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/editorContext.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/globalStateUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/importAdderUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/licenseUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/runtimeLanguageContext.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/securityScanLanguageContext.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/showSsoPrompt.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/supplemetalContextUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/telemetryHelper.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/userGroupUtil.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/util/utgUtils.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhisperer/views/securityPanelViewProvider.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhispererChat/controllers/chat/chatRequest/converter.test.ts
delete mode 100644 packages/amazonq/test/unit/codewhispererChat/editor/context/focusArea/focusAreaExtractor.test.ts
delete mode 100644 packages/amazonq/test/unit/index.ts
delete mode 100644 packages/amazonq/test/unit/validation.test.ts
delete mode 100644 packages/amazonq/test/web/extension.test.ts
delete mode 100644 packages/amazonq/test/web/shared/crypto.test.ts
delete mode 100644 packages/amazonq/test/web/shared/fs.test.ts
delete mode 100644 packages/amazonq/test/web/shared/utilities/timeoutUtils.test.ts
delete mode 100644 packages/amazonq/test/web/testRunner.ts
delete mode 100644 packages/amazonq/test/web/utils.test.ts
delete mode 100644 packages/amazonq/tsconfig.json
delete mode 100644 packages/amazonq/webpack.config.js
diff --git a/.github/workflows/release_notes.md b/.github/workflows/release_notes.md
index 8a044acd831..cd9bc191983 100644
--- a/.github/workflows/release_notes.md
+++ b/.github/workflows/release_notes.md
@@ -16,4 +16,3 @@ ${AMAZON_Q_CHANGES}
## Previous changes
- [AWS Toolkit changelog](/packages/toolkit/CHANGELOG.md)
-- [Amazon Q changelog](/packages/amazonq/CHANGELOG.md)
diff --git a/.gitignore b/.gitignore
index 8a8b0fbe406..5eb5fc0d331 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,8 +45,6 @@ packages/*/LICENSE
packages/*/NOTICE
packages/toolkit/package.nls.json
packages/toolkit/resources
-packages/amazonq/package.nls.json
-packages/amazonq/resources
# Icons
packages/*/resources/fonts/aws-toolkit-icons.woff
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 04e90660dec..d60a2872e6d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -230,7 +230,7 @@ more options.
### Coverage report
-You can find the coverage report at `./coverage/amazonq/lcov-report/index.html` and `./coverage/toolkit/lcov-report/index.html` after running the tests. Tests ran from the workspace launch config won't generate a coverage report automatically because it can break file watching.
+You can find the coverage report at `./coverage/toolkit/lcov-report/index.html` after running the tests. Tests ran from the workspace launch config won't generate a coverage report automatically because it can break file watching.
### CodeCatalyst Blueprints
diff --git a/buildspec/linuxE2ETests.yml b/buildspec/linuxE2ETests.yml
index 4cb2f08f03d..1c22c9c05e9 100644
--- a/buildspec/linuxE2ETests.yml
+++ b/buildspec/linuxE2ETests.yml
@@ -43,7 +43,7 @@ phases:
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g')
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- - test -n "${CODECOV_TOKEN}" && [ "$TARGET_BRANCH" = "master" ] && ./codecov --token=${CODECOV_TOKEN} --branch=${CODEBUILD_RESOLVED_SOURCE_VERSION} --repository=${CODEBUILD_SOURCE_REPO_URL} --file=./coverage/amazonq/lcov.info --file=./coverage/toolkit/lcov.info
+ - test -n "${CODECOV_TOKEN}" && [ "$TARGET_BRANCH" = "master" ] && ./codecov --token=${CODECOV_TOKEN} --branch=${CODEBUILD_RESOLVED_SOURCE_VERSION} --repository=${CODEBUILD_SOURCE_REPO_URL} --file=./coverage/toolkit/lcov.info
finally:
- rm -rf ~/.aws/sso/cache || true
reports:
diff --git a/buildspec/linuxIntegrationTests.yml b/buildspec/linuxIntegrationTests.yml
index dacab125b89..f89cf495978 100644
--- a/buildspec/linuxIntegrationTests.yml
+++ b/buildspec/linuxIntegrationTests.yml
@@ -96,7 +96,7 @@ phases:
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g')
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- - test -n "${CODECOV_TOKEN}" && [ "$TARGET_BRANCH" = "master" ] && ./codecov --token=${CODECOV_TOKEN} --branch=${CODEBUILD_RESOLVED_SOURCE_VERSION} --repository=${CODEBUILD_SOURCE_REPO_URL} --file=./coverage/amazonq/lcov.info --file=./coverage/toolkit/lcov.info
+ - test -n "${CODECOV_TOKEN}" && [ "$TARGET_BRANCH" = "master" ] && ./codecov --token=${CODECOV_TOKEN} --branch=${CODEBUILD_RESOLVED_SOURCE_VERSION} --repository=${CODEBUILD_SOURCE_REPO_URL} --file=./coverage/toolkit/lcov.info
post_build:
commands:
# Destroy .netrc to avoid leaking $GITHUB_READONLY_TOKEN.
diff --git a/buildspec/linuxTests.yml b/buildspec/linuxTests.yml
index 241b5bb193a..cd5e4396d75 100644
--- a/buildspec/linuxTests.yml
+++ b/buildspec/linuxTests.yml
@@ -48,7 +48,7 @@ phases:
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- - test -n "${CODECOV_TOKEN}" && [ "$TARGET_BRANCH" = "master" ] && ./codecov --token=${CODECOV_TOKEN} --branch=${CODEBUILD_RESOLVED_SOURCE_VERSION} --repository=${CODEBUILD_SOURCE_REPO_URL} --file=./coverage/amazonq/lcov.info --file=./coverage/toolkit/lcov.info || true
+ - test -n "${CODECOV_TOKEN}" && [ "$TARGET_BRANCH" = "master" ] && ./codecov --token=${CODECOV_TOKEN} --branch=${CODEBUILD_RESOLVED_SOURCE_VERSION} --repository=${CODEBUILD_SOURCE_REPO_URL} --file=./coverage/toolkit/lcov.info || true
reports:
unit-test:
diff --git a/codecov.yml b/codecov.yml
index 1e348859f11..196bb232651 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -31,7 +31,6 @@ coverage:
paths:
- 'packages/core/src/codewhisperer/'
- 'packages/core/src/amazonq*/*'
- - 'packages/amazonq/src/'
flags:
- 'codewhisperer'
target: 80
@@ -104,7 +103,6 @@ flags:
paths:
- 'packages/core/src/codewhisperer/'
- 'packages/core/src/amazonq*/*'
- - 'packages/amazonq/src/'
amazonqFeatureDev:
paths:
- 'packages/core/src/amazonqFeatureDev/'
diff --git a/docs/arch_runtime.md b/docs/arch_runtime.md
index e1cbfd01661..340ac991610 100644
--- a/docs/arch_runtime.md
+++ b/docs/arch_runtime.md
@@ -20,7 +20,6 @@ If you must define a new key (is it _really_ necessary?), follow these guideline
- Choose a prefix as follows (as [recommended](https://code.visualstudio.com/api/extension-guides/command#using-a-custom-when-clause-context)):
- `packages/core/` should use `aws.` prefix
- `packages/toolkit/` should use `aws.toolkit.` prefix
- - `packages/amazonq/` should use `amazonq.` prefix
- Use brevity. Less is more.
- Document it in the list below.
@@ -45,10 +44,6 @@ toolkit/ or amazonq/ if appropriate.
- TODO
-#### setContext keys owned by packages/amazonq/
-
-- TODO
-
## How our components communicate
TODO: vscode events; the "globals" module; activate(); EventEmitters; ...?
diff --git a/docs/icons.md b/docs/icons.md
index 46e252d5dac..085623fa6cb 100644
--- a/docs/icons.md
+++ b/docs/icons.md
@@ -6,7 +6,7 @@ A [build script](../scripts/generateIcons.ts) generates extension artifacts in [
- `resources/fonts/aws-toolkit-icons.woff`
- `resources/css/icons.css`
-- `contributes.icons` in [amazonq package.json](../packages/amazonq/package.json) and [toolkit package.json](../packages/toolkit/package.json)
+- `contributes.icons` in [toolkit package.json](../packages/toolkit/package.json)
This script should be ran using `npm run generateIcons` after making updates. Any changes made to `package.json` should be committed with the relevant icons. Type checking in `core/` relies on the entries in `core/package.json`. However, the individual extensions require entries in their `package.json`s as well. Currently, resources (including icons) are shared between `core/` and the individual extensions. If `contributes.icons` in each of the extensions does not match the entry in `core/`, then CI will fail.
diff --git a/docs/lsp.md b/docs/lsp.md
deleted file mode 100644
index 49a6ad00b87..00000000000
--- a/docs/lsp.md
+++ /dev/null
@@ -1,137 +0,0 @@
-# Flare Language Server
-
-## Chat Activation flow
-
-```mermaid
-sequenceDiagram
- participant user as User
- participant ext as Extension
- participant webview as Chat Webview
- participant flare as Amazon Q LSP
- participant backend as Amazon Q Backend
-
- user->>ext: opens IDE
- ext->>ext: activates
- ext->>webview: loads UI
- ext->>flare: initialize process
- flare->>flare: starts and waits
- user->>webview: interacts
- webview->>ext: sends message
- ext->>flare: sends message
- flare->>backend: call api
- backend->>flare: returns
- flare->>ext: display
- ext->>webview: display
-```
-
-## Language Server Debugging
-
-If you want to connect a local version of language-servers to aws-toolkit-vscode, follow these steps:
-
-1. Clone https://github.com/aws/language-servers.git and set it up in the same workspace as this project by cmd+shift+p and "add folder to workspace" and selecting the language-servers folder that you just cloned. Your VS code folder structure should look like below.
-
- ```
- /aws-toolkit-vscode
- /toolkit
- /core
- /amazonq
- /language-servers
- ```
-
-2. Inside of the language-servers project run:
- ```
- npm install
- npm run compile
- npm run package
- ```
- to get the project setup
-3. You need to open VScode user settings (Cmd+Shift+P and Search "Open User Settings (JSON)") and add the lines below at the bottom of the settings to enable the lsp experiment:
- ```
- "aws.experiments": {
- "amazonqLSP": true,
- "amazonqLSPInline": true, // optional: enables inline completion from flare
- "amazonqLSPChat": true // optional: enables chat from flare
- }
- ```
-4. Uncomment the `__AMAZONQLSP_PATH` and `__AMAZONQLSP_UI` variables in the `amazonq/.vscode/launch.json` extension configuration
-5. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server, Once you run "Launch LSP with Debugging" a new window should start, wait for the plugin to show up there. Then go to the run menu again and run "Attach to Language Server (amazonq)" after this you should be able to add breakpoints in the LSP code.
-6. (Optional): Enable `"amazonq.trace.server": "on"` or `"amazonq.trace.server": "verbose"` in your VSCode settings to view detailed log messages sent to/from the language server. These log messages will show up in the "Amazon Q Language Server" output channel
-
-### Breakpoints Work-Around
-
-If the breakpoints in your language-servers project remain greyed out and do not trigger when you run `Launch LSP with Debugging`, your debugger may be attaching to the language server before it has launched. You can follow the work-around below to avoid this problem. If anyone fixes this issue, please remove this section.
-
-1. Set your breakpoints and click `Launch LSP with Debugging`
-2. Once the debugging session has started, click `Launch LSP with Debugging` again, then `Cancel` on any pop-ups that appear
-3. On the debug panel, click `Attach to Language Server (amazonq)` next to the red stop button
-4. Click `Launch LSP with Debugging` again, then `Cancel` on any pop-ups that appear
-
-## Language Server Runtimes Debugging
-
-If you want to connect a local version of language-server-runtimes to aws-toolkit-vscode, follow these steps:
-
-1. Clone https://github.com/aws/language-server-runtimes.git and set it up in the same workspace as this project by cmd+shift+p and "add folder to workspace" and selecting the language-server-runtimes folder that you just cloned. Your VS code folder structure should look like below.
-
- ```
- /aws-toolkit-vscode
- /toolkit
- /core
- /amazonq
- /language-servers
- /language-server-runtimes
- ```
-
-2. Inside of the language-server-runtimes project run:
-
- ```
- npm install
- npm run compile
- cd runtimes
- npm run prepub
- cd out
- ```
-
- If you get an error running `npm run prepub`, you can instead run `npm run prepub:copyFiles` to skip cleaning and testing.
-
-3. Choose one of the following approaches:
-
-### Option A: Using npm pack (Recommended)
-
-3a. Create a package file:
-
- npm pack
-
-You will see a file created like this: `aws-language-server-runtimes-0.*.*.tgz`
-
-4a. Inside of language-servers, find the package where you need the change.
-
-For example, if you would like the change in `language-servers/app/aws-lsp-codewhisperer-runtimes`, you would run:
-
- cd language-servers/app/aws-lsp-codewhisperer-runtimes
-
- npm install ../../../language-server-runtimes/runtimes/out/aws-language-server-runtimes-0.*.*.tgz
-
- npm run compile
-
-5a. If you need the change in aws-toolkit-vscode run:
-
- cd aws-toolkit-vscode
-
- npm install ../language-server-runtimes/runtimes/out/aws-language-server-runtimes-0.*.*.tgz
-
-### Option B: Using npm link (Alternative)
-
-3b. Create npm links:
-
- npm link
- cd ../../types
- npm link
-
-4b. Inside of aws-toolkit-vscode run:
-
- npm install
- npm link @aws/language-server-runtimes @aws/language-server-runtimes-types
-
-## Amazon Q Inline Activation
-
-- In order to get inline completion working you must open a supported file type defined in CodewhispererInlineCompletionLanguages in `packages/amazonq/src/app/inline/completion.ts`
diff --git a/docs/web.md b/docs/web.md
index 1540ddf8134..5a685c2ae23 100644
--- a/docs/web.md
+++ b/docs/web.md
@@ -75,7 +75,7 @@ The following will explain how to get your latest local development changes runn
1. Build the extension. We need the Web mode entrypoint file to exist.
2. OPTIONAL: Start up your browser with security disabled. Certain functionalities do not support CORS and will fail otherwise.
- On MacOS from the CLI is similar to `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security`
-3. `cd` to the extension you want to test in `packages/`. Eg: `packages/amazonq/`.
+3. `cd` to the extension you want to test in `packages/`. Eg: `packages/toolkit/`.
- We need to do this since the following command hosts your build from the `cwd`.
4. Follow the [VS Code documentation](https://code.visualstudio.com/api/extension-guides/web-extensions#test-your-web-extension-in-vscode.dev) for setting up certs, serving your the latest changes, and installing the extension to `vscode.dev`.
diff --git a/package.json b/package.json
index 1c63c1e0dde..6c372ba72c0 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,6 @@
"reset": "npm run clean && ts-node ./scripts/clean.ts node_modules && npm install",
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/ --if-present",
"mergeReports": "ts-node ./scripts/mergeReports.ts",
- "skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/",
"scan-licenses": "ts-node ./scripts/scan-licenses.ts"
},
"devDependencies": {
diff --git a/packages/amazonq/.c8rc.json b/packages/amazonq/.c8rc.json
deleted file mode 100644
index 95d5af7c32b..00000000000
--- a/packages/amazonq/.c8rc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "report-dir": "../../coverage/amazonq",
- "reporter": ["lcov"],
- "all": true,
- "exclude": ["**/test*/**", "**/node_modules/**"]
-}
diff --git a/packages/amazonq/.changes/1.0.0.json b/packages/amazonq/.changes/1.0.0.json
deleted file mode 100644
index 9499804cd6d..00000000000
--- a/packages/amazonq/.changes/1.0.0.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "date": "2024-04-29",
- "version": "1.0.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Code Transformation: Address various issues in TransformationHub UX."
- },
- {
- "type": "Bug Fix",
- "description": "Code Transformation: Transform may fail if JAVA_HOME has leading or trailing whitespace"
- },
- {
- "type": "Bug Fix",
- "description": "Chat: Q panel doesn't fit to its parent"
- },
- {
- "type": "Bug Fix",
- "description": "Feature Development: update welcome message and menu item description for /dev command"
- },
- {
- "type": "Bug Fix",
- "description": "Code Transformation: show error messages in chat"
- },
- {
- "type": "Bug Fix",
- "description": "Code Transformation: Proposed changes not updated when multiple transformation jobs run in sequence."
- },
- {
- "type": "Bug Fix",
- "description": "Feature Development: Update error message for monthly conversation limit reach"
- },
- {
- "type": "Bug Fix",
- "description": "Code Transformation: Omit Maven metadata files when uploading dependencies to fix certain build failures in backend."
- },
- {
- "type": "Feature",
- "description": "Code Transformation: Refreshed UI during CodeTransformation"
- },
- {
- "type": "Feature",
- "description": "Chat: cmd + i to open chat"
- },
- {
- "type": "Feature",
- "description": "Right Click + no code selected shows Q context menu"
- },
- {
- "type": "Feature",
- "description": "Security Scan: Scans can now run on all files in the project"
- },
- {
- "type": "Feature",
- "description": "Chat: Updates quick action commands style and groupings"
- },
- {
- "type": "Feature",
- "description": "Code Transformation: add details about expected changes in transformation plan"
- },
- {
- "type": "Feature",
- "description": "Enable Amazon Q feature development and Amazon Q transform capabilities (/dev and /transform) for AWS Builder ID users."
- },
- {
- "type": "Feature",
- "description": "Initial release"
- },
- {
- "type": "Feature",
- "description": "Chat: Added metric parameters to recordAddMessage telemetry event."
- },
- {
- "type": "Feature",
- "description": "Security Scan: Scans can now run automatically when file changes are made"
- },
- {
- "type": "Feature",
- "description": "Chat: brief CodeLens to advertise chat"
- },
- {
- "type": "Feature",
- "description": "Security Scan: Send security issue to chat for explanation and fix"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.1.0.json b/packages/amazonq/.changes/1.1.0.json
deleted file mode 100644
index 4e3083f31a5..00000000000
--- a/packages/amazonq/.changes/1.1.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-04-30",
- "version": "1.1.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed markdown is not getting parsed inside list items."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Copy to clipboard on code blocks doesn't work"
- },
- {
- "type": "Bug Fix",
- "description": "Fixed a crash when trying to use Q /dev on large projects or projects containing files with unsupported encoding."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.10.0.json b/packages/amazonq/.changes/1.10.0.json
deleted file mode 100644
index 6d6521e6fa6..00000000000
--- a/packages/amazonq/.changes/1.10.0.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "date": "2024-06-21",
- "version": "1.10.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixes an issue where project-scans time out for larger projects."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev command: Fix file rejections for files outside of src/"
- },
- {
- "type": "Bug Fix",
- "description": "Feature Development: update /dev welcome message"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed broken code blocks with typewriter text in list items."
- },
- {
- "type": "Feature",
- "description": "UX: New style for the login window"
- },
- {
- "type": "Removal",
- "description": "Auth: No longer share SSO sessions with AWS Toolkit."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.100.0.json b/packages/amazonq/.changes/1.100.0.json
deleted file mode 100644
index e1deb61908b..00000000000
--- a/packages/amazonq/.changes/1.100.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-10-16",
- "version": "1.100.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.101.0.json b/packages/amazonq/.changes/1.101.0.json
deleted file mode 100644
index 7a72dabfc9e..00000000000
--- a/packages/amazonq/.changes/1.101.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-10-22",
- "version": "1.101.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.102.0.json b/packages/amazonq/.changes/1.102.0.json
deleted file mode 100644
index df8ee166397..00000000000
--- a/packages/amazonq/.changes/1.102.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-10-30",
- "version": "1.102.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.103.0.json b/packages/amazonq/.changes/1.103.0.json
deleted file mode 100644
index b7ba187c759..00000000000
--- a/packages/amazonq/.changes/1.103.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-11-06",
- "version": "1.103.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Q CodeTransformation: add more job metadata to history table"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.104.0.json b/packages/amazonq/.changes/1.104.0.json
deleted file mode 100644
index d6346984469..00000000000
--- a/packages/amazonq/.changes/1.104.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-11-15",
- "version": "1.104.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.105.0.json b/packages/amazonq/.changes/1.105.0.json
deleted file mode 100644
index 1a435ce46b9..00000000000
--- a/packages/amazonq/.changes/1.105.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-11-19",
- "version": "1.105.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Remove show logs menu item for non Q views"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.106.0.json b/packages/amazonq/.changes/1.106.0.json
deleted file mode 100644
index 23dffe4c5e6..00000000000
--- a/packages/amazonq/.changes/1.106.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-11-21",
- "version": "1.106.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.107.0.json b/packages/amazonq/.changes/1.107.0.json
deleted file mode 100644
index 2baf3e97c81..00000000000
--- a/packages/amazonq/.changes/1.107.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2026-01-08",
- "version": "1.107.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.11.0.json b/packages/amazonq/.changes/1.11.0.json
deleted file mode 100644
index 202625b2560..00000000000
--- a/packages/amazonq/.changes/1.11.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-06-27",
- "version": "1.11.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fix for inline buttons don't have borders"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fix for some edge cases when followups appear on top without styles"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fix for prompt input removes whole word if it starts with @ character but there is no context selected"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fix for prompt input doesn't show multi line content properly after it reaches 10-15 lines"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev command: Fix in progress experience for ongoing backend calls"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.12.0.json b/packages/amazonq/.changes/1.12.0.json
deleted file mode 100644
index a2cf430a220..00000000000
--- a/packages/amazonq/.changes/1.12.0.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "date": "2024-07-08",
- "version": "1.12.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Security Scans: Fixed unnecessary yellow lines appearing in both auto scans and project scans."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed prompt input becomes invisible if an html special character is inserted"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed button font sizes are too big"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed buttons don't show borders inside a message"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transform: Link UI messages to troubleshooting docs"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev command: improve user error messages"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed button texts are cropped too short"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed prompt input and selected command horizontal alignment"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed prompt input becomes invisible when multine text inserted with paste"
- },
- {
- "type": "Feature",
- "description": "Q feature dev: Only use relevant code and related files"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.13.0.json b/packages/amazonq/.changes/1.13.0.json
deleted file mode 100644
index 7bf940dd04a..00000000000
--- a/packages/amazonq/.changes/1.13.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2024-07-11",
- "version": "1.13.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "AD/LDAP users may see \"uv_os_get_passwd ENOENT\" error on startup #5277"
- },
- {
- "type": "Feature",
- "description": "Add support for [Amazon Q Chat Workspace Context](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/workspace-context.html). Customers can use `@workspace` to ask questions regarding local workspace."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.14.0.json b/packages/amazonq/.changes/1.14.0.json
deleted file mode 100644
index 95f9248b933..00000000000
--- a/packages/amazonq/.changes/1.14.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2024-07-11",
- "version": "1.14.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Amazon Q/dev proactively show code generation iterations"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.15.0.json b/packages/amazonq/.changes/1.15.0.json
deleted file mode 100644
index cda200cb196..00000000000
--- a/packages/amazonq/.changes/1.15.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-07-15",
- "version": "1.15.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixes a bug when the prompt input exceeds the width of the chat box it's not always wrapped correctly."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q: Corrected a miswording in the Amazon Q: Share Content With AWS setting."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixes a bug when user input contains 4 or more spaces at the beginning of the line for multiline inputs, that line appears like a code block instead of a paragraph"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.16.0.json b/packages/amazonq/.changes/1.16.0.json
deleted file mode 100644
index 1d24082abd6..00000000000
--- a/packages/amazonq/.changes/1.16.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-07-18",
- "version": "1.16.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon q /dev: include granular error handling for code generation failed state"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: always show build logs from last job run"
- },
- {
- "type": "Bug Fix",
- "description": "Unexpected SSO expiration on Windows due to EPERM"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.17.0.json b/packages/amazonq/.changes/1.17.0.json
deleted file mode 100644
index d65bee6fdcc..00000000000
--- a/packages/amazonq/.changes/1.17.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-07-25",
- "version": "1.17.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Dev and Transform introduction text formatted incorrectly"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: update error message for code gen timeout and include backfill for error name"
- },
- {
- "type": "Bug Fix",
- "description": "Sign-in page may fail to render in rare circumstances."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.18.0.json b/packages/amazonq/.changes/1.18.0.json
deleted file mode 100644
index 8ca73a4cc3f..00000000000
--- a/packages/amazonq/.changes/1.18.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2024-07-29",
- "version": "1.18.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixed an issue scans were not able to succeed on Java projects with .class files"
- },
- {
- "type": "Bug Fix",
- "description": "FileNotFound error causing early SSO expiration"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.19.0.json b/packages/amazonq/.changes/1.19.0.json
deleted file mode 100644
index 90fe678b7fd..00000000000
--- a/packages/amazonq/.changes/1.19.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-08-01",
- "version": "1.19.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixing issue with an incorrect input cursor position in the prompt text box"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixing issue with the max tabs notification not being dismissible."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Showing/hiding the scrollbars is now controlled by the OS settings"
- },
- {
- "type": "Bug Fix",
- "description": "Q chat may stop responding after processing Python/Java code"
- },
- {
- "type": "Feature",
- "description": "Amazon q /dev: i18n support for messaging"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.2.0.json b/packages/amazonq/.changes/1.2.0.json
deleted file mode 100644
index df142bc0933..00000000000
--- a/packages/amazonq/.changes/1.2.0.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "date": "2024-05-07",
- "version": "1.2.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Fix bug when Amazon Q chat sends code selection while user has no selection"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: make jobId visible in job history tab at start of job and allow summary.md + icons to be saved when accepting changes"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Typewriter animator parts showing up in code fields inside listitems"
- },
- {
- "type": "Bug Fix",
- "description": "Security Scan: Addresses a bug where security issues sometimes appear multiple times"
- },
- {
- "type": "Feature",
- "description": "Update cross file context config for Q inline suggestion"
- },
- {
- "type": "Feature",
- "description": "Amazon Q: Security scans now support C, C++, and PHP files"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.20.0.json b/packages/amazonq/.changes/1.20.0.json
deleted file mode 100644
index fbaee8ce3f8..00000000000
--- a/packages/amazonq/.changes/1.20.0.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "date": "2024-08-08",
- "version": "1.20.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: include a retry option for the same prompt after folder reselection"
- },
- {
- "type": "Bug Fix",
- "description": "Ignore virtual environment when indexing workspace"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Transformation: show pro tier users estimated cost of /transform on projects over 100K lines"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Transformation: warn user if absolute file paths are found in the pom.xml"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.21.0.json b/packages/amazonq/.changes/1.21.0.json
deleted file mode 100644
index d6c630a689e..00000000000
--- a/packages/amazonq/.changes/1.21.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2024-08-15",
- "version": "1.21.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Q feature dev: update file extension list and minor UI fixes"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.22.0.json b/packages/amazonq/.changes/1.22.0.json
deleted file mode 100644
index 2053fb1f123..00000000000
--- a/packages/amazonq/.changes/1.22.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-08-22",
- "version": "1.22.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Avoid refreshing code suggestion for paginated response"
- },
- {
- "type": "Bug Fix",
- "description": "Update login logo styling"
- },
- {
- "type": "Bug Fix",
- "description": "Correct indentation when insert Q chat code at cursor position"
- },
- {
- "type": "Feature",
- "description": "Add notification for extended session to IdC users"
- },
- {
- "type": "Feature",
- "description": "Support more programming languages for workspace index"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.23.0.json b/packages/amazonq/.changes/1.23.0.json
deleted file mode 100644
index 1aff236995a..00000000000
--- a/packages/amazonq/.changes/1.23.0.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "date": "2024-08-29",
- "version": "1.23.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Fix bug when undo inline suggestion causes command not found"
- },
- {
- "type": "Bug Fix",
- "description": "Auth: `SyntaxError` causing unexpected SSO logout"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: allow symlinks for JDK path"
- },
- {
- "type": "Bug Fix",
- "description": "Fix bug where text with inline code copied from Amazon Q Chat had new line breaks around the inline code text"
- },
- {
- "type": "Bug Fix",
- "description": "Fix bug with code indentation and nested list formatting in chat response prompt"
- },
- {
- "type": "Bug Fix",
- "description": "Fix bug when disabled commands does not get filtered in quick actions"
- },
- {
- "type": "Bug Fix",
- "description": "Auth: Users may be silently logged out due to network issues when starting the extension."
- },
- {
- "type": "Feature",
- "description": "Support AB testing"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.24.0.json b/packages/amazonq/.changes/1.24.0.json
deleted file mode 100644
index a5a87d9b747..00000000000
--- a/packages/amazonq/.changes/1.24.0.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "date": "2024-09-05",
- "version": "1.24.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Network errors causing premature SSO logout"
- },
- {
- "type": "Bug Fix",
- "description": "Fix SyntaxError causing premature expiration (edge case)"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: show instructions for finding JDK path on Linux"
- },
- {
- "type": "Bug Fix",
- "description": "UI: 'Start using Amazon Q' may display even if the user is signed in."
- },
- {
- "type": "Bug Fix",
- "description": "Add getFeature and isEnabled utility methods to FeatureConfigProvider"
- },
- {
- "type": "Feature",
- "description": "Amazon Q /dev: include in progress state agent in code generation"
- },
- {
- "type": "Feature",
- "description": "Reduce workspace CPU indexing time by 50%"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.25.0.json b/packages/amazonq/.changes/1.25.0.json
deleted file mode 100644
index b3cdaff40c1..00000000000
--- a/packages/amazonq/.changes/1.25.0.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "date": "2024-09-12",
- "version": "1.25.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fixed inline code blocks are not vertically aligned with texts"
- },
- {
- "type": "Feature",
- "description": "Record telemetry event when AWS Toolkits extension is uninstalled."
- },
- {
- "type": "Feature",
- "description": "Improve workspace indexing by only index files that are changed since last indexing"
- },
- {
- "type": "Removal",
- "description": "Amazon Q Feature dev: Remove approach generation flow"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.26.0.json b/packages/amazonq/.changes/1.26.0.json
deleted file mode 100644
index 5f7e5361811..00000000000
--- a/packages/amazonq/.changes/1.26.0.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "date": "2024-09-19",
- "version": "1.26.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixed an issue where the wrong icon was used in the status bar menu."
- },
- {
- "type": "Bug Fix",
- "description": "Disable Amazon Q LSP in AL2"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fix shifted chat contents when closing and opening chat panel back"
- },
- {
- "type": "Bug Fix",
- "description": "Security Scan: Minor styling improvements in the security issue webview panel"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Fix tooltip remaining on screen when closing and opening chat panel back"
- },
- {
- "type": "Bug Fix",
- "description": "Auth: Login state not updating across multiple VS Code windows."
- },
- {
- "type": "Feature",
- "description": "Support @workspace queries for specific files like `@workspace what does test.ts do? `. "
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.27.0.json b/packages/amazonq/.changes/1.27.0.json
deleted file mode 100644
index 005008c342f..00000000000
--- a/packages/amazonq/.changes/1.27.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2024-09-27",
- "version": "1.27.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixes an issue that incorrectly removes hardcoded credentials detections from auto scans."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.28.0.json b/packages/amazonq/.changes/1.28.0.json
deleted file mode 100644
index 481a4d8e7d2..00000000000
--- a/packages/amazonq/.changes/1.28.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-10-03",
- "version": "1.28.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: define first folder as a root path for LLM-created files when using workspaces"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Transformation: allow users to skip running tests"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Developer: Updated legal disclaimer text"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.29.0.json b/packages/amazonq/.changes/1.29.0.json
deleted file mode 100644
index 35cc08b1b25..00000000000
--- a/packages/amazonq/.changes/1.29.0.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "date": "2024-10-10",
- "version": "1.29.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: include telemetry for workspace usage when generating new files"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q extension may fail to start if AWS Toolkit extension fails to start"
- },
- {
- "type": "Bug Fix",
- "description": "Start language server by default"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Feature Dev: Add error messages when the upload URL expires"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q (/dev): view diffs of previous /dev iterations"
- },
- {
- "type": "Bug Fix",
- "description": "Q dev handle no change required"
- },
- {
- "type": "Deprecation",
- "description": "The next release of this extension will require VS Code 1.83.0 or newer."
- },
- {
- "type": "Feature",
- "description": "Automatically pause and resume @workspace indexing when OS CPU load is high"
- },
- {
- "type": "Feature",
- "description": "Add buttons to code blocks to view and accept diffs."
- },
- {
- "type": "Feature",
- "description": "Inline completion for more json files, and all yaml files"
- },
- {
- "type": "Feature",
- "description": "Show a one-time warning if new VS Code is required"
- },
- {
- "type": "Removal",
- "description": "Minimum required VSCode version is now 1.83"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.3.0.json b/packages/amazonq/.changes/1.3.0.json
deleted file mode 100644
index 9645f416074..00000000000
--- a/packages/amazonq/.changes/1.3.0.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "date": "2024-05-08",
- "version": "1.3.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "modifying the root folder for /dev now modifies it"
- },
- {
- "type": "Bug Fix",
- "description": "Q chat may stop responding after processing Javascript/Typescript code"
- },
- {
- "type": "Bug Fix",
- "description": "Completion may fail unexpected if user opened many tabs"
- },
- {
- "type": "Feature",
- "description": "Inline Suggestions: Only display the 'Open Chat' CodeLens if the user is signed into Amazon Q."
- },
- {
- "type": "Feature",
- "description": "Security Scan: Scans can now be run without an open editor"
- },
- {
- "type": "Feature",
- "description": "Security Scan: Multi-root workspace support"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.30.0.json b/packages/amazonq/.changes/1.30.0.json
deleted file mode 100644
index 070f0f7be5f..00000000000
--- a/packages/amazonq/.changes/1.30.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2024-10-17",
- "version": "1.30.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Various fixes and changes"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.31.0.json b/packages/amazonq/.changes/1.31.0.json
deleted file mode 100644
index 882fbad0f49..00000000000
--- a/packages/amazonq/.changes/1.31.0.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "date": "2024-10-29",
- "version": "1.31.0",
- "entries": [
- {
- "type": "Breaking Change",
- "description": "Change keybind for focusing chat to ctrl+win+i on Windows, ctrl+cmd+i on macOS and ctrl+meta+i on Linux"
- },
- {
- "type": "Bug Fix",
- "description": "Inline Suggestions: Occasional `ValidationException` if user context has too many characters."
- },
- {
- "type": "Bug Fix",
- "description": "Update `@workspace` index when adding or deleting a file"
- },
- {
- "type": "Bug Fix",
- "description": "fixed device code detection when running auth through tunneled vscode"
- },
- {
- "type": "Feature",
- "description": "Use inline chat to select code and transform it with natural language instructions"
- },
- {
- "type": "Feature",
- "description": "Amazon Q /dev: Add stop generation action"
- },
- {
- "type": "Feature",
- "description": "Provide more frequent updates about code changes made by agent"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.32.0.json b/packages/amazonq/.changes/1.32.0.json
deleted file mode 100644
index cfa6f4796bf..00000000000
--- a/packages/amazonq/.changes/1.32.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-10-29",
- "version": "1.32.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Remove warning when no input is provided to inline chat input box"
- },
- {
- "type": "Bug Fix",
- "description": "Use Sagemaker environment IAM Credentials for Code Completion when they're available"
- },
- {
- "type": "Bug Fix",
- "description": "Inline: Code completion not working for Sagemaker Pro Tier users."
- },
- {
- "type": "Bug Fix",
- "description": "Disable /transform and /dev commands for sagemaker users as they're not supported"
- },
- {
- "type": "Feature",
- "description": "Amazon SageMaker Studio: Enable Free Tier Chat for IAM users"
- }
- ]
-}
diff --git a/packages/amazonq/.changes/1.33.0.json b/packages/amazonq/.changes/1.33.0.json
deleted file mode 100644
index ac740352518..00000000000
--- a/packages/amazonq/.changes/1.33.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2024-10-30",
- "version": "1.33.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: fix for stop button showing for Code Transformation"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.34.0.json b/packages/amazonq/.changes/1.34.0.json
deleted file mode 100644
index 35d1a3b1e1d..00000000000
--- a/packages/amazonq/.changes/1.34.0.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "date": "2024-11-07",
- "version": "1.34.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Align example help text with prompt message in chat"
- },
- {
- "type": "Bug Fix",
- "description": "Improve `@workspace` index auto pause start strategy. "
- },
- {
- "type": "Feature",
- "description": "Allow users to View and Apply diff when they explictily send code to Amazon Q using - Fix, Refactor, Optimize and Send To Prompt."
- },
- {
- "type": "Feature",
- "description": "Security Scan: Auto-scan now supports JSX, TSX, Kotlin, Scala, and Shell files."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.35.0.json b/packages/amazonq/.changes/1.35.0.json
deleted file mode 100644
index 45b791ac4c4..00000000000
--- a/packages/amazonq/.changes/1.35.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-11-11",
- "version": "1.35.0",
- "entries": [
- {
- "type": "Breaking Change",
- "description": "Change focus chat keybind to win+alt+i on Windows, cmd+alt+i on macOS, and meta+alt+i on Linux"
- },
- {
- "type": "Bug Fix",
- "description": "Fix suboptimal inline suggestions from Amazon Q caused by improperly formatted supplemental context"
- },
- {
- "type": "Bug Fix",
- "description": "Fix empty chunks being sent to service and get validationException"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.36.0.json b/packages/amazonq/.changes/1.36.0.json
deleted file mode 100644
index 0b10e6d8720..00000000000
--- a/packages/amazonq/.changes/1.36.0.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "date": "2024-11-14",
- "version": "1.36.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Fix broken inline suggestion auto-trigger on Systemverfilog files if users dont have systemverilog extension installed and enabled"
- },
- {
- "type": "Bug Fix",
- "description": "tutorial always showing on start"
- },
- {
- "type": "Feature",
- "description": "Enable default `@workspace` context of Amazon Q chat for certain users"
- },
- {
- "type": "Feature",
- "description": "Amazon Q /dev: Add an action to accept individual files"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.37.0.json b/packages/amazonq/.changes/1.37.0.json
deleted file mode 100644
index 3076836aa3c..00000000000
--- a/packages/amazonq/.changes/1.37.0.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "date": "2024-11-22",
- "version": "1.37.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Feature Dev: display limit reached error message"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: `@workspace` command shown in all tab types"
- },
- {
- "type": "Bug Fix",
- "description": "Chat container exceeds width of container"
- },
- {
- "type": "Bug Fix",
- "description": "amazon q inline: skip indexing when no workspace folders are found"
- },
- {
- "type": "Bug Fix",
- "description": "file details and name unneccessary cropping"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: update diff window behavior after a change is accepted"
- },
- {
- "type": "Feature",
- "description": "Amazon Q /dev: support `.gradle` files"
- },
- {
- "type": "Feature",
- "description": "Code Transform: Enable support for Java 17 projects."
- },
- {
- "type": "Feature",
- "description": "Notifications: Support for delivering critical alerts and product updates"
- },
- {
- "type": "Feature",
- "description": "Retrieve and display a customization name when a customization is overridden in an AB test"
- },
- {
- "type": "Feature",
- "description": "Feature(Amazon Q Code Transformation): support conversions of embedded SQL from Oracle to PostgreSQL"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.38.0.json b/packages/amazonq/.changes/1.38.0.json
deleted file mode 100644
index cc04393dfa7..00000000000
--- a/packages/amazonq/.changes/1.38.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-11-27",
- "version": "1.38.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Amazon Q /dev: support `Dockerfile` files"
- },
- {
- "type": "Feature",
- "description": "Introduce @workspace command to enhance context fetching for Chat"
- },
- {
- "type": "Feature",
- "description": "Feature(Amazon Q Code Transformation): allow users to view results in 5 smaller diffs"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.39.0.json b/packages/amazonq/.changes/1.39.0.json
deleted file mode 100644
index 750b30ba03a..00000000000
--- a/packages/amazonq/.changes/1.39.0.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "date": "2024-12-03",
- "version": "1.39.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Added a getting started page for exploring amazon q agents"
- },
- {
- "type": "Feature",
- "description": "`/test` in Q chat to generate unit tests for java and python"
- },
- {
- "type": "Feature",
- "description": "`/doc` in Q chat to generate and update documentation for your project"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Scan is now Amazon Q Code Review"
- },
- {
- "type": "Feature",
- "description": "`/review` in Q chat to scan your code for vulnerabilities and quality issues, and generate fixes"
- },
- {
- "type": "Feature",
- "description": "Security Scan: New TreeView to display security scan issues and vulnerabilities detected in your project. The TreeView provides an organized and hierarchical view of the scan results, making it easier to navigate and prioritize the issues that need to be addressed."
- },
- {
- "type": "Feature",
- "description": "Security Scan: Added ability to suppress or ignore security issues"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.4.0.json b/packages/amazonq/.changes/1.4.0.json
deleted file mode 100644
index aab7e1f2b70..00000000000
--- a/packages/amazonq/.changes/1.4.0.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "date": "2024-05-13",
- "version": "1.4.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Auth: No longer request AWS account scopes during login."
- },
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixes an issue where scans fail for projects with Terraform files"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transform: Show additional status messages to align with experience when JAVA_HOME set incorrectly."
- },
- {
- "type": "Feature",
- "description": "UX: Added keyboard navigation to login screen."
- },
- {
- "type": "Feature",
- "description": "New SSO Authorization Code flow for faster logins"
- },
- {
- "type": "Feature",
- "description": "Transform: Add human intervention to help update dependencies during transformation."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.40.0.json b/packages/amazonq/.changes/1.40.0.json
deleted file mode 100644
index ea251bdd8fe..00000000000
--- a/packages/amazonq/.changes/1.40.0.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "date": "2024-12-10",
- "version": "1.40.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Improved LLM code review for file review."
- },
- {
- "type": "Bug Fix",
- "description": "@workspace is missing from the welcome to q chat tab"
- },
- {
- "type": "Bug Fix",
- "description": "Fix chat syntax highlighting when using several different themes"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: progress bar persists after cancelling README creation"
- },
- {
- "type": "Bug Fix",
- "description": "Code Review: Fixed a bug where some issues are missing from the code issues view for workspaces with custom names"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: Prompt user to choose a folder in chat"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev not adding Dockerfiles in nested folders"
- },
- {
- "type": "Bug Fix",
- "description": "Improved Code Fix generation for code review issues"
- },
- {
- "type": "Bug Fix",
- "description": "Fix the quick start buttons on the explore page to show amazon q colours on hover"
- },
- {
- "type": "Feature",
- "description": "Q feature dev: recognize .bms, .pli code files"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Transformation: show job ID in Transformation Hub"
- },
- {
- "type": "Feature",
- "description": "UI improvements to Amazon Q Chat: New splash loader animation, initial streaming card animation, improved button colours"
- },
- {
- "type": "Feature",
- "description": "Add acknowledgement button for amazon q chat disclaimer"
- },
- {
- "type": "Feature",
- "description": "Navigate through prompt history by using the up/down arrows"
- },
- {
- "type": "Feature",
- "description": "Amazon Q: Simplify log channel"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.41.0.json b/packages/amazonq/.changes/1.41.0.json
deleted file mode 100644
index d0ca09cb476..00000000000
--- a/packages/amazonq/.changes/1.41.0.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "date": "2024-12-17",
- "version": "1.41.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "/review: Apply fix removes other issues in the same file."
- },
- {
- "type": "Bug Fix",
- "description": "Fix(Amazon Q Code Transformation): show correct diff when running consecutive transformations"
- },
- {
- "type": "Bug Fix",
- "description": "Improve when the welcome page is shown in amazon q chat"
- },
- {
- "type": "Bug Fix",
- "description": "Code Review: Cleaned up output logs when running /review"
- },
- {
- "type": "Bug Fix",
- "description": "Code Review: Fixed a bug where applying a fix did not update the positions of other issues in the same file."
- },
- {
- "type": "Bug Fix",
- "description": "Chat: When navigating to previous prompts, code attachments are sometimes displayed incorrectly"
- },
- {
- "type": "Bug Fix",
- "description": "/review: Diagnostics in the problems panel are mapped to the wrong code"
- },
- {
- "type": "Bug Fix",
- "description": "Fix opentabs context possibly timeout due to race condition of misuse of different timeout functionalities"
- },
- {
- "type": "Bug Fix",
- "description": "Auth: SSO session was bad, but no reauth prompt given"
- },
- {
- "type": "Bug Fix",
- "description": "Reduce frequency of system status poll"
- },
- {
- "type": "Bug Fix",
- "description": "Chat: When writing a prompt without sending it, navigating via up/down arrows sometimes deletes the unsent prompt."
- },
- {
- "type": "Bug Fix",
- "description": "Code Review: Fixed a bug where projects with repeated path names did not scan properly."
- },
- {
- "type": "Feature",
- "description": "/review: Code fix automatically scrolls into view after generation."
- },
- {
- "type": "Feature",
- "description": "Chat: improve font size and line-height in footer (below prompt input field)"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.42.0.json b/packages/amazonq/.changes/1.42.0.json
deleted file mode 100644
index 7327ed0c9c4..00000000000
--- a/packages/amazonq/.changes/1.42.0.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "date": "2025-01-09",
- "version": "1.42.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: Improve button text phrasing"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev: Fix issue when files are deleted while preparing context"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: allow POSTGRESQL as target DB for SQL conversions"
- },
- {
- "type": "Bug Fix",
- "description": "Fix context menu displaying when typing @, even though input is disallowed"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q can update mvn and gradle build files"
- },
- {
- "type": "Bug Fix",
- "description": "/transform: use correct documentation link in SQL conversion help message"
- },
- {
- "type": "Bug Fix",
- "description": "Up/down history navigation only triggering on first/last line of prompt input"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /test: Fix to redirect /test to generate tests in chat for external files out of workspace scope."
- },
- {
- "type": "Bug Fix",
- "description": "/review: Code block extends beyond page margins in code issue detail view"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: retry project upload up to 3 times"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Transformation: add view summary button in chat"
- },
- {
- "type": "Feature",
- "description": "Amazon Q: new code syntax highlighter for improved accuracy"
- },
- {
- "type": "Removal",
- "description": "Settings: No longer migrate old CodeWhisperer settings or initialize telemetry setting from AWS Toolkit."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.43.0.json b/packages/amazonq/.changes/1.43.0.json
deleted file mode 100644
index a4f2376f2e6..00000000000
--- a/packages/amazonq/.changes/1.43.0.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "date": "2025-01-15",
- "version": "1.43.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Auth: Valid StartURL not accepted at login"
- },
- {
- "type": "Bug Fix",
- "description": "Fix inline completion supplementalContext length exceeding maximum in certain cases"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /test: Unit test generation completed message shows after accept/reject action"
- },
- {
- "type": "Bug Fix",
- "description": "/test: for unsupported languages was sometimes unreliable"
- },
- {
- "type": "Bug Fix",
- "description": "User-selected customizations are sometimes not being persisted."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon q /dev: Remove hard-coded limits and instead rely server-side data to communicate number of code generations remaining"
- },
- {
- "type": "Feature",
- "description": "Adds capability to send new context commands to AB groups"
- },
- {
- "type": "Feature",
- "description": "feat(amazonq): Add error message for updated README too large"
- },
- {
- "type": "Feature",
- "description": "Enhance Q inline completion context fetching for better suggestion quality"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.44.0.json b/packages/amazonq/.changes/1.44.0.json
deleted file mode 100644
index 7593e9a7af3..00000000000
--- a/packages/amazonq/.changes/1.44.0.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "date": "2025-01-23",
- "version": "1.44.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q: word duplication when pressing tab on context selector fixed"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: Prevent users from requesting changes if no iterations remain"
- },
- {
- "type": "Bug Fix",
- "description": "`/test`: view diffs by clicking files in the file tree, aligning the behavior with the 'View Diff' button."
- },
- {
- "type": "Bug Fix",
- "description": "/review: Improved error handling for code fix operations"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q: cursor no longer jumps after navigating prompt history"
- },
- {
- "type": "Bug Fix",
- "description": "Improve the text description of workspace index settings"
- },
- {
- "type": "Bug Fix",
- "description": "Notifications: 'Dismiss' command visible in command palette."
- },
- {
- "type": "Bug Fix",
- "description": "/transform: replace icons in Transformation Hub with text"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: Ask for user prompt if error occurs while updating documentation"
- },
- {
- "type": "Feature",
- "description": "Amazon Q: increase chat current active file context char limit to 40k"
- },
- {
- "type": "Feature",
- "description": "/review: Code issues can be grouped by file location or severity"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.45.0-SNAPSHOT.json b/packages/amazonq/.changes/1.45.0-SNAPSHOT.json
deleted file mode 100644
index 881d3e94e5a..00000000000
--- a/packages/amazonq/.changes/1.45.0-SNAPSHOT.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-01-30",
- "version": "1.45.0-SNAPSHOT",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Allow AB users with an overridden customization to go back to the default customization"
- },
- {
- "type": "Bug Fix",
- "description": "For security reasons, disabled auto linkify for link texts coming in markdown other than [TEXT](URL) format"
- },
- {
- "type": "Feature",
- "description": "Add setting to allow Q /dev to run code and test commands"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.45.0.json b/packages/amazonq/.changes/1.45.0.json
deleted file mode 100644
index 7ef04691624..00000000000
--- a/packages/amazonq/.changes/1.45.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-01-30",
- "version": "1.45.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Allow AB users with an overridden customization to go back to the default customization"
- },
- {
- "type": "Bug Fix",
- "description": "For security reasons, disabled auto linkify for link texts coming in markdown other than [TEXT](URL) format"
- },
- {
- "type": "Feature",
- "description": "Add setting to allow Q /dev to run code and test commands"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.46.0.json b/packages/amazonq/.changes/1.46.0.json
deleted file mode 100644
index 1253cbe3d01..00000000000
--- a/packages/amazonq/.changes/1.46.0.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "date": "2025-02-05",
- "version": "1.46.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Citation links are not clickable as numbers, but appear as non-clickable texts"
- },
- {
- "type": "Bug Fix",
- "description": "Fix language server start failure in AL2023 ARM64"
- },
- {
- "type": "Bug Fix",
- "description": "/review: Auto-review issues did not populate code issues list"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q: Fix code upload error when using /dev or /doc on Remote SSH"
- },
- {
- "type": "Bug Fix",
- "description": "/test placeholder text aligned across IDEs"
- },
- {
- "type": "Bug Fix",
- "description": "Inline: Typos in the first example suggestion"
- },
- {
- "type": "Feature",
- "description": "Inline suggestions: Pre-fetch recommendations to reduce suggestion latency."
- },
- {
- "type": "Feature",
- "description": "Added github issue link and description to the chat answer feedback form"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.47.0.json b/packages/amazonq/.changes/1.47.0.json
deleted file mode 100644
index 5e168b79fe2..00000000000
--- a/packages/amazonq/.changes/1.47.0.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "date": "2025-02-13",
- "version": "1.47.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "`Send to prompt` and other context menu options not sent if chat was closed"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /test: Truncating user input to 4096 characters for unit test generation."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /test: Q identify active test file and infer source file for test generation."
- },
- {
- "type": "Bug Fix",
- "description": "/review: Code review starts automatically when invoked from menu"
- },
- {
- "type": "Feature",
- "description": "Amazon Q /dev: support `.hbs`, `.gjs`, `.gts`, `.astro`, `.mdx`, `.svelte`, `.erb`, `.rake` files"
- },
- {
- "type": "Feature",
- "description": "/transform: automatically download results when ready"
- },
- {
- "type": "Feature",
- "description": "/transform: support Java 21 transformations"
- },
- {
- "type": "Removal",
- "description": "Reverted prefetch logic to enable more stable inline completion"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.48.0.json b/packages/amazonq/.changes/1.48.0.json
deleted file mode 100644
index 409649ab817..00000000000
--- a/packages/amazonq/.changes/1.48.0.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "date": "2025-02-20",
- "version": "1.48.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "/dev and /doc: Multi-root workspace with duplicate files causes infinite 'Uploading code...' loop"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: update workspace too large error message "
- },
- {
- "type": "Bug Fix",
- "description": "/review: Auto-review should not remove issues from manual reviews"
- },
- {
- "type": "Bug Fix",
- "description": "/transform: allow View Summary button to work even after accepting diff"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /test: Fixing the issue of target file does not exist."
- },
- {
- "type": "Feature",
- "description": "Amazon Q /doc: Add support for infrastructure diagrams"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.49.0.json b/packages/amazonq/.changes/1.49.0.json
deleted file mode 100644
index b08aff46ac7..00000000000
--- a/packages/amazonq/.changes/1.49.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2025-02-27",
- "version": "1.49.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q /test: Unit test generation displays an inaccurate diff view for non-primary packages in the workspace."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /doc: Fix uploading file method throwing incorrect workspace too large error message"
- },
- {
- "type": "Bug Fix",
- "description": "/transform: skip running tests locally when user chooses to do so"
- },
- {
- "type": "Bug Fix",
- "description": "/review: ignored lines should not show up in scan issues"
- },
- {
- "type": "Bug Fix",
- "description": "/test: update capability card text"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.5.0.json b/packages/amazonq/.changes/1.5.0.json
deleted file mode 100644
index 1e59c67e102..00000000000
--- a/packages/amazonq/.changes/1.5.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-05-17",
- "version": "1.5.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixes an issue when scanning projects with binary files"
- },
- {
- "type": "Bug Fix",
- "description": "Fixes an issue where the /dev chat wouldn't let customers modify the source folder when exceeding the size limit"
- },
- {
- "type": "Bug Fix",
- "description": "Security Scan: Improved error notifications"
- },
- {
- "type": "Feature",
- "description": "Security Scan: Added custom command to run the security scan."
- },
- {
- "type": "Feature",
- "description": "Security Scan: \"View details\" and \"Explain\" options can now be accessed from the problems panel"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.50.0.json b/packages/amazonq/.changes/1.50.0.json
deleted file mode 100644
index bd832127681..00000000000
--- a/packages/amazonq/.changes/1.50.0.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "date": "2025-03-06",
- "version": "1.50.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "/doc: Usage in multiple chat tabs may cause unexpected behavior."
- },
- {
- "type": "Bug Fix",
- "description": "/review: subsequent reviews weren't possible"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: Use `@` to add folders, files, and saved prompts as context"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: increase chat input height to 3 lines"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: Show list of files sent as context in chat response"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: Add support for `.md` file rules in workspace-level `.amazonq/rules` directory"
- },
- {
- "type": "Test",
- "description": "add Q Chat /review command test coverage"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.51.0.json b/packages/amazonq/.changes/1.51.0.json
deleted file mode 100644
index 97870fda325..00000000000
--- a/packages/amazonq/.changes/1.51.0.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "date": "2025-03-12",
- "version": "1.51.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "increase scan timeout to reduce front-end timeout errors"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: Create a new prompt form does not autofocus or submit with Enter press"
- },
- {
- "type": "Bug Fix",
- "description": "/review: Zip files are created with the wrong file path for file scans in multifolder workspaces."
- },
- {
- "type": "Bug Fix",
- "description": "/review: Invalid file path characters caused some detections to be skipped on Windows"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Chat: You can now keep a \"library\" of prompt files in your home directory under `~/.aws/amazonq/prompts` and then quickly add them to the context using `@` on any project you’re working on. Prompt files are in markdown (`.md`) format."
- },
- {
- "type": "Feature",
- "description": "/review: show code diff for fix preview"
- },
- {
- "type": "Feature",
- "description": "/test: display test plan summary in chat after generating tests"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.52.0.json b/packages/amazonq/.changes/1.52.0.json
deleted file mode 100644
index a4f357edc87..00000000000
--- a/packages/amazonq/.changes/1.52.0.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "date": "2025-03-20",
- "version": "1.52.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: @Folders and @Files are missing `@` prefix in chat history"
- },
- {
- "type": "Bug Fix",
- "description": "/review: Code Issues ellipses menu displays AWS Toolkit options, if installed."
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: Progress indicator height is stretched"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: Long descriptions in context list are cut off"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: Improve responses for saved prompts and workspace rules"
- },
- {
- "type": "Bug Fix",
- "description": "/test: show descriptive error message"
- },
- {
- "type": "Bug Fix",
- "description": "Code Review: Fixed a bug where issues are double counted in the Q chat"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: Animation timings are too long"
- },
- {
- "type": "Bug Fix",
- "description": "Fix inline completion failure due to context length exceeding the threshold"
- },
- {
- "type": "Feature",
- "description": "/review: passing referenceTrackerConfiguration to StartCodeFixJob"
- },
- {
- "type": "Feature",
- "description": "/review: rename setting `showInlineCodeSuggestionsWithCodeReferences` to `showCodeWithReferences`"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.53.0.json b/packages/amazonq/.changes/1.53.0.json
deleted file mode 100644
index cb548513e35..00000000000
--- a/packages/amazonq/.changes/1.53.0.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "date": "2025-03-28",
- "version": "1.53.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Choosing a nested subfolder for `/doc` on Windows results in `The folder you chose did not contain any source files` error"
- },
- {
- "type": "Feature",
- "description": "Add support for Code search in Q chat"
- },
- {
- "type": "Feature",
- "description": "(Experimental) Amazon Q inline code suggestions via Amazon Q Language Server. (enable with `aws.experiments.amazonqLSP: true`)"
- },
- {
- "type": "Feature",
- "description": "Command Palette: Add `Amazon Q: Open Chat` command."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.54.0.json b/packages/amazonq/.changes/1.54.0.json
deleted file mode 100644
index 32e6ccabf4a..00000000000
--- a/packages/amazonq/.changes/1.54.0.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "date": "2025-04-03",
- "version": "1.54.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q chat: `@prompts` not added to context"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: View and search chat history"
- },
- {
- "type": "Feature",
- "description": "SageMaker Unified Studio: Disable Sign out"
- },
- {
- "type": "Feature",
- "description": "SageMaker Unified Studio: Update Q Chat Introduction message"
- },
- {
- "type": "Feature",
- "description": "/review: automatically generate fix without clicking Generate Fix button"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: Automatically persist chats between IDE sessions"
- },
- {
- "type": "Feature",
- "description": "Save user command execution logs to plugin output."
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: Code blocks in chat messages have a max-height of 21 lines and can be scrolled inside"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.55.0.json b/packages/amazonq/.changes/1.55.0.json
deleted file mode 100644
index 194814fc3be..00000000000
--- a/packages/amazonq/.changes/1.55.0.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "date": "2025-04-09",
- "version": "1.55.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Update chat history icon"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: chat occasionally freezes and displays gray screen"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Set owner-only permissions for chat history and saved prompt files"
- },
- {
- "type": "Feature",
- "description": "`/test` generates tests in all languages, not only Java/Python"
- },
- {
- "type": "Feature",
- "description": "Amazon Q chat: Click export icon to save chat transcript in Markdown or HTML"
- },
- {
- "type": "Feature",
- "description": "SageMaker: Disable the unsupported agentic commands and welcome prompt"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Chat: Add `@code` context for PHP, Ruby, Scala, Shell, and Swift projects"
- },
- {
- "type": "Feature",
- "description": "Enterprise users can choose their preferred Amazon Q profile to improve personalization and workflow across different business regions"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.56.0.json b/packages/amazonq/.changes/1.56.0.json
deleted file mode 100644
index 8de6eea2db5..00000000000
--- a/packages/amazonq/.changes/1.56.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-04-09",
- "version": "1.56.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Improve status message while loading Amazon Q Profiles during login"
- },
- {
- "type": "Bug Fix",
- "description": "\"failed to run command\" error"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.57.0.json b/packages/amazonq/.changes/1.57.0.json
deleted file mode 100644
index 3a7a8d2ab95..00000000000
--- a/packages/amazonq/.changes/1.57.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-04-10",
- "version": "1.57.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Fix bug where generate fix does not work"
- },
- {
- "type": "Bug Fix",
- "description": "Fix bug where review shows 0 findings"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.58.0.json b/packages/amazonq/.changes/1.58.0.json
deleted file mode 100644
index 02395a6dfd8..00000000000
--- a/packages/amazonq/.changes/1.58.0.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "date": "2025-04-11",
- "version": "1.58.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "inline chat activates properly when using 'aws.experiments.amazonqChatLSP' feature flag"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: code blocks in responses flicker, switching tabs during answer streaming makes expand button disappear"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: tab bar buttons disappear when closing non-active tab"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: chat history list does not truncate markdown"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.59.0.json b/packages/amazonq/.changes/1.59.0.json
deleted file mode 100644
index 840d65f5294..00000000000
--- a/packages/amazonq/.changes/1.59.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-04-11",
- "version": "1.59.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Code fix line number or file is sometimes not accurate"
- },
- {
- "type": "Bug Fix",
- "description": "Fix Q agents will fail for /transform /dev /test features if IdC kms key is configured with 400 error"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.6.0.json b/packages/amazonq/.changes/1.6.0.json
deleted file mode 100644
index 9974f06a414..00000000000
--- a/packages/amazonq/.changes/1.6.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2024-05-21",
- "version": "1.6.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Inside chat body, if there is a code block inside a list item it shows
tags"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Prompt input field allows additional input beyond the character limit"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Chat: Prompt input field not getting focus when chat window opens"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.60.0.json b/packages/amazonq/.changes/1.60.0.json
deleted file mode 100644
index 64a9b9ea137..00000000000
--- a/packages/amazonq/.changes/1.60.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-04-18",
- "version": "1.60.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Users might be bound to a customization which they dont have access with the selected profile and it causes service throwing 403 when using inline suggestion and chat features"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.61.0.json b/packages/amazonq/.changes/1.61.0.json
deleted file mode 100644
index 64b0f4da610..00000000000
--- a/packages/amazonq/.changes/1.61.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-04-22",
- "version": "1.61.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Some users not signaled they needed to select a Region Profile to get features working"
- },
- {
- "type": "bugfix",
- "description": "/review: disable auto-review by default"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.62.0.json b/packages/amazonq/.changes/1.62.0.json
deleted file mode 100644
index 530f26ccb29..00000000000
--- a/packages/amazonq/.changes/1.62.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-04-25",
- "version": "1.62.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Toast message to warn users if Developer Profile is not selected"
- },
- {
- "type": "Bug Fix",
- "description": "Fix users can not log in successfully with 2+ IDE instnaces open due to throttle error throw by the service"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.63.0.json b/packages/amazonq/.changes/1.63.0.json
deleted file mode 100644
index 10020659c5a..00000000000
--- a/packages/amazonq/.changes/1.63.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-05-01",
- "version": "1.63.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Q profile selection hangs when a region is blocked"
- },
- {
- "type": "Feature",
- "description": "Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.64.0.json b/packages/amazonq/.changes/1.64.0.json
deleted file mode 100644
index 461ad140c01..00000000000
--- a/packages/amazonq/.changes/1.64.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-05-02",
- "version": "1.64.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Enable Amazon Q LSP in AL2 instances"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.65.0.json b/packages/amazonq/.changes/1.65.0.json
deleted file mode 100644
index ec01584f56b..00000000000
--- a/packages/amazonq/.changes/1.65.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-05-05",
- "version": "1.65.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Support selecting customizations across all Q profiles with automatic profile switching for enterprise users"
- },
- {
- "type": "Feature",
- "description": "Memorize and autofill users' last Sso login profile"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.66.0.json b/packages/amazonq/.changes/1.66.0.json
deleted file mode 100644
index ab4a819b85a..00000000000
--- a/packages/amazonq/.changes/1.66.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-05-09",
- "version": "1.66.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Avoid inline completion 'Improperly formed request' errors when file is too large"
- },
- {
- "type": "Bug Fix",
- "description": "Named agent tabs sometimes open with unnecessary input options"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.67.0.json b/packages/amazonq/.changes/1.67.0.json
deleted file mode 100644
index 59ff03eacdd..00000000000
--- a/packages/amazonq/.changes/1.67.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-05-14",
- "version": "1.67.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Previous and subsequent cells are used as context for completion in a Jupyter notebook"
- },
- {
- "type": "Bug Fix",
- "description": "Support chat in AL2 aarch64"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.68.0.json b/packages/amazonq/.changes/1.68.0.json
deleted file mode 100644
index 2c21170aa0b..00000000000
--- a/packages/amazonq/.changes/1.68.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-05-15",
- "version": "1.68.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Fix Error: 'Amazon Q service is not signed in'"
- },
- {
- "type": "Bug Fix",
- "description": "Fix Error: 'Amazon Q Profile is not selected for IDC connection type'"
- },
- {
- "type": "Feature",
- "description": "Add inline completion support for abap language"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.69.0.json b/packages/amazonq/.changes/1.69.0.json
deleted file mode 100644
index caa8ed28676..00000000000
--- a/packages/amazonq/.changes/1.69.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-05-22",
- "version": "1.69.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "/transform: avoid prompting user for target JDK path unnecessarily"
- },
- {
- "type": "Removal",
- "description": "/transform: remove option to select multiple diffs"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.7.0.json b/packages/amazonq/.changes/1.7.0.json
deleted file mode 100644
index cfc03fc40e6..00000000000
--- a/packages/amazonq/.changes/1.7.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-05-30",
- "version": "1.7.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Feature Development: File rejection is not rejecting a file when code is generated"
- },
- {
- "type": "Bug Fix",
- "description": "Security Scan: Improved accuracy when applying security fixes"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q Code Transformation: show more specific error messages on failure cases"
- },
- {
- "type": "Feature",
- "description": "Security Scan: Support for scanning files outside of workspaces."
- },
- {
- "type": "Feature",
- "description": "Amazon Q now publishes to Open VSX: https://open-vsx.org/namespace/amazonwebservices"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.70.0.json b/packages/amazonq/.changes/1.70.0.json
deleted file mode 100644
index 841e8107430..00000000000
--- a/packages/amazonq/.changes/1.70.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-05-28",
- "version": "1.70.0",
- "entries": [
- {
- "type": "Removal",
- "description": "Disable local workspace LSP"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.71.0.json b/packages/amazonq/.changes/1.71.0.json
deleted file mode 100644
index be5cc5a2013..00000000000
--- a/packages/amazonq/.changes/1.71.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-06-04",
- "version": "1.71.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.72.0.json b/packages/amazonq/.changes/1.72.0.json
deleted file mode 100644
index 10b0b374c3a..00000000000
--- a/packages/amazonq/.changes/1.72.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-06-11",
- "version": "1.72.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Launch LSP with bundled artifacts as fallback"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.73.0.json b/packages/amazonq/.changes/1.73.0.json
deleted file mode 100644
index 25cda6dcf03..00000000000
--- a/packages/amazonq/.changes/1.73.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-06-11",
- "version": "1.73.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Add MCP Server Support"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.74.0.json b/packages/amazonq/.changes/1.74.0.json
deleted file mode 100644
index e584f7a9d01..00000000000
--- a/packages/amazonq/.changes/1.74.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-06-12",
- "version": "1.74.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.75.0.json b/packages/amazonq/.changes/1.75.0.json
deleted file mode 100644
index 384d07654a4..00000000000
--- a/packages/amazonq/.changes/1.75.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-06-13",
- "version": "1.75.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.76.0.json b/packages/amazonq/.changes/1.76.0.json
deleted file mode 100644
index eaa2ce8af56..00000000000
--- a/packages/amazonq/.changes/1.76.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-06-18",
- "version": "1.76.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "/transform: only show lines of code statistic in plan"
- },
- {
- "type": "Feature",
- "description": "Add model selection feature"
- },
- {
- "type": "Feature",
- "description": "Pin context items in chat and manage workspace rules"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.77.0.json b/packages/amazonq/.changes/1.77.0.json
deleted file mode 100644
index 37436c259f9..00000000000
--- a/packages/amazonq/.changes/1.77.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-06-18",
- "version": "1.77.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.78.0.json b/packages/amazonq/.changes/1.78.0.json
deleted file mode 100644
index 9a6f35cf36f..00000000000
--- a/packages/amazonq/.changes/1.78.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-06-20",
- "version": "1.78.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Resolve missing chat options in Amazon Q chat interface."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.79.0.json b/packages/amazonq/.changes/1.79.0.json
deleted file mode 100644
index 51d910cca2b..00000000000
--- a/packages/amazonq/.changes/1.79.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-06-25",
- "version": "1.79.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Added automatic system certificate detection and VSCode proxy settings support"
- },
- {
- "type": "Bug Fix",
- "description": "Improved Amazon Linux 2 support with better SageMaker environment detection"
- },
- {
- "type": "Feature",
- "description": "/transform: run all builds client-side"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.8.0.json b/packages/amazonq/.changes/1.8.0.json
deleted file mode 100644
index 9f64639c310..00000000000
--- a/packages/amazonq/.changes/1.8.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-06-07",
- "version": "1.8.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "fix(featureDev): fix file rejection for multi-workspaces"
- },
- {
- "type": "Feature",
- "description": "The `Send to Amazon Q` [context menu](https://github.com/aws/aws-toolkit-vscode/assets/371007/ce4c61a4-1b58-48ee-8500-56667d45dd7d) was renamed to `Amazon Q`"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Transform: Increase project upload size limit to 2GB"
- },
- {
- "type": "Feature",
- "description": "feat(featureDev): generated plan being shown from top"
- },
- {
- "type": "Feature",
- "description": "Add additional commands for Amazon Q."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.80.0.json b/packages/amazonq/.changes/1.80.0.json
deleted file mode 100644
index 20e948b69f2..00000000000
--- a/packages/amazonq/.changes/1.80.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-07-01",
- "version": "1.80.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.81.0.json b/packages/amazonq/.changes/1.81.0.json
deleted file mode 100644
index b93c5693ad4..00000000000
--- a/packages/amazonq/.changes/1.81.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-07-02",
- "version": "1.81.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Stop auto inline completion when deleting code"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.82.0.json b/packages/amazonq/.changes/1.82.0.json
deleted file mode 100644
index 816da045f4a..00000000000
--- a/packages/amazonq/.changes/1.82.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-07-07",
- "version": "1.82.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Prompt re-authenticate if auto trigger failed with expired token"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.83.0.json b/packages/amazonq/.changes/1.83.0.json
deleted file mode 100644
index 5997b2b1b95..00000000000
--- a/packages/amazonq/.changes/1.83.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-07-09",
- "version": "1.83.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Amazon Q /test, /doc, and /dev capabilities integrated into Agentic coding."
- },
- {
- "type": "Feature",
- "description": "Added image support to Amazon Q chat, users can now upload images from their local file system"
- },
- {
- "type": "Removal",
- "description": "Deprecate \"amazon q is generating...\" UI for inline suggestion"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.84.0.json b/packages/amazonq/.changes/1.84.0.json
deleted file mode 100644
index e73a685e054..00000000000
--- a/packages/amazonq/.changes/1.84.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-07-17",
- "version": "1.84.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Slightly delay rendering inline completion when user is typing"
- },
- {
- "type": "Bug Fix",
- "description": "Render first response before receiving all paginated inline completion results"
- },
- {
- "type": "Feature",
- "description": "Explain and Fix for any issue in Code Issues panel will pull the experience into chat. Also no more view details tab."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.85.0.json b/packages/amazonq/.changes/1.85.0.json
deleted file mode 100644
index b0aba38025b..00000000000
--- a/packages/amazonq/.changes/1.85.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-07-19",
- "version": "1.85.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.86.0.json b/packages/amazonq/.changes/1.86.0.json
deleted file mode 100644
index abe84ce5b5f..00000000000
--- a/packages/amazonq/.changes/1.86.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-07-30",
- "version": "1.86.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Let Enter invoke auto completion more consistently"
- },
- {
- "type": "Bug Fix",
- "description": "Faster and more responsive inline completion UX"
- },
- {
- "type": "Bug Fix",
- "description": "Use documentChangeEvent as auto trigger condition"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.87.0.json b/packages/amazonq/.changes/1.87.0.json
deleted file mode 100644
index d80e11a2bfa..00000000000
--- a/packages/amazonq/.changes/1.87.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-07-31",
- "version": "1.87.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.88.0.json b/packages/amazonq/.changes/1.88.0.json
deleted file mode 100644
index 05e006954d8..00000000000
--- a/packages/amazonq/.changes/1.88.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-08-06",
- "version": "1.88.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Amazon Q Chat provides error explanations and fixes when hovering or right-clicking on error indicators and messages"
- },
- {
- "type": "Feature",
- "description": "/transform: Show transformation history in Transformation Hub and allow users to resume jobs"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.89.0.json b/packages/amazonq/.changes/1.89.0.json
deleted file mode 100644
index 95ef52909d5..00000000000
--- a/packages/amazonq/.changes/1.89.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-08-13",
- "version": "1.89.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.9.0.json b/packages/amazonq/.changes/1.9.0.json
deleted file mode 100644
index 546b595dc56..00000000000
--- a/packages/amazonq/.changes/1.9.0.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "date": "2024-06-14",
- "version": "1.9.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q inline suggestions: remember `Pause Auto-Suggestions` after IDE restart"
- },
- {
- "type": "Bug Fix",
- "description": "Amazon Q /dev command: stop showing spinner when there is an error."
- },
- {
- "type": "Bug Fix",
- "description": "Security Scan: Fixes an issue where auto-scans cause the editor to become unresponsive for larger projects."
- },
- {
- "type": "Bug Fix",
- "description": "Fix(Amazon Q Code Transformation): show more detailed error messages for proxy issues"
- },
- {
- "type": "Feature",
- "description": "Amazon Q Code Transform: Allow user to view transformation build log"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.90.0.json b/packages/amazonq/.changes/1.90.0.json
deleted file mode 100644
index 547528bce40..00000000000
--- a/packages/amazonq/.changes/1.90.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-08-15",
- "version": "1.90.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.91.0.json b/packages/amazonq/.changes/1.91.0.json
deleted file mode 100644
index b555f97447c..00000000000
--- a/packages/amazonq/.changes/1.91.0.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "date": "2025-08-22",
- "version": "1.91.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Enable inline completion in Jupyter Notebook"
- },
- {
- "type": "Feature",
- "description": "Amazon Q supports admin control for MCP servers to restrict MCP server usage"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.92.0.json b/packages/amazonq/.changes/1.92.0.json
deleted file mode 100644
index 46f2518fb37..00000000000
--- a/packages/amazonq/.changes/1.92.0.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "date": "2025-08-28",
- "version": "1.92.0",
- "entries": [
- {
- "type": "Feature",
- "description": "Amazon Q supports admin control for MCP servers to restrict MCP server usage"
- },
- {
- "type": "Feature",
- "description": "Enabling dynamic model fetching capabilities in Amazon Q chat"
- },
- {
- "type": "Feature",
- "description": "Amazon Q: Support for configuring and utilizing remote MCP servers."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.93.0.json b/packages/amazonq/.changes/1.93.0.json
deleted file mode 100644
index c8f34a95645..00000000000
--- a/packages/amazonq/.changes/1.93.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-09-05",
- "version": "1.93.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.94.0.json b/packages/amazonq/.changes/1.94.0.json
deleted file mode 100644
index d0adc1ee037..00000000000
--- a/packages/amazonq/.changes/1.94.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-09-11",
- "version": "1.94.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.95.0.json b/packages/amazonq/.changes/1.95.0.json
deleted file mode 100644
index 8014b9e23b2..00000000000
--- a/packages/amazonq/.changes/1.95.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-09-19",
- "version": "1.95.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q automatically refreshes expired IAM Credentials in Sagemaker instances"
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.96.0.json b/packages/amazonq/.changes/1.96.0.json
deleted file mode 100644
index 17919dd6374..00000000000
--- a/packages/amazonq/.changes/1.96.0.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "date": "2025-09-25",
- "version": "1.96.0",
- "entries": [
- {
- "type": "Bug Fix",
- "description": "Amazon Q support web/container environments running Ubuntu/Linux, even when the host machine is Amazon Linux 2."
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.97.0.json b/packages/amazonq/.changes/1.97.0.json
deleted file mode 100644
index 94952817128..00000000000
--- a/packages/amazonq/.changes/1.97.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-09-29",
- "version": "1.97.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.98.0.json b/packages/amazonq/.changes/1.98.0.json
deleted file mode 100644
index a71130bc08a..00000000000
--- a/packages/amazonq/.changes/1.98.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-10-02",
- "version": "1.98.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.changes/1.99.0.json b/packages/amazonq/.changes/1.99.0.json
deleted file mode 100644
index 9d1089ee8fa..00000000000
--- a/packages/amazonq/.changes/1.99.0.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "date": "2025-10-10",
- "version": "1.99.0",
- "entries": []
-}
\ No newline at end of file
diff --git a/packages/amazonq/.vscode/launch.json b/packages/amazonq/.vscode/launch.json
deleted file mode 100644
index b00c5071ce5..00000000000
--- a/packages/amazonq/.vscode/launch.json
+++ /dev/null
@@ -1,168 +0,0 @@
-// A launch configuration that compiles the extension and then opens it inside a new window
-// Use IntelliSense to learn about possible attributes.
-// Hover to view descriptions of existing attributes.
-// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
-{
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Extension",
- "type": "extensionHost",
- "request": "launch",
- "runtimeExecutable": "${execPath}",
- "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
- "env": {
- "SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
- "WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
- // Below allows for overrides used during development
- // "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
- // "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
- },
- "envFile": "${workspaceFolder}/.local.env",
- "outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],
- "preLaunchTask": "watch",
- "postDebugTask": "terminate",
- "presentation": {
- "group": "1_Extension",
- "order": 2
- }
- },
- {
- /** Handles the entire process of building and running the toolkit extension in the browser. **/
- "name": "Extension (Web)",
- "type": "chrome",
- "request": "attach",
- "port": 9222,
- /**
- To get an understanding why we need the following:
- - comment out the following
- - set a breakpoint in VS Code that gets triggerd on extension startup
- Now in the Chrome Developer Tools menu, the extension will load slower and open up random files.
- I think this is due to source maps for irrelevant code being attempted to be resolved and slowing execution.
-
- What this is doing is ignoring certain modules that match the following paths, it matches the path of
- a file in `Developer Tools` > `Sources`.
- I was inspired by this: https://github.com/microsoft/vscode-test-web/blob/897bca4907a87a6bc564efc242ce6794e5da3232/.vscode/launch.json#L28
- **/
- "resolveSourceMapLocations": ["!**/node_modules/**", "!**/vs/**", "!**/extensions/**"],
- "preLaunchTask": "webRun",
- "postDebugTask": "webRunTerminate",
- "presentation": {
- "group": "1_Extension",
- "order": 4
- }
- },
- {
- "name": "Extension Tests",
- "type": "extensionHost",
- "request": "launch",
- "runtimeExecutable": "${execPath}",
- "args": [
- "--disable-extensions",
- "--extensionDevelopmentPath=${workspaceFolder}",
- "--extensionTestsPath=${workspaceFolder}/dist/test/unit/index",
- "${workspaceFolder}/../core/dist/src/testFixtures/workspaceFolder"
- ],
- "env": {
- "DEVELOPMENT_PATH": "${workspaceFolder}",
- "AWS_TOOLKIT_AUTOMATION": "local"
- },
- "outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],
- "preLaunchTask": "watch",
- "presentation": {
- "group": "3_ExtensionTests",
- "order": 2
- }
- },
- {
- "name": "Extension Tests (current file)",
- "type": "extensionHost",
- "request": "launch",
- "runtimeExecutable": "${execPath}",
- "args": [
- "--disable-extensions",
- "--extensionDevelopmentPath=${workspaceFolder}",
- "--extensionTestsPath=${workspaceFolder}/dist/test/unit/index",
- "${workspaceFolder}/../core/dist/src/testFixtures/workspaceFolder"
- ],
- "env": {
- "TEST_FILE": "${relativeFile}",
- "DEVELOPMENT_PATH": "${workspaceFolder}",
- "AWS_TOOLKIT_AUTOMATION": "local"
- },
- "outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],
- "preLaunchTask": "watch",
- "presentation": {
- "group": "2_ExtensionTestsCurrentFile",
- "order": 2
- }
- },
- {
- "name": "Extension Tests (web)",
- "type": "extensionHost",
- "debugWebWorkerHost": true,
- "request": "launch",
- "args": [
- "--disable-extension=amazonwebservices.aws-toolkit-vscode",
- "--extensionDevelopmentPath=${workspaceFolder}",
- "--extensionDevelopmentKind=web",
- "--extensionTestsPath=${workspaceFolder}/dist/test/web/testRunnerWebCore",
- "${workspaceFolder}/../core/dist/src/testFixtures/workspaceFolder"
- ],
- "outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],
- "preLaunchTask": "webRun",
- "presentation": {
- "group": "3_ExtensionTests",
- "order": 3
- }
- },
- {
- "name": "E2E Test (current file)",
- "type": "extensionHost",
- "request": "launch",
- "runtimeExecutable": "${execPath}",
- "args": [
- "--disable-extension=amazonwebservices.aws-toolkit-vscode",
- "${workspaceFolder}/../core/dist/src/testFixtures/workspaceFolder",
- "--extensionDevelopmentPath=${workspaceFolder}",
- "--extensionTestsPath=${workspaceFolder}/dist/test/e2e/index.js"
- ],
- "env": {
- "TEST_FILE": "${relativeFile}",
- "DEVELOPMENT_PATH": "${workspaceFolder}",
- "AWS_TOOLKIT_AUTOMATION": "local"
- },
- "outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],
- "preLaunchTask": "watch",
- "presentation": {
- "group": "4_E2ETestCurrentFile",
- "order": 2
- }
- },
- {
- "name": "Attach to Language Server",
- "type": "node",
- "request": "attach",
- "port": 6080, // Hard defined in core/src/shared/lsp/platform.ts
- "outFiles": ["${workspaceFolder}/../../../language-servers/**/out/**/*.js"],
- "skipFiles": [
- "/**",
- "${workspaceFolder}/../../../language-servers/**/node_modules/**/*.js"
- ],
- "restart": {
- "maxAttempts": 10,
- "delay": 1000
- }
- }
- ],
- "compounds": [
- {
- "name": "Launch LSP with Debugging",
- "configurations": ["Extension", "Attach to Language Server"],
- "presentation": {
- "group": "1_Extension",
- "order": 5
- }
- }
- ]
-}
diff --git a/packages/amazonq/.vscode/settings.json b/packages/amazonq/.vscode/settings.json
deleted file mode 100644
index 4715e0254bf..00000000000
--- a/packages/amazonq/.vscode/settings.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "files.exclude": {},
- "search.exclude": {
- "dist": true,
- "node_modules": true
- },
- "files.watcherExclude": {},
- "typescript.preferences.importModuleSpecifier": "relative",
- "javascript.preferences.importModuleSpecifier": "relative",
- "typescript.tsdk": "../../node_modules/typescript/lib",
- "npm.packageManager": "npm"
-}
diff --git a/packages/amazonq/.vscode/tasks.json b/packages/amazonq/.vscode/tasks.json
deleted file mode 100644
index 86652ec71df..00000000000
--- a/packages/amazonq/.vscode/tasks.json
+++ /dev/null
@@ -1,174 +0,0 @@
-// See https://go.microsoft.com/fwlink/?LinkId=733558
-// for the documentation about the tasks.json format
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "watch",
- "type": "shell",
- "command": "npm",
- "args": ["run", "watch"],
- "problemMatcher": "$tsc-watch",
- "isBackground": true,
- "group": {
- "kind": "build",
- "isDefault": true
- },
- "dependsOn": ["watchCore", "webpackCore", "serveVueCore"]
- },
- {
- "label": "watchCore",
- "command": "npm run compileOnly -- --watch",
- "type": "shell",
- "isBackground": true,
- "problemMatcher": "$tsc-watch",
- "options": {
- "cwd": "${workspaceFolder}/../../packages/core"
- }
- },
- {
- "label": "webpackCore",
- "command": "npm run webpackDev -- --watch",
- "type": "shell",
- "isBackground": true,
- "problemMatcher": "$ts-webpack-watch",
- "options": {
- "cwd": "${workspaceFolder}/../../packages/core"
- }
- },
- {
- "label": "serveVueCore",
- "command": "npm run serveVue",
- "type": "shell",
- "detail": "Webpack + local server for Vue webview files from `core`.",
- "isBackground": true,
- "problemMatcher": "$ts-webpack-watch",
- "options": {
- "cwd": "${workspaceFolder}/../../packages/core"
- },
- "presentation": { "panel": "dedicated" }
- },
- {
- "label": "terminate",
- "command": "echo run terminate",
- "type": "shell",
- "presentation": {
- "close": true
- }
- },
- // ---------- Start: Web Mode Tasks ----------
- {
- "label": "webRun",
- "type": "npm",
- "script": "webRun",
- "detail": "Runs VS Code in the Chrome browser with our toolkit installed",
- "isBackground": true,
- "dependsOn": ["webWatch"],
- /**
- We only need this problem matcher to signal when this task is completed.
- Since this task starts a web server it does not terminate and we need to use
- problemMatcher.background.endsPattern to read the CLI and know when this task
- can signal it is done.
-
- The rest of the data in problemMatcher is required by VS Code to be "valid",
- but not important for what we need.
-
- Doc: https://code.visualstudio.com/Docs/editor/tasks#_defining-a-problem-matcher
- **/
- "problemMatcher": {
- "pattern": [
- {
- "regexp": "this section irrelevant but it must exist to work",
- "file": 1,
- "location": 2,
- "message": 3
- }
- ],
- "background": {
- "activeOnStart": true,
- "beginsPattern": "^@vscode/test-web",
- "endsPattern": "^Listening on"
- }
- }
- },
- {
- "label": "webWatch",
- "type": "npm",
- "script": "webWatch",
- "detail": "Webpacks our toolkit code (with --watch) in preparation to be run in the browser",
- "isBackground": true,
- // Since `webpack --watch` never terminates (but finishes packaging at some point),
- // VS Code uses this to parse the CLI output to pattern match something that indicates it is done
- "problemMatcher": "$ts-webpack-watch",
- "dependsOn": ["webCoreModuleWatch"]
- },
- {
- "label": "webCoreModuleWatch",
- "type": "shell",
- "command": "npm run compileDev -- --watch",
- "detail": "Webpacks our toolkit code as a module in preparation to be webpacked by the toolkit package",
- "isBackground": true,
- // Since `webpack --watch` never terminates (but finishes packaging at some point),
- // VS Code uses this to parse the CLI output to pattern match something that indicates it is done
- "problemMatcher": "$ts-webpack-watch",
- "options": {
- "cwd": "${workspaceFolder}/../../packages/core"
- }
- },
- /**
- After we stop debugging our browser, we also want to stop the web server.
- When this task is ran it will stop the web server.
-
- From: https://stackoverflow.com/a/60330174
- **/
- {
- "label": "webRunTerminate",
- "command": "echo ${input:webRunTerminate}",
- "type": "shell",
- "dependsOn": []
- },
- // ---------- End: Web Mode Tasks ----------
- {
- "type": "npm",
- "script": "lint",
- "problemMatcher": "$eslint-stylish"
- },
- {
- "type": "npm",
- "script": "lintfix",
- "problemMatcher": "$eslint-stylish"
- },
- {
- "type": "npm",
- "script": "compile",
- "dependsOn": ["Kill Tasks"],
- "problemMatcher": "$tsc"
- },
- {
- "type": "npm",
- "script": "clean",
- "dependsOn": ["Kill Tasks"],
- "problemMatcher": []
- },
- {
- "label": "Kill Tasks",
- "type": "process",
- "command": "${input:killTasks}",
- "problemMatcher": []
- }
- ],
- "inputs": [
- {
- "id": "killTasks",
- "type": "command",
- "command": "workbench.action.tasks.terminate",
- "args": "terminateAll"
- },
- {
- "id": "webRunTerminate",
- "type": "command",
- "command": "workbench.action.tasks.terminate",
- "args": "webRun"
- }
- ]
-}
diff --git a/packages/amazonq/CHANGELOG.md b/packages/amazonq/CHANGELOG.md
deleted file mode 100644
index 4583523540b..00000000000
--- a/packages/amazonq/CHANGELOG.md
+++ /dev/null
@@ -1,744 +0,0 @@
-## 1.107.0 2026-01-08
-
-- Miscellaneous non-user-facing changes
-
-## 1.106.0 2025-11-21
-
-- Miscellaneous non-user-facing changes
-
-## 1.105.0 2025-11-19
-
-- **Bug Fix** Remove show logs menu item for non Q views
-
-## 1.104.0 2025-11-15
-
-- Miscellaneous non-user-facing changes
-
-## 1.103.0 2025-11-06
-
-- **Feature** Q CodeTransformation: add more job metadata to history table
-
-## 1.102.0 2025-10-30
-
-- Miscellaneous non-user-facing changes
-
-## 1.101.0 2025-10-22
-
-- Miscellaneous non-user-facing changes
-
-## 1.100.0 2025-10-16
-
-- Miscellaneous non-user-facing changes
-
-## 1.99.0 2025-10-10
-
-- Miscellaneous non-user-facing changes
-
-## 1.98.0 2025-10-02
-
-- Miscellaneous non-user-facing changes
-
-## 1.97.0 2025-09-29
-
-- Miscellaneous non-user-facing changes
-
-## 1.96.0 2025-09-25
-
-- **Bug Fix** Amazon Q support web/container environments running Ubuntu/Linux, even when the host machine is Amazon Linux 2.
-
-## 1.95.0 2025-09-19
-
-- **Bug Fix** Amazon Q automatically refreshes expired IAM Credentials in Sagemaker instances
-
-## 1.94.0 2025-09-11
-
-- Miscellaneous non-user-facing changes
-
-## 1.93.0 2025-09-05
-
-- Miscellaneous non-user-facing changes
-
-## 1.92.0 2025-08-28
-
-- **Feature** Amazon Q supports admin control for MCP servers to restrict MCP server usage
-- **Feature** Enabling dynamic model fetching capabilities in Amazon Q chat
-- **Feature** Amazon Q: Support for configuring and utilizing remote MCP servers.
-
-## 1.91.0 2025-08-22
-
-- **Bug Fix** Enable inline completion in Jupyter Notebook
-- **Feature** Amazon Q supports admin control for MCP servers to restrict MCP server usage
-
-## 1.90.0 2025-08-15
-
-- Miscellaneous non-user-facing changes
-
-## 1.89.0 2025-08-13
-
-- Miscellaneous non-user-facing changes
-
-## 1.88.0 2025-08-06
-
-- **Feature** Amazon Q Chat provides error explanations and fixes when hovering or right-clicking on error indicators and messages
-- **Feature** /transform: Show transformation history in Transformation Hub and allow users to resume jobs
-
-## 1.87.0 2025-07-31
-
-- Miscellaneous non-user-facing changes
-
-## 1.86.0 2025-07-30
-
-- **Bug Fix** Let Enter invoke auto completion more consistently
-- **Bug Fix** Faster and more responsive inline completion UX
-- **Bug Fix** Use documentChangeEvent as auto trigger condition
-
-## 1.85.0 2025-07-19
-
-- Miscellaneous non-user-facing changes
-
-## 1.84.0 2025-07-17
-
-- **Bug Fix** Slightly delay rendering inline completion when user is typing
-- **Bug Fix** Render first response before receiving all paginated inline completion results
-- **Feature** Explain and Fix for any issue in Code Issues panel will pull the experience into chat. Also no more view details tab.
-
-## 1.83.0 2025-07-09
-
-- **Feature** Amazon Q /test, /doc, and /dev capabilities integrated into Agentic coding.
-- **Feature** Added image support to Amazon Q chat, users can now upload images from their local file system
-- **Removal** Deprecate "amazon q is generating..." UI for inline suggestion
-
-## 1.82.0 2025-07-07
-
-- **Bug Fix** Prompt re-authenticate if auto trigger failed with expired token
-
-## 1.81.0 2025-07-02
-
-- **Bug Fix** Stop auto inline completion when deleting code
-
-## 1.80.0 2025-07-01
-
-- Miscellaneous non-user-facing changes
-
-## 1.79.0 2025-06-25
-
-- **Bug Fix** Added automatic system certificate detection and VSCode proxy settings support
-- **Bug Fix** Improved Amazon Linux 2 support with better SageMaker environment detection
-- **Feature** /transform: run all builds client-side
-
-## 1.78.0 2025-06-20
-
-- **Bug Fix** Resolve missing chat options in Amazon Q chat interface.
-
-## 1.77.0 2025-06-18
-
-- Miscellaneous non-user-facing changes
-
-## 1.76.0 2025-06-18
-
-- **Bug Fix** /transform: only show lines of code statistic in plan
-- **Feature** Add model selection feature
-- **Feature** Pin context items in chat and manage workspace rules
-
-## 1.75.0 2025-06-13
-
-- Miscellaneous non-user-facing changes
-
-## 1.74.0 2025-06-12
-
-- Miscellaneous non-user-facing changes
-
-## 1.73.0 2025-06-11
-
-- **Feature** Add MCP Server Support
-
-## 1.72.0 2025-06-11
-
-- **Feature** Launch LSP with bundled artifacts as fallback
-
-## 1.71.0 2025-06-04
-
-- Miscellaneous non-user-facing changes
-
-## 1.70.0 2025-05-28
-
-- **Removal** Disable local workspace LSP
-
-## 1.69.0 2025-05-22
-
-- **Bug Fix** /transform: avoid prompting user for target JDK path unnecessarily
-- **Removal** /transform: remove option to select multiple diffs
-
-## 1.68.0 2025-05-15
-
-- **Bug Fix** Fix Error: 'Amazon Q service is not signed in'
-- **Bug Fix** Fix Error: 'Amazon Q Profile is not selected for IDC connection type'
-- **Feature** Add inline completion support for abap language
-
-## 1.67.0 2025-05-14
-
-- **Bug Fix** Previous and subsequent cells are used as context for completion in a Jupyter notebook
-- **Bug Fix** Support chat in AL2 aarch64
-
-## 1.66.0 2025-05-09
-
-- **Bug Fix** Avoid inline completion 'Improperly formed request' errors when file is too large
-- **Bug Fix** Named agent tabs sometimes open with unnecessary input options
-
-## 1.65.0 2025-05-05
-
-- **Feature** Support selecting customizations across all Q profiles with automatic profile switching for enterprise users
-- **Feature** Memorize and autofill users' last Sso login profile
-
-## 1.64.0 2025-05-02
-
-- **Bug Fix** Enable Amazon Q LSP in AL2 instances
-
-## 1.63.0 2025-05-01
-
-- **Bug Fix** Q profile selection hangs when a region is blocked
-- **Feature** Agentic coding experience: Amazon Q can now write code and run shell commands on your behalf
-
-## 1.62.0 2025-04-25
-
-- **Bug Fix** Toast message to warn users if Developer Profile is not selected
-- **Bug Fix** Fix users can not log in successfully with 2+ IDE instnaces open due to throttle error throw by the service
-
-## 1.61.0 2025-04-22
-
-- **Bug Fix** Some users not signaled they needed to select a Region Profile to get features working
-- **bugfix** /review: disable auto-review by default
-
-## 1.60.0 2025-04-18
-
-- **Bug Fix** Users might be bound to a customization which they dont have access with the selected profile and it causes service throwing 403 when using inline suggestion and chat features
-
-## 1.59.0 2025-04-11
-
-- **Bug Fix** Code fix line number or file is sometimes not accurate
-- **Bug Fix** Fix Q agents will fail for /transform /dev /test features if IdC kms key is configured with 400 error
-
-## 1.58.0 2025-04-11
-
-- **Bug Fix** inline chat activates properly when using 'aws.experiments.amazonqChatLSP' feature flag
-- **Bug Fix** Amazon Q Chat: code blocks in responses flicker, switching tabs during answer streaming makes expand button disappear
-- **Bug Fix** Amazon Q Chat: tab bar buttons disappear when closing non-active tab
-- **Bug Fix** Amazon Q Chat: chat history list does not truncate markdown
-
-## 1.57.0 2025-04-10
-
-- **Bug Fix** Fix bug where generate fix does not work
-- **Bug Fix** Fix bug where review shows 0 findings
-
-## 1.56.0 2025-04-09
-
-- **Bug Fix** Improve status message while loading Amazon Q Profiles during login
-- **Bug Fix** "failed to run command" error
-
-## 1.55.0 2025-04-09
-
-- **Bug Fix** Amazon Q Chat: Update chat history icon
-- **Bug Fix** Amazon Q Chat: chat occasionally freezes and displays gray screen
-- **Bug Fix** Amazon Q Chat: Set owner-only permissions for chat history and saved prompt files
-- **Feature** `/test` generates tests in all languages, not only Java/Python
-- **Feature** Amazon Q chat: Click export icon to save chat transcript in Markdown or HTML
-- **Feature** SageMaker: Disable the unsupported agentic commands and welcome prompt
-- **Feature** Amazon Q Chat: Add `@code` context for PHP, Ruby, Scala, Shell, and Swift projects
-- **Feature** Enterprise users can choose their preferred Amazon Q profile to improve personalization and workflow across different business regions
-
-## 1.54.0 2025-04-03
-
-- **Bug Fix** Amazon Q chat: `@prompts` not added to context
-- **Feature** Amazon Q chat: View and search chat history
-- **Feature** SageMaker Unified Studio: Disable Sign out
-- **Feature** SageMaker Unified Studio: Update Q Chat Introduction message
-- **Feature** /review: automatically generate fix without clicking Generate Fix button
-- **Feature** Amazon Q chat: Automatically persist chats between IDE sessions
-- **Feature** Save user command execution logs to plugin output.
-- **Feature** Amazon Q chat: Code blocks in chat messages have a max-height of 21 lines and can be scrolled inside
-
-## 1.53.0 2025-03-28
-
-- **Bug Fix** Amazon Q Chat: Choosing a nested subfolder for `/doc` on Windows results in `The folder you chose did not contain any source files` error
-- **Feature** Add support for Code search in Q chat
-- **Feature** (Experimental) Amazon Q inline code suggestions via Amazon Q Language Server. (enable with `aws.experiments.amazonqLSP: true`)
-- **Feature** Command Palette: Add `Amazon Q: Open Chat` command.
-
-## 1.52.0 2025-03-20
-
-- **Bug Fix** Amazon Q chat: @Folders and @Files are missing `@` prefix in chat history
-- **Bug Fix** /review: Code Issues ellipses menu displays AWS Toolkit options, if installed.
-- **Bug Fix** Amazon Q chat: Progress indicator height is stretched
-- **Bug Fix** Amazon Q chat: Long descriptions in context list are cut off
-- **Bug Fix** Amazon Q chat: Improve responses for saved prompts and workspace rules
-- **Bug Fix** /test: show descriptive error message
-- **Bug Fix** Code Review: Fixed a bug where issues are double counted in the Q chat
-- **Bug Fix** Amazon Q chat: Animation timings are too long
-- **Bug Fix** Fix inline completion failure due to context length exceeding the threshold
-- **Feature** /review: passing referenceTrackerConfiguration to StartCodeFixJob
-- **Feature** /review: rename setting `showInlineCodeSuggestionsWithCodeReferences` to `showCodeWithReferences`
-
-## 1.51.0 2025-03-12
-
-- **Bug Fix** increase scan timeout to reduce front-end timeout errors
-- **Bug Fix** Amazon Q chat: Create a new prompt form does not autofocus or submit with Enter press
-- **Bug Fix** /review: Zip files are created with the wrong file path for file scans in multifolder workspaces.
-- **Bug Fix** /review: Invalid file path characters caused some detections to be skipped on Windows
-- **Feature** Amazon Q Chat: You can now keep a "library" of prompt files in your home directory under `~/.aws/amazonq/prompts` and then quickly add them to the context using `@` on any project you’re working on. Prompt files are in markdown (`.md`) format.
-- **Feature** /review: show code diff for fix preview
-- **Feature** /test: display test plan summary in chat after generating tests
-
-## 1.50.0 2025-03-06
-
-- **Bug Fix** /doc: Usage in multiple chat tabs may cause unexpected behavior.
-- **Bug Fix** /review: subsequent reviews weren't possible
-- **Feature** Amazon Q chat: Use `@` to add folders, files, and saved prompts as context
-- **Feature** Amazon Q chat: increase chat input height to 3 lines
-- **Feature** Amazon Q chat: Show list of files sent as context in chat response
-- **Feature** Amazon Q chat: Add support for `.md` file rules in workspace-level `.amazonq/rules` directory
-- **Test** add Q Chat /review command test coverage
-
-## 1.49.0 2025-02-27
-
-- **Bug Fix** Amazon Q /test: Unit test generation displays an inaccurate diff view for non-primary packages in the workspace.
-- **Bug Fix** Amazon Q /doc: Fix uploading file method throwing incorrect workspace too large error message
-- **Bug Fix** /transform: skip running tests locally when user chooses to do so
-- **Bug Fix** /review: ignored lines should not show up in scan issues
-- **Bug Fix** /test: update capability card text
-
-## 1.48.0 2025-02-20
-
-- **Bug Fix** /dev and /doc: Multi-root workspace with duplicate files causes infinite 'Uploading code...' loop
-- **Bug Fix** Amazon Q /doc: update workspace too large error message
-- **Bug Fix** /review: Auto-review should not remove issues from manual reviews
-- **Bug Fix** /transform: allow View Summary button to work even after accepting diff
-- **Bug Fix** Amazon Q /test: Fixing the issue of target file does not exist.
-- **Feature** Amazon Q /doc: Add support for infrastructure diagrams
-
-## 1.47.0 2025-02-13
-
-- **Bug Fix** `Send to prompt` and other context menu options not sent if chat was closed
-- **Bug Fix** Amazon Q /test: Truncating user input to 4096 characters for unit test generation.
-- **Bug Fix** Amazon Q /test: Q identify active test file and infer source file for test generation.
-- **Bug Fix** /review: Code review starts automatically when invoked from menu
-- **Feature** Amazon Q /dev: support `.hbs`, `.gjs`, `.gts`, `.astro`, `.mdx`, `.svelte`, `.erb`, `.rake` files
-- **Feature** /transform: automatically download results when ready
-- **Feature** /transform: support Java 21 transformations
-- **Removal** Reverted prefetch logic to enable more stable inline completion
-
-## 1.46.0 2025-02-05
-
-- **Bug Fix** Citation links are not clickable as numbers, but appear as non-clickable texts
-- **Bug Fix** Fix language server start failure in AL2023 ARM64
-- **Bug Fix** /review: Auto-review issues did not populate code issues list
-- **Bug Fix** Amazon Q: Fix code upload error when using /dev or /doc on Remote SSH
-- **Bug Fix** /test placeholder text aligned across IDEs
-- **Bug Fix** Inline: Typos in the first example suggestion
-- **Feature** Inline suggestions: Pre-fetch recommendations to reduce suggestion latency.
-- **Feature** Added github issue link and description to the chat answer feedback form
-
-## 1.45.0 2025-01-30
-
-- **Bug Fix** Allow AB users with an overridden customization to go back to the default customization
-- **Bug Fix** For security reasons, disabled auto linkify for link texts coming in markdown other than [TEXT](URL) format
-- **Feature** Add setting to allow Q /dev to run code and test commands
-
-## 1.44.0 2025-01-23
-
-- **Bug Fix** Amazon Q: word duplication when pressing tab on context selector fixed
-- **Bug Fix** Amazon Q /doc: Prevent users from requesting changes if no iterations remain
-- **Bug Fix** `/test`: view diffs by clicking files in the file tree, aligning the behavior with the 'View Diff' button.
-- **Bug Fix** /review: Improved error handling for code fix operations
-- **Bug Fix** Amazon Q: cursor no longer jumps after navigating prompt history
-- **Bug Fix** Improve the text description of workspace index settings
-- **Bug Fix** Notifications: 'Dismiss' command visible in command palette.
-- **Bug Fix** /transform: replace icons in Transformation Hub with text
-- **Bug Fix** Amazon Q /doc: Ask for user prompt if error occurs while updating documentation
-- **Feature** Amazon Q: increase chat current active file context char limit to 40k
-- **Feature** /review: Code issues can be grouped by file location or severity
-
-## 1.43.0 2025-01-15
-
-- **Bug Fix** Auth: Valid StartURL not accepted at login
-- **Bug Fix** Fix inline completion supplementalContext length exceeding maximum in certain cases
-- **Bug Fix** Amazon Q /test: Unit test generation completed message shows after accept/reject action
-- **Bug Fix** /test: for unsupported languages was sometimes unreliable
-- **Bug Fix** User-selected customizations are sometimes not being persisted.
-- **Bug Fix** Amazon q /dev: Remove hard-coded limits and instead rely server-side data to communicate number of code generations remaining
-- **Feature** Adds capability to send new context commands to AB groups
-- **Feature** feat(amazonq): Add error message for updated README too large
-- **Feature** Enhance Q inline completion context fetching for better suggestion quality
-
-## 1.42.0 2025-01-09
-
-- **Bug Fix** Amazon Q /doc: Improve button text phrasing
-- **Bug Fix** Amazon Q /dev: Fix issue when files are deleted while preparing context
-- **Bug Fix** Amazon Q Code Transformation: allow POSTGRESQL as target DB for SQL conversions
-- **Bug Fix** Fix context menu displaying when typing @, even though input is disallowed
-- **Bug Fix** Amazon Q can update mvn and gradle build files
-- **Bug Fix** /transform: use correct documentation link in SQL conversion help message
-- **Bug Fix** Up/down history navigation only triggering on first/last line of prompt input
-- **Bug Fix** Amazon Q /test: Fix to redirect /test to generate tests in chat for external files out of workspace scope.
-- **Bug Fix** /review: Code block extends beyond page margins in code issue detail view
-- **Bug Fix** Amazon Q Code Transformation: retry project upload up to 3 times
-- **Feature** Amazon Q Code Transformation: add view summary button in chat
-- **Feature** Amazon Q: new code syntax highlighter for improved accuracy
-- **Removal** Settings: No longer migrate old CodeWhisperer settings or initialize telemetry setting from AWS Toolkit.
-
-## 1.41.0 2024-12-17
-
-- **Bug Fix** /review: Apply fix removes other issues in the same file.
-- **Bug Fix** Fix(Amazon Q Code Transformation): show correct diff when running consecutive transformations
-- **Bug Fix** Improve when the welcome page is shown in amazon q chat
-- **Bug Fix** Code Review: Cleaned up output logs when running /review
-- **Bug Fix** Code Review: Fixed a bug where applying a fix did not update the positions of other issues in the same file.
-- **Bug Fix** Chat: When navigating to previous prompts, code attachments are sometimes displayed incorrectly
-- **Bug Fix** /review: Diagnostics in the problems panel are mapped to the wrong code
-- **Bug Fix** Fix opentabs context possibly timeout due to race condition of misuse of different timeout functionalities
-- **Bug Fix** Auth: SSO session was bad, but no reauth prompt given
-- **Bug Fix** Reduce frequency of system status poll
-- **Bug Fix** Chat: When writing a prompt without sending it, navigating via up/down arrows sometimes deletes the unsent prompt.
-- **Bug Fix** Code Review: Fixed a bug where projects with repeated path names did not scan properly.
-- **Feature** /review: Code fix automatically scrolls into view after generation.
-- **Feature** Chat: improve font size and line-height in footer (below prompt input field)
-
-## 1.40.0 2024-12-10
-
-- **Bug Fix** Improved LLM code review for file review.
-- **Bug Fix** @workspace is missing from the welcome to q chat tab
-- **Bug Fix** Fix chat syntax highlighting when using several different themes
-- **Bug Fix** Amazon Q /doc: progress bar persists after cancelling README creation
-- **Bug Fix** Code Review: Fixed a bug where some issues are missing from the code issues view for workspaces with custom names
-- **Bug Fix** Amazon Q /doc: Prompt user to choose a folder in chat
-- **Bug Fix** Amazon Q /dev not adding Dockerfiles in nested folders
-- **Bug Fix** Improved Code Fix generation for code review issues
-- **Bug Fix** Fix the quick start buttons on the explore page to show amazon q colours on hover
-- **Feature** Q feature dev: recognize .bms, .pli code files
-- **Feature** Amazon Q Code Transformation: show job ID in Transformation Hub
-- **Feature** UI improvements to Amazon Q Chat: New splash loader animation, initial streaming card animation, improved button colours
-- **Feature** Add acknowledgement button for amazon q chat disclaimer
-- **Feature** Navigate through prompt history by using the up/down arrows
-- **Feature** Amazon Q: Simplify log channel
-
-## 1.39.0 2024-12-03
-
-- **Feature** Added a getting started page for exploring amazon q agents
-- **Feature** `/test` in Q chat to generate unit tests for java and python
-- **Feature** `/doc` in Q chat to generate and update documentation for your project
-- **Feature** Amazon Q Code Scan is now Amazon Q Code Review
-- **Feature** `/review` in Q chat to scan your code for vulnerabilities and quality issues, and generate fixes
-- **Feature** Security Scan: New TreeView to display security scan issues and vulnerabilities detected in your project. The TreeView provides an organized and hierarchical view of the scan results, making it easier to navigate and prioritize the issues that need to be addressed.
-- **Feature** Security Scan: Added ability to suppress or ignore security issues
-
-## 1.38.0 2024-11-27
-
-- **Feature** Amazon Q /dev: support `Dockerfile` files
-- **Feature** Introduce @workspace command to enhance context fetching for Chat
-- **Feature** Feature(Amazon Q Code Transformation): allow users to view results in 5 smaller diffs
-
-## 1.37.0 2024-11-22
-
-- **Bug Fix** Amazon Q Feature Dev: display limit reached error message
-- **Bug Fix** Amazon Q chat: `@workspace` command shown in all tab types
-- **Bug Fix** Chat container exceeds width of container
-- **Bug Fix** amazon q inline: skip indexing when no workspace folders are found
-- **Bug Fix** file details and name unneccessary cropping
-- **Bug Fix** Amazon Q /dev: update diff window behavior after a change is accepted
-- **Feature** Amazon Q /dev: support `.gradle` files
-- **Feature** Code Transform: Enable support for Java 17 projects.
-- **Feature** Notifications: Support for delivering critical alerts and product updates
-- **Feature** Retrieve and display a customization name when a customization is overridden in an AB test
-- **Feature** Feature(Amazon Q Code Transformation): support conversions of embedded SQL from Oracle to PostgreSQL
-
-## 1.36.0 2024-11-14
-
-- **Bug Fix** Fix broken inline suggestion auto-trigger on Systemverfilog files if users dont have systemverilog extension installed and enabled
-- **Bug Fix** tutorial always showing on start
-- **Feature** Enable default `@workspace` context of Amazon Q chat for certain users
-- **Feature** Amazon Q /dev: Add an action to accept individual files
-
-## 1.35.0 2024-11-11
-
-- **Breaking Change** Change focus chat keybind to win+alt+i on Windows, cmd+alt+i on macOS, and meta+alt+i on Linux
-- **Bug Fix** Fix suboptimal inline suggestions from Amazon Q caused by improperly formatted supplemental context
-- **Bug Fix** Fix empty chunks being sent to service and get validationException
-
-## 1.34.0 2024-11-07
-
-- **Bug Fix** Align example help text with prompt message in chat
-- **Bug Fix** Improve `@workspace` index auto pause start strategy.
-- **Feature** Allow users to View and Apply diff when they explictily send code to Amazon Q using - Fix, Refactor, Optimize and Send To Prompt.
-- **Feature** Security Scan: Auto-scan now supports JSX, TSX, Kotlin, Scala, and Shell files.
-
-## 1.33.0 2024-10-30
-
-- **Bug Fix** Amazon Q /dev: fix for stop button showing for Code Transformation
-
-## 1.32.0 2024-10-29
-
-- **Bug Fix** Remove warning when no input is provided to inline chat input box
-- **Bug Fix** Use Sagemaker environment IAM Credentials for Code Completion when they're available
-- **Bug Fix** Inline: Code completion not working for Sagemaker Pro Tier users.
-- **Bug Fix** Disable /transform and /dev commands for sagemaker users as they're not supported
-- **Feature** Amazon SageMaker Studio: Enable Free Tier Chat for IAM users
-
-## 1.31.0 2024-10-29
-
-- **Breaking Change** Change keybind for focusing chat to ctrl+win+i on Windows, ctrl+cmd+i on macOS and ctrl+meta+i on Linux
-- **Bug Fix** Inline Suggestions: Occasional `ValidationException` if user context has too many characters.
-- **Bug Fix** Update `@workspace` index when adding or deleting a file
-- **Bug Fix** fixed device code detection when running auth through tunneled vscode
-- **Feature** Use inline chat to select code and transform it with natural language instructions
-- **Feature** Amazon Q /dev: Add stop generation action
-- **Feature** Provide more frequent updates about code changes made by agent
-
-## 1.30.0 2024-10-17
-
-- **Bug Fix** Various fixes and changes
-
-## 1.29.0 2024-10-10
-
-- **Bug Fix** Amazon Q /dev: include telemetry for workspace usage when generating new files
-- **Bug Fix** Amazon Q extension may fail to start if AWS Toolkit extension fails to start
-- **Bug Fix** Start language server by default
-- **Bug Fix** Amazon Q Feature Dev: Add error messages when the upload URL expires
-- **Bug Fix** Amazon Q (/dev): view diffs of previous /dev iterations
-- **Bug Fix** Q dev handle no change required
-- **Deprecation** The next release of this extension will require VS Code 1.83.0 or newer.
-- **Feature** Automatically pause and resume @workspace indexing when OS CPU load is high
-- **Feature** Add buttons to code blocks to view and accept diffs.
-- **Feature** Inline completion for more json files, and all yaml files
-- **Feature** Show a one-time warning if new VS Code is required
-- **Removal** Minimum required VSCode version is now 1.83
-
-## 1.28.0 2024-10-03
-
-- **Bug Fix** Amazon Q /dev: define first folder as a root path for LLM-created files when using workspaces
-- **Feature** Amazon Q Code Transformation: allow users to skip running tests
-- **Feature** Amazon Q Developer: Updated legal disclaimer text
-
-## 1.27.0 2024-09-27
-
-- **Bug Fix** Security Scan: Fixes an issue that incorrectly removes hardcoded credentials detections from auto scans.
-
-## 1.26.0 2024-09-19
-
-- **Bug Fix** Security Scan: Fixed an issue where the wrong icon was used in the status bar menu.
-- **Bug Fix** Disable Amazon Q LSP in AL2
-- **Bug Fix** Amazon Q Chat: Fix shifted chat contents when closing and opening chat panel back
-- **Bug Fix** Security Scan: Minor styling improvements in the security issue webview panel
-- **Bug Fix** Amazon Q Chat: Fix tooltip remaining on screen when closing and opening chat panel back
-- **Bug Fix** Auth: Login state not updating across multiple VS Code windows.
-- **Feature** Support @workspace queries for specific files like `@workspace what does test.ts do? `.
-
-## 1.25.0 2024-09-12
-
-- **Bug Fix** Amazon Q Chat: Fixed inline code blocks are not vertically aligned with texts
-- **Feature** Record telemetry event when Amazon Q extension is uninstalled.
-- **Feature** Improve workspace indexing by only index files that are changed since last indexing
-- **Removal** Amazon Q Feature dev: Remove approach generation flow
-
-## 1.24.0 2024-09-05
-
-- **Bug Fix** Network errors causing premature SSO logout
-- **Bug Fix** Fix SyntaxError causing premature expiration (edge case)
-- **Bug Fix** Amazon Q Code Transformation: show instructions for finding JDK path on Linux
-- **Bug Fix** UI: 'Start using Amazon Q' may display even if the user is signed in.
-- **Bug Fix** Add getFeature and isEnabled utility methods to FeatureConfigProvider
-- **Feature** Amazon Q /dev: include in progress state agent in code generation
-- **Feature** Reduce workspace CPU indexing time by 50%
-
-## 1.23.0 2024-08-29
-
-- **Bug Fix** Fix bug when undo inline suggestion causes command not found
-- **Bug Fix** Auth: `SyntaxError` causing unexpected SSO logout
-- **Bug Fix** Amazon Q Code Transformation: allow symlinks for JDK path
-- **Bug Fix** Fix bug where text with inline code copied from Amazon Q Chat had new line breaks around the inline code text
-- **Bug Fix** Fix bug with code indentation and nested list formatting in chat response prompt
-- **Bug Fix** Fix bug when disabled commands does not get filtered in quick actions
-- **Bug Fix** Auth: Users may be silently logged out due to network issues when starting the extension.
-- **Feature** Support AB testing
-
-## 1.22.0 2024-08-22
-
-- **Bug Fix** Avoid refreshing code suggestion for paginated response
-- **Bug Fix** Update login logo styling
-- **Bug Fix** Correct indentation when insert Q chat code at cursor position
-- **Feature** Add notification for extended session to IdC users
-- **Feature** Support more programming languages for workspace index
-
-## 1.21.0 2024-08-15
-
-- **Bug Fix** Q feature dev: update file extension list and minor UI fixes
-
-## 1.20.0 2024-08-08
-
-- **Bug Fix** Amazon Q /dev: include a retry option for the same prompt after folder reselection
-- **Bug Fix** Ignore virtual environment when indexing workspace
-- **Feature** Amazon Q Code Transformation: show pro tier users estimated cost of /transform on projects over 100K lines
-- **Feature** Amazon Q Code Transformation: warn user if absolute file paths are found in the pom.xml
-
-## 1.19.0 2024-08-01
-
-- **Bug Fix** Amazon Q Chat: Fixing issue with an incorrect input cursor position in the prompt text box
-- **Bug Fix** Amazon Q Chat: Fixing issue with the max tabs notification not being dismissible.
-- **Bug Fix** Amazon Q Chat: Showing/hiding the scrollbars is now controlled by the OS settings
-- **Bug Fix** Q chat may stop responding after processing Python/Java code
-- **Feature** Amazon q /dev: i18n support for messaging
-
-## 1.18.0 2024-07-29
-
-- **Bug Fix** Security Scan: Fixed an issue scans were not able to succeed on Java projects with .class files
-- **Bug Fix** FileNotFound error causing early SSO expiration
-
-## 1.17.0 2024-07-25
-
-- **Bug Fix** Amazon Q Dev and Transform introduction text formatted incorrectly
-- **Bug Fix** Amazon Q /dev: update error message for code gen timeout and include backfill for error name
-- **Bug Fix** Sign-in page may fail to render in rare circumstances.
-
-## 1.16.0 2024-07-18
-
-- **Bug Fix** Amazon q /dev: include granular error handling for code generation failed state
-- **Bug Fix** Amazon Q Code Transformation: always show build logs from last job run
-- **Bug Fix** Unexpected SSO expiration on Windows due to EPERM
-
-## 1.15.0 2024-07-15
-
-- **Bug Fix** Amazon Q Chat: Fixes a bug when the prompt input exceeds the width of the chat box it's not always wrapped correctly.
-- **Bug Fix** Amazon Q: Corrected a miswording in the Amazon Q: Share Content With AWS setting.
-- **Bug Fix** Amazon Q Chat: Fixes a bug when user input contains 4 or more spaces at the beginning of the line for multiline inputs, that line appears like a code block instead of a paragraph
-
-## 1.14.0 2024-07-11
-
-- **Feature** Amazon Q/dev proactively show code generation iterations
-
-## 1.13.0 2024-07-11
-
-- **Bug Fix** AD/LDAP users may see "uv_os_get_passwd ENOENT" error on startup #5277
-- **Feature** Add support for [Amazon Q Chat Workspace Context](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/workspace-context.html). Customers can use `@workspace` to ask questions regarding local workspace.
-
-## 1.12.0 2024-07-08
-
-- **Bug Fix** Amazon Q Security Scans: Fixed unnecessary yellow lines appearing in both auto scans and project scans.
-- **Bug Fix** Amazon Q Chat: Fixed prompt input becomes invisible if an html special character is inserted
-- **Bug Fix** Amazon Q Chat: Fixed button font sizes are too big
-- **Bug Fix** Amazon Q Chat: Fixed buttons don't show borders inside a message
-- **Bug Fix** Amazon Q Code Transform: Link UI messages to troubleshooting docs
-- **Bug Fix** Amazon Q /dev command: improve user error messages
-- **Bug Fix** Amazon Q Chat: Fixed button texts are cropped too short
-- **Bug Fix** Amazon Q Chat: Fixed prompt input and selected command horizontal alignment
-- **Bug Fix** Amazon Q Chat: Fixed prompt input becomes invisible when multine text inserted with paste
-- **Feature** Q feature dev: Only use relevant code and related files
-
-## 1.11.0 2024-06-27
-
-- **Bug Fix** Amazon Q Chat: Fix for inline buttons don't have borders
-- **Bug Fix** Amazon Q Chat: Fix for some edge cases when followups appear on top without styles
-- **Bug Fix** Amazon Q Chat: Fix for prompt input removes whole word if it starts with @ character but there is no context selected
-- **Bug Fix** Amazon Q Chat: Fix for prompt input doesn't show multi line content properly after it reaches 10-15 lines
-- **Bug Fix** Amazon Q /dev command: Fix in progress experience for ongoing backend calls
-
-## 1.10.0 2024-06-21
-
-- **Bug Fix** Security Scan: Fixes an issue where project-scans time out for larger projects.
-- **Bug Fix** Amazon Q /dev command: Fix file rejections for files outside of src/
-- **Bug Fix** Feature Development: update /dev welcome message
-- **Bug Fix** Amazon Q Chat: Fixed broken code blocks with typewriter text in list items.
-- **Feature** UX: New style for the login window
-- **Removal** Auth: No longer share SSO sessions with AWS Toolkit.
-
-## 1.9.0 2024-06-14
-
-- **Bug Fix** Amazon Q inline suggestions: remember `Pause Auto-Suggestions` after IDE restart
-- **Bug Fix** Amazon Q /dev command: stop showing spinner when there is an error.
-- **Bug Fix** Security Scan: Fixes an issue where auto-scans cause the editor to become unresponsive for larger projects.
-- **Bug Fix** Fix(Amazon Q Code Transformation): show more detailed error messages for proxy issues
-- **Feature** Amazon Q Code Transform: Allow user to view transformation build log
-
-## 1.8.0 2024-06-07
-
-- **Bug Fix** fix(featureDev): fix file rejection for multi-workspaces
-- **Feature** The `Send to Amazon Q` [context menu](https://github.com/aws/aws-toolkit-vscode/assets/371007/ce4c61a4-1b58-48ee-8500-56667d45dd7d) was renamed to `Amazon Q`
-- **Feature** Amazon Q Transform: Increase project upload size limit to 2GB
-- **Feature** feat(featureDev): generated plan being shown from top
-- **Feature** Add additional commands for Amazon Q.
-
-## 1.7.0 2024-05-30
-
-- **Bug Fix** Feature Development: File rejection is not rejecting a file when code is generated
-- **Bug Fix** Security Scan: Improved accuracy when applying security fixes
-- **Bug Fix** Amazon Q Code Transformation: show more specific error messages on failure cases
-- **Feature** Security Scan: Support for scanning files outside of workspaces.
-- **Feature** Amazon Q now publishes to Open VSX: https://open-vsx.org/namespace/amazonwebservices
-
-## 1.6.0 2024-05-21
-
-- **Bug Fix** Amazon Q Chat: Inside chat body, if there is a code block inside a list item it shows
tags
-- **Bug Fix** Amazon Q Chat: Prompt input field allows additional input beyond the character limit
-- **Bug Fix** Amazon Q Chat: Prompt input field not getting focus when chat window opens
-
-## 1.5.0 2024-05-17
-
-- **Bug Fix** Security Scan: Fixes an issue when scanning projects with binary files
-- **Bug Fix** Fixes an issue where the /dev chat wouldn't let customers modify the source folder when exceeding the size limit
-- **Bug Fix** Security Scan: Improved error notifications
-- **Feature** Security Scan: Added custom command to run the security scan.
-- **Feature** Security Scan: "View details" and "Explain" options can now be accessed from the problems panel
-
-## 1.4.0 2024-05-13
-
-- **Bug Fix** Auth: No longer request AWS account scopes during login.
-- **Bug Fix** Security Scan: Fixes an issue where scans fail for projects with Terraform files
-- **Bug Fix** Amazon Q Code Transform: Show additional status messages to align with experience when JAVA_HOME set incorrectly.
-- **Feature** UX: Added keyboard navigation to login screen.
-- **Feature** New SSO Authorization Code flow for faster logins
-- **Feature** Transform: Add human intervention to help update dependencies during transformation.
-
-## 1.3.0 2024-05-08
-
-- **Bug Fix** modifying the root folder for /dev now modifies it
-- **Bug Fix** Q chat may stop responding after processing Javascript/Typescript code
-- **Bug Fix** Completion may fail unexpected if user opened many tabs
-- **Feature** Inline Suggestions: Only display the 'Open Chat' CodeLens if the user is signed into Amazon Q.
-- **Feature** Security Scan: Scans can now be run without an open editor
-- **Feature** Security Scan: Multi-root workspace support
-
-## 1.2.0 2024-05-07
-
-- **Bug Fix** Fix bug when Amazon Q chat sends code selection while user has no selection
-- **Bug Fix** Amazon Q Code Transformation: make jobId visible in job history tab at start of job and allow summary.md + icons to be saved when accepting changes
-- **Bug Fix** Amazon Q Chat: Typewriter animator parts showing up in code fields inside listitems
-- **Bug Fix** Security Scan: Addresses a bug where security issues sometimes appear multiple times
-- **Feature** Update cross file context config for Q inline suggestion
-- **Feature** Amazon Q: Security scans now support C, C++, and PHP files
-
-## 1.1.0 2024-04-30
-
-- **Bug Fix** Amazon Q Chat: Fixed markdown is not getting parsed inside list items.
-- **Bug Fix** Amazon Q Chat: Copy to clipboard on code blocks doesn't work
-- **Bug Fix** Fixed a crash when trying to use Q /dev on large projects or projects containing files with unsupported encoding.
-
-## 1.0.0 2024-04-29
-
-- **Bug Fix** Code Transformation: Address various issues in TransformationHub UX.
-- **Bug Fix** Code Transformation: Transform may fail if JAVA_HOME has leading or trailing whitespace
-- **Bug Fix** Chat: Q panel doesn't fit to its parent
-- **Bug Fix** Feature Development: update welcome message and menu item description for /dev command
-- **Bug Fix** Code Transformation: show error messages in chat
-- **Bug Fix** Code Transformation: Proposed changes not updated when multiple transformation jobs run in sequence.
-- **Bug Fix** Feature Development: Update error message for monthly conversation limit reach
-- **Bug Fix** Code Transformation: Omit Maven metadata files when uploading dependencies to fix certain build failures in backend.
-- **Feature** Code Transformation: Refreshed UI during CodeTransformation
-- **Feature** Chat: cmd + i to open chat
-- **Feature** Right Click + no code selected shows Q context menu
-- **Feature** Security Scan: Scans can now run on all files in the project
-- **Feature** Chat: Updates quick action commands style and groupings
-- **Feature** Code Transformation: add details about expected changes in transformation plan
-- **Feature** Enable Amazon Q feature development and Amazon Q transform capabilities (/dev and /transform) for AWS Builder ID users.
-- **Feature** Initial release
-- **Feature** Chat: Added metric parameters to recordAddMessage telemetry event.
-- **Feature** Security Scan: Scans can now run automatically when file changes are made
-- **Feature** Chat: brief CodeLens to advertise chat
-- **Feature** Security Scan: Send security issue to chat for explanation and fix
-
diff --git a/packages/amazonq/README.md b/packages/amazonq/README.md
deleted file mode 100644
index e3ec16bb2ac..00000000000
--- a/packages/amazonq/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-
-[](https://x.com/awscloud)
-[](https://www.youtube.com/@amazonwebservices)
-
-
-# Agentic coding experience
-
-Amazon Q Developer uses information across native and MCP server-based tools to intelligently perform actions beyond code suggestions, such as reading files, generating code diffs, and running commands based on your natural language instruction. Simply type your prompt in your preferred language and Q Developer will provide continuous status updates and iteratively apply changes based on your feedback, helping you accomplish tasks faster.
-
-### Implement new features
-
-Generate new code across your entire project and implement features.
-
-### Generate documentation
-
-Write API, technical design, and onboarding documentation.
-
-### Automate code reviews
-
-Perform code reviews, flagging suspicious code patterns and assessing deployment risk.
-
-### Generate unit tests
-
-Generate unit tests and add them to your project, helping you improve code quality, fast.
-
-
-
-# Core features
-
-### MCP support
-
-Add Model Context Protocol (MCP) servers to give Amazon Q Developer access to important context.
-
-### Inline suggestions
-
-Receive real-time code suggestions ranging from snippets to full functions based on your comments and existing code.
-
-[_15+ languages supported including Python, TypeScript, Rust, Terraform, AWS Cloudformation, and more_](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-language-ide-support.html)
-
-### Inline chat
-
-Seamlessly chat within the inline coding experience. Select a section of code that you need assistance with and initiate chat within the editor to request actions such as "Optimize this code", "Add comments", or "Write tests".
-
-### Chat
-
-Generate code, explain code, and get answers about software development.
-
-
-
-# Getting Started
-
-**Free Tier** - create or log in with an AWS Builder ID (a personal profile from AWS).
-
-**Pro Tier** - if your organization is on the Amazon Q Developer Pro tier, log in with single sign-on.
-
-# Troubleshooting & feedback
-
-[File a bug](https://github.com/aws/aws-toolkit-vscode/issues/new?assignees=&labels=bug&projects=&template=bug_report.md) or [submit a feature request](https://github.com/aws/aws-toolkit-vscode/issues/new?assignees=&labels=feature-request&projects=&template=feature_request.md) on our Github repository.
diff --git a/packages/amazonq/package.json b/packages/amazonq/package.json
deleted file mode 100644
index 9619a7053db..00000000000
--- a/packages/amazonq/package.json
+++ /dev/null
@@ -1,1506 +0,0 @@
-{
- "name": "amazon-q-vscode",
- "displayName": "Amazon Q",
- "description": "The most capable generative AI–powered assistant for software development.",
- "version": "1.108.0-SNAPSHOT",
- "extensionKind": [
- "workspace"
- ],
- "publisher": "amazonwebservices",
- "icon": "resources/marketplace/amazonq-icon-256x256.png",
- "license": "Apache-2.0",
- "repository": {
- "type": "git",
- "url": "https://github.com/aws/aws-toolkit-vscode"
- },
- "bugs": {
- "url": "https://github.com/aws/aws-toolkit-vscode/issues"
- },
- "galleryBanner": {
- "color": "#232F3E",
- "theme": "dark"
- },
- "categories": [
- "AI",
- "Chat",
- "Programming Languages",
- "Education",
- "Machine Learning"
- ],
- "keywords": [
- "AWS",
- "Codewhisperer",
- "AI",
- "Assistant",
- "Chatbot",
- "Q Developer"
- ],
- "preview": false,
- "qna": "https://github.com/aws/aws-toolkit-vscode/issues",
- "activationEvents": [
- "onStartupFinished",
- "onUri",
- "onCommand:aws.amazonq.accept",
- "onView:aws.codeWhisperer.securityPanel"
- ],
- "main": "./dist/src/extensionNode",
- "browser": "./dist/src/extensionWeb",
- "scripts": {
- "vscode:prepublish": "npm run clean && npm run buildScripts && webpack --mode production",
- "buildScripts": "npm run generateNonCodeFiles && npm run copyFiles && npm run generateIcons && npm run generateSettings && tsc -p ./ --noEmit",
- "generateNonCodeFiles": "ts-node ../../scripts/generateNonCodeFiles.ts",
- "copyFiles": "ts-node ./scripts/build/copyFiles.ts",
- "clean": "ts-node ../../scripts/clean.ts dist/ LICENSE NOTICE",
- "compile": "npm run clean && npm run buildScripts && webpack",
- "compileDev": "npm run testCompile && webpack --mode development",
- "compileOnly": "tsc -p ./",
- "package": "ts-node ../../scripts/package.ts",
- "lint": "true",
- "watch": "npm run clean && npm run buildScripts && tsc -watch -p ./",
- "testCompile": "npm run clean && npm run buildScripts && npm run compileOnly",
- "test": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
- "testE2E": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts e2e dist/test/e2e/index.js ../core/dist/src/testFixtures/workspaceFolder",
- "testWeb": "npm run compileDev && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts web dist/test/web/testRunnerWebCore.js",
- "webRun": "npx @vscode/test-web --open-devtools --browserOption=--disable-web-security --waitForDebugger=9222 --extensionDevelopmentPath=. .",
- "webWatch": "npm run clean && npm run buildScripts && webpack --mode development --watch",
- "serve": "webpack serve --config-name mainServe --mode development",
- "newChange": "ts-node ../../scripts/newChange.ts",
- "createRelease": "ts-node ../../scripts/createRelease.ts",
- "generateIcons": "ts-node ../../scripts/generateIcons.ts",
- "generateSettings": "ts-node ../../scripts/generateSettings.ts"
- },
- "dependencies": {
- "aws-core-vscode": "file:../core/"
- },
- "contributesComments": {
- "configuration": {
- "properties": "Any settings also defined in packages/core/package.json will override same-named settings in this file."
- }
- },
- "contributes": {
- "configuration": {
- "type": "object",
- "title": "%AWS.amazonq.productName%",
- "properties": {
- "amazonQ.telemetry": {
- "type": "boolean",
- "default": true,
- "markdownDescription": "%AWS.configuration.description.amazonq.telemetry%"
- },
- "amazonQ.suppressPrompts": {
- "type": "object",
- "description": "%AWS.configuration.description.suppressPrompts%",
- "default": {},
- "properties": {
- "createCredentialsProfile": {
- "type": "boolean",
- "default": false
- },
- "codeWhispererNewWelcomeMessage": {
- "type": "boolean",
- "default": false
- },
- "codeWhispererConnectionExpired": {
- "type": "boolean",
- "default": false
- },
- "amazonQWelcomePage": {
- "type": "boolean",
- "default": false
- },
- "amazonQSessionConfigurationMessage": {
- "type": "boolean",
- "default": false
- },
- "minIdeVersion": {
- "type": "boolean",
- "default": false
- },
- "ssoCacheError": {
- "type": "boolean",
- "default": false
- },
- "amazonQLspManifestMessage": {
- "type": "boolean",
- "default": false
- },
- "amazonQWorkspaceLspManifestMessage": {
- "type": "boolean",
- "default": false
- },
- "amazonQChatDisclaimer": {
- "type": "boolean",
- "default": false
- },
- "amazonQChatPairProgramming": {
- "type": "boolean",
- "default": false
- },
- "amazonQSelectDeveloperProfile": {
- "type": "boolean",
- "default": false
- }
- },
- "additionalProperties": false
- },
- "amazonQ.showCodeWithReferences": {
- "type": "boolean",
- "markdownDescription": "%AWS.configuration.description.amazonq%",
- "default": true
- },
- "amazonQ.allowFeatureDevelopmentToRunCodeAndTests": {
- "markdownDescription": "%AWS.configuration.description.featureDevelopment.allowRunningCodeAndTests%",
- "type": "object",
- "default": {}
- },
- "amazonQ.importRecommendationForInlineCodeSuggestions": {
- "type": "boolean",
- "description": "%AWS.configuration.description.amazonq.importRecommendation%",
- "default": true
- },
- "amazonQ.shareContentWithAWS": {
- "type": "boolean",
- "markdownDescription": "%AWS.configuration.description.amazonq.shareContentWithAWS%",
- "default": true,
- "scope": "application"
- },
- "amazonQ.workspaceIndex": {
- "type": "boolean",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndex%",
- "default": false,
- "scope": "application"
- },
- "amazonQ.workspaceIndexWorkerThreads": {
- "type": "number",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexWorkerThreads%",
- "default": 0,
- "scope": "application"
- },
- "amazonQ.workspaceIndexUseGPU": {
- "type": "boolean",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexUseGPU%",
- "default": false,
- "scope": "application"
- },
- "amazonQ.workspaceIndexMaxSize": {
- "type": "number",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexMaxSize%",
- "default": 2048,
- "scope": "application"
- },
- "amazonQ.workspaceIndexMaxFileSize": {
- "type": "number",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexMaxFileSize%",
- "default": 10,
- "scope": "application"
- },
- "amazonQ.workspaceIndexCacheDirPath": {
- "type": "string",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexCacheDirPath%",
- "default": null,
- "scope": "application"
- },
- "amazonQ.workspaceIndexIgnoreFilePatterns": {
- "type": "array",
- "markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexIgnoreFilePatterns%",
- "default": [],
- "scope": "application"
- },
- "amazonQ.ignoredSecurityIssues": {
- "type": "array",
- "markdownDescription": "%AWS.configuration.description.amazonq.ignoredSecurityIssues%",
- "scope": "window",
- "items": {
- "type": "string"
- }
- },
- "amazonQ.proxy.certificateAuthority": {
- "type": "string",
- "markdownDescription": "%AWS.configuration.description.amazonq.proxy.certificateAuthority%",
- "default": null,
- "scope": "application"
- },
- "amazonQ.proxy.enableProxyAndCertificateAutoDiscovery": {
- "type": "boolean",
- "markdownDescription": "%AWS.configuration.description.amazonq.proxy.enableProxyAndCertificateAutoDiscovery%",
- "default": true
- }
- }
- },
- "viewsContainers": {
- "activitybar": [
- {
- "id": "amazonq",
- "title": "%AWS.amazonq.title%",
- "icon": "resources/amazonq-logo.svg"
- }
- ],
- "panel": [
- {
- "id": "aws-codewhisperer-reference-log",
- "title": "Code Reference Log",
- "icon": "media/aws-logo.svg"
- },
- {
- "id": "aws-codewhisperer-transformation-hub",
- "title": "Transformation Hub",
- "icon": "media/aws-logo.svg"
- }
- ]
- },
- "views": {
- "amazonq": [
- {
- "id": "aws.amazonq.notifications",
- "name": "%AWS.notifications.title%",
- "when": "!(isCloud9 || aws.isSageMaker) && aws.amazonq.notifications.show"
- },
- {
- "type": "webview",
- "id": "aws.amazonq.AmazonCommonAuth",
- "name": "%AWS.amazonq.login%",
- "when": "!aws.isWebExtHost && aws.amazonq.showLoginView"
- },
- {
- "type": "tree",
- "id": "aws.amazonq.SecurityIssuesTree",
- "name": "%AWS.amazonq.security%",
- "when": "!aws.isSageMaker && !aws.isWebExtHost && !aws.amazonq.showLoginView",
- "visibility": "collapsed"
- },
- {
- "type": "webview",
- "id": "aws.amazonq.AmazonQChatView",
- "name": "%AWS.amazonq.chat%",
- "when": "!aws.isWebExtHost && !aws.amazonq.showLoginView"
- }
- ],
- "aws-codewhisperer-reference-log": [
- {
- "type": "webview",
- "id": "aws.codeWhisperer.referenceLog",
- "name": ""
- }
- ],
- "aws-codewhisperer-transformation-hub": [
- {
- "type": "webview",
- "id": "aws.amazonq.transformationHub",
- "name": "Status",
- "when": "gumby.wasQCodeTransformationUsed"
- },
- {
- "id": "aws.amazonq.transformationProposedChangesTree",
- "name": "Proposed Changes",
- "when": "gumby.transformationProposalReviewInProgress"
- }
- ]
- },
- "viewsWelcome": [
- {
- "view": "aws.amazonq.transformationProposedChangesTree",
- "contents": "Project transformation is complete.\n[Download Proposed Changes](command:aws.amazonq.transformationHub.reviewChanges.startReview)",
- "when": "gumby.reviewState == NotStarted"
- },
- {
- "view": "aws.amazonq.transformationProposedChangesTree",
- "contents": "Project transformation is complete.\n Downloading the proposed changes...",
- "when": "gumby.reviewState == PreparingReview"
- },
- {
- "view": "aws.amazonq.SecurityIssuesTree",
- "contents": "No code issues have been detected in the workspace.",
- "when": "!aws.amazonq.security.noMatches"
- },
- {
- "view": "aws.amazonq.SecurityIssuesTree",
- "contents": "No matches.\n[Clear Filters](command:aws.amazonq.securityIssuesTreeFilter.clearFilters)",
- "when": "aws.amazonq.security.noMatches"
- }
- ],
- "submenus": [
- {
- "label": "%AWS.submenu.amazonqEditorContextSubmenu.title%",
- "id": "amazonqEditorContextSubmenu"
- },
- {
- "label": "%AWS.generic.feedback%",
- "id": "aws.amazonq.submenu.feedback"
- },
- {
- "label": "%AWS.generic.help%",
- "id": "aws.amazonq.submenu.help"
- },
- {
- "label": "%AWS.generic.moreActions%",
- "id": "aws.amazonq.submenu.securityIssueMoreActions",
- "icon": "$(ellipsis)"
- }
- ],
- "menus": {
- "commandPalette": [
- {
- "command": "aws.amazonq.reconnect",
- "when": "false"
- },
- {
- "command": "amazonq.dev.openMenu",
- "when": "aws.isDevMode"
- },
- {
- "command": "aws.amazonq.learnMore",
- "when": "false"
- }
- ],
- "view/title": [
- {
- "command": "aws.amazonq.stopTransformationInHub",
- "when": "view == aws.amazonq.transformationHub",
- "group": "navigation@1"
- },
- {
- "command": "aws.amazonq.showPlanProgressInHub",
- "when": "view == aws.amazonq.transformationHub",
- "group": "navigation@2"
- },
- {
- "command": "aws.amazonq.showHistoryInHub",
- "when": "view == aws.amazonq.transformationHub",
- "group": "navigation@3"
- },
- {
- "command": "aws.amazonq.showTransformationPlanInHub",
- "when": "view == aws.amazonq.transformationHub",
- "group": "navigation@4"
- },
- {
- "command": "aws.amazonq.transformationHub.summary.reveal",
- "when": "view == aws.amazonq.transformationHub",
- "group": "navigation@5"
- },
- {
- "command": "aws.amazonq.transformationHub.reviewChanges.acceptChanges",
- "when": "view == aws.amazonq.transformationProposedChangesTree && gumby.reviewState == InReview",
- "group": "navigation@1"
- },
- {
- "command": "aws.amazonq.transformationHub.reviewChanges.rejectChanges",
- "when": "view == aws.amazonq.transformationProposedChangesTree && gumby.reviewState == InReview",
- "group": "navigation@2"
- },
- {
- "command": "aws.amazonq.openReferencePanel",
- "when": "view == aws.amazonq.AmazonQChatView",
- "group": "0_topAmazonQ@1"
- },
- {
- "command": "aws.amazonq.selectRegionProfile",
- "when": "view == aws.amazonq.AmazonQChatView && aws.amazonq.connectedSsoIdc == true",
- "group": "1_amazonQ@1"
- },
- {
- "command": "aws.amazonq.manageSubscription",
- "when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connected",
- "group": "1_amazonQ@2"
- },
- {
- "command": "aws.amazonq.learnMore",
- "when": "view =~ /^aws\\.amazonq/",
- "group": "1_amazonQ@3"
- },
- {
- "command": "aws.amazonq.signout",
- "when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connected && !aws.isSageMakerUnifiedStudio",
- "group": "2_amazonQ@4"
- },
- {
- "command": "aws.amazonq.showLogs",
- "when": "(view =~ /^aws\\.amazonq/) && !aws.isSageMakerUnifiedStudio",
- "group": "1_amazonQ@5"
- },
- {
- "command": "aws.amazonq.reconnect",
- "when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connectionExpired",
- "group": "2_amazonQ@3"
- },
- {
- "submenu": "aws.amazonq.submenu.feedback",
- "when": "view =~ /^aws\\.amazonq/",
- "group": "y_toolkitMeta@1"
- },
- {
- "submenu": "aws.amazonq.submenu.help",
- "when": "view =~ /^aws\\.amazonq/",
- "group": "y_toolkitMeta@2"
- },
- {
- "command": "aws.amazonq.codescan.showGroupingStrategy",
- "when": "view == aws.amazonq.SecurityIssuesTree",
- "group": "navigation@1"
- },
- {
- "command": "aws.amazonq.security.showFilters",
- "when": "view == aws.amazonq.SecurityIssuesTree",
- "group": "navigation@2"
- }
- ],
- "view/item/context": [
- {
- "command": "_aws.amazonq.notifications.dismiss",
- "when": "viewItem == amazonqNotificationStartUp",
- "group": "inline@1"
- },
- {
- "command": "aws.amazonq.openSecurityIssuePanel",
- "when": "false && view == aws.amazonq.SecurityIssuesTree && (viewItem == issueWithoutFix || viewItem == issueWithFix || viewItem == issueWithFixDisabled)",
- "group": "inline@4"
- },
- {
- "command": "aws.amazonq.security.explain",
- "when": "view == aws.amazonq.SecurityIssuesTree && (viewItem == issueWithoutFix || viewItem == issueWithFix || viewItem == issueWithFixDisabled)",
- "group": "inline@4"
- },
- {
- "command": "aws.amazonq.security.generateFix",
- "when": "view == aws.amazonq.SecurityIssuesTree && (viewItem == issueWithoutFix || viewItem == issueWithFix || viewItem == issueWithFixDisabled)",
- "group": "inline@5"
- },
- {
- "command": "aws.amazonq.security.ignore",
- "when": "view == aws.amazonq.SecurityIssuesTree && (viewItem == issueWithoutFix || viewItem == issueWithFix || viewItem == issueWithFixDisabled)",
- "group": "inline@6"
- },
- {
- "submenu": "aws.amazonq.submenu.securityIssueMoreActions",
- "when": "view == aws.amazonq.SecurityIssuesTree && (viewItem == issueWithoutFix || viewItem == issueWithFix || viewItem == issueWithFixDisabled)",
- "group": "inline@7"
- }
- ],
- "amazonqEditorContextSubmenu": [
- {
- "command": "aws.amazonq.explainCode",
- "group": "cw_chat@1"
- },
- {
- "command": "aws.amazonq.refactorCode",
- "group": "cw_chat@2"
- },
- {
- "command": "aws.amazonq.fixCode",
- "group": "cw_chat@3"
- },
- {
- "command": "aws.amazonq.optimizeCode",
- "group": "cw_chat@4"
- },
- {
- "command": "aws.amazonq.generateUnitTests",
- "when": "!aws.isSageMaker",
- "group": "cw_chat@5"
- },
- {
- "command": "aws.amazonq.sendToPrompt",
- "group": "cw_chat@6"
- },
- {
- "command": "aws.amazonq.inline.invokeChat",
- "group": "cw_chat@7"
- }
- ],
- "editor/context": [
- {
- "submenu": "amazonqEditorContextSubmenu",
- "group": "cw_chat"
- }
- ],
- "aws.amazonq.submenu.feedback": [
- {
- "command": "aws.amazonq.submitFeedback",
- "when": "!aws.isWebExtHost",
- "group": "1_feedback@1"
- },
- {
- "command": "aws.amazonq.createIssueOnGitHub",
- "group": "1_feedback@2"
- }
- ],
- "aws.amazonq.submenu.help": [
- {
- "command": "aws.amazonq.walkthrough.show",
- "group": "1_help@1"
- },
- {
- "command": "aws.amazonq.github",
- "group": "1_help@2"
- },
- {
- "command": "aws.amazonq.aboutExtension",
- "group": "1_help@3"
- },
- {
- "command": "aws.amazonq.viewLogs",
- "group": "1_help@4"
- }
- ],
- "aws.amazonq.submenu.securityIssueMoreActions": [
- {
- "command": "aws.amazonq.security.explain",
- "when": "false",
- "group": "1_more@1"
- },
- {
- "command": "aws.amazonq.applySecurityFix",
- "when": "false && view == aws.amazonq.SecurityIssuesTree && viewItem == issueWithFix",
- "group": "1_more@3"
- },
- {
- "command": "aws.amazonq.security.regenerateFix",
- "when": "false && view == aws.amazonq.SecurityIssuesTree && viewItem == issueWithFix",
- "group": "1_more@4"
- },
- {
- "command": "aws.amazonq.security.ignoreAll",
- "group": "1_more@5"
- }
- ]
- },
- "commands": [
- {
- "command": "aws.amazonq.stopCmdExecution",
- "title": "Stop Amazon Q",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.runCmdExecution",
- "title": "Run Amazon Q Tool",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.rejectCmdExecution",
- "title": "Reject Amazon Q Tool",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "_aws.amazonq.notifications.dismiss",
- "title": "%AWS.generic.dismiss%",
- "category": "%AWS.amazonq.title%",
- "enablement": "view == aws.amazonq.notifications",
- "icon": "$(remove-close)"
- },
- {
- "command": "aws.amazonq.explainCode",
- "title": "%AWS.command.amazonq.explainCode%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.refactorCode",
- "title": "%AWS.command.amazonq.refactorCode%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.fixCode",
- "title": "%AWS.command.amazonq.fixCode%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.optimizeCode",
- "title": "%AWS.command.amazonq.optimizeCode%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.sendToPrompt",
- "title": "%AWS.command.amazonq.sendToPrompt%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.generateUnitTests",
- "title": "%AWS.command.amazonq.generateUnitTests%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected && !aws.isSageMaker"
- },
- {
- "command": "aws.amazonq.reconnect",
- "title": "%AWS.command.codewhisperer.reconnect%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.openReferencePanel",
- "title": "%AWS.command.codewhisperer.openReferencePanel%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.showLogs",
- "title": "%AWS.command.codewhisperer.showLogs%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.selectRegionProfile",
- "title": "Change Profile",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.transformationHub.reviewChanges.acceptChanges",
- "title": "%AWS.command.q.transform.acceptChanges%"
- },
- {
- "command": "aws.amazonq.transformationHub.reviewChanges.rejectChanges",
- "title": "%AWS.command.q.transform.rejectChanges%"
- },
- {
- "command": "aws.amazonq.transformationHub.summary.reveal",
- "title": "%AWS.command.q.transform.showChangeSummary%",
- "enablement": "gumby.isSummaryAvailable"
- },
- {
- "command": "aws.amazonq.showTransformationPlanInHub",
- "title": "%AWS.command.q.transform.showTransformationPlan%",
- "enablement": "gumby.isPlanAvailable"
- },
- {
- "command": "aws.amazonq.createIssueOnGitHub",
- "title": "%AWS.command.createIssueOnGitHub%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.submitFeedback",
- "title": "%AWS.command.submitFeedback%",
- "enablement": "!aws.isWebExtHost",
- "category": "%AWS.amazonq.title%",
- "icon": "$(comment)"
- },
- {
- "command": "aws.amazonq.viewLogs",
- "title": "%AWS.command.viewLogs%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.github",
- "title": "%AWS.command.github%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.aboutExtension",
- "title": "%AWS.command.aboutToolkit%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.invokeInlineCompletion",
- "title": "%AWS.command.codewhisperer.title%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.configure",
- "title": "%AWS.command.codewhisperer.configure%",
- "category": "%AWS.amazonq.title%",
- "icon": "$(gear)"
- },
- {
- "command": "aws.amazonq.introduction",
- "title": "%AWS.command.codewhisperer.introduction%",
- "category": "%AWS.amazonq.title%",
- "icon": "$(question)"
- },
- {
- "command": "aws.amazonq.manageSubscription",
- "title": "%AWS.command.manageSubscription%",
- "category": "%AWS.amazonq.title%",
- "icon": "$(gear)",
- "enablement": "aws.codewhisperer.connected && !aws.amazonq.connectedSsoIdc"
- },
- {
- "command": "aws.amazonq.signout",
- "title": "%AWS.command.codewhisperer.signout%",
- "category": "%AWS.amazonq.title%",
- "icon": "$(debug-disconnect)",
- "enablement": "aws.codewhisperer.connected && !aws.isSageMakerUnifiedStudio"
- },
- {
- "command": "aws.amazonq.learnMore",
- "title": "%AWS.amazonq.learnMore%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "amazonq.dev.openMenu",
- "title": "Open Developer Menu",
- "category": "Amazon Q (Developer)",
- "enablement": "aws.isDevMode"
- },
- {
- "command": "aws.amazonq.stopTransformationInHub",
- "title": "%AWS.command.q.transform.stopJobInHub%",
- "enablement": "gumby.isStopButtonAvailable"
- },
- {
- "command": "aws.amazonq.showPlanProgressInHub",
- "title": "%AWS.command.q.transform.viewJobProgress%"
- },
- {
- "command": "aws.amazonq.showHistoryInHub",
- "title": "%AWS.command.q.transform.viewJobHistory%"
- },
- {
- "command": "aws.amazonq.selectCustomization",
- "title": "%AWS.codewhisperer.customization.notification.new_customizations.select%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.gettingStarted",
- "title": "Try inline suggestion examples",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.toggleCodeSuggestion",
- "title": "%AWS.amazonq.toggleCodeSuggestion%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.codeWhisperer.toggleCodeScan",
- "title": "%AWS.amazonq.toggleCodeScan%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.securityIssuesTreeFilter.clearFilters",
- "title": "Clear Filters",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.security.generateFix",
- "title": "%AWS.command.amazonq.generateFix%",
- "icon": "$(wrench)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.applySecurityFix",
- "title": "%AWS.command.amazonq.acceptFix%",
- "icon": "$(check)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.security.regenerateFix",
- "title": "%AWS.command.amazonq.regenerateFix%",
- "icon": "$(lightbulb-autofix)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.openSecurityIssuePanel",
- "title": "%AWS.command.amazonq.viewDetails%",
- "icon": "$(search)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.security.explain",
- "title": "%AWS.command.amazonq.explainIssue%",
- "icon": "$(search)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.security.ignore",
- "title": "%AWS.command.amazonq.ignoreIssue%",
- "icon": "$(circle-slash)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.security.ignoreAll",
- "title": "%AWS.command.amazonq.ignoreAllIssues%",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.security.showFilters",
- "title": "%AWS.command.amazonq.filterIssues%",
- "icon": "$(filter)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.codescan.showGroupingStrategy",
- "title": "%AWS.command.amazonq.groupIssues%",
- "icon": "$(list-filter)",
- "enablement": "view == aws.amazonq.SecurityIssuesTree"
- },
- {
- "command": "aws.amazonq.inline.invokeChat",
- "title": "%AWS.amazonq.inline.invokeChat%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.focusChat",
- "title": "%AWS.amazonq.openChat%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.walkthrough.show",
- "title": "%AWS.amazonq.welcomeWalkthrough%"
- },
- {
- "command": "aws.amazonq.clearCache",
- "title": "%AWS.amazonq.clearCache%",
- "category": "%AWS.amazonq.title%"
- },
- {
- "command": "aws.amazonq.inline.acceptEdit",
- "title": "%AWS.amazonq.inline.acceptEdit%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.inline.rejectEdit",
- "title": "%AWS.amazonq.inline.rejectEdit%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.toggleNextEditPredictionPanel",
- "title": "%AWS.amazonq.toggleNextEditPredictionPanel%",
- "category": "%AWS.amazonq.title%",
- "enablement": "aws.codewhisperer.connected"
- }
- ],
- "keybindings": [
- {
- "command": "aws.amazonq.stopCmdExecution",
- "key": "ctrl+shift+backspace",
- "mac": "cmd+shift+backspace",
- "when": "aws.amazonq.amazonqChatLSP.isFocus"
- },
- {
- "command": "aws.amazonq.runCmdExecution",
- "key": "ctrl+shift+enter",
- "mac": "cmd+shift+enter",
- "when": "aws.amazonq.amazonqChatLSP.isFocus"
- },
- {
- "command": "aws.amazonq.rejectCmdExecution",
- "key": "ctrl+shift+r",
- "mac": "cmd+shift+r",
- "when": "aws.amazonq.amazonqChatLSP.isFocus"
- },
- {
- "command": "_aws.amazonq.focusChat.keybinding",
- "win": "win+alt+i",
- "mac": "cmd+alt+i",
- "linux": "meta+alt+i"
- },
- {
- "command": "aws.amazonq.inline.debugAcceptEdit",
- "key": "ctrl+alt+a",
- "mac": "cmd+alt+a",
- "when": "editorTextFocus"
- },
- {
- "command": "aws.amazonq.inline.debugRejectEdit",
- "key": "ctrl+alt+r",
- "mac": "cmd+alt+r",
- "when": "editorTextFocus"
- },
- {
- "command": "aws.amazonq.explainCode",
- "win": "win+alt+e",
- "mac": "cmd+alt+e",
- "linux": "meta+alt+e"
- },
- {
- "command": "aws.amazonq.refactorCode",
- "win": "win+alt+u",
- "mac": "cmd+alt+u",
- "linux": "meta+alt+u"
- },
- {
- "command": "aws.amazonq.fixCode",
- "win": "win+alt+h",
- "mac": "cmd+alt+y",
- "linux": "meta+alt+y"
- },
- {
- "command": "aws.amazonq.optimizeCode",
- "win": "win+alt+a",
- "mac": "cmd+alt+a",
- "linux": "meta+alt+a"
- },
- {
- "command": "aws.amazonq.sendToPrompt",
- "key": "win+alt+q",
- "mac": "cmd+alt+q",
- "linux": "meta+alt+q"
- },
- {
- "command": "aws.amazonq.generateUnitTests",
- "key": "win+alt+n",
- "mac": "cmd+alt+t",
- "linux": "meta+alt+t"
- },
- {
- "command": "aws.amazonq.invokeInlineCompletion",
- "key": "alt+c",
- "mac": "alt+c",
- "when": "editorTextFocus && aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.rejectCodeSuggestion",
- "key": "escape",
- "mac": "escape",
- "when": "inlineSuggestionVisible && !editorReadonly && aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.dismissTutorial",
- "key": "escape",
- "mac": "escape",
- "when": "aws.codewhisperer.tutorial.workInProgress && !inlineSuggestionVisible && !suggestWidgetVisible"
- },
- {
- "key": "right",
- "command": "aws.amazonq.showNext",
- "when": "inlineSuggestionVisible && !editorReadonly && aws.codewhisperer.connected"
- },
- {
- "key": "left",
- "command": "aws.amazonq.showPrev",
- "when": "inlineSuggestionVisible && !editorReadonly && aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.checkInlineSuggestionVisibility",
- "when": "inlineSuggestionVisible && !editorReadonly && aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.inline.invokeChat",
- "win": "ctrl+i",
- "mac": "cmd+i",
- "linux": "ctrl+i",
- "when": "editorTextFocus && aws.codewhisperer.connected"
- },
- {
- "command": "aws.amazonq.inline.waitForUserDecisionAcceptAll",
- "key": "enter",
- "when": "editorTextFocus && aws.codewhisperer.connected && amazonq.inline.codelensShortcutEnabled"
- },
- {
- "command": "aws.amazonq.inline.waitForUserDecisionRejectAll",
- "key": "escape",
- "when": "editorTextFocus && aws.codewhisperer.connected && amazonq.inline.codelensShortcutEnabled"
- },
- {
- "command": "aws.amazonq.inline.acceptEdit",
- "key": "tab",
- "when": "editorTextFocus && aws.amazonq.editSuggestionActive"
- },
- {
- "command": "aws.amazonq.inline.rejectEdit",
- "key": "escape",
- "when": "editorTextFocus && aws.amazonq.editSuggestionActive"
- }
- ],
- "icons": {
- "aws-amazonq-q-gradient": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1aa"
- }
- },
- "aws-amazonq-q-squid-ink": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ab"
- }
- },
- "aws-amazonq-q-white": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ac"
- }
- },
- "aws-amazonq-severity-critical": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ad"
- }
- },
- "aws-amazonq-severity-high": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ae"
- }
- },
- "aws-amazonq-severity-info": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1af"
- }
- },
- "aws-amazonq-severity-low": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b0"
- }
- },
- "aws-amazonq-severity-medium": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b1"
- }
- },
- "aws-amazonq-transform-arrow-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b2"
- }
- },
- "aws-amazonq-transform-arrow-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b3"
- }
- },
- "aws-amazonq-transform-default-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b4"
- }
- },
- "aws-amazonq-transform-default-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b5"
- }
- },
- "aws-amazonq-transform-dependencies-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b6"
- }
- },
- "aws-amazonq-transform-dependencies-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b7"
- }
- },
- "aws-amazonq-transform-file-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b8"
- }
- },
- "aws-amazonq-transform-file-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1b9"
- }
- },
- "aws-amazonq-transform-logo": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ba"
- }
- },
- "aws-amazonq-transform-step-into-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1bb"
- }
- },
- "aws-amazonq-transform-step-into-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1bc"
- }
- },
- "aws-amazonq-transform-variables-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1bd"
- }
- },
- "aws-amazonq-transform-variables-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1be"
- }
- },
- "aws-applicationcomposer-icon": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1bf"
- }
- },
- "aws-applicationcomposer-icon-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c0"
- }
- },
- "aws-apprunner-service": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c1"
- }
- },
- "aws-cdk-logo": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c2"
- }
- },
- "aws-cloudformation-stack": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c3"
- }
- },
- "aws-cloudwatch-log-group": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c4"
- }
- },
- "aws-codecatalyst-logo": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c5"
- }
- },
- "aws-codewhisperer-icon-black": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c6"
- }
- },
- "aws-codewhisperer-icon-white": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c7"
- }
- },
- "aws-codewhisperer-learn": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c8"
- }
- },
- "aws-ecr-registry": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1c9"
- }
- },
- "aws-ecs-cluster": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ca"
- }
- },
- "aws-ecs-container": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1cb"
- }
- },
- "aws-ecs-service": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1cc"
- }
- },
- "aws-generic-attach-file": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1cd"
- }
- },
- "aws-iot-certificate": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ce"
- }
- },
- "aws-iot-policy": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1cf"
- }
- },
- "aws-iot-thing": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d0"
- }
- },
- "aws-lambda-create-stack": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d1"
- }
- },
- "aws-lambda-create-stack-light": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d2"
- }
- },
- "aws-lambda-deployed-function": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d3"
- }
- },
- "aws-lambda-function": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d4"
- }
- },
- "aws-lambda-invoke-remotely": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d5"
- }
- },
- "aws-mynah-MynahIconBlack": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d6"
- }
- },
- "aws-mynah-MynahIconWhite": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d7"
- }
- },
- "aws-mynah-logo": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d8"
- }
- },
- "aws-redshift-cluster": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1d9"
- }
- },
- "aws-redshift-cluster-connected": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1da"
- }
- },
- "aws-redshift-database": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1db"
- }
- },
- "aws-redshift-redshift-cluster-connected": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1dc"
- }
- },
- "aws-redshift-schema": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1dd"
- }
- },
- "aws-redshift-table": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1de"
- }
- },
- "aws-s3-bucket": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1df"
- }
- },
- "aws-s3-create-bucket": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e0"
- }
- },
- "aws-sagemaker-code-editor": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e1"
- }
- },
- "aws-sagemaker-jupyter-lab": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e2"
- }
- },
- "aws-sagemakerunifiedstudio-catalog": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e3"
- }
- },
- "aws-sagemakerunifiedstudio-spaces": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e4"
- }
- },
- "aws-sagemakerunifiedstudio-spaces-dark": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e5"
- }
- },
- "aws-sagemakerunifiedstudio-symbol-int": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e6"
- }
- },
- "aws-sagemakerunifiedstudio-table": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e7"
- }
- },
- "aws-schemas-registry": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e8"
- }
- },
- "aws-schemas-schema": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1e9"
- }
- },
- "aws-stepfunctions-preview": {
- "description": "AWS Contributed Icon",
- "default": {
- "fontPath": "./resources/fonts/aws-toolkit-icons.woff",
- "fontCharacter": "\\f1ea"
- }
- }
- },
- "walkthroughs": [
- {
- "id": "aws.amazonq.walkthrough",
- "title": "Meet Amazon Q",
- "description": "Your generative AI-powered assistant across the software development lifecycle.",
- "steps": [
- {
- "id": "aws.amazonq.walkthrough.inlineSuggestions",
- "title": "Get inline code suggestions",
- "description": "Amazon Q suggests code as you type based on your open files. Accepted suggestions from licensed code will go into the Code Reference Log.\n\n[Try Example](command:_aws.amazonq.walkthrough.inlineSuggestionsExample)\n\n**TIP: Invoke manually with opt/alt + c**",
- "media": {
- "markdown": "./resources/walkthrough/amazonq/inline.md"
- },
- "completionEvents": [
- "onCommand:_aws.amazonq.walkthrough.inlineSuggestionsExample"
- ]
- },
- {
- "id": "aws.amazonq.walkthrough.chat",
- "title": "Ask using chat",
- "description": "Amazon Q answers software development questions, writes code based on your current file, and cites sources.\n\nUse the right-click menu for quick commands.\n\n**TIP: Drag and drop the Q panel to dock on the right**",
- "media": {
- "markdown": "./resources/walkthrough/amazonq/chat.md"
- },
- "completionEvents": []
- },
- {
- "id": "aws.amazonq.walkthrough.settings",
- "title": "Access actions and options",
- "description": "Pause inline suggestions, open the Code Reference Log, access Settings, and more from the Amazon Q menu.\n\n[Open the status bar menu](command:_aws.amazonq.walkthrough.listCommands)",
- "media": {
- "markdown": "./resources/walkthrough/amazonq/menu.md"
- },
- "completionEvents": [
- "onCommand:_aws.amazonq.walkthrough.listCommands"
- ]
- }
- ]
- }
- ]
- },
- "engines": {
- "npm": "^10.1.0",
- "vscode": "^1.83.0"
- }
-}
diff --git a/packages/amazonq/scripts/build/copyFiles.ts b/packages/amazonq/scripts/build/copyFiles.ts
deleted file mode 100644
index 45b1d263f0b..00000000000
--- a/packages/amazonq/scripts/build/copyFiles.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-/* eslint-disable no-restricted-imports */
-import fs from 'fs'
-import * as path from 'path'
-
-// Moves all dependencies into `dist`
-
-const projectRoot = process.cwd()
-const outRoot = path.join(projectRoot, 'dist')
-let vueHr = false
-
-// The target file or directory must exist, otherwise we should fail the whole build.
-interface CopyTask {
- /**
- * Target file or directory to copy.
- */
- readonly target: string
-
- /**
- * Providing no destination means the target will be copied relative to the root directory.
- */
- readonly destination?: string
-}
-
-const tasks: CopyTask[] = [
- ...['LICENSE', 'NOTICE'].map((f) => {
- return { target: path.join('../../', f), destination: path.join(projectRoot, f) }
- }),
-
- { target: path.join('../core', 'resources'), destination: path.join('..', 'resources') },
- {
- target: path.join('../core', 'package.nls.json'),
- destination: path.join('..', 'package.nls.json'),
- },
- { target: 'test/unit/amazonqGumby/resources' },
-
- // Vue
- {
- target: '../core/src/auth/sso/vue',
- destination: 'src/auth/sso/vue',
- },
- {
- target: path.join('../core', 'resources', 'js', 'vscode.js'),
- destination: path.join('libs', 'vscode.js'),
- },
- {
- target: path.join('../../node_modules', 'vue', 'dist', 'vue.global.prod.js'),
- destination: path.join('libs', 'vue.min.js'),
- },
- {
- target: path.join('../../node_modules', 'aws-core-vscode', 'dist', vueHr ? 'vuehr' : 'vue'),
- destination: 'vue/',
- },
-
- {
- target: path.join('../../node_modules', 'web-tree-sitter', 'tree-sitter.wasm'),
- destination: path.join('src', 'tree-sitter.wasm'),
- },
-]
-
-function copy(task: CopyTask): void {
- const src = path.resolve(projectRoot, task.target)
- const dst = path.resolve(outRoot, task.destination ?? task.target)
-
- try {
- fs.cpSync(src, dst, {
- recursive: true,
- force: true,
- errorOnExist: false,
- })
- } catch (error) {
- throw new Error(`Copy "${src}" to "${dst}" failed: ${error instanceof Error ? error.message : error}`)
- }
-}
-
-const args = process.argv.slice(2)
-if (args.includes('--vueHr')) {
- vueHr = true
- console.log('Using Vue Hot Reload webpacks from core/')
-}
-
-function main() {
- try {
- tasks.map(copy)
- } catch (error) {
- console.error('`copyFiles.ts` failed')
- console.error(error)
- process.exit(1)
- }
-}
-
-void main()
diff --git a/packages/amazonq/src/api.ts b/packages/amazonq/src/api.ts
deleted file mode 100644
index 03b2a32ea55..00000000000
--- a/packages/amazonq/src/api.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { SendMessageCommandOutput, SendMessageRequest } from '@amzn/amazon-q-developer-streaming-client'
-import { GenerateAssistantResponseCommandOutput, GenerateAssistantResponseRequest } from '@amzn/codewhisperer-streaming'
-import { AuthUtil } from 'aws-core-vscode/codewhisperer'
-import { ChatSession } from 'aws-core-vscode/codewhispererChat'
-import { api } from 'aws-core-vscode/amazonq'
-
-export default {
- chatApi: {
- async chat(request: GenerateAssistantResponseRequest): Promise {
- const chatSession = new ChatSession()
- return chatSession.chatSso(request)
- },
- async chatIam(request: SendMessageRequest): Promise {
- const chatSession = new ChatSession()
- return chatSession.chatIam(request)
- },
- },
- authApi: {
- async reauthIfNeeded() {
- if (AuthUtil.instance.isConnectionExpired()) {
- await AuthUtil.instance.showReauthenticatePrompt()
- }
- },
- async getChatAuthState() {
- return AuthUtil.instance.getChatAuthState()
- },
- },
-} satisfies api
diff --git a/packages/amazonq/src/app/amazonqScan/app.ts b/packages/amazonq/src/app/amazonqScan/app.ts
deleted file mode 100644
index bd12e3acd01..00000000000
--- a/packages/amazonq/src/app/amazonqScan/app.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import { AmazonQAppInitContext, MessageListener } from 'aws-core-vscode/amazonq'
-import { AuthUtil, codeScanState, onDemandFileScanState } from 'aws-core-vscode/codewhisperer'
-import { ScanChatControllerEventEmitters, ChatSessionManager } from 'aws-core-vscode/amazonqScan'
-import { ScanController } from './chat/controller/controller'
-import { AppToWebViewMessageDispatcher } from './chat/views/connector/connector'
-import { Messenger } from './chat/controller/messenger/messenger'
-import { UIMessageListener } from './chat/views/actions/uiMessageListener'
-import { debounce } from 'lodash'
-
-export function init(appContext: AmazonQAppInitContext) {
- const scanChatControllerEventEmitters: ScanChatControllerEventEmitters = {
- authClicked: new vscode.EventEmitter(),
- tabOpened: new vscode.EventEmitter(),
- tabClosed: new vscode.EventEmitter(),
- runScan: new vscode.EventEmitter(),
- formActionClicked: new vscode.EventEmitter(),
- errorThrown: new vscode.EventEmitter(),
- showSecurityScan: new vscode.EventEmitter(),
- scanStopped: new vscode.EventEmitter(),
- followUpClicked: new vscode.EventEmitter(),
- scanProgress: new vscode.EventEmitter(),
- processResponseBodyLinkClick: new vscode.EventEmitter(),
- fileClicked: new vscode.EventEmitter(),
- scanCancelled: new vscode.EventEmitter(),
- processChatItemVotedMessage: new vscode.EventEmitter(),
- }
- const dispatcher = new AppToWebViewMessageDispatcher(appContext.getAppsToWebViewMessagePublisher())
- const messenger = new Messenger(dispatcher)
-
- new ScanController(scanChatControllerEventEmitters, messenger, appContext.onDidChangeAmazonQVisibility.event)
-
- const scanChatUIInputEventEmitter = new vscode.EventEmitter()
-
- new UIMessageListener({
- chatControllerEventEmitters: scanChatControllerEventEmitters,
- webViewMessageListener: new MessageListener(scanChatUIInputEventEmitter),
- })
-
- const debouncedEvent = debounce(async () => {
- const authenticated = (await AuthUtil.instance.getChatAuthState()).amazonQ === 'connected'
- let authenticatingSessionID = ''
-
- if (authenticated) {
- const session = ChatSessionManager.Instance.getSession()
-
- if (session.isTabOpen() && session.isAuthenticating) {
- authenticatingSessionID = session.tabID!
- session.isAuthenticating = false
- }
- }
-
- messenger.sendAuthenticationUpdate(authenticated, [authenticatingSessionID])
- }, 500)
-
- AuthUtil.instance.secondaryAuth.onDidChangeActiveConnection(() => {
- return debouncedEvent()
- })
- AuthUtil.instance.regionProfileManager.onDidChangeRegionProfile(() => {
- return debouncedEvent()
- })
-
- codeScanState.setChatControllers(scanChatControllerEventEmitters)
- onDemandFileScanState.setChatControllers(scanChatControllerEventEmitters)
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/controller/controller.ts b/packages/amazonq/src/app/amazonqScan/chat/controller/controller.ts
deleted file mode 100644
index 72af0a200c5..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/controller/controller.ts
+++ /dev/null
@@ -1,372 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- *
- * This class is responsible for responding to UI events by calling
- * the Scan extension.
- */
-import * as vscode from 'vscode'
-import { AuthController } from 'aws-core-vscode/amazonq'
-import { getLogger, placeholder, i18n, openUrl, fs, TabTypeDataMap, randomUUID } from 'aws-core-vscode/shared'
-import { ScanChatControllerEventEmitters, Session, ChatSessionManager } from 'aws-core-vscode/amazonqScan'
-import {
- AggregatedCodeScanIssue,
- AuthUtil,
- CodeAnalysisScope,
- codeScanState,
- isGitRepo,
- onDemandFileScanState,
- SecurityScanError,
- SecurityScanStep,
- showFileScan,
- showSecurityScan,
-} from 'aws-core-vscode/codewhisperer'
-import { Messenger, ScanNamedMessages } from './messenger/messenger'
-import MessengerUtils from './messenger/messengerUtils'
-import {
- cancellingProgressField,
- fileScanProgressField,
- projectScanProgressField,
- ScanAction,
- scanProgressMessage,
- scanSummaryMessage,
-} from '../../models/constants'
-import path from 'path'
-import { telemetry } from 'aws-core-vscode/telemetry'
-
-export class ScanController {
- private readonly messenger: Messenger
- private readonly sessionStorage: ChatSessionManager
- private authController: AuthController
-
- public constructor(
- private readonly chatControllerMessageListeners: ScanChatControllerEventEmitters,
- messenger: Messenger,
- onDidChangeAmazonQVisibility: vscode.Event
- ) {
- this.messenger = messenger
- this.sessionStorage = ChatSessionManager.Instance
- this.authController = new AuthController()
-
- this.chatControllerMessageListeners.tabOpened.event((data) => {
- return this.tabOpened(data)
- })
-
- this.chatControllerMessageListeners.tabClosed.event((data) => {
- return this.tabClosed(data)
- })
-
- this.chatControllerMessageListeners.authClicked.event((data) => {
- this.authClicked(data)
- })
-
- this.chatControllerMessageListeners.runScan.event((data) => {
- return this.scanInitiated(data)
- })
-
- this.chatControllerMessageListeners.formActionClicked.event((data) => {
- return this.formActionClicked(data)
- })
-
- this.chatControllerMessageListeners.errorThrown.event((data) => {
- return this.handleError(data)
- })
-
- this.chatControllerMessageListeners.showSecurityScan.event((data) => {
- return this.handleScanResults(data)
- })
-
- this.chatControllerMessageListeners.scanStopped.event((data) => {
- return this.handleScanStopped(data)
- })
-
- this.chatControllerMessageListeners.followUpClicked.event((data) => {
- return this.handleFollowUpClicked(data)
- })
-
- this.chatControllerMessageListeners.scanProgress.event((data) => {
- return this.handleScanProgress(data)
- })
-
- this.chatControllerMessageListeners.processResponseBodyLinkClick.event((data) => {
- return this.processLink(data)
- })
-
- this.chatControllerMessageListeners.fileClicked.event((data) => {
- return this.processFileClick(data)
- })
-
- this.chatControllerMessageListeners.scanCancelled.event((data) => {
- return this.handleScanCancelled(data)
- })
-
- this.chatControllerMessageListeners.processChatItemVotedMessage.event((data) => {
- telemetry.amazonq_feedback.emit({
- featureId: 'amazonQReview',
- amazonqConversationId: this.sessionStorage.getSession().scanUuid,
- credentialStartUrl: AuthUtil.instance.startUrl,
- interactionType: data.vote,
- })
- })
-
- AuthUtil.instance.regionProfileManager.onDidChangeRegionProfile(() => {
- this.sessionStorage.removeActiveTab()
- })
- }
-
- private async tabOpened(message: any) {
- const session: Session = this.sessionStorage.getSession()
- const tabID = this.sessionStorage.setActiveTab(message.tabID)
-
- // check if authentication has expired
- try {
- getLogger().debug(`Q - Review: Session created with id: ${session.tabID}`)
-
- const authState = await AuthUtil.instance.getChatAuthState()
- if (authState.amazonQ !== 'connected') {
- void this.messenger.sendAuthNeededExceptionMessage(authState, tabID)
- session.isAuthenticating = true
- return
- }
- } catch (err: any) {
- this.messenger.sendErrorMessage(err.message, message.tabID)
- }
- }
-
- private async tabClosed(data: any) {
- this.sessionStorage.removeActiveTab()
- }
-
- private authClicked(message: any) {
- this.authController.handleAuth(message.authType)
-
- this.messenger.sendAnswer({
- type: 'answer',
- tabID: message.tabID,
- message: 'Follow instructions to re-authenticate ...',
- })
-
- // Explicitly ensure the user goes through the re-authenticate flow
- this.messenger.sendChatInputEnabled(message.tabID, false)
- }
-
- private async scanInitiated(message: any) {
- const session: Session = this.sessionStorage.getSession()
- try {
- // check that a project is open
- const workspaceFolders = vscode.workspace.workspaceFolders
- if (workspaceFolders === undefined || workspaceFolders.length === 0) {
- this.messenger.sendChatInputEnabled(message.tabID, false)
- this.messenger.sendErrorResponse('no-project-found', message.tabID)
- return
- }
- // check that the session is authenticated
- const authState = await AuthUtil.instance.getChatAuthState()
- if (authState.amazonQ !== 'connected') {
- void this.messenger.sendAuthNeededExceptionMessage(authState, message.tabID)
- session.isAuthenticating = true
- return
- }
- this.messenger.sendPromptMessage({
- tabID: message.tabID,
- message: i18n('AWS.amazonq.scans.runCodeScan'),
- })
- this.messenger.sendCapabilityCard({ tabID: message.tabID })
- // Displaying types of scans and wait for user input
- this.messenger.sendUpdatePlaceholder(message.tabID, i18n('AWS.amazonq.scans.waitingForInput'))
-
- this.messenger.sendScans(message.tabID, i18n('AWS.amazonq.scans.chooseScan.description'))
- } catch (e: any) {
- this.messenger.sendErrorMessage(e.message, message.tabID)
- }
- }
-
- private async formActionClicked(message: any) {
- const typedAction = MessengerUtils.stringToEnumValue(ScanAction, message.action as any)
- switch (typedAction) {
- case ScanAction.STOP_PROJECT_SCAN:
- codeScanState.setToCancelling()
- this.messenger.sendUpdatePromptProgress(message.tabID, cancellingProgressField)
- break
- case ScanAction.STOP_FILE_SCAN:
- onDemandFileScanState.setToCancelling()
- this.messenger.sendUpdatePromptProgress(message.tabID, cancellingProgressField)
- break
- }
- }
-
- private async handleError(message: {
- error: SecurityScanError
- tabID: string
- scope: CodeAnalysisScope
- fileName: string | undefined
- scanUuid?: string
- }) {
- if (this.isNotMatchingId(message)) {
- return
- }
- if (message.error.code === 'NoSourceFilesError') {
- this.messenger.sendScanResults(message.tabID, message.scope, message.fileName, true)
- this.messenger.sendAnswer({
- tabID: message.tabID,
- type: 'answer',
- canBeVoted: true,
- message: scanSummaryMessage(message.scope, []),
- })
- } else {
- this.messenger.sendErrorResponse(message.error, message.tabID)
- }
- }
-
- private async handleScanResults(message: {
- error: Error
- totalIssues: number
- tabID: string
- securityRecommendationCollection: AggregatedCodeScanIssue[]
- scope: CodeAnalysisScope
- fileName: string
- scanUuid?: string
- }) {
- if (this.isNotMatchingId(message)) {
- return
- }
- this.messenger.sendScanResults(message.tabID, message.scope, message.fileName, true)
- this.messenger.sendAnswer({
- tabID: message.tabID,
- type: 'answer',
- canBeVoted: true,
- message: scanSummaryMessage(message.scope, message.securityRecommendationCollection),
- })
- }
-
- private async handleScanStopped(message: { tabID: string }) {
- this.messenger.sendUpdatePlaceholder(message.tabID, TabTypeDataMap.review.placeholder)
- // eslint-disable-next-line unicorn/no-null
- this.messenger.sendUpdatePromptProgress(message.tabID, null)
- this.messenger.sendChatInputEnabled(message.tabID, true)
- }
-
- private async handleFollowUpClicked(message: any) {
- switch (message.followUp.type) {
- case ScanAction.RUN_PROJECT_SCAN: {
- this.messenger.sendPromptMessage({
- tabID: message.tabID,
- message: i18n('AWS.amazonq.scans.projectScan'),
- })
-
- const workspaceFolders = vscode.workspace.workspaceFolders ?? []
- for (const folder of workspaceFolders) {
- if (!(await isGitRepo(folder.uri))) {
- this.messenger.sendAnswer({
- tabID: message.tabID,
- type: 'answer',
- message: i18n('AWS.amazonq.scans.noGitRepo'),
- })
- break
- }
- }
-
- this.messenger.sendScanInProgress({
- type: 'answer-stream',
- tabID: message.tabID,
- canBeVoted: true,
- message: scanProgressMessage(0, CodeAnalysisScope.PROJECT),
- })
- this.messenger.sendUpdatePromptProgress(message.tabID, projectScanProgressField)
- const scanUuid = randomUUID()
- this.sessionStorage.getSession().scanUuid = scanUuid
- void showSecurityScan.execute(placeholder, 'amazonQChat', true, scanUuid)
- break
- }
- case ScanAction.RUN_FILE_SCAN: {
- // check if IDE has active file open.
- const activeEditor = vscode.window.activeTextEditor
- // also check all open editors and allow this to proceed if only one is open (even if not main focus)
- const allVisibleEditors = vscode.window.visibleTextEditors
- const openFileEditors = allVisibleEditors.filter((editor) => editor.document.uri.scheme === 'file')
- const hasOnlyOneOpenFileSplitView = openFileEditors.length === 1
- getLogger().debug(`hasOnlyOneOpenSplitView: ${hasOnlyOneOpenFileSplitView}`)
- // is not a file if the currently highlighted window is not a file, and there is either more than one or no file windows open
- const isNotFile = activeEditor?.document.uri.scheme !== 'file' && !hasOnlyOneOpenFileSplitView
- getLogger().debug(`activeEditor: ${activeEditor}, isNotFile: ${isNotFile}`)
- if (!activeEditor || isNotFile) {
- this.messenger.sendErrorResponse(
- isNotFile ? 'invalid-file-type' : 'no-open-file-found',
- message.tabID
- )
- this.messenger.sendUpdatePlaceholder(
- message.tabID,
- 'Please open and highlight a source code file in order run a code scan.'
- )
- this.messenger.sendChatInputEnabled(message.tabID, true)
- return
- }
- const fileEditorToTest = hasOnlyOneOpenFileSplitView ? openFileEditors[0] : activeEditor
- const fileName = fileEditorToTest.document.uri.fsPath
-
- this.messenger.sendPromptMessage({
- tabID: message.tabID,
- message: i18n('AWS.amazonq.scans.fileScan'),
- })
- this.messenger.sendScanInProgress({
- type: 'answer-stream',
- tabID: message.tabID,
- canBeVoted: true,
- message: scanProgressMessage(
- SecurityScanStep.GENERATE_ZIP - 1,
- CodeAnalysisScope.FILE_ON_DEMAND,
- fileName ? path.basename(fileName) : undefined
- ),
- })
- this.messenger.sendUpdatePromptProgress(message.tabID, fileScanProgressField)
- const scanUuid = randomUUID()
- this.sessionStorage.getSession().scanUuid = scanUuid
- void showFileScan.execute(placeholder, 'amazonQChat', scanUuid)
- break
- }
- }
- }
-
- private async handleScanProgress(message: any) {
- if (this.isNotMatchingId(message)) {
- return
- }
- this.messenger.sendAnswer({
- type: 'answer-part',
- tabID: message.tabID,
- messageID: ScanNamedMessages.SCAN_SUBMISSION_STATUS_MESSAGE,
- message: scanProgressMessage(
- message.step,
- message.scope,
- message.fileName ? path.basename(message.fileName) : undefined
- ),
- })
- }
-
- private processLink(message: any) {
- void openUrl(vscode.Uri.parse(message.link))
- }
-
- private async processFileClick(message: any) {
- const workspaceFolders = vscode.workspace.workspaceFolders ?? []
- for (const workspaceFolder of workspaceFolders) {
- const projectPath = workspaceFolder.uri.fsPath
- const filePathWithoutProjectName = message.filePath.split('/').slice(1).join('/')
- const absolutePath = path.join(projectPath, filePathWithoutProjectName)
- if (await fs.existsFile(absolutePath)) {
- const document = await vscode.workspace.openTextDocument(absolutePath)
- await vscode.window.showTextDocument(document)
- }
- }
- }
-
- private async handleScanCancelled(message: any) {
- this.messenger.sendAnswer({ type: 'answer', tabID: message.tabID, message: 'Cancelled' })
- }
-
- private isNotMatchingId(data: { scanUuid?: string }): boolean {
- const messagescanUuid = data.scanUuid
- const currentscanUuid = this.sessionStorage.getSession().scanUuid
- return Boolean(messagescanUuid) && Boolean(currentscanUuid) && messagescanUuid !== currentscanUuid
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messenger.ts b/packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messenger.ts
deleted file mode 100644
index 18b05e8bb84..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messenger.ts
+++ /dev/null
@@ -1,230 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- *
- * This class controls the presentation of the various chat bubbles presented by the
- * Q Security Scans.
- *
- * As much as possible, all strings used in the experience should originate here.
- */
-
-import { AuthFollowUpType, AuthMessageDataMap } from 'aws-core-vscode/amazonq'
-import {
- FeatureAuthState,
- SecurityScanError,
- CodeWhispererConstants,
- SecurityScanStep,
- DefaultCodeScanErrorMessage,
-} from 'aws-core-vscode/codewhisperer'
-import { ChatItemButton, ProgressField } from '@aws/mynah-ui/dist/static'
-import { MynahIcons, ChatItemAction } from '@aws/mynah-ui'
-import { ChatItemType } from 'aws-core-vscode/amazonq'
-import {
- AppToWebViewMessageDispatcher,
- AuthNeededException,
- AuthenticationUpdateMessage,
- CapabilityCardMessage,
- ChatInputEnabledMessage,
- ChatMessage,
- ChatPrompt,
- ErrorMessage,
- UpdatePlaceholderMessage,
- UpdatePromptProgressMessage,
-} from '../../views/connector/connector'
-import { i18n } from 'aws-core-vscode/shared'
-import { ScanAction, scanProgressMessage } from '../../../models/constants'
-import path from 'path'
-
-export type UnrecoverableErrorType = 'no-project-found' | 'no-open-file-found' | 'invalid-file-type'
-
-export enum ScanNamedMessages {
- SCAN_SUBMISSION_STATUS_MESSAGE = 'scanSubmissionMessage',
-}
-
-export class Messenger {
- public constructor(private readonly dispatcher: AppToWebViewMessageDispatcher) {}
-
- public sendAnswer(params: {
- message?: string
- type: ChatItemType
- tabID: string
- messageID?: string
- followUps?: ChatItemAction[]
- canBeVoted?: boolean
- }) {
- this.dispatcher.sendChatMessage(
- new ChatMessage(
- {
- message: params.message,
- messageType: params.type,
- messageId: params.messageID,
- followUps: params.followUps,
- canBeVoted: true,
- },
- params.tabID
- )
- )
- }
-
- public sendChatInputEnabled(tabID: string, enabled: boolean) {
- this.dispatcher.sendChatInputEnabled(new ChatInputEnabledMessage(tabID, enabled))
- }
-
- public sendUpdatePlaceholder(tabID: string, newPlaceholder: string) {
- this.dispatcher.sendUpdatePlaceholder(new UpdatePlaceholderMessage(tabID, newPlaceholder))
- }
-
- public sendUpdatePromptProgress(tabID: string, progressField: ProgressField | null) {
- this.dispatcher.sendUpdatePromptProgress(new UpdatePromptProgressMessage(tabID, progressField))
- }
-
- public async sendAuthNeededExceptionMessage(credentialState: FeatureAuthState, tabID: string) {
- let authType: AuthFollowUpType = 'full-auth'
- let message = AuthMessageDataMap[authType].message
-
- switch (credentialState.amazonQ) {
- case 'disconnected':
- authType = 'full-auth'
- message = AuthMessageDataMap[authType].message
- break
- case 'unsupported':
- authType = 'use-supported-auth'
- message = AuthMessageDataMap[authType].message
- break
- case 'expired':
- authType = 're-auth'
- message = AuthMessageDataMap[authType].message
- break
- }
-
- this.dispatcher.sendAuthNeededExceptionMessage(new AuthNeededException(message, authType, tabID))
- }
-
- public sendAuthenticationUpdate(scanEnabled: boolean, authenticatingTabIDs: string[]) {
- this.dispatcher.sendAuthenticationUpdate(new AuthenticationUpdateMessage(scanEnabled, authenticatingTabIDs))
- }
-
- public sendScanInProgress(params: {
- message?: string
- type: ChatItemType
- tabID: string
- messageID?: string
- canBeVoted?: boolean
- }) {
- this.dispatcher.sendChatMessage(
- new ChatMessage(
- {
- message: params.message,
- messageType: params.type,
- messageId: ScanNamedMessages.SCAN_SUBMISSION_STATUS_MESSAGE,
- canBeVoted: params.canBeVoted,
- },
- params.tabID
- )
- )
- }
-
- public sendErrorMessage(errorMessage: string, tabID: string) {
- this.dispatcher.sendErrorMessage(
- new ErrorMessage(CodeWhispererConstants.genericErrorMessage, errorMessage, tabID)
- )
- }
-
- public sendScanResults(
- tabID: string,
- scope: CodeWhispererConstants.CodeAnalysisScope,
- fileName?: string,
- canBeVoted?: boolean
- ) {
- this.dispatcher.sendChatMessage(
- new ChatMessage(
- {
- message: scanProgressMessage(
- SecurityScanStep.PROCESS_SCAN_RESULTS + 1,
- scope,
- fileName ? path.basename(fileName) : undefined
- ),
- messageType: 'answer-part',
- messageId: ScanNamedMessages.SCAN_SUBMISSION_STATUS_MESSAGE,
- canBeVoted: canBeVoted,
- },
- tabID
- )
- )
- }
-
- public sendErrorResponse(error: UnrecoverableErrorType | SecurityScanError, tabID: string) {
- let message = DefaultCodeScanErrorMessage
- const buttons: ChatItemButton[] = []
- if (typeof error === 'string') {
- switch (error) {
- case 'no-project-found': {
- // TODO: If required we can add "Open the Projects" button in the chat panel.
- message = CodeWhispererConstants.noOpenProjectsFound
- break
- }
- case 'no-open-file-found': {
- message = CodeWhispererConstants.noOpenFileFound
- break
- }
- case 'invalid-file-type': {
- message = CodeWhispererConstants.invalidFileTypeChatMessage
- break
- }
- }
- } else if (error.code === 'NoActiveFileError') {
- message = CodeWhispererConstants.noOpenFileFound
- } else if (error.code === 'ContentLengthError') {
- message = CodeWhispererConstants.ProjectSizeExceededErrorMessage
- } else if (error.code === 'NoSourceFilesError') {
- message = CodeWhispererConstants.noSourceFilesErrorMessage
- } else {
- message = error.customerFacingMessage
- }
- this.dispatcher.sendChatMessage(
- new ChatMessage(
- {
- message,
- messageType: 'answer',
- buttons,
- },
- tabID
- )
- )
- }
-
- public sendScans(tabID: string, message: string) {
- const followUps: ChatItemAction[] = []
- followUps.push({
- pillText: i18n('AWS.amazonq.scans.projectScan'),
- status: 'info',
- icon: 'folder' as MynahIcons,
- type: ScanAction.RUN_PROJECT_SCAN,
- })
- followUps.push({
- pillText: i18n('AWS.amazonq.scans.fileScan'),
- status: 'info',
- icon: 'file' as MynahIcons,
- type: ScanAction.RUN_FILE_SCAN,
- })
- this.dispatcher.sendChatMessage(
- new ChatMessage(
- {
- message,
- messageType: 'ai-prompt',
- followUps,
- },
- tabID
- )
- )
- }
-
- // This function shows selected scan type in the chat panel as a user input
- public sendPromptMessage(params: { tabID: string; message: string }) {
- this.dispatcher.sendPromptMessage(new ChatPrompt(params.message, params.tabID))
- }
-
- public sendCapabilityCard(params: { tabID: string }) {
- this.dispatcher.sendChatMessage(new CapabilityCardMessage(params.tabID))
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messengerUtils.ts b/packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messengerUtils.ts
deleted file mode 100644
index 455a4ebf4af..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/controller/messenger/messengerUtils.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- *
- */
-// TODO: Refactor the common functionality between Transform, FeatureDev, CWSPRChat, Scan and UTG to a new Folder.
-
-export default class MessengerUtils {
- static stringToEnumValue = (
- enumObject: T,
- value: `${T[K]}`
- ): T[K] => {
- if (Object.values(enumObject).includes(value)) {
- return value as unknown as T[K]
- } else {
- throw new Error('Value provided was not found in Enum')
- }
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/session/session.ts b/packages/amazonq/src/app/amazonqScan/chat/session/session.ts
deleted file mode 100644
index 1ca7e8d7362..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/session/session.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-export enum ConversationState {
- IDLE,
- JOB_SUBMITTED,
-}
-
-export class Session {
- // Used to keep track of whether or not the current session is currently authenticating/needs authenticating
- public isAuthenticating: boolean = false
-
- // A tab may or may not be currently open
- public tabID: string | undefined
-
- public conversationState: ConversationState = ConversationState.IDLE
-
- constructor() {}
-
- public isTabOpen(): boolean {
- return this.tabID !== undefined
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/storages/chatSession.ts b/packages/amazonq/src/app/amazonqScan/chat/storages/chatSession.ts
deleted file mode 100644
index b7df6eb0cc6..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/storages/chatSession.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- *
- */
-
-import { Session } from '../session/session'
-
-export class SessionNotFoundError extends Error {}
-
-export class ChatSessionManager {
- private static _instance: ChatSessionManager
- private activeSession: Session | undefined
-
- constructor() {}
-
- public static get Instance() {
- return this._instance || (this._instance = new this())
- }
-
- private createSession(): Session {
- this.activeSession = new Session()
- return this.activeSession
- }
-
- public getSession(): Session {
- if (this.activeSession === undefined) {
- return this.createSession()
- }
-
- return this.activeSession
- }
-
- public setActiveTab(tabID: string): string {
- if (this.activeSession !== undefined) {
- if (!this.activeSession.isTabOpen()) {
- this.activeSession.tabID = tabID
- return tabID
- }
- return this.activeSession.tabID!
- }
-
- throw new SessionNotFoundError()
- }
-
- public removeActiveTab(): void {
- if (this.activeSession !== undefined) {
- if (this.activeSession.isTabOpen()) {
- this.activeSession.tabID = undefined
- return
- }
- }
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/views/actions/uiMessageListener.ts b/packages/amazonq/src/app/amazonqScan/chat/views/actions/uiMessageListener.ts
deleted file mode 100644
index efa577313ab..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/views/actions/uiMessageListener.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { MessageListener, ExtensionMessage } from 'aws-core-vscode/amazonq'
-import { ScanChatControllerEventEmitters } from 'aws-core-vscode/amazonqScan'
-
-type UIMessage = ExtensionMessage & {
- tabID?: string
-}
-
-export interface UIMessageListenerProps {
- readonly chatControllerEventEmitters: ScanChatControllerEventEmitters
- readonly webViewMessageListener: MessageListener
-}
-
-export class UIMessageListener {
- private scanControllerEventsEmitters: ScanChatControllerEventEmitters | undefined
- private webViewMessageListener: MessageListener
-
- constructor(props: UIMessageListenerProps) {
- this.scanControllerEventsEmitters = props.chatControllerEventEmitters
- this.webViewMessageListener = props.webViewMessageListener
-
- // Now we are listening to events that get sent from amazonq/webview/actions/actionListener (e.g. the tab)
- this.webViewMessageListener.onMessage((msg) => {
- this.handleMessage(msg)
- })
- }
-
- private handleMessage(msg: ExtensionMessage) {
- switch (msg.command) {
- case 'new-tab-was-created':
- this.tabOpened(msg)
- break
- case 'tab-was-removed':
- this.tabClosed(msg)
- break
- case 'auth-follow-up-was-clicked':
- this.authClicked(msg)
- break
- case 'review':
- this.scan(msg)
- break
- case 'form-action-click':
- this.formActionClicked(msg)
- break
- case 'follow-up-was-clicked':
- this.followUpClicked(msg)
- break
- case 'response-body-link-click':
- this.processResponseBodyLinkClick(msg)
- break
- case 'file-click':
- this.processFileClick(msg)
- break
- case 'chat-item-voted':
- this.chatItemVoted(msg)
- break
- }
- }
-
- private scan(msg: UIMessage) {
- this.scanControllerEventsEmitters?.runScan.fire({
- tabID: msg.tabID,
- })
- }
-
- private formActionClicked(msg: UIMessage) {
- this.scanControllerEventsEmitters?.formActionClicked.fire({
- ...msg,
- })
- }
-
- private tabOpened(msg: UIMessage) {
- this.scanControllerEventsEmitters?.tabOpened.fire({
- tabID: msg.tabID,
- })
- }
-
- private tabClosed(msg: UIMessage) {
- this.scanControllerEventsEmitters?.tabClosed.fire({
- tabID: msg.tabID,
- })
- }
-
- private authClicked(msg: UIMessage) {
- this.scanControllerEventsEmitters?.authClicked.fire({
- tabID: msg.tabID,
- authType: msg.authType,
- })
- }
-
- private followUpClicked(msg: UIMessage) {
- this.scanControllerEventsEmitters?.followUpClicked.fire({
- followUp: msg.followUp,
- tabID: msg.tabID,
- })
- }
-
- private processResponseBodyLinkClick(msg: UIMessage) {
- this.scanControllerEventsEmitters?.processResponseBodyLinkClick.fire({
- command: msg.command,
- messageId: msg.messageId,
- tabID: msg.tabID,
- link: msg.link,
- })
- }
-
- private processFileClick(msg: UIMessage) {
- this.scanControllerEventsEmitters?.fileClicked.fire({
- tabID: msg.tabID,
- messageId: msg.messageId,
- filePath: msg.filePath,
- })
- }
-
- private chatItemVoted(msg: any) {
- this.scanControllerEventsEmitters?.processChatItemVotedMessage.fire({
- tabID: msg.tabID,
- command: msg.command,
- vote: msg.vote,
- })
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/chat/views/connector/connector.ts b/packages/amazonq/src/app/amazonqScan/chat/views/connector/connector.ts
deleted file mode 100644
index c906a401f91..00000000000
--- a/packages/amazonq/src/app/amazonqScan/chat/views/connector/connector.ts
+++ /dev/null
@@ -1,192 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { AuthFollowUpType, MessagePublisher, ChatItemType } from 'aws-core-vscode/amazonq'
-import { ScanMessageType } from 'aws-core-vscode/amazonqScan'
-import { ChatItemButton, ProgressField, ChatItemAction, ChatItemContent } from '@aws/mynah-ui/dist/static'
-import { scanChat } from '../../../models/constants'
-import { MynahIcons } from '@aws/mynah-ui'
-
-class UiMessage {
- readonly time: number = Date.now()
- readonly sender: string = scanChat
- readonly type: ScanMessageType = 'chatMessage'
- readonly status: string = 'info'
-
- public constructor(protected tabID: string) {}
-}
-
-export class AuthenticationUpdateMessage {
- readonly time: number = Date.now()
- readonly sender: string = scanChat
- readonly type: ScanMessageType = 'authenticationUpdateMessage'
-
- constructor(
- readonly scanEnabled: boolean,
- readonly authenticatingTabIDs: string[]
- ) {}
-}
-
-export class AuthNeededException extends UiMessage {
- override type: ScanMessageType = 'authNeededException'
-
- constructor(
- readonly message: string,
- readonly authType: AuthFollowUpType,
- tabID: string
- ) {
- super(tabID)
- }
-}
-
-export interface ChatMessageProps {
- readonly message: string | undefined
- readonly messageId?: string | undefined
- readonly messageType: ChatItemType
- readonly canBeVoted?: boolean
- readonly buttons?: ChatItemButton[]
- readonly followUps?: ChatItemAction[] | undefined
- readonly informationCard?: ChatItemContent['informationCard']
- readonly fileList?: ChatItemContent['fileList']
-}
-
-export class ChatMessage extends UiMessage {
- readonly message: string | undefined
- readonly messageId?: string | undefined
- readonly messageType: ChatItemType
- readonly canBeVoted?: boolean
- readonly buttons: ChatItemButton[]
- readonly followUps: ChatItemAction[] | undefined
- readonly informationCard: ChatItemContent['informationCard']
- readonly fileList: ChatItemContent['fileList']
- override type: ScanMessageType = 'chatMessage'
-
- constructor(props: ChatMessageProps, tabID: string) {
- super(tabID)
- this.message = props.message
- this.messageType = props.messageType
- this.buttons = props.buttons || []
- this.messageId = props.messageId || undefined
- this.followUps = props.followUps
- this.informationCard = props.informationCard || undefined
- this.fileList = props.fileList
- this.canBeVoted = props.canBeVoted || undefined
- }
-}
-
-export class CapabilityCardMessage extends ChatMessage {
- constructor(tabID: string) {
- super(
- {
- message: '',
- messageType: 'answer',
- informationCard: {
- title: '/review',
- description: 'Included in your Q Developer subscription',
- content: {
- body: `I can review your workspace for vulnerabilities and issues.
-
-After you begin a review, I will:
-1. Review all relevant code in your workspace or your current file
-2. Provide a list of issues for your review
-
-You can then investigate, fix, or ignore issues.
-
-To learn more, check out our [User Guide](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/security-scans.html).`,
- },
- icon: 'bug' as MynahIcons,
- },
- },
- tabID
- )
- }
-}
-
-export class ChatInputEnabledMessage extends UiMessage {
- override type: ScanMessageType = 'chatInputEnabledMessage'
-
- constructor(
- tabID: string,
- readonly enabled: boolean
- ) {
- super(tabID)
- }
-}
-
-export class UpdatePlaceholderMessage extends UiMessage {
- readonly newPlaceholder: string
- override type: ScanMessageType = 'updatePlaceholderMessage'
-
- constructor(tabID: string, newPlaceholder: string) {
- super(tabID)
- this.newPlaceholder = newPlaceholder
- }
-}
-
-export class UpdatePromptProgressMessage extends UiMessage {
- readonly progressField: ProgressField | null
- override type: ScanMessageType = 'updatePromptProgress'
- constructor(tabID: string, progressField: ProgressField | null) {
- super(tabID)
- this.progressField = progressField
- }
-}
-
-export class ErrorMessage extends UiMessage {
- override type: ScanMessageType = 'errorMessage'
- constructor(
- readonly title: string,
- readonly message: string,
- tabID: string
- ) {
- super(tabID)
- }
-}
-
-export class ChatPrompt extends UiMessage {
- readonly message: string | undefined
- readonly messageType = 'system-prompt'
- override type: ScanMessageType = 'chatPrompt'
- constructor(message: string | undefined, tabID: string) {
- super(tabID)
- this.message = message
- }
-}
-
-export class AppToWebViewMessageDispatcher {
- constructor(private readonly appsToWebViewMessagePublisher: MessagePublisher) {}
-
- public sendChatMessage(message: ChatMessage) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendUpdatePlaceholder(message: UpdatePlaceholderMessage) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendUpdatePromptProgress(message: UpdatePromptProgressMessage) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendAuthenticationUpdate(message: AuthenticationUpdateMessage) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendAuthNeededExceptionMessage(message: AuthNeededException) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendChatInputEnabled(message: ChatInputEnabledMessage) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendErrorMessage(message: ErrorMessage) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-
- public sendPromptMessage(message: ChatPrompt) {
- this.appsToWebViewMessagePublisher.publish(message)
- }
-}
diff --git a/packages/amazonq/src/app/amazonqScan/index.ts b/packages/amazonq/src/app/amazonqScan/index.ts
deleted file mode 100644
index c195193740b..00000000000
--- a/packages/amazonq/src/app/amazonqScan/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-export { default as MessengerUtils } from './chat/controller/messenger/messengerUtils'
-export { init as scanChatAppInit } from './app'
diff --git a/packages/amazonq/src/app/amazonqScan/models/constants.ts b/packages/amazonq/src/app/amazonqScan/models/constants.ts
deleted file mode 100644
index 4180b130b78..00000000000
--- a/packages/amazonq/src/app/amazonqScan/models/constants.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-import { ProgressField, MynahIcons, ChatItemButton } from '@aws/mynah-ui'
-import { AggregatedCodeScanIssue, CodeAnalysisScope, SecurityScanStep, severities } from 'aws-core-vscode/codewhisperer'
-import { i18n } from 'aws-core-vscode/shared'
-
-// For uniquely identifiying which chat messages should be routed to Scan
-export const scanChat = 'scanChat'
-
-export enum ScanAction {
- RUN_PROJECT_SCAN = 'runProjectScan',
- RUN_FILE_SCAN = 'runFileScan',
- STOP_PROJECT_SCAN = 'stopProjectScan',
- STOP_FILE_SCAN = 'stopFileScan',
-}
-
-export const cancelFileScanButton: ChatItemButton = {
- id: ScanAction.STOP_FILE_SCAN,
- text: i18n('AWS.generic.cancel'),
- icon: 'cancel' as MynahIcons,
-}
-
-export const cancelProjectScanButton: ChatItemButton = {
- ...cancelFileScanButton,
- id: ScanAction.STOP_PROJECT_SCAN,
-}
-
-export const fileScanProgressField: ProgressField = {
- status: 'default',
- text: i18n('AWS.amazonq.scans.fileScanInProgress'),
- value: -1,
- actions: [cancelFileScanButton],
-}
-
-export const projectScanProgressField: ProgressField = {
- ...fileScanProgressField,
- text: i18n('AWS.amazonq.scans.projectScanInProgress'),
- actions: [cancelProjectScanButton],
-}
-
-export const cancellingProgressField: ProgressField = {
- status: 'warning',
- text: i18n('AWS.generic.cancelling'),
- value: -1,
- actions: [],
-}
-
-const checkIcons = {
- wait: '☐',
- current: '☐',
- done: '☑',
-}
-export const scanProgressMessage = (
- currentStep: SecurityScanStep,
- scope: CodeAnalysisScope,
- fileName?: string
-) => `Okay, I'm reviewing ${scope === CodeAnalysisScope.PROJECT ? 'your project' : fileName ? `\`${fileName}\`` : 'your file'} for code issues.
-
-This may take a few minutes. I'll share my progress here.
-
-${getIconForStep(SecurityScanStep.CREATE_SCAN_JOB, currentStep)} Initiating code review
-
-${getIconForStep(SecurityScanStep.POLL_SCAN_STATUS, currentStep)} Reviewing your code
-
-${getIconForStep(SecurityScanStep.PROCESS_SCAN_RESULTS, currentStep)} Processing review results
-`
-
-export const scanSummaryMessage = (
- scope: CodeAnalysisScope,
- securityRecommendationCollection: AggregatedCodeScanIssue[]
-) => {
- const severityCounts = securityRecommendationCollection.reduce(
- (accumulator, current) => ({
- ...Object.fromEntries(
- severities.map((severity) => [
- severity,
- accumulator[severity] +
- current.issues.filter((issue) => issue.severity === severity && issue.visible).length,
- ])
- ),
- }),
- Object.fromEntries(severities.map((severity) => [severity, 0]))
- )
- return `I completed the code review. I found the following issues in your ${scope === CodeAnalysisScope.PROJECT ? 'workspace' : 'file'}:
-${Object.entries(severityCounts)
- .map(([severity, count]) => `- ${severity}: \`${count} ${count === 1 ? 'issue' : 'issues'}\``)
- .join('\n')}
-`
-}
-
-const getIconForStep = (targetStep: number, currentStep: number) => {
- return currentStep === targetStep
- ? checkIcons.current
- : currentStep > targetStep
- ? checkIcons.done
- : checkIcons.wait
-}
-
-export const codeReviewInChat = true
diff --git a/packages/amazonq/src/app/chat/activation.ts b/packages/amazonq/src/app/chat/activation.ts
deleted file mode 100644
index 7517d668497..00000000000
--- a/packages/amazonq/src/app/chat/activation.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import { ExtensionContext } from 'vscode'
-import { telemetry } from 'aws-core-vscode/telemetry'
-import { AuthUtil } from 'aws-core-vscode/codewhisperer'
-import { Commands, getLogger, placeholder } from 'aws-core-vscode/shared'
-import * as amazonq from 'aws-core-vscode/amazonq'
-
-export async function activate(context: ExtensionContext) {
- const appInitContext = amazonq.DefaultAmazonQAppInitContext.instance
- await amazonq.TryChatCodeLensProvider.register(appInitContext.onDidChangeAmazonQVisibility.event)
-
- context.subscriptions.push(
- amazonq.focusAmazonQChatWalkthrough.register(),
- amazonq.walkthroughInlineSuggestionsExample.register(),
- amazonq.openAmazonQWalkthrough.register(),
- amazonq.listCodeWhispererCommandsWalkthrough.register(),
- amazonq.focusAmazonQPanel.register(),
- amazonq.focusAmazonQPanelKeybinding.register(),
- amazonq.tryChatCodeLensCommand.register()
- )
-
- Commands.register('aws.amazonq.learnMore', () => {
- void vscode.env.openExternal(vscode.Uri.parse(amazonq.amazonQHelpUrl))
- })
-
- void setupAuthNotification()
-}
-
-/**
- * Display a notification to user for Log In.
- *
- * Authentication Notification is displayed when:
- * - User is not authenticated
- * - Once every session
- *
- */
-async function setupAuthNotification() {
- let notificationDisplayed = false // Auth Notification should be displayed only once.
- await tryShowNotification()
-
- async function tryShowNotification() {
- // Do not show the notification if the IDE starts and user is already authenticated.
- if (AuthUtil.instance.isConnected()) {
- notificationDisplayed = true
- }
-
- if (notificationDisplayed) {
- return
- }
-
- const source = 'authNotification'
- const buttonAction = 'Sign In'
- notificationDisplayed = true
-
- telemetry.toolkit_showNotification.emit({
- component: 'editor',
- id: source,
- reason: 'notLoggedIn',
- result: 'Succeeded',
- })
- const selection = await vscode.window.showWarningMessage('Start using Amazon Q', buttonAction)
-
- if (selection === buttonAction) {
- amazonq.focusAmazonQPanel.execute(placeholder, source).catch((e) => {
- getLogger().error('focusAmazonQPanel failed: %s', e)
- })
- }
- }
-}
diff --git a/packages/amazonq/src/app/chat/node/activateAgents.ts b/packages/amazonq/src/app/chat/node/activateAgents.ts
deleted file mode 100644
index cd0309d7f2d..00000000000
--- a/packages/amazonq/src/app/chat/node/activateAgents.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as amazonqNode from 'aws-core-vscode/amazonq/node'
-import { scanChatAppInit } from '../../amazonqScan'
-import { DefaultAmazonQAppInitContext } from 'aws-core-vscode/amazonq'
-
-export function activateAgents() {
- const appInitContext = DefaultAmazonQAppInitContext.instance
-
- amazonqNode.cwChatAppInit(appInitContext)
- amazonqNode.gumbyChatAppInit(appInitContext)
- scanChatAppInit(appInitContext)
-}
diff --git a/packages/amazonq/src/app/inline/EditRendering/diffUtils.ts b/packages/amazonq/src/app/inline/EditRendering/diffUtils.ts
deleted file mode 100644
index 7f9ca54b6aa..00000000000
--- a/packages/amazonq/src/app/inline/EditRendering/diffUtils.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-// TODO: deprecate this file in favor of core/shared/utils/diffUtils
-import { applyPatch } from 'diff'
-
-export type LineDiff =
- | { type: 'added'; content: string }
- | { type: 'removed'; content: string }
- | { type: 'modified'; before: string; after: string }
-
-/**
- * Apply a unified diff to original code to generate modified code
- * @param originalCode The original code as a string
- * @param unifiedDiff The unified diff content
- * @returns The modified code after applying the diff
- */
-export function applyUnifiedDiff(docText: string, unifiedDiff: string): string {
- try {
- // First try the standard diff package
- try {
- const result = applyPatch(docText, unifiedDiff)
- if (result !== false) {
- return result
- }
- } catch (error) {}
-
- // Parse the unified diff to extract the changes
- const diffLines = unifiedDiff.split('\n')
- let result = docText
-
- // Find all hunks in the diff
- const hunkStarts = diffLines
- .map((line, index) => (line.startsWith('@@ ') ? index : -1))
- .filter((index) => index !== -1)
-
- // Process each hunk
- for (const hunkStart of hunkStarts) {
- // Parse the hunk header
- const hunkHeader = diffLines[hunkStart]
- const match = hunkHeader.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/)
-
- if (!match) {
- continue
- }
-
- const oldStart = parseInt(match[1])
- const oldLines = parseInt(match[2])
-
- // Extract the content lines for this hunk
- let i = hunkStart + 1
- const contentLines = []
- while (i < diffLines.length && !diffLines[i].startsWith('@@')) {
- contentLines.push(diffLines[i])
- i++
- }
-
- // Build the old and new text
- let oldText = ''
- let newText = ''
-
- for (const line of contentLines) {
- if (line.startsWith('-')) {
- oldText += line.substring(1) + '\n'
- } else if (line.startsWith('+')) {
- newText += line.substring(1) + '\n'
- } else if (line.startsWith(' ')) {
- oldText += line.substring(1) + '\n'
- newText += line.substring(1) + '\n'
- }
- }
-
- // Remove trailing newline if it was added
- oldText = oldText.replace(/\n$/, '')
- newText = newText.replace(/\n$/, '')
-
- // Find the text to replace in the document
- const docLines = docText.split('\n')
- const startLine = oldStart - 1 // Convert to 0-based
- const endLine = startLine + oldLines
-
- // Extract the text that should be replaced
- const textToReplace = docLines.slice(startLine, endLine).join('\n')
-
- // Replace the text
- result = result.replace(textToReplace, newText)
- }
- return result
- } catch (error) {
- return docText // Return original text if all methods fail
- }
-}
diff --git a/packages/amazonq/src/app/inline/EditRendering/displayImage.ts b/packages/amazonq/src/app/inline/EditRendering/displayImage.ts
deleted file mode 100644
index df4841bacfd..00000000000
--- a/packages/amazonq/src/app/inline/EditRendering/displayImage.ts
+++ /dev/null
@@ -1,471 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { getLogger, setContext } from 'aws-core-vscode/shared'
-import * as vscode from 'vscode'
-import { applyPatch, diffLines } from 'diff'
-import { BaseLanguageClient } from 'vscode-languageclient'
-import { CodeWhispererSession } from '../sessionManager'
-import { LogInlineCompletionSessionResultsParams } from '@aws/language-server-runtimes/protocol'
-import { InlineCompletionItemWithReferences } from '@aws/language-server-runtimes/protocol'
-import path from 'path'
-import { imageVerticalOffset } from './svgGenerator'
-import { EditSuggestionState } from '../editSuggestionState'
-import type { AmazonQInlineCompletionItemProvider } from '../completion'
-import { vsCodeState } from 'aws-core-vscode/codewhisperer'
-
-const autoDiscardEditCursorDistance = 10
-
-export class EditDecorationManager {
- private imageDecorationType: vscode.TextEditorDecorationType
- private removedCodeDecorationType: vscode.TextEditorDecorationType
- private currentImageDecoration: vscode.DecorationOptions | undefined
- private currentRemovedCodeDecorations: vscode.DecorationOptions[] = []
- private acceptHandler: (() => void) | undefined
- private rejectHandler: ((isDiscard: boolean) => void) | undefined
-
- constructor() {
- this.registerCommandHandlers()
- this.imageDecorationType = vscode.window.createTextEditorDecorationType({
- isWholeLine: true,
- })
-
- this.removedCodeDecorationType = vscode.window.createTextEditorDecorationType({
- backgroundColor: 'rgba(255, 0, 0, 0.2)',
- })
- }
-
- private imageToDecoration(image: vscode.Uri, range: vscode.Range) {
- return {
- range,
- renderOptions: {
- after: {
- contentIconPath: image,
- verticalAlign: 'text-top',
- width: '100%',
- height: 'auto',
- margin: '1px 0',
- },
- },
- hoverMessage: new vscode.MarkdownString('Edit suggestion. Press [Tab] to accept or [Esc] to reject.'),
- }
- }
-
- /**
- * Highlights code that will be removed using the provided highlight ranges
- * @param editor The active text editor
- * @param startLine The line where the edit starts
- * @param highlightRanges Array of ranges specifying which parts to highlight
- * @returns Array of decoration options
- */
- private highlightRemovedLines(
- editor: vscode.TextEditor,
- startLine: number,
- highlightRanges: Array<{ line: number; start: number; end: number }>
- ): vscode.DecorationOptions[] {
- const decorations: vscode.DecorationOptions[] = []
-
- // Group ranges by line for more efficient processing
- const rangesByLine = new Map>()
-
- // Process each range and adjust line numbers relative to document
- for (const range of highlightRanges) {
- const documentLine = startLine + range.line
-
- // Skip if line is out of bounds
- if (documentLine >= editor.document.lineCount) {
- continue
- }
-
- // Add to ranges map, grouped by line
- if (!rangesByLine.has(documentLine)) {
- rangesByLine.set(documentLine, [])
- }
- rangesByLine.get(documentLine)!.push({
- start: range.start,
- end: range.end,
- })
- }
-
- // Process each line with ranges
- for (const [lineNumber, ranges] of rangesByLine.entries()) {
- const lineLength = editor.document.lineAt(lineNumber).text.length
-
- if (ranges.length === 0) {
- continue
- }
-
- // Check if we should highlight the entire line
- if (ranges.length === 1 && ranges[0].start === 0 && ranges[0].end >= lineLength) {
- // Highlight entire line
- const range = new vscode.Range(
- new vscode.Position(lineNumber, 0),
- new vscode.Position(lineNumber, lineLength)
- )
- decorations.push({ range })
- } else {
- // Create individual decorations for each range on this line
- for (const range of ranges) {
- const end = Math.min(range.end, lineLength)
- if (range.start < end) {
- const vsRange = new vscode.Range(
- new vscode.Position(lineNumber, range.start),
- new vscode.Position(lineNumber, end)
- )
- decorations.push({ range: vsRange })
- }
- }
- }
- }
-
- return decorations
- }
-
- /**
- * Displays an edit suggestion as an SVG image in the editor and highlights removed code
- */
- public async displayEditSuggestion(
- editor: vscode.TextEditor,
- svgImage: vscode.Uri,
- startLine: number,
- onAccept: () => Promise,
- onReject: (isDiscard: boolean) => Promise,
- originalCode: string,
- newCode: string,
- originalCodeHighlightRanges: Array<{ line: number; start: number; end: number }>
- ): Promise {
- // Clear old decorations but don't reset state (state is already set in displaySvgDecoration)
- editor.setDecorations(this.imageDecorationType, [])
- editor.setDecorations(this.removedCodeDecorationType, [])
- this.currentImageDecoration = undefined
- this.currentRemovedCodeDecorations = []
-
- this.acceptHandler = onAccept
- this.rejectHandler = onReject
-
- // Get the line text to determine the end position
- const lineText = editor.document.lineAt(Math.max(0, startLine - imageVerticalOffset)).text
- const endPosition = new vscode.Position(Math.max(0, startLine - imageVerticalOffset), lineText.length)
- const range = new vscode.Range(endPosition, endPosition)
-
- this.currentImageDecoration = this.imageToDecoration(svgImage, range)
-
- // Apply image decoration
- editor.setDecorations(this.imageDecorationType, [this.currentImageDecoration])
-
- // Highlight removed code with red background
- this.currentRemovedCodeDecorations = this.highlightRemovedLines(editor, startLine, originalCodeHighlightRanges)
- editor.setDecorations(this.removedCodeDecorationType, this.currentRemovedCodeDecorations)
- }
-
- /**
- * Clears all edit suggestion decorations
- */
- public async clearDecorations(editor: vscode.TextEditor, disposables: vscode.Disposable[]): Promise {
- for (const d of disposables) {
- d.dispose()
- }
- editor.setDecorations(this.imageDecorationType, [])
- editor.setDecorations(this.removedCodeDecorationType, [])
- this.currentImageDecoration = undefined
- this.currentRemovedCodeDecorations = []
- this.acceptHandler = undefined
- this.rejectHandler = undefined
- await setContext('aws.amazonq.editSuggestionActive' as any, false)
- EditSuggestionState.setEditSuggestionActive(false)
- }
-
- /**
- * Registers command handlers for accepting/rejecting suggestions
- */
- public registerCommandHandlers(): void {
- // Register Tab key handler for accepting suggestion
- vscode.commands.registerCommand('aws.amazonq.inline.acceptEdit', () => {
- if (this.acceptHandler) {
- this.acceptHandler()
- }
- })
-
- // Register Esc key handler for rejecting suggestion
- vscode.commands.registerCommand('aws.amazonq.inline.rejectEdit', (isDiscard: boolean = false) => {
- if (this.rejectHandler) {
- this.rejectHandler(isDiscard)
- }
- })
- }
-
- /**
- * Disposes resources
- */
- public dispose(): void {
- this.imageDecorationType.dispose()
- this.removedCodeDecorationType.dispose()
- }
-
- // Use process-wide singleton to prevent multiple instances on Windows
- static readonly decorationManagerKey = Symbol.for('aws.amazonq.decorationManager')
-
- static getDecorationManager(): EditDecorationManager {
- const globalObj = global as any
- if (!globalObj[this.decorationManagerKey]) {
- globalObj[this.decorationManagerKey] = new EditDecorationManager()
- }
- return globalObj[this.decorationManagerKey]
- }
-}
-
-export const decorationManager = EditDecorationManager.getDecorationManager()
-
-/**
- * Function to replace editor's content with new code
- */
-async function replaceEditorContent(editor: vscode.TextEditor, newCode: string): Promise {
- const document = editor.document
- const fullRange = new vscode.Range(
- 0,
- 0,
- document.lineCount - 1,
- document.lineAt(document.lineCount - 1).text.length
- )
-
- await editor.edit((editBuilder) => {
- editBuilder.replace(fullRange, newCode)
- })
-}
-
-/**
- * Calculates the end position of the actual edited content by finding the last changed part
- */
-function getEndOfEditPosition(originalCode: string, newCode: string): vscode.Position {
- const changes = diffLines(originalCode, newCode)
- let lineOffset = 0
-
- // Track the end position of the last added chunk
- let lastChangeEndLine = 0
- let lastChangeEndColumn = 0
- let foundAddedContent = false
-
- for (const part of changes) {
- if (part.added) {
- foundAddedContent = true
-
- // Calculate lines in this added part
- const lines = part.value.split('\n')
- const linesCount = lines.length
-
- // Update position to the end of this added chunk
- lastChangeEndLine = lineOffset + linesCount - 1
-
- // Get the length of the last line in this added chunk
- lastChangeEndColumn = lines[linesCount - 1].length
- }
-
- // Update line offset (skip removed parts)
- if (!part.removed) {
- const partLineCount = part.value.split('\n').length
- lineOffset += partLineCount - 1
- }
- }
-
- // If we found added content, return position at the end of the last addition
- if (foundAddedContent) {
- return new vscode.Position(lastChangeEndLine, lastChangeEndColumn)
- }
-
- // Fallback to current cursor position if no changes were found
- const editor = vscode.window.activeTextEditor
- return editor ? editor.selection.active : new vscode.Position(0, 0)
-}
-
-/**
- * Helper function to create discard telemetry params
- */
-function createDiscardTelemetryParams(
- session: CodeWhispererSession,
- item: InlineCompletionItemWithReferences
-): LogInlineCompletionSessionResultsParams {
- return {
- sessionId: session.sessionId,
- completionSessionResult: {
- [item.itemId]: {
- seen: false,
- accepted: false,
- discarded: true,
- },
- },
- totalSessionDisplayTime: Date.now() - session.requestStartTime,
- firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
- isInlineEdit: true,
- }
-}
-
-/**
- * Helper function to display SVG decorations
- */
-export async function displaySvgDecoration(
- editor: vscode.TextEditor,
- svgImage: vscode.Uri,
- startLine: number,
- newCode: string,
- originalCodeHighlightRanges: Array<{ line: number; start: number; end: number }>,
- session: CodeWhispererSession,
- languageClient: BaseLanguageClient,
- item: InlineCompletionItemWithReferences,
- listeners: vscode.Disposable[],
- inlineCompletionProvider?: AmazonQInlineCompletionItemProvider
-) {
- function logSuggestionFailure(type: 'DISCARD' | 'REJECT', reason: string, suggestionContent: string) {
- getLogger('nextEditPrediction').debug(
- `Auto ${type} edit suggestion with reason=${reason}, suggetion: ${suggestionContent}`
- )
- }
- // Check if edit is too far from current cursor position
- const currentCursorLine = editor.selection.active.line
- if (Math.abs(startLine - currentCursorLine) >= autoDiscardEditCursorDistance) {
- // Emit DISCARD telemetry for edit suggestion that can't be shown because the suggestion is too far away
- const params = createDiscardTelemetryParams(session, item)
- void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
- logSuggestionFailure('DISCARD', 'cursor is too far away', item.insertText as string)
- return
- }
-
- const originalCode = editor.document.getText()
-
- // Set edit state immediately to prevent race condition with completion requests
- await setContext('aws.amazonq.editSuggestionActive' as any, true)
- EditSuggestionState.setEditSuggestionActive(true)
-
- // Check if a completion suggestion is currently active - if so, discard edit suggestion
- if (inlineCompletionProvider && (await inlineCompletionProvider.isCompletionActive())) {
- // Clean up state since we're not showing the edit
- await setContext('aws.amazonq.editSuggestionActive' as any, false)
- EditSuggestionState.setEditSuggestionActive(false)
-
- // Emit DISCARD telemetry for edit suggestion that can't be shown due to active completion
- const params = createDiscardTelemetryParams(session, item)
- void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
- logSuggestionFailure('DISCARD', 'Conflicting active inline completion', item.insertText as string)
- return
- }
-
- const isPatchValid = applyPatch(editor.document.getText(), item.insertText as string)
- if (!isPatchValid) {
- // Clean up state since we're not showing the edit
- await setContext('aws.amazonq.editSuggestionActive' as any, false)
- EditSuggestionState.setEditSuggestionActive(false)
-
- const params = createDiscardTelemetryParams(session, item)
- // TODO: this session is closed on flare side hence discarded is not emitted in flare
- void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
- logSuggestionFailure('DISCARD', 'Invalid patch', item.insertText as string)
- return
- }
-
- await decorationManager.displayEditSuggestion(
- editor,
- svgImage,
- startLine,
- async () => {
- // Handle accept
- getLogger().info('Edit suggestion accepted')
-
- // Replace content
- try {
- vsCodeState.isCodeWhispererEditing = true
- await replaceEditorContent(editor, newCode)
- } finally {
- vsCodeState.isCodeWhispererEditing = false
- }
-
- // Move cursor to end of the actual changed content
- const endPosition = getEndOfEditPosition(originalCode, newCode)
- editor.selection = new vscode.Selection(endPosition, endPosition)
-
- await decorationManager.clearDecorations(editor, listeners)
-
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: session.sessionId,
- completionSessionResult: {
- [item.itemId]: {
- seen: true,
- accepted: true,
- discarded: false,
- },
- },
- totalSessionDisplayTime: Date.now() - session.requestStartTime,
- firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
- isInlineEdit: true,
- }
- void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
- session.triggerOnAcceptance = true
- },
- async (isDiscard: boolean) => {
- // Handle reject
- if (isDiscard) {
- getLogger().info('Edit suggestion discarded')
- } else {
- getLogger().info('Edit suggestion rejected')
- }
- await decorationManager.clearDecorations(editor, listeners)
-
- const suggestionState = isDiscard
- ? {
- seen: false,
- accepted: false,
- discarded: true,
- }
- : {
- seen: true,
- accepted: false,
- discarded: false,
- }
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: session.sessionId,
- completionSessionResult: {
- [item.itemId]: suggestionState,
- },
- totalSessionDisplayTime: Date.now() - session.requestStartTime,
- firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
- isInlineEdit: true,
- }
- void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
- },
- originalCode,
- newCode,
- originalCodeHighlightRanges
- )
-}
-
-export function deactivate() {
- decorationManager.dispose()
-}
-
-let decorationType: vscode.TextEditorDecorationType | undefined
-
-export function decorateLinesWithGutterIcon(lineNumbers: number[]) {
- const editor = vscode.window.activeTextEditor
- if (!editor) {
- return
- }
-
- // Dispose previous decoration if it exists
- if (decorationType) {
- decorationType.dispose()
- }
-
- // Create a new gutter decoration with a small green dot
- decorationType = vscode.window.createTextEditorDecorationType({
- gutterIconPath: vscode.Uri.file(
- path.join(__dirname, 'media', 'green-dot.svg') // put your svg file in a `media` folder
- ),
- gutterIconSize: 'contain',
- })
-
- const decorations: vscode.DecorationOptions[] = lineNumbers.map((line) => ({
- range: new vscode.Range(new vscode.Position(line, 0), new vscode.Position(line, 0)),
- }))
-
- editor.setDecorations(decorationType, decorations)
-}
diff --git a/packages/amazonq/src/app/inline/EditRendering/imageRenderer.ts b/packages/amazonq/src/app/inline/EditRendering/imageRenderer.ts
deleted file mode 100644
index 6a4eeacf642..00000000000
--- a/packages/amazonq/src/app/inline/EditRendering/imageRenderer.ts
+++ /dev/null
@@ -1,210 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import { displaySvgDecoration, decorationManager } from './displayImage'
-import { SvgGenerationService } from './svgGenerator'
-import { getContext, getLogger } from 'aws-core-vscode/shared'
-import { BaseLanguageClient } from 'vscode-languageclient'
-import { InlineCompletionItemWithReferences } from '@aws/language-server-runtimes/protocol'
-import { CodeWhispererSession } from '../sessionManager'
-import type { AmazonQInlineCompletionItemProvider } from '../completion'
-import { vsCodeState } from 'aws-core-vscode/codewhisperer'
-import { applyPatch, createPatch } from 'diff'
-import { EditSuggestionState } from '../editSuggestionState'
-import { debounce } from 'aws-core-vscode/utils'
-
-const autoRejectEditCursorDistance = 25
-const maxPrefixRetryCharDiff = 5
-const rerenderDeboucneInMs = 500
-
-enum RejectReason {
- DocumentChange = 'Invalid patch due to document change',
- NotApplicableToOriginal = 'ApplyPatch fail for original code',
- MaxRetry = `Already retry ${maxPrefixRetryCharDiff} times`,
-}
-
-export class EditsSuggestionSvg {
- private readonly logger = getLogger('nextEditPrediction')
- private documentChangedListener: vscode.Disposable | undefined
- private cursorChangedListener: vscode.Disposable | undefined
-
- private startLine = 0
-
- private documentChangeTrace = {
- contentChanged: '',
- count: 0,
- }
-
- constructor(
- private suggestion: InlineCompletionItemWithReferences,
- private readonly editor: vscode.TextEditor,
- private readonly languageClient: BaseLanguageClient,
- private readonly session: CodeWhispererSession,
- private readonly inlineCompletionProvider?: AmazonQInlineCompletionItemProvider
- ) {}
-
- async show(patchedSuggestion?: InlineCompletionItemWithReferences) {
- if (!this.editor) {
- this.logger.error(`attempting to render an edit suggestion while editor is undefined`)
- return
- }
-
- const item = patchedSuggestion ? patchedSuggestion : this.suggestion
-
- try {
- const svgGenerationService = new SvgGenerationService()
- // Generate your SVG image with the file contents
- const currentFile = this.editor.document.uri.fsPath
- const { svgImage, startLine, newCode, originalCodeHighlightRange } =
- await svgGenerationService.generateDiffSvg(currentFile, this.suggestion.insertText as string)
-
- // For cursorChangeListener to access
- this.startLine = startLine
-
- if (newCode.length === 0) {
- this.logger.warn('not able to apply provided edit suggestion, skip rendering')
- return
- }
-
- if (svgImage) {
- const documentChangedListener = (this.documentChangedListener ??=
- vscode.workspace.onDidChangeTextDocument(async (e) => {
- await this.onDocChange(e)
- }))
-
- const cursorChangedListener = (this.cursorChangedListener ??=
- vscode.window.onDidChangeTextEditorSelection((e) => {
- this.onCursorChange(e)
- }))
-
- // display the SVG image
- await displaySvgDecoration(
- this.editor,
- svgImage,
- startLine,
- newCode,
- originalCodeHighlightRange,
- this.session,
- this.languageClient,
- item,
- [documentChangedListener, cursorChangedListener],
- this.inlineCompletionProvider
- )
- } else {
- this.logger.error('SVG image generation returned an empty result.')
- }
- } catch (error) {
- this.logger.error(`Error generating SVG image: ${error}`)
- }
- }
-
- private onCursorChange(e: vscode.TextEditorSelectionChangeEvent) {
- if (!EditSuggestionState.isEditSuggestionActive()) {
- return
- }
- if (e.textEditor !== this.editor) {
- return
- }
- const currentPosition = e.selections[0].active
- const distance = Math.abs(currentPosition.line - this.startLine)
- if (distance > autoRejectEditCursorDistance) {
- this.autoReject(`cursor position move too far away off ${autoRejectEditCursorDistance} lines`)
- }
- }
-
- private async onDocChange(e: vscode.TextDocumentChangeEvent) {
- if (e.contentChanges.length <= 0) {
- return
- }
- if (e.document !== this.editor.document) {
- return
- }
- if (vsCodeState.isCodeWhispererEditing) {
- return
- }
- if (getContext('aws.amazonq.editSuggestionActive') === false) {
- return
- }
-
- // TODO: handle multi-contentChanges scenario
- const diff = e.contentChanges[0] ? e.contentChanges[0].text : ''
- this.logger.info(`docChange sessionId=${this.session.sessionId}, contentChange=${diff}`)
-
- // Track document changes because we might need to hide/reject suggestions while users are typing for better UX
- this.documentChangeTrace.contentChanged += e.contentChanges[0].text
- this.documentChangeTrace.count++
- /**
- * 1. Take the diff returned by the model and apply it to the code we originally sent to the model
- * 2. Do a diff between the above code and what's currently in the editor
- * 3. Show this second diff to the user as the edit suggestion
- */
- // Users' file content when the request fires (best guess because the actual process happens in language server)
- const originalCode = this.session.fileContent
- const appliedToOriginal = applyPatch(originalCode, this.suggestion.insertText as string)
- try {
- if (appliedToOriginal) {
- const updatedPatch = this.patchSuggestion(appliedToOriginal)
-
- if (
- this.documentChangeTrace.contentChanged.length > maxPrefixRetryCharDiff ||
- this.documentChangeTrace.count > maxPrefixRetryCharDiff
- ) {
- // Reject the suggestion if users've typed over 5 characters while the suggestion is shown
- this.autoReject(RejectReason.MaxRetry)
- } else if (applyPatch(this.editor.document.getText(), updatedPatch.insertText as string) === false) {
- this.autoReject(RejectReason.DocumentChange)
- } else {
- // Close the previoius popup and rerender it
- this.logger.debug(`calling rerender with suggestion\n ${updatedPatch.insertText as string}`)
- await this.debouncedRerender(updatedPatch)
- }
- } else {
- this.autoReject(RejectReason.NotApplicableToOriginal)
- }
- } catch (e) {
- this.logger.error(`encountered error while processing edit suggestion when users type ${e}`)
- // TODO: Maybe we should auto reject/hide suggestions in this scenario
- }
- }
-
- async dispose() {
- this.documentChangedListener?.dispose()
- this.cursorChangedListener?.dispose()
- await decorationManager.clearDecorations(this.editor, [])
- }
-
- debouncedRerender = debounce(
- async (suggestion: InlineCompletionItemWithReferences) => await this.rerender(suggestion),
- rerenderDeboucneInMs,
- true
- )
-
- private async rerender(suggestion: InlineCompletionItemWithReferences) {
- await decorationManager.clearDecorations(this.editor, [])
- await this.show(suggestion)
- }
-
- private autoReject(reason: string) {
- function logSuggestionFailure(type: 'REJECT', reason: string, suggestionContent: string) {
- getLogger('nextEditPrediction').debug(
- `Auto ${type} edit suggestion with reason=${reason}, suggetion: ${suggestionContent}`
- )
- }
-
- logSuggestionFailure('REJECT', reason, this.suggestion.insertText as string)
- void vscode.commands.executeCommand('aws.amazonq.inline.rejectEdit')
- }
-
- private patchSuggestion(appliedToOriginal: string): InlineCompletionItemWithReferences {
- const updatedPatch = createPatch(
- this.editor.document.fileName,
- this.editor.document.getText(),
- appliedToOriginal
- )
- this.logger.info(`Update edit suggestion\n ${updatedPatch}`)
- return { ...this.suggestion, insertText: updatedPatch }
- }
-}
diff --git a/packages/amazonq/src/app/inline/EditRendering/stringUtils.ts b/packages/amazonq/src/app/inline/EditRendering/stringUtils.ts
deleted file mode 100644
index b8c9a52d052..00000000000
--- a/packages/amazonq/src/app/inline/EditRendering/stringUtils.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-/**
- * Strips common indentation from each line of code that may contain HTML tags
- * @param lines Array of code lines (may contain HTML tags)
- * @returns Array of code lines with common indentation removed
- */
-export function stripCommonIndentation(lines: string[]): string[] {
- if (lines.length === 0) {
- return lines
- }
- const removeFirstTag = (line: string) => line.replace(/^<[^>]*>/, '')
- const getLeadingWhitespace = (text: string) => text.match(/^\s*/)?.[0] || ''
-
- // Find minimum indentation across all lines
- const minIndentLength = Math.min(...lines.map((line) => getLeadingWhitespace(removeFirstTag(line)).length))
-
- // Remove common indentation from each line
- return lines.map((line) => {
- const firstTagRemovedLine = removeFirstTag(line)
- const leadingWhitespace = getLeadingWhitespace(firstTagRemovedLine)
- const reducedWhitespace = leadingWhitespace.substring(minIndentLength)
- return line.replace(leadingWhitespace, reducedWhitespace)
- })
-}
diff --git a/packages/amazonq/src/app/inline/EditRendering/svgGenerator.ts b/packages/amazonq/src/app/inline/EditRendering/svgGenerator.ts
deleted file mode 100644
index 59752a7b08a..00000000000
--- a/packages/amazonq/src/app/inline/EditRendering/svgGenerator.ts
+++ /dev/null
@@ -1,519 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { diffWordsWithSpace, diffLines } from 'diff'
-import * as vscode from 'vscode'
-import { ToolkitError, getLogger } from 'aws-core-vscode/shared'
-import { diffUtilities } from 'aws-core-vscode/shared'
-import { stripCommonIndentation } from './stringUtils'
-type Range = { line: number; start: number; end: number }
-
-const logger = getLogger('nextEditPrediction')
-export const imageVerticalOffset = 1
-export const emptyDiffSvg = {
- svgImage: vscode.Uri.parse(''),
- startLine: 0,
- newCode: '',
- originalCodeHighlightRange: [],
-}
-
-const defaultLineHighlightLength = 4
-
-export class SvgGenerationService {
- /**
- * Generates an SVG image representing a code diff
- * @param originalCode The original code
- * @param newCode The new code with editsss
- * @param theme The editor theme information
- * @param offSet The margin to add to the left of the image
- */
- public async generateDiffSvg(
- filePath: string,
- udiff: string
- ): Promise<{
- svgImage: vscode.Uri
- startLine: number
- newCode: string
- originalCodeHighlightRange: Range[]
- }> {
- const textDoc = await vscode.workspace.openTextDocument(filePath)
- const originalCode = textDoc.getText().replaceAll('\r\n', '\n')
- if (originalCode === '') {
- logger.error(`udiff format error`)
- throw new ToolkitError('udiff format error')
- }
- const newCode = await diffUtilities.getPatchedCode(filePath, udiff)
-
- const { createSVGWindow } = await import('svgdom')
-
- const svgjs = await import('@svgdotjs/svg.js')
- const SVG = svgjs.SVG
- const registerWindow = svgjs.registerWindow
-
- // Get editor theme info
- const currentTheme = this.getEditorTheme()
-
- // Get edit diffs with highlight
- const { addedLines, removedLines } = this.getEditedLinesFromCode(originalCode, newCode)
-
- const modifiedLines = diffUtilities.getModifiedLinesFromCode(addedLines, removedLines)
- // TODO remove
- // eslint-disable-next-line aws-toolkits/no-json-stringify-in-log
- logger.info(`Line mapping: ${JSON.stringify(modifiedLines)}`)
-
- // Calculate dimensions based on code content
- const { offset, editStartLine, isPositionValid } = this.calculatePosition(
- originalCode.split('\n'),
- newCode.split('\n'),
- addedLines,
- currentTheme
- )
-
- // if the position for the EDITS suggestion is not valid (there is no difference between new
- // and current code content), return EMPTY_DIFF_SVG and skip the suggestion.
- if (!isPositionValid) {
- return emptyDiffSvg
- }
-
- const highlightRanges = this.generateHighlightRanges(removedLines, addedLines, modifiedLines)
- const diffAddedWithHighlight = this.getHighlightEdit(addedLines, highlightRanges.addedRanges)
- const normalizedDiffLines = stripCommonIndentation(diffAddedWithHighlight)
-
- // Create SVG window, document, and container
- const window = createSVGWindow()
- const document = window.document
- registerWindow(window, document)
- const draw = SVG(document.documentElement) as any
-
- const { width, height } = this.calculateDimensions(addedLines, currentTheme)
- draw.size(width + offset, height)
-
- // Generate CSS for syntax highlighting HTML content based on theme
- const styles = this.generateStyles(currentTheme)
- const htmlContent = this.generateHtmlContent(normalizedDiffLines, styles, offset)
-
- // Create foreignObject to embed HTML
- const foreignObject = draw.foreignObject(width + offset, height)
- foreignObject.node.innerHTML = htmlContent.trim()
-
- const svgData = draw.svg()
- const svgResult = `data:image/svg+xml;base64,${Buffer.from(svgData).toString('base64')}`
-
- return {
- svgImage: vscode.Uri.parse(svgResult),
- startLine: editStartLine,
- newCode: newCode,
- originalCodeHighlightRange: highlightRanges.removedRanges,
- }
- }
-
- private calculateDimensions(newLines: string[], currentTheme: editorThemeInfo): { width: number; height: number } {
- // Calculate appropriate width and height based on diff content
- const maxLineLength = Math.max(...newLines.map((line) => line.length))
-
- const headerFrontSize = Math.ceil(currentTheme.fontSize * 0.66)
-
- // Estimate width based on character count and font size
- const width = Math.max(41 * headerFrontSize * 0.7, maxLineLength * currentTheme.fontSize * 0.7)
-
- // Calculate height based on diff line count and line height
- const totalLines = newLines.length + 1 // +1 for header
- const height = totalLines * currentTheme.lingHeight + 25 // +25 for padding
-
- return { width, height }
- }
-
- private generateStyles(theme: editorThemeInfo): string {
- // Generate CSS styles based on editor theme
- const fontSize = theme.fontSize
- const headerFrontSize = Math.ceil(fontSize * 0.66)
- const lineHeight = theme.lingHeight
- const foreground = theme.foreground
- const bordeColor = 'rgba(212, 212, 212, 0.5)'
- const background = theme.background || '#1e1e1e'
- const diffRemoved = theme.diffRemoved || 'rgba(255, 0, 0, 0.2)'
- const diffAdded = 'rgba(72, 128, 72, 0.52)'
- return `
- .code-container {
- font-family: ${'monospace'};
- color: ${foreground};
- font-size: ${fontSize}px;
- line-height: ${lineHeight}px;
- background-color: ${background};
- border: 1px solid ${bordeColor};
- border-radius: 0px;
- padding-top: 3px;
- padding-bottom: 5px;
- padding-left: 10px;
- }
- .diff-header {
- color: ${theme.foreground || '#d4d4d4'};
- margin: 0;
- font-size: ${headerFrontSize}px;
- padding: 0px;
- }
- .diff-removed {
- background-color: ${diffRemoved};
- white-space: pre-wrap; /* Preserve whitespace */
- text-decoration: line-through;
- opacity: 0.7;
- }
- .diff-changed {
- white-space: pre-wrap; /* Preserve whitespace */
- background-color: ${diffAdded};
- }
- .diff-unchanged {
- white-space: pre-wrap; /* Preserve indentation for unchanged lines */
- }
- `
- }
-
- private generateHtmlContent(diffLines: string[], styles: string, offSet: number): string {
- return `
-
-
-
-
- ${diffLines.map((line) => `
${line}
`).join('')}
-
-
- `
- }
-
- /**
- * Extract added and removed lines by comparing original and new code
- * @param originalCode The original code string
- * @param newCode The new code string
- * @returns Object containing arrays of added and removed lines
- */
- private getEditedLinesFromCode(
- originalCode: string,
- newCode: string
- ): { addedLines: string[]; removedLines: string[] } {
- const addedLines: string[] = []
- const removedLines: string[] = []
-
- const changes = diffLines(originalCode, newCode)
-
- for (const change of changes) {
- if (change.added) {
- addedLines.push(...change.value.split('\n').filter((line) => line.length > 0))
- } else if (change.removed) {
- removedLines.push(...change.value.split('\n').filter((line) => line.length > 0))
- }
- }
-
- return { addedLines, removedLines }
- }
-
- /**
- * Applies highlighting to code lines based on the specified ranges
- * @param newLines Array of code lines to highlight
- * @param highlightRanges Array of ranges specifying which parts of the lines to highlight
- * @returns Array of HTML strings with appropriate spans for highlighting
- */
- private getHighlightEdit(newLines: string[], highlightRanges: Range[]): string[] {
- const result: string[] = []
-
- // Group ranges by line for easier lookup
- const rangesByLine = new Map()
- for (const range of highlightRanges) {
- if (!rangesByLine.has(range.line)) {
- rangesByLine.set(range.line, [])
- }
- rangesByLine.get(range.line)!.push(range)
- }
-
- // Process each line of code
- for (let lineIndex = 0; lineIndex < newLines.length; lineIndex++) {
- const line = newLines[lineIndex]
- // Get ranges for this line
- const lineRanges = rangesByLine.get(lineIndex) || []
-
- // If no ranges for this line, leave it as-is with HTML escaping
- if (lineRanges.length === 0) {
- result.push(`${this.escapeHtml(line)}`)
- continue
- }
-
- // Sort ranges by start position to ensure correct ordering
- lineRanges.sort((a, b) => a.start - b.start)
-
- // Build the highlighted line
- let highlightedLine = ''
- let currentPos = 0
-
- for (const range of lineRanges) {
- // Add text before the current range (with HTML escaping)
- if (range.start > currentPos) {
- const beforeText = line.substring(currentPos, range.start)
- highlightedLine += `${this.escapeHtml(beforeText)}`
- }
-
- // Add the highlighted part (with HTML escaping)
- const highlightedText = line.substring(range.start, range.end)
- highlightedLine += `${this.escapeHtml(highlightedText)}`
-
- // Update current position
- currentPos = range.end
- }
-
- // Add any remaining text after the last range (with HTML escaping)
- if (currentPos < line.length) {
- const afterText = line.substring(currentPos)
- highlightedLine += `${this.escapeHtml(afterText)}`
- }
-
- result.push(highlightedLine)
- }
-
- return result
- }
-
- private getEditorTheme(): editorThemeInfo {
- const editorConfig = vscode.workspace.getConfiguration('editor')
- const fontSize = editorConfig.get('fontSize', 12) // Default to 12 if not set
- const lineHeightSetting = editorConfig.get('lineHeight', 0) // Default to 0 if not set
-
- /**
- * Calculate effective line height, documented as such:
- * Use 0 to automatically compute the line height from the font size.
- * Values between 0 and 8 will be used as a multiplier with the font size.
- * Values greater than or equal to 8 will be used as effective values.
- */
- let effectiveLineHeight: number
- if (lineHeightSetting > 0 && lineHeightSetting < 8) {
- effectiveLineHeight = lineHeightSetting * fontSize
- } else if (lineHeightSetting >= 8) {
- effectiveLineHeight = lineHeightSetting
- } else {
- effectiveLineHeight = Math.round(1.5 * fontSize)
- }
-
- const themeName = vscode.workspace.getConfiguration('workbench').get('colorTheme', 'Default')
- const themeColors = this.getThemeColors(themeName)
-
- return {
- fontSize: fontSize,
- lingHeight: effectiveLineHeight,
- ...themeColors,
- }
- }
-
- private getThemeColors(themeName: string): {
- foreground: string
- background: string
- diffAdded: string
- diffRemoved: string
- } {
- // Define default dark theme colors
- const darkThemeColors = {
- foreground: 'rgba(212, 212, 212, 1)',
- background: 'rgba(30, 30, 30, 1)',
- diffAdded: 'rgba(231, 245, 231, 0.2)',
- diffRemoved: 'rgba(255, 0, 0, 0.2)',
- }
-
- // Define default light theme colors
- const lightThemeColors = {
- foreground: 'rgba(0, 0, 0, 1)',
- background: 'rgba(255, 255, 255, 1)',
- diffAdded: 'rgba(198, 239, 206, 0.2)',
- diffRemoved: 'rgba(255, 199, 206, 0.5)',
- }
-
- // For dark and light modes
- const themeNameLower = themeName.toLowerCase()
-
- if (themeNameLower.includes('dark')) {
- return darkThemeColors
- } else if (themeNameLower.includes('light')) {
- return lightThemeColors
- }
-
- // Define colors for specific themes, add more if needed.
- const themeColorMap: {
- [key: string]: { foreground: string; background: string; diffAdded: string; diffRemoved: string }
- } = {
- Abyss: {
- foreground: 'rgba(255, 255, 255, 1)',
- background: 'rgba(0, 12, 24, 1)',
- diffAdded: 'rgba(0, 255, 0, 0.2)',
- diffRemoved: 'rgba(255, 0, 0, 0.3)',
- },
- Red: {
- foreground: 'rgba(255, 0, 0, 1)',
- background: 'rgba(51, 0, 0, 1)',
- diffAdded: 'rgba(255, 100, 100, 0.2)',
- diffRemoved: 'rgba(255, 0, 0, 0.5)',
- },
- }
-
- // Return colors for the specific theme or default to light theme
- return themeColorMap[themeName] || lightThemeColors
- }
-
- private calculatePosition(
- originalLines: string[],
- newLines: string[],
- diffLines: string[],
- theme: editorThemeInfo
- ): { offset: number; editStartLine: number; isPositionValid: boolean } {
- // Determine the starting line of the edit in the original file
- let editStartLineInOldFile = 0
- const maxLength = Math.min(originalLines.length, newLines.length)
-
- for (let i = 0; i <= maxLength; i++) {
- // if there is no difference between the original lines and the new lines, skip calculating for the start position.
- if (i === maxLength && originalLines[i] === newLines[i] && originalLines.length === newLines.length) {
- logger.info(
- 'There is no difference between current and new code suggestion. Skip calculating for start position.'
- )
- return {
- offset: 0,
- editStartLine: 0,
- isPositionValid: false,
- }
- }
- if (originalLines[i] !== newLines[i] || i === maxLength) {
- editStartLineInOldFile = i
- break
- }
- }
- const shiftedStartLine = Math.max(0, editStartLineInOldFile - imageVerticalOffset)
-
- // Determine the range to consider
- const startLine = shiftedStartLine
- const endLine = Math.min(editStartLineInOldFile + diffLines.length, originalLines.length)
-
- // Find the longest line within the specified range
- let maxLineLength = 0
- for (let i = startLine; i <= endLine; i++) {
- const lineLength = originalLines[i]?.length || 0
- if (lineLength > maxLineLength) {
- maxLineLength = lineLength
- }
- }
-
- // Calculate the offset based on the longest line and the starting line length
- const startLineLength = originalLines[startLine]?.length || 0
- const offset = (maxLineLength - startLineLength) * theme.fontSize * 0.7 + 10 // padding
-
- return { offset, editStartLine: editStartLineInOldFile, isPositionValid: true }
- }
-
- private escapeHtml(text: string): string {
- return text
- .replace(/&/g, '&')
- .replace(//g, '>')
- .replace(/"/g, '"')
- .replace(/'/g, ''')
- }
-
- /**
- * Generates character-level highlight ranges for both original and modified code.
- * @param originalCode Array of original code lines
- * @param afterCode Array of code lines after modification
- * @param modifiedLines Map of original lines to modified lines
- * @returns Object containing ranges for original and after code character level highlighting
- */
- private generateHighlightRanges(
- originalCode: string[],
- afterCode: string[],
- modifiedLines: Map
- ): { removedRanges: Range[]; addedRanges: Range[] } {
- const originalRanges: Range[] = []
- const afterRanges: Range[] = []
-
- // Create reverse mapping for quicker lookups
- const reverseMap = new Map()
- for (const [original, modified] of modifiedLines.entries()) {
- reverseMap.set(modified, original)
- }
-
- // Process original code lines - produces highlight ranges in current editor text
- for (let lineIndex = 0; lineIndex < originalCode.length; lineIndex++) {
- const line = originalCode[lineIndex]
-
- /**
- * If [line] is an empty line or only contains whitespace char, [diffWordsWithSpace] will say it's not an "remove", i.e. [part.removed] will be undefined,
- * therefore the deletion will not be highlighted. Thus fallback this scenario to highlight the entire line
- */
- // If line exists in modifiedLines as a key, process character diffs
- if (Array.from(modifiedLines.keys()).includes(line) && line.trim().length > 0) {
- const modifiedLine = modifiedLines.get(line)!
- const changes = diffWordsWithSpace(line, modifiedLine)
-
- let charPos = 0
- for (const part of changes) {
- if (part.removed) {
- originalRanges.push({
- line: lineIndex,
- start: charPos,
- end: charPos + part.value.length,
- })
- }
-
- if (!part.added) {
- charPos += part.value.length
- }
- }
- } else {
- // Line doesn't exist in modifiedLines values, highlight entire line
- originalRanges.push({
- line: lineIndex,
- start: 0,
- end: line.length ?? defaultLineHighlightLength,
- })
- }
- }
-
- // Process after code lines - used for highlight in SVG image
- for (let lineIndex = 0; lineIndex < afterCode.length; lineIndex++) {
- const line = afterCode[lineIndex]
-
- if (reverseMap.has(line)) {
- const originalLine = reverseMap.get(line)!
- const changes = diffWordsWithSpace(originalLine, line)
-
- let charPos = 0
- for (const part of changes) {
- if (part.added) {
- afterRanges.push({
- line: lineIndex,
- start: charPos,
- end: charPos + part.value.length,
- })
- }
-
- if (!part.removed) {
- charPos += part.value.length
- }
- }
- } else {
- afterRanges.push({
- line: lineIndex,
- start: 0,
- end: line.length,
- })
- }
- }
-
- return {
- removedRanges: originalRanges,
- addedRanges: afterRanges,
- }
- }
-}
-
-interface editorThemeInfo {
- fontSize: number
- lingHeight: number
- foreground?: string
- background?: string
- diffAdded?: string
- diffRemoved?: string
-}
diff --git a/packages/amazonq/src/app/inline/activation.ts b/packages/amazonq/src/app/inline/activation.ts
deleted file mode 100644
index 5a86d340c00..00000000000
--- a/packages/amazonq/src/app/inline/activation.ts
+++ /dev/null
@@ -1,128 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import vscode from 'vscode'
-import {
- acceptSuggestion,
- AuthUtil,
- CodeSuggestionsState,
- CodeWhispererCodeCoverageTracker,
- CodeWhispererConstants,
- CodeWhispererSettings,
- ConfigurationEntry,
- DefaultCodeWhispererClient,
- invokeRecommendation,
- isInlineCompletionEnabled,
- KeyStrokeHandler,
- RecommendationHandler,
- runtimeLanguageContext,
- TelemetryHelper,
- UserWrittenCodeTracker,
- vsCodeState,
-} from 'aws-core-vscode/codewhisperer'
-import { Commands, getLogger, globals, sleep } from 'aws-core-vscode/shared'
-import { BaseLanguageClient } from 'vscode-languageclient'
-
-export async function activate(languageClient: BaseLanguageClient) {
- const codewhispererSettings = CodeWhispererSettings.instance
- const client = new DefaultCodeWhispererClient()
-
- if (isInlineCompletionEnabled()) {
- await setSubscriptionsforInlineCompletion()
- await AuthUtil.instance.setVscodeContextProps()
- RecommendationHandler.instance.setLanguageClient(languageClient)
- }
-
- function getAutoTriggerStatus(): boolean {
- return CodeSuggestionsState.instance.isSuggestionsEnabled()
- }
-
- async function getConfigEntry(): Promise {
- const isShowMethodsEnabled: boolean =
- vscode.workspace.getConfiguration('editor').get('suggest.showMethods') || false
- const isAutomatedTriggerEnabled: boolean = getAutoTriggerStatus()
- const isManualTriggerEnabled: boolean = true
- const isSuggestionsWithCodeReferencesEnabled = codewhispererSettings.isSuggestionsWithCodeReferencesEnabled()
-
- // TODO:remove isManualTriggerEnabled
- return {
- isShowMethodsEnabled,
- isManualTriggerEnabled,
- isAutomatedTriggerEnabled,
- isSuggestionsWithCodeReferencesEnabled,
- }
- }
-
- async function setSubscriptionsforInlineCompletion() {
- RecommendationHandler.instance.subscribeSuggestionCommands()
-
- /**
- * Automated trigger
- */
- globals.context.subscriptions.push(
- acceptSuggestion.register(globals.context),
- vscode.window.onDidChangeActiveTextEditor(async (editor) => {
- await RecommendationHandler.instance.onEditorChange()
- }),
- vscode.window.onDidChangeWindowState(async (e) => {
- await RecommendationHandler.instance.onFocusChange()
- }),
- vscode.window.onDidChangeTextEditorSelection(async (e) => {
- await RecommendationHandler.instance.onCursorChange(e)
- }),
- vscode.workspace.onDidChangeTextDocument(async (e) => {
- const editor = vscode.window.activeTextEditor
- if (!editor) {
- return
- }
- if (e.document !== editor.document) {
- return
- }
- if (!runtimeLanguageContext.isLanguageSupported(e.document)) {
- return
- }
-
- CodeWhispererCodeCoverageTracker.getTracker(e.document.languageId)?.countTotalTokens(e)
- UserWrittenCodeTracker.instance.onTextDocumentChange(e)
- /**
- * Handle this keystroke event only when
- * 1. It is not a backspace
- * 2. It is not caused by CodeWhisperer editing
- * 3. It is not from undo/redo.
- */
- if (e.contentChanges.length === 0 || vsCodeState.isCodeWhispererEditing) {
- return
- }
-
- if (vsCodeState.lastUserModificationTime) {
- TelemetryHelper.instance.setTimeSinceLastModification(
- Date.now() - vsCodeState.lastUserModificationTime
- )
- }
- vsCodeState.lastUserModificationTime = Date.now()
- /**
- * Important: Doing this sleep(10) is to make sure
- * 1. this event is processed by vs code first
- * 2. editor.selection.active has been successfully updated by VS Code
- * Then this event can be processed by our code.
- */
- await sleep(CodeWhispererConstants.vsCodeCursorUpdateDelay)
- if (!RecommendationHandler.instance.isSuggestionVisible()) {
- await KeyStrokeHandler.instance.processKeyStroke(e, editor, client, await getConfigEntry())
- }
- }),
- // manual trigger
- Commands.register({ id: 'aws.amazonq.invokeInlineCompletion', autoconnect: true }, async () => {
- invokeRecommendation(
- vscode.window.activeTextEditor as vscode.TextEditor,
- client,
- await getConfigEntry()
- ).catch((e: Error) => {
- getLogger().error('invokeRecommendation failed: %s', (e as Error).message)
- })
- })
- )
- }
-}
diff --git a/packages/amazonq/src/app/inline/completion.ts b/packages/amazonq/src/app/inline/completion.ts
deleted file mode 100644
index a7ba2760c09..00000000000
--- a/packages/amazonq/src/app/inline/completion.ts
+++ /dev/null
@@ -1,602 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-import * as vscode from 'vscode'
-import {
- CancellationToken,
- InlineCompletionContext,
- InlineCompletionItem,
- InlineCompletionItemProvider,
- Position,
- TextDocument,
- commands,
- languages,
- Disposable,
- window,
- TextEditor,
- InlineCompletionTriggerKind,
- Range,
-} from 'vscode'
-import { BaseLanguageClient } from 'vscode-languageclient'
-import {
- InlineCompletionItemWithReferences,
- LogInlineCompletionSessionResultsParams,
-} from '@aws/language-server-runtimes/protocol'
-import { SessionManager } from './sessionManager'
-import { GetAllRecommendationsOptions, RecommendationService } from './recommendationService'
-import {
- CodeWhispererConstants,
- ReferenceHoverProvider,
- ReferenceLogViewProvider,
- ImportAdderProvider,
- CodeSuggestionsState,
- vsCodeState,
- noInlineSuggestionsMsg,
- getDiagnosticsDifferences,
- getDiagnosticsOfCurrentFile,
- toIdeDiagnostics,
- handleExtraBrackets,
- InlineCompletionLoggingReason,
-} from 'aws-core-vscode/codewhisperer'
-import { LineTracker } from './stateTracker/lineTracker'
-import { InlineTutorialAnnotation } from './tutorials/inlineTutorialAnnotation'
-import { TelemetryHelper } from './telemetryHelper'
-import { Experiments, getContext, getLogger, sleep } from 'aws-core-vscode/shared'
-import { messageUtils } from 'aws-core-vscode/utils'
-import { EditsSuggestionSvg } from './EditRendering/imageRenderer'
-import { ICursorUpdateRecorder } from './cursorUpdateManager'
-import { DocumentEventListener } from './documentEventListener'
-
-export class InlineCompletionManager implements Disposable {
- private disposable: Disposable
- private inlineCompletionProvider: AmazonQInlineCompletionItemProvider
- private languageClient: BaseLanguageClient
- private sessionManager: SessionManager
- private recommendationService: RecommendationService
- private lineTracker: LineTracker
-
- private inlineTutorialAnnotation: InlineTutorialAnnotation
- private readonly logSessionResultMessageName = 'aws/logInlineCompletionSessionResults'
- private documentEventListener: DocumentEventListener
-
- constructor(
- languageClient: BaseLanguageClient,
- sessionManager: SessionManager,
- lineTracker: LineTracker,
- inlineTutorialAnnotation: InlineTutorialAnnotation,
- cursorUpdateRecorder?: ICursorUpdateRecorder
- ) {
- this.languageClient = languageClient
- this.sessionManager = sessionManager
- this.lineTracker = lineTracker
- this.recommendationService = new RecommendationService(this.sessionManager, cursorUpdateRecorder)
- this.inlineTutorialAnnotation = inlineTutorialAnnotation
- this.documentEventListener = new DocumentEventListener()
- this.inlineCompletionProvider = new AmazonQInlineCompletionItemProvider(
- languageClient,
- this.recommendationService,
- this.sessionManager,
- this.inlineTutorialAnnotation,
- this.documentEventListener
- )
-
- this.disposable = languages.registerInlineCompletionItemProvider(
- CodeWhispererConstants.platformLanguageIds,
- this.inlineCompletionProvider
- )
- this.lineTracker.ready()
- }
-
- public getInlineCompletionProvider(): AmazonQInlineCompletionItemProvider {
- return this.inlineCompletionProvider
- }
-
- public dispose(): void {
- if (this.disposable) {
- this.disposable.dispose()
- this.lineTracker.dispose()
- }
- if (this.documentEventListener) {
- this.documentEventListener.dispose()
- }
- }
-
- public registerInlineCompletion() {
- const onInlineAcceptance = async (
- sessionId: string,
- item: InlineCompletionItemWithReferences,
- editor: TextEditor,
- requestStartTime: number,
- position: vscode.Position,
- firstCompletionDisplayLatency?: number
- ) => {
- try {
- vsCodeState.isCodeWhispererEditing = true
- const startLine = position.line
- // TODO: also log the seen state for other suggestions in session
- // Calculate timing metrics before diagnostic delay
- const totalSessionDisplayTime = Date.now() - requestStartTime
- await sleep(500)
- const diagnosticDiff = getDiagnosticsDifferences(
- this.sessionManager.getActiveSession()?.diagnosticsBeforeAccept,
- getDiagnosticsOfCurrentFile()
- )
- // try remove the extra } ) ' " if there is a new reported problem
- // the extra } will cause syntax error
- if (diagnosticDiff.added.length > 0) {
- await handleExtraBrackets(editor, editor.selection.active, position)
- }
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: sessionId,
- completionSessionResult: {
- [item.itemId]: {
- seen: true,
- accepted: true,
- discarded: false,
- },
- },
- totalSessionDisplayTime: totalSessionDisplayTime,
- firstCompletionDisplayLatency: firstCompletionDisplayLatency,
- addedDiagnostics: diagnosticDiff.added.map((it) => toIdeDiagnostics(it)),
- removedDiagnostics: diagnosticDiff.removed.map((it) => toIdeDiagnostics(it)),
- }
- void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
- this.disposable.dispose()
- this.disposable = languages.registerInlineCompletionItemProvider(
- CodeWhispererConstants.platformLanguageIds,
- this.inlineCompletionProvider
- )
- if (item.references && item.references.length) {
- const referenceLog = ReferenceLogViewProvider.getReferenceLog(
- item.insertText as string,
- item.references,
- editor
- )
- ReferenceLogViewProvider.instance.addReferenceLog(referenceLog)
- ReferenceHoverProvider.instance.addCodeReferences(item.insertText as string, item.references)
- }
- if (item.mostRelevantMissingImports?.length) {
- await ImportAdderProvider.instance.onAcceptRecommendation(editor, item, startLine)
- }
- this.sessionManager.incrementSuggestionCount()
- // clear session manager states once accepted
- this.sessionManager.clear()
- } finally {
- vsCodeState.isCodeWhispererEditing = false
- }
- }
- commands.registerCommand('aws.amazonq.acceptInline', onInlineAcceptance)
-
- const onInlineRejection = async () => {
- try {
- vsCodeState.isCodeWhispererEditing = true
- const session = this.sessionManager.getActiveSession()
- if (session === undefined) {
- return
- }
- const requestStartTime = session.requestStartTime
- const totalSessionDisplayTime = Date.now() - requestStartTime
- await commands.executeCommand('editor.action.inlineSuggest.hide')
- // TODO: also log the seen state for other suggestions in session
- this.disposable.dispose()
- this.disposable = languages.registerInlineCompletionItemProvider(
- CodeWhispererConstants.platformLanguageIds,
- this.inlineCompletionProvider
- )
- const sessionId = session.sessionId
- const itemId = this.sessionManager.getActiveRecommendation()[0]?.itemId
- if (!itemId) {
- return
- }
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: sessionId,
- completionSessionResult: {
- [itemId]: {
- seen: true,
- accepted: false,
- discarded: false,
- },
- },
- firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
- totalSessionDisplayTime: totalSessionDisplayTime,
- }
- void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
- // clear session manager states once rejected
- this.sessionManager.clear()
- } finally {
- vsCodeState.isCodeWhispererEditing = false
- }
- }
- commands.registerCommand('aws.amazonq.rejectCodeSuggestion', onInlineRejection)
- }
-}
-
-export class AmazonQInlineCompletionItemProvider implements InlineCompletionItemProvider {
- private logger = getLogger()
- private pendingRequest: Promise | undefined
- private lastEdit: EditsSuggestionSvg | undefined
-
- constructor(
- private readonly languageClient: BaseLanguageClient,
- private readonly recommendationService: RecommendationService,
- private readonly sessionManager: SessionManager,
- private readonly inlineTutorialAnnotation: InlineTutorialAnnotation,
- private readonly documentEventListener: DocumentEventListener
- ) {}
-
- private readonly logSessionResultMessageName = 'aws/logInlineCompletionSessionResults'
-
- // Ideally use this API handleDidShowCompletionItem
- // https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts#L83
- // we need this because the returned items of provideInlineCompletionItems may not be actually rendered on screen
- // if VS Code believes the user is actively typing then it will not show such item
- async checkWhetherInlineCompletionWasShown() {
- // this line is to force VS Code to re-render the inline completion
- // if it decides the inline completion can be shown
- await vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
- // yield event loop to let backend state transition finish plus wait for vsc to render
- await sleep(10)
- // run the command to detect if inline suggestion is really shown or not
- await vscode.commands.executeCommand(`aws.amazonq.checkInlineSuggestionVisibility`)
- }
-
- /**
- * Check if a completion suggestion is currently active/displayed
- */
- public async isCompletionActive(): Promise {
- const session = this.sessionManager.getActiveSession()
- if (session === undefined || !session.displayed || session.suggestions.some((item) => item.isInlineEdit)) {
- return false
- }
-
- // Use VS Code command to check if inline suggestion is actually visible on screen
- // This command only executes when inlineSuggestionVisible context is true
- await vscode.commands.executeCommand('aws.amazonq.checkInlineSuggestionVisibility')
- const isInlineSuggestionVisible = Date.now() - session.lastVisibleTime < 50
- return isInlineSuggestionVisible
- }
-
- /**
- * Batch discard telemetry for completion suggestions when edit suggestion is active
- */
- public batchDiscardTelemetryForEditSuggestion(items: any[], session: any): void {
- // Emit DISCARD telemetry for completion suggestions that can't be shown due to active edit
- const completionSessionResult: {
- [key: string]: { seen: boolean; accepted: boolean; discarded: boolean }
- } = {}
-
- for (const item of items) {
- if (!item.isInlineEdit && item.itemId) {
- completionSessionResult[item.itemId] = {
- seen: false,
- accepted: false,
- discarded: true,
- }
- }
- }
-
- // Send single telemetry event for all discarded items
- if (Object.keys(completionSessionResult).length > 0) {
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: session.sessionId,
- completionSessionResult,
- firstCompletionDisplayLatency: session.firstCompletionDisplayLatency,
- totalSessionDisplayTime: Date.now() - session.requestStartTime,
- }
- void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
- }
- }
-
- // this method is automatically invoked by VS Code as user types
- async provideInlineCompletionItems(
- document: TextDocument,
- position: Position,
- context: InlineCompletionContext,
- token: CancellationToken,
- getAllRecommendationsOptions?: GetAllRecommendationsOptions
- ): Promise {
- getLogger().info('_provideInlineCompletionItems called with: %O', {
- documentUri: document.uri.toString(),
- position,
- context,
- triggerKind: context.triggerKind === InlineCompletionTriggerKind.Automatic ? 'Automatic' : 'Invoke',
- options: JSON.stringify(getAllRecommendationsOptions),
- })
-
- // If there's already a pending request, wait for it to complete instead of starting a new one
- // This prevents race conditions where multiple concurrent calls cause the later (empty) response
- // to override the earlier (valid) response
- if (this.pendingRequest) {
- getLogger().info('Reusing pending inline completion request to avoid race condition')
- try {
- const result = await this.pendingRequest
- // Check if THIS call's token was cancelled (not the original call's token)
- if (token.isCancellationRequested) {
- getLogger().info('Reused request completed but this call was cancelled')
- return []
- }
- return result
- } catch (e) {
- // If the pending request failed, continue with a new request
- getLogger().info('Pending request failed, starting new request: %O', e)
- }
- }
-
- // Start a new request and track it
- this.pendingRequest = this._provideInlineCompletionItemsImpl(
- document,
- position,
- context,
- token,
- getAllRecommendationsOptions
- )
-
- try {
- return await this.pendingRequest
- } finally {
- this.pendingRequest = undefined
- }
- }
-
- private async _provideInlineCompletionItemsImpl(
- document: TextDocument,
- position: Position,
- context: InlineCompletionContext,
- token: CancellationToken,
- getAllRecommendationsOptions?: GetAllRecommendationsOptions
- ): Promise {
- if (vsCodeState.isCodeWhispererEditing) {
- getLogger().info('Q is editing, returning empty')
- return []
- }
-
- // Make edit suggestion blocking
- if (getContext('aws.amazonq.editSuggestionActive') === true) {
- return []
- }
-
- // there is a bug in VS Code, when hitting Enter, the context.triggerKind is Invoke (0)
- // when hitting other keystrokes, the context.triggerKind is Automatic (1)
- // we only mark option + C as manual trigger
- // this is a workaround since the inlineSuggest.trigger command take no params
- const isAutoTrigger = Date.now() - vsCodeState.lastManualTriggerTime > 50
- if (isAutoTrigger && !CodeSuggestionsState.instance.isSuggestionsEnabled()) {
- // return early when suggestions are disabled with auto trigger
- return []
- }
-
- // yield event loop to let the document listen catch updates
- await sleep(1)
-
- let logstr = `GenerateCompletion activity:\n`
- try {
- const t0 = Date.now()
- vsCodeState.isRecommendationsActive = true
- // handling previous session
- const prevSession = this.sessionManager.getActiveSession()
- const prevSessionId = prevSession?.sessionId
- const prevItemId = this.sessionManager.getActiveRecommendation()?.[0]?.itemId
- const prevStartPosition = prevSession?.startPosition
- const editsTriggerOnAcceptance = prevSession?.triggerOnAcceptance
- if (editsTriggerOnAcceptance) {
- getAllRecommendationsOptions = {
- ...getAllRecommendationsOptions,
- editsStreakToken: prevSession?.editsStreakPartialResultToken,
- }
- }
- const editor = window.activeTextEditor
- // Skip prefix matching for Edits suggestions that trigger on acceptance.
- if (prevSession && prevSessionId && prevItemId && prevStartPosition && !editsTriggerOnAcceptance) {
- const prefix = document.getText(new Range(prevStartPosition, position))
- const prevItemMatchingPrefix = []
- for (const item of this.sessionManager.getActiveRecommendation()) {
- // if item is an Edit suggestion, insertText is a diff instead of new code contents, skip the logic to check for prefix.
- if (item.isInlineEdit) {
- continue
- }
- const text = typeof item.insertText === 'string' ? item.insertText : item.insertText.value
- if (text.startsWith(prefix) && position.isAfterOrEqual(prevStartPosition)) {
- item.command = {
- command: 'aws.amazonq.acceptInline',
- title: 'On acceptance',
- arguments: [
- prevSessionId,
- item,
- editor,
- prevSession?.requestStartTime,
- position,
- prevSession?.firstCompletionDisplayLatency,
- ],
- }
- item.range = new Range(prevStartPosition, position)
- prevItemMatchingPrefix.push(item as InlineCompletionItem)
- }
- }
- // re-use previous suggestions as long as new typed prefix matches
- if (prevItemMatchingPrefix.length > 0) {
- logstr += `- not call LSP and reuse previous suggestions that match user typed characters
- - duration between trigger to completion suggestion is displayed ${Date.now() - t0}`
- void this.checkWhetherInlineCompletionWasShown()
- return prevItemMatchingPrefix
- }
-
- // if no such suggestions, report the previous suggestion as Reject or Discarded
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: prevSessionId,
- completionSessionResult: {
- [prevItemId]: {
- seen: prevSession.displayed,
- accepted: false,
- discarded: !prevSession.displayed,
- },
- },
- reason: InlineCompletionLoggingReason.IMPLICIT_REJECT,
- firstCompletionDisplayLatency: prevSession.firstCompletionDisplayLatency,
- totalSessionDisplayTime: Date.now() - prevSession.requestStartTime,
- }
- void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
- this.sessionManager.clear()
- // Do not make auto trigger if user rejects a suggestion
- // by typing characters that does not match
- return []
- }
-
- // tell the tutorial that completions has been triggered
- await this.inlineTutorialAnnotation.triggered(context.triggerKind)
-
- TelemetryHelper.instance.setInvokeSuggestionStartTime()
- TelemetryHelper.instance.setTriggerType(context.triggerKind)
-
- const t1 = Date.now()
-
- await this.recommendationService.getAllRecommendations(
- this.languageClient,
- document,
- position,
- {
- triggerKind: isAutoTrigger ? 1 : 0,
- selectedCompletionInfo: context.selectedCompletionInfo,
- },
- token,
- isAutoTrigger,
- this.documentEventListener,
- getAllRecommendationsOptions
- )
- // get active item from session for displaying
- const items = this.sessionManager.getActiveRecommendation()
- const itemId = this.sessionManager.getActiveRecommendation()?.[0]?.itemId
-
- // eslint-disable-next-line @typescript-eslint/no-base-to-string
- const itemLog = items[0] ? `${items[0].insertText.toString()}` : `no suggestion`
-
- const t2 = Date.now()
-
- logstr += `- number of suggestions: ${items.length}
-- sessionId: ${this.sessionManager.getActiveSession()?.sessionId}
-- first suggestion content (next line):
-${itemLog}
-- duration between trigger to before sending LSP call: ${t1 - t0}ms
-- duration between trigger to after receiving LSP response: ${t2 - t0}ms
-- duration between before sending LSP call to after receving LSP response: ${t2 - t1}ms
-`
- const session = this.sessionManager.getActiveSession()
-
- // Show message to user when manual invoke fails to produce results.
- if (items.length === 0 && context.triggerKind === InlineCompletionTriggerKind.Invoke) {
- void messageUtils.showTimedMessage(noInlineSuggestionsMsg, 2000)
- }
-
- if (!session || !items.length || !editor) {
- logstr += `Failed to produce inline suggestion results. Received ${items.length} items from service`
- return []
- }
-
- const cursorPosition = document.validatePosition(position)
-
- // Completion will not be rendered if users cursor moves to a position which is before the position when the service is invoked
- if (items.length > 0 && !items[0].isInlineEdit) {
- if (position.isAfter(editor.selection.active)) {
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: session.sessionId,
- completionSessionResult: {
- [itemId]: {
- seen: false,
- accepted: false,
- discarded: true,
- },
- },
- }
- void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
- this.sessionManager.clear()
- logstr += `- cursor moved behind trigger position. Discarding completion suggestion...`
- return []
- }
- }
-
- // delay the suggestion rendeing if user is actively typing
- // see https://github.com/aws/aws-toolkit-vscode/commit/a537602a96f498f372ed61ec9d82cf8577a9d854
- for (let i = 0; i < 30; i++) {
- const lastDocumentChange = this.documentEventListener.getLastDocumentChangeEvent(document.uri.fsPath)
- if (
- lastDocumentChange &&
- Date.now() - lastDocumentChange.timestamp < CodeWhispererConstants.inlineSuggestionShowDelay
- ) {
- await sleep(CodeWhispererConstants.showRecommendationTimerPollPeriod)
- } else {
- break
- }
- }
-
- // the user typed characters from invoking suggestion cursor position to receiving suggestion position
- const typeahead = document.getText(new Range(position, editor.selection.active))
-
- const itemsMatchingTypeahead = []
-
- for (const item of items) {
- if (item.isInlineEdit) {
- // Check if Next Edit Prediction feature flag is enabled
- if (Experiments.instance.get('amazonqLSPNEP', true)) {
- if (this.lastEdit) {
- await this.lastEdit.dispose()
- }
- const e = new EditsSuggestionSvg(item, editor, this.languageClient, session, this)
- await e.show()
- this.lastEdit = e
- logstr += `- duration between trigger to edits suggestion is displayed: ${Date.now() - t0}ms`
- }
- return []
- }
-
- item.insertText = typeof item.insertText === 'string' ? item.insertText : item.insertText.value
- if (item.insertText.startsWith(typeahead)) {
- item.command = {
- command: 'aws.amazonq.acceptInline',
- title: 'On acceptance',
- arguments: [
- session.sessionId,
- item,
- editor,
- session.requestStartTime,
- cursorPosition,
- session.firstCompletionDisplayLatency,
- ],
- }
- item.range = new Range(cursorPosition, cursorPosition)
- itemsMatchingTypeahead.push(item)
- }
- }
-
- // report discard if none of suggestions match typeahead
- if (itemsMatchingTypeahead.length === 0) {
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: session.sessionId,
- completionSessionResult: {
- [itemId]: {
- seen: false,
- accepted: false,
- discarded: true,
- },
- },
- }
- void this.languageClient.sendNotification(this.logSessionResultMessageName, params)
- this.sessionManager.clear()
- logstr += `- suggestion does not match user typeahead from insertion position. Discarding suggestion...`
- return []
- }
-
- this.sessionManager.updateCodeReferenceAndImports()
- // suggestions returned here will be displayed on screen
- logstr += `- duration between trigger to completion suggestion is displayed: ${Date.now() - t0}ms`
- void this.checkWhetherInlineCompletionWasShown()
- return itemsMatchingTypeahead as InlineCompletionItem[]
- } catch (e) {
- getLogger('amazonqLsp').error('Failed to provide completion items: %O', e)
- logstr += `- failed to provide completion items ${(e as Error).message}`
- return []
- } finally {
- vsCodeState.isRecommendationsActive = false
- this.logger.info(logstr)
- }
- }
-}
diff --git a/packages/amazonq/src/app/inline/cursorUpdateManager.ts b/packages/amazonq/src/app/inline/cursorUpdateManager.ts
deleted file mode 100644
index e06285d1f32..00000000000
--- a/packages/amazonq/src/app/inline/cursorUpdateManager.ts
+++ /dev/null
@@ -1,211 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import { BaseLanguageClient } from 'vscode-languageclient'
-import { getLogger } from 'aws-core-vscode/shared'
-import { globals } from 'aws-core-vscode/shared'
-import { AmazonQInlineCompletionItemProvider } from './completion'
-import { CodeSuggestionsState } from 'aws-core-vscode/codewhisperer'
-
-// Configuration section for cursor updates
-export const cursorUpdateConfigurationSection = 'aws.q.cursorUpdate'
-
-/**
- * Interface for recording completion requests
- */
-export interface ICursorUpdateRecorder {
- recordCompletionRequest(): void
-}
-
-/**
- * Manages periodic cursor position updates for Next Edit Prediction
- */
-export class CursorUpdateManager implements vscode.Disposable, ICursorUpdateRecorder {
- private readonly logger = getLogger('amazonqLsp')
- private updateIntervalMs = 250
- private updateTimer?: NodeJS.Timeout
- private lastPosition?: vscode.Position
- private lastDocumentUri?: string
- private lastSentPosition?: vscode.Position
- private lastSentDocumentUri?: string
- private isActive = false
- private lastRequestTime = 0
- private autotriggerStateDisposable?: vscode.Disposable
-
- constructor(
- private readonly languageClient: BaseLanguageClient,
- private readonly inlineCompletionProvider?: AmazonQInlineCompletionItemProvider
- ) {
- // Listen for autotrigger state changes to enable/disable the timer
- this.autotriggerStateDisposable = CodeSuggestionsState.instance.onDidChangeState((isEnabled: boolean) => {
- if (isEnabled && this.isActive) {
- // If autotrigger is enabled and we're active, ensure timer is running
- this.setupUpdateTimer()
- } else {
- // If autotrigger is disabled, clear the timer but keep isActive state
- this.clearUpdateTimer()
- }
- })
- }
-
- /**
- * Start tracking cursor positions and sending periodic updates
- */
- public async start(): Promise {
- if (this.isActive) {
- return
- }
-
- // Request configuration from server
- try {
- const config = await this.languageClient.sendRequest('aws/getConfigurationFromServer', {
- section: cursorUpdateConfigurationSection,
- })
-
- if (
- config &&
- typeof config === 'object' &&
- 'intervalMs' in config &&
- typeof config.intervalMs === 'number' &&
- config.intervalMs > 0
- ) {
- this.updateIntervalMs = config.intervalMs
- }
- } catch (error) {
- this.logger.warn(`Failed to get cursor update configuration from server: ${error}`)
- }
-
- this.isActive = true
- if (CodeSuggestionsState.instance.isSuggestionsEnabled()) {
- this.setupUpdateTimer()
- }
- }
-
- /**
- * Stop tracking cursor positions and sending updates
- */
- public stop(): void {
- this.isActive = false
- this.clearUpdateTimer()
- }
-
- /**
- * Update the current cursor position
- */
- public updatePosition(position: vscode.Position, documentUri: string): void {
- // If the document changed, set the last sent position to the current position
- // This prevents triggering an immediate recommendation when switching tabs
- if (this.lastDocumentUri !== documentUri) {
- this.lastSentPosition = position.with() // Create a copy
- this.lastSentDocumentUri = documentUri
- }
-
- this.lastPosition = position.with() // Create a copy
- this.lastDocumentUri = documentUri
- }
-
- /**
- * Record that a regular InlineCompletionWithReferences request was made
- * This will prevent cursor updates from being sent for the update interval
- */
- public recordCompletionRequest(): void {
- this.lastRequestTime = globals.clock.Date.now()
- }
-
- /**
- * Set up the timer for periodic cursor position updates
- */
- private setupUpdateTimer(): void {
- this.clearUpdateTimer()
-
- this.updateTimer = globals.clock.setInterval(async () => {
- await this.sendCursorUpdate()
- }, this.updateIntervalMs)
- }
-
- /**
- * Clear the update timer
- */
- private clearUpdateTimer(): void {
- if (this.updateTimer) {
- globals.clock.clearInterval(this.updateTimer)
- this.updateTimer = undefined
- }
- }
-
- /**
- * Creates a cancellation token source
- * This method exists to make testing easier by allowing it to be stubbed
- */
- private createCancellationTokenSource(): vscode.CancellationTokenSource {
- return new vscode.CancellationTokenSource()
- }
-
- /**
- * Request LSP generate a completion for the current cursor position.
- */
- private async sendCursorUpdate(): Promise {
- // Don't send an update if a regular request was made recently
- const now = globals.clock.Date.now()
- if (now - this.lastRequestTime < this.updateIntervalMs) {
- return
- }
-
- const editor = vscode.window.activeTextEditor
- if (!editor || editor.document.uri.toString() !== this.lastDocumentUri) {
- return
- }
-
- // Don't send an update if the position hasn't changed since the last update
- if (
- this.lastSentPosition &&
- this.lastPosition &&
- this.lastSentDocumentUri === this.lastDocumentUri &&
- this.lastSentPosition.line === this.lastPosition.line &&
- this.lastSentPosition.character === this.lastPosition.character
- ) {
- return
- }
-
- // Only proceed if we have a valid position and provider
- if (this.lastPosition && this.inlineCompletionProvider) {
- const position = this.lastPosition.with() // Create a copy
-
- // Call the inline completion provider instead of directly calling getAllRecommendations
- try {
- await this.inlineCompletionProvider.provideInlineCompletionItems(
- editor.document,
- position,
- {
- triggerKind: vscode.InlineCompletionTriggerKind.Automatic,
- selectedCompletionInfo: undefined,
- },
- this.createCancellationTokenSource().token,
- { emitTelemetry: false, showUi: false }
- )
-
- // Only update the last sent position after successfully sending the request
- this.lastSentPosition = position
- this.lastSentDocumentUri = this.lastDocumentUri
- } catch (error) {
- this.logger.error(`Error sending cursor update: ${error}`)
- }
- }
- }
-
- /**
- * Dispose of resources
- */
- public dispose(): void {
- // Dispose of the autotrigger state change listener
- if (this.autotriggerStateDisposable) {
- this.autotriggerStateDisposable.dispose()
- this.autotriggerStateDisposable = undefined
- }
-
- this.stop()
- }
-}
diff --git a/packages/amazonq/src/app/inline/documentEventListener.ts b/packages/amazonq/src/app/inline/documentEventListener.ts
deleted file mode 100644
index 7af22a3015a..00000000000
--- a/packages/amazonq/src/app/inline/documentEventListener.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-import * as vscode from 'vscode'
-
-export interface DocumentChangeEvent {
- event: vscode.TextDocumentChangeEvent
- timestamp: number
-}
-
-export class DocumentEventListener {
- private lastDocumentChangeEventMap: Map = new Map()
- private documentChangeListener: vscode.Disposable
- private _maxDocument = 1000
-
- constructor() {
- this.documentChangeListener = vscode.workspace.onDidChangeTextDocument((e) => {
- if (e.contentChanges.length > 0) {
- if (this.lastDocumentChangeEventMap.size > this._maxDocument) {
- this.lastDocumentChangeEventMap.clear()
- }
- this.lastDocumentChangeEventMap.set(e.document.uri.fsPath, { event: e, timestamp: Date.now() })
- // The VS Code provideInlineCompletionCallback may not trigger when Enter is pressed, especially in Python files
- // manually make this trigger. In case of duplicate, the provideInlineCompletionCallback is already debounced
- if (this.isEnter(e) && vscode.window.activeTextEditor) {
- void vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
- }
- }
- })
- }
-
- public isLastEventDeletion(filepath: string): boolean {
- const result = this.lastDocumentChangeEventMap.get(filepath)
- if (result) {
- const event = result.event
- const eventTime = result.timestamp
- const isDelete =
- (event && event.contentChanges.length === 1 && event.contentChanges[0].text === '') || false
- const timeDiff = Math.abs(Date.now() - eventTime)
- return timeDiff < 500 && isDelete
- }
- return false
- }
-
- public getLastDocumentChangeEvent(filepath: string): DocumentChangeEvent | undefined {
- return this.lastDocumentChangeEventMap.get(filepath)
- }
-
- public dispose(): void {
- if (this.documentChangeListener) {
- this.documentChangeListener.dispose()
- }
- }
-
- private isEnter(e: vscode.TextDocumentChangeEvent): boolean {
- if (e.contentChanges.length !== 1) {
- return false
- }
- const str = e.contentChanges[0].text
- if (str.length === 0) {
- return false
- }
- return (
- (str.startsWith('\r\n') && str.substring(2).trim() === '') ||
- (str[0] === '\n' && str.substring(1).trim() === '')
- )
- }
-}
diff --git a/packages/amazonq/src/app/inline/editSuggestionState.ts b/packages/amazonq/src/app/inline/editSuggestionState.ts
deleted file mode 100644
index 61e4aebd142..00000000000
--- a/packages/amazonq/src/app/inline/editSuggestionState.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-/**
- * Manages the state of edit suggestions to avoid circular dependencies
- */
-export class EditSuggestionState {
- private static isEditSuggestionCurrentlyActive = false
- private static displayStartTime = Date.now()
-
- static setEditSuggestionActive(active: boolean): void {
- this.isEditSuggestionCurrentlyActive = active
- if (active) {
- this.displayStartTime = Date.now()
- }
- }
-
- static isEditSuggestionActive(): boolean {
- return this.isEditSuggestionCurrentlyActive
- }
-
- static isEditSuggestionDisplayingOverOneSecond(): boolean {
- return this.isEditSuggestionActive() && Date.now() - this.displayStartTime > 1000
- }
-}
diff --git a/packages/amazonq/src/app/inline/notebookUtil.ts b/packages/amazonq/src/app/inline/notebookUtil.ts
deleted file mode 100644
index 928de1aad33..00000000000
--- a/packages/amazonq/src/app/inline/notebookUtil.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-
-import { CodeWhispererConstants, runtimeLanguageContext } from 'aws-core-vscode/codewhisperer'
-import { InlineCompletionWithReferencesParams } from '@aws/language-server-runtimes/server-interface'
-
-function getEnclosingNotebook(document: vscode.TextDocument): vscode.NotebookDocument | undefined {
- // For notebook cells, find the existing notebook with a cell that matches the current document.
- return vscode.workspace.notebookDocuments.find(
- (nb) => nb.notebookType === 'jupyter-notebook' && nb.getCells().some((cell) => cell.document === document)
- )
-}
-
-export function getNotebookContext(
- notebook: vscode.NotebookDocument,
- document: vscode.TextDocument,
- position: vscode.Position
-) {
- // Expand the context for a cell inside of a noteboo with whatever text fits from the preceding and subsequent cells
- const allCells = notebook.getCells()
- const cellIndex = allCells.findIndex((cell) => cell.document === document)
- let caretLeftFileContext = ''
- let caretRightFileContext = ''
-
- if (cellIndex >= 0 && cellIndex < allCells.length) {
- // Add content from previous cells
- for (let i = 0; i < cellIndex; i++) {
- caretLeftFileContext += convertCellContent(allCells[i]) + '\n'
- }
-
- // Add content from current cell up to cursor
- caretLeftFileContext += allCells[cellIndex].document.getText(
- new vscode.Range(new vscode.Position(0, 0), position)
- )
-
- // Add content from cursor to end of current cell
- caretRightFileContext = allCells[cellIndex].document.getText(
- new vscode.Range(
- position,
- allCells[cellIndex].document.positionAt(allCells[cellIndex].document.getText().length)
- )
- )
-
- // Add content from following cells
- for (let i = cellIndex + 1; i < allCells.length; i++) {
- caretRightFileContext += '\n' + convertCellContent(allCells[i])
- }
- }
- caretLeftFileContext = caretLeftFileContext.slice(-CodeWhispererConstants.charactersLimit)
- caretRightFileContext = caretRightFileContext.slice(0, CodeWhispererConstants.charactersLimit)
- return { caretLeftFileContext, caretRightFileContext }
-}
-
-// Convert the markup cells into code with comments
-export function convertCellContent(cell: vscode.NotebookCell) {
- const cellText = cell.document.getText()
- if (cell.kind === vscode.NotebookCellKind.Markup) {
- const commentPrefix = runtimeLanguageContext.getSingleLineCommentPrefix(
- runtimeLanguageContext.normalizeLanguage(cell.document.languageId) ?? cell.document.languageId
- )
- if (commentPrefix === '') {
- return cellText
- }
- return cell.document
- .getText()
- .split('\n')
- .map((line) => `${commentPrefix}${line}`)
- .join('\n')
- }
- return cellText
-}
-
-export function extractFileContextInNotebooks(
- document: vscode.TextDocument,
- position: vscode.Position
-): InlineCompletionWithReferencesParams['fileContextOverride'] | undefined {
- let caretLeftFileContext = ''
- let caretRightFileContext = ''
- const languageName = runtimeLanguageContext.normalizeLanguage(document.languageId) ?? document.languageId
- if (document.uri.scheme === 'vscode-notebook-cell') {
- const notebook = getEnclosingNotebook(document)
- if (notebook) {
- ;({ caretLeftFileContext, caretRightFileContext } = getNotebookContext(notebook, document, position))
- return {
- leftFileContent: caretLeftFileContext,
- rightFileContent: caretRightFileContext,
- filename: document.fileName,
- fileUri: document.uri.toString(),
- programmingLanguage: languageName,
- }
- }
- }
- return undefined
-}
diff --git a/packages/amazonq/src/app/inline/recommendationService.ts b/packages/amazonq/src/app/inline/recommendationService.ts
deleted file mode 100644
index e866eb47a04..00000000000
--- a/packages/amazonq/src/app/inline/recommendationService.ts
+++ /dev/null
@@ -1,342 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-import {
- InlineCompletionListWithReferences,
- InlineCompletionWithReferencesParams,
- inlineCompletionWithReferencesRequestType,
- TextDocumentContentChangeEvent,
- editCompletionRequestType,
- LogInlineCompletionSessionResultsParams,
-} from '@aws/language-server-runtimes/protocol'
-import { CancellationToken, InlineCompletionContext, Position, TextDocument, commands } from 'vscode'
-import { BaseLanguageClient } from 'vscode-languageclient'
-import { SessionManager } from './sessionManager'
-import {
- AuthUtil,
- CodeWhispererConstants,
- CodeWhispererStatusBarManager,
- vsCodeState,
-} from 'aws-core-vscode/codewhisperer'
-import { TelemetryHelper } from './telemetryHelper'
-import { ICursorUpdateRecorder } from './cursorUpdateManager'
-import { getLogger } from 'aws-core-vscode/shared'
-import { DocumentEventListener } from './documentEventListener'
-import { getOpenFilesInWindow } from 'aws-core-vscode/utils'
-import { asyncCallWithTimeout } from '../../util/timeoutUtil'
-import { extractFileContextInNotebooks } from './notebookUtil'
-import { EditSuggestionState } from './editSuggestionState'
-
-export interface GetAllRecommendationsOptions {
- emitTelemetry?: boolean
- showUi?: boolean
- editsStreakToken?: number | string
-}
-
-export class RecommendationService {
- private logger = getLogger('inline')
-
- constructor(
- private readonly sessionManager: SessionManager,
- private cursorUpdateRecorder?: ICursorUpdateRecorder
- ) {}
- /**
- * Set the recommendation service
- */
- public setCursorUpdateRecorder(recorder: ICursorUpdateRecorder): void {
- this.cursorUpdateRecorder = recorder
- }
-
- async getRecommendationsWithTimeout(
- languageClient: BaseLanguageClient,
- request: InlineCompletionWithReferencesParams,
- token: CancellationToken
- ) {
- const resultPromise: Promise = languageClient.sendRequest(
- inlineCompletionWithReferencesRequestType.method,
- request,
- token
- )
- return await asyncCallWithTimeout(
- resultPromise,
- `${inlineCompletionWithReferencesRequestType.method} time out`,
- CodeWhispererConstants.promiseTimeoutLimit * 1000
- )
- }
-
- async getAllRecommendations(
- languageClient: BaseLanguageClient,
- document: TextDocument,
- position: Position,
- context: InlineCompletionContext,
- token: CancellationToken,
- isAutoTrigger: boolean,
- documentEventListener: DocumentEventListener,
- options: GetAllRecommendationsOptions = { emitTelemetry: true, showUi: true }
- ) {
- const documentChangeEvent = documentEventListener?.getLastDocumentChangeEvent(document.uri.fsPath)?.event
-
- // Record that a regular request is being made
- this.cursorUpdateRecorder?.recordCompletionRequest()
- const documentChangeParams = documentChangeEvent
- ? {
- textDocument: {
- uri: document.uri.toString(),
- version: document.version,
- },
- contentChanges: documentChangeEvent.contentChanges.map((x) => x as TextDocumentContentChangeEvent),
- }
- : undefined
- const openTabs = await getOpenFilesInWindow()
- let request: InlineCompletionWithReferencesParams = {
- textDocument: {
- uri: document.uri.toString(),
- },
- position,
- context,
- documentChangeParams: documentChangeParams,
- openTabFilepaths: openTabs,
- }
- if (options.editsStreakToken) {
- request = { ...request, partialResultToken: options.editsStreakToken }
- }
- if (document.uri.scheme === 'vscode-notebook-cell') {
- request.fileContextOverride = extractFileContextInNotebooks(document, position)
- }
- const requestStartTime = Date.now()
- const statusBar = CodeWhispererStatusBarManager.instance
-
- // Only track telemetry if enabled
- TelemetryHelper.instance.setInvokeSuggestionStartTime()
- TelemetryHelper.instance.setPreprocessEndTime()
- TelemetryHelper.instance.setSdkApiCallStartTime()
-
- try {
- // Show UI indicators only if UI is enabled
- if (options.showUi) {
- await statusBar.setLoading()
- }
-
- // Handle first request
- this.logger.info('Sending inline completion request: %O', {
- method: inlineCompletionWithReferencesRequestType.method,
- request: {
- textDocument: request.textDocument,
- position: request.position,
- context: request.context,
- nextToken: request.partialResultToken,
- },
- })
- const t0 = Date.now()
-
- // Best effort estimate of deletion
- const isTriggerByDeletion = documentEventListener.isLastEventDeletion(document.uri.fsPath)
-
- const ps: Promise[] = []
- /**
- * IsTriggerByDeletion is to prevent user deletion invoking Completions.
- * PartialResultToken is not a hack for now since only Edits suggestion use partialResultToken across different calls of [getAllRecommendations],
- * Completions use PartialResultToken with single 1 call of [getAllRecommendations].
- * Edits leverage partialResultToken to achieve EditStreak such that clients can pull all continuous suggestions generated by the model within 1 EOS block.
- */
- if (!isTriggerByDeletion && !request.partialResultToken && !EditSuggestionState.isEditSuggestionActive()) {
- const completionPromise: Promise = languageClient.sendRequest(
- inlineCompletionWithReferencesRequestType.method,
- request,
- token
- )
- ps.push(completionPromise)
- }
-
- /**
- * Though Edit request is sent on keystrokes everytime, the language server will execute the request in a debounced manner so that it won't be immediately executed.
- */
- const editPromise: Promise = languageClient.sendRequest(
- editCompletionRequestType.method,
- request,
- token
- )
- ps.push(editPromise)
-
- /**
- * First come first serve, ideally we should simply return the first response returned. However there are some caviar here because either
- * (1) promise might be returned early without going through service
- * (2) some users are not enabled with edits suggestion, therefore service will return empty result without passing through the model
- * With the scenarios listed above or others, it's possible that 1 promise will ALWAYS win the race and users will NOT get any suggestion back.
- * This is the hack to return first "NON-EMPTY" response
- */
- let result = await Promise.race(ps)
- if (ps.length > 1 && result.items.length === 0) {
- for (const p of ps) {
- const r = await p
- if (r.items.length > 0) {
- result = r
- }
- }
- }
-
- this.logger.info('Received inline completion response (page 0) from LSP: %O', {
- sessionId: result.sessionId,
- latency: Date.now() - t0,
- itemCount: result.items?.length || 0,
- items: result.items?.map((item) => ({
- itemId: item.itemId,
- insertText:
- (typeof item.insertText === 'string' ? item.insertText : String(item.insertText))?.substring(
- 0,
- 50
- ) + '...',
- })),
- nextToken: result.partialResultToken,
- })
-
- if (result.items.length > 0 && result.items[0].isInlineEdit === false) {
- if (isTriggerByDeletion) {
- this.logger.info(`Suggestions were discarded; reason: triggerByDeletion`)
- return []
- }
- // Completion will not be rendered if an edit suggestion has been active for longer than 1 second
- if (EditSuggestionState.isEditSuggestionDisplayingOverOneSecond()) {
- const session = this.sessionManager.getActiveSession()
- if (!session) {
- this.logger.error(`Suggestions were discarded; reason: undefined conflicting session`)
- return []
- }
- const params: LogInlineCompletionSessionResultsParams = {
- sessionId: session.sessionId,
- completionSessionResult: Object.fromEntries(
- result.items.map((item) => [
- item.itemId,
- {
- seen: false,
- accepted: false,
- discarded: true,
- },
- ])
- ),
- }
- void languageClient.sendNotification('aws/logInlineCompletionSessionResults', params)
- this.sessionManager.clear()
- this.logger.info(
- 'Suggetions were discarded; reason: active edit suggestion displayed longer than 1 second'
- )
- return []
- } else if (EditSuggestionState.isEditSuggestionActive()) {
- // discard the current edit suggestion if its display time is less than 1 sec
- await commands.executeCommand('aws.amazonq.inline.rejectEdit', true)
- this.logger.info('Discarding active edit suggestion displaying less than 1 second')
- }
- }
-
- TelemetryHelper.instance.setSdkApiCallEndTime()
- TelemetryHelper.instance.setSessionId(result.sessionId)
- if (result.items.length > 0 && result.items[0].itemId !== undefined) {
- TelemetryHelper.instance.setFirstResponseRequestId(result.items[0].itemId as string)
- }
- TelemetryHelper.instance.setFirstSuggestionShowTime()
-
- const firstCompletionDisplayLatency = Date.now() - requestStartTime
- this.sessionManager.startSession(
- result.sessionId,
- result.items,
- requestStartTime,
- position,
- document,
- firstCompletionDisplayLatency
- )
-
- const isInlineEdit = result.items.some((item) => item.isInlineEdit)
-
- // TODO: question, is it possible that the first request returns empty suggestion but has non-empty next token?
- if (result.partialResultToken) {
- let logstr = `Found non null next token; `
- if (!isInlineEdit) {
- // If the suggestion is COMPLETIONS and there are more results to fetch, handle them in the background
- logstr += 'start pagination'
- this.processRemainingRequests(languageClient, request, result, token)
- .then(async (flag) => {
- // Force vscode to reload suggestions
- await commands.executeCommand('editor.action.inlineSuggest.hide')
- await commands.executeCommand('editor.action.inlineSuggest.trigger')
-
- const logstr = `Done pagination; shouldUpdate=${flag}; updatedSuggestionCount=${this.sessionManager.getActiveRecommendation().length}`
- this.logger.info(logstr)
- })
- .catch((error) => {
- languageClient.warn(`Error when getting suggestions: ${error}`)
- })
- } else {
- // Skip fetching for more items if the suggesion is EDITS. If it is EDITS suggestion, only fetching for more
- // suggestions when the user start to accept a suggesion.
- // Save editsStreakPartialResultToken for the next EDITS suggestion trigger if user accepts.
- logstr += 'skip pagination as Edit doesnt support pagination'
- this.sessionManager.updateActiveEditsStreakToken(result.partialResultToken)
- }
-
- this.logger.info(logstr)
- }
- } catch (error: any) {
- this.logger.error('Error getting recommendations: %O', error)
- // bearer token expired
- if (error.data && error.data.awsErrorCode === 'E_AMAZON_Q_CONNECTION_EXPIRED') {
- // ref: https://github.com/aws/aws-toolkit-vscode/blob/amazonq/v1.74.0/packages/core/src/codewhisperer/service/inlineCompletionService.ts#L104
- // show re-auth once if connection expired
- if (AuthUtil.instance.isConnectionExpired()) {
- await AuthUtil.instance.notifyReauthenticate(isAutoTrigger)
- } else {
- // get a new bearer token, if this failed, the connection will be marked as expired.
- // new tokens will be synced per 10 seconds in auth.startTokenRefreshInterval
- await AuthUtil.instance.getBearerToken()
- }
- }
- return []
- } finally {
- // Remove all UI indicators if UI is enabled
- if (options.showUi) {
- void statusBar.refreshStatusBar() // effectively "stop loading"
- }
- }
- }
-
- private async processRemainingRequests(
- languageClient: BaseLanguageClient,
- initialRequest: InlineCompletionWithReferencesParams,
- firstResult: InlineCompletionListWithReferences,
- token: CancellationToken
- ): Promise {
- let page = 1
- let logstr = `Pagination call is complete\n\tpage 0 has ${this.sessionManager.getActiveRecommendation().length} suggestions\n`
- let nextToken = firstResult.partialResultToken
- let shouldUpdateUi: boolean = false
- while (nextToken) {
- const request = { ...initialRequest, partialResultToken: nextToken }
-
- const result = await this.getRecommendationsWithTimeout(languageClient, request, token)
-
- logstr += `\tpage ${page} has ${result.items.length} suggestions\n`
-
- // when pagination is in progress, but user has already accepted or rejected an inline completion
- // then stop pagination
- if (this.sessionManager.getActiveSession() === undefined || vsCodeState.isCodeWhispererEditing) {
- break
- }
- this.sessionManager.updateSessionSuggestions(result.items)
- if (result.items.length > 0) {
- shouldUpdateUi = true
- }
- nextToken = result.partialResultToken
- page++
- }
-
- this.logger.info(logstr)
- this.sessionManager.closeSession()
-
- // refresh inline completion items to render paginated responses
- // All pagination requests completed
- TelemetryHelper.instance.setAllPaginationEndTime()
- TelemetryHelper.instance.tryRecordClientComponentLatency()
-
- return shouldUpdateUi
- }
-}
diff --git a/packages/amazonq/src/app/inline/sessionManager.ts b/packages/amazonq/src/app/inline/sessionManager.ts
deleted file mode 100644
index 85b83dd3997..00000000000
--- a/packages/amazonq/src/app/inline/sessionManager.ts
+++ /dev/null
@@ -1,186 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-import * as vscode from 'vscode'
-import { InlineCompletionItemWithReferences } from '@aws/language-server-runtimes-types'
-import {
- FileDiagnostic,
- getDiagnosticsOfCurrentFile,
- ImportAdderProvider,
- ReferenceInlineProvider,
-} from 'aws-core-vscode/codewhisperer'
-
-// TODO: add more needed data to the session interface
-export interface CodeWhispererSession {
- sessionId: string
- suggestions: InlineCompletionItemWithReferences[]
- // TODO: might need to convert to enum states
- isRequestInProgress: boolean
- requestStartTime: number
- firstCompletionDisplayLatency?: number
- startPosition: vscode.Position
- diagnosticsBeforeAccept: FileDiagnostic | undefined
- // partialResultToken for the next trigger if user accepts an EDITS suggestion
- editsStreakPartialResultToken?: number | string
- triggerOnAcceptance?: boolean
- // whether any suggestion in this session was displayed on screen
- displayed: boolean
- // timestamp when the suggestion was last visible
- lastVisibleTime: number
- fileContent: string
-}
-
-export class SessionManager {
- private activeSession?: CodeWhispererSession
- private _acceptedSuggestionCount: number = 0
- private _refreshedSessions = new Set()
- private _currentSuggestionIndex = 0
- constructor() {}
-
- public startSession(
- sessionId: string,
- suggestions: InlineCompletionItemWithReferences[],
- requestStartTime: number,
- startPosition: vscode.Position,
- document: vscode.TextDocument,
- firstCompletionDisplayLatency?: number
- ) {
- const diagnosticsBeforeAccept = getDiagnosticsOfCurrentFile()
- this.activeSession = {
- sessionId,
- suggestions,
- isRequestInProgress: true,
- requestStartTime,
- startPosition,
- firstCompletionDisplayLatency,
- diagnosticsBeforeAccept,
- displayed: false,
- lastVisibleTime: 0,
- fileContent: document.getText(),
- }
- this._currentSuggestionIndex = 0
- }
-
- public closeSession() {
- if (!this.activeSession) {
- return
- }
- this.activeSession.isRequestInProgress = false
- }
-
- public getActiveSession() {
- return this.activeSession
- }
-
- public updateSessionSuggestions(suggestions: InlineCompletionItemWithReferences[]) {
- if (!this.activeSession) {
- return
- }
- this.activeSession.suggestions = [...this.activeSession.suggestions, ...suggestions]
- }
-
- public getActiveRecommendation(): InlineCompletionItemWithReferences[] {
- return this.activeSession?.suggestions ?? []
- }
-
- public get acceptedSuggestionCount(): number {
- return this._acceptedSuggestionCount
- }
-
- public incrementSuggestionCount() {
- this._acceptedSuggestionCount += 1
- }
-
- public updateActiveEditsStreakToken(partialResultToken: number | string) {
- if (!this.activeSession) {
- return
- }
- this.activeSession.editsStreakPartialResultToken = partialResultToken
- }
-
- public clear() {
- this.activeSession = undefined
- this._currentSuggestionIndex = 0
- this.clearReferenceInlineHintsAndImportHints()
- }
-
- // re-render the session ghost text to display paginated responses once per completed session
- public async maybeRefreshSessionUx() {
- if (
- this.activeSession &&
- !this.activeSession.isRequestInProgress &&
- !this._refreshedSessions.has(this.activeSession.sessionId)
- ) {
- await vscode.commands.executeCommand('editor.action.inlineSuggest.hide')
- await vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
- if (this._refreshedSessions.size > 1000) {
- this._refreshedSessions.clear()
- }
- this._refreshedSessions.add(this.activeSession.sessionId)
- }
- }
-
- public onNextSuggestion() {
- if (this.activeSession?.suggestions && this.activeSession?.suggestions.length > 0) {
- this._currentSuggestionIndex = (this._currentSuggestionIndex + 1) % this.activeSession.suggestions.length
- this.updateCodeReferenceAndImports()
- }
- }
-
- public onPrevSuggestion() {
- if (this.activeSession?.suggestions && this.activeSession.suggestions.length > 0) {
- this._currentSuggestionIndex =
- (this._currentSuggestionIndex - 1 + this.activeSession.suggestions.length) %
- this.activeSession.suggestions.length
- this.updateCodeReferenceAndImports()
- }
- }
-
- public checkInlineSuggestionVisibility() {
- if (this.activeSession) {
- this.activeSession.displayed = true
- this.activeSession.lastVisibleTime = Date.now()
- }
- }
-
- private clearReferenceInlineHintsAndImportHints() {
- ReferenceInlineProvider.instance.removeInlineReference()
- ImportAdderProvider.instance.clear()
- }
-
- // Ideally use this API handleDidShowCompletionItem
- // https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts#L83
- updateCodeReferenceAndImports() {
- try {
- this.clearReferenceInlineHintsAndImportHints()
- if (
- this.activeSession?.suggestions &&
- this.activeSession.suggestions[this._currentSuggestionIndex] &&
- this.activeSession.suggestions.length > 0
- ) {
- const reference = this.activeSession.suggestions[this._currentSuggestionIndex].references
- const insertText = this.activeSession.suggestions[this._currentSuggestionIndex].insertText
- if (reference && reference.length > 0) {
- const insertTextStr =
- typeof insertText === 'string' ? insertText : (insertText.value ?? String(insertText))
-
- ReferenceInlineProvider.instance.setInlineReference(
- this.activeSession.startPosition.line,
- insertTextStr,
- reference
- )
- }
- if (vscode.window.activeTextEditor) {
- ImportAdderProvider.instance.onShowRecommendation(
- vscode.window.activeTextEditor.document,
- this.activeSession.startPosition.line,
- this.activeSession.suggestions[this._currentSuggestionIndex]
- )
- }
- }
- } catch {
- // do nothing as this is not critical path
- }
- }
-}
diff --git a/packages/amazonq/src/app/inline/stateTracker/lineTracker.ts b/packages/amazonq/src/app/inline/stateTracker/lineTracker.ts
deleted file mode 100644
index 58bee329a40..00000000000
--- a/packages/amazonq/src/app/inline/stateTracker/lineTracker.ts
+++ /dev/null
@@ -1,178 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import { editorUtilities, setContext } from 'aws-core-vscode/shared'
-
-export interface LineSelection {
- anchor: number
- active: number
-}
-
-export interface LinesChangeEvent {
- readonly editor: vscode.TextEditor | undefined
- readonly selections: LineSelection[] | undefined
-
- readonly reason: 'editor' | 'selection' | 'content'
-}
-
-/**
- * This class providees a single interface to manage and access users' "line" selections
- * Callers could use it by subscribing onDidChangeActiveLines to do UI updates or logic needed to be executed when line selections get changed
- */
-export class LineTracker implements vscode.Disposable {
- private _onDidChangeActiveLines = new vscode.EventEmitter()
- get onDidChangeActiveLines(): vscode.Event {
- return this._onDidChangeActiveLines.event
- }
-
- private _editor: vscode.TextEditor | undefined
- private _disposable: vscode.Disposable | undefined
-
- private _selections: LineSelection[] | undefined
- get selections(): LineSelection[] | undefined {
- return this._selections
- }
-
- private _onReady: vscode.EventEmitter = new vscode.EventEmitter()
- get onReady(): vscode.Event {
- return this._onReady.event
- }
-
- private _ready: boolean = false
- get isReady() {
- return this._ready
- }
-
- constructor() {
- this._disposable = vscode.Disposable.from(
- vscode.window.onDidChangeActiveTextEditor(async (e) => {
- await this.onActiveTextEditorChanged(e)
- }),
- vscode.window.onDidChangeTextEditorSelection(async (e) => {
- await this.onTextEditorSelectionChanged(e)
- }),
- vscode.workspace.onDidChangeTextDocument((e) => {
- this.onContentChanged(e)
- })
- )
-
- queueMicrotask(async () => await this.onActiveTextEditorChanged(vscode.window.activeTextEditor))
- }
-
- dispose() {
- this._disposable?.dispose()
- }
-
- ready() {
- if (this._ready) {
- throw new Error('Linetracker is already activated')
- }
-
- this._ready = true
- queueMicrotask(() => this._onReady.fire())
- }
-
- // @VisibleForTesting
- async onActiveTextEditorChanged(editor: vscode.TextEditor | undefined) {
- if (editor === this._editor) {
- return
- }
-
- this._editor = editor
- this._selections = toLineSelections(editor?.selections)
- if (this._selections && this._selections[0]) {
- const s = this._selections.map((item) => item.active + 1)
- await setContext('codewhisperer.activeLine', s)
- }
-
- this.notifyLinesChanged('editor')
- }
-
- // @VisibleForTesting
- async onTextEditorSelectionChanged(e: vscode.TextEditorSelectionChangeEvent) {
- // If this isn't for our cached editor and its not a real editor -- kick out
- if (this._editor !== e.textEditor && !editorUtilities.isTextEditor(e.textEditor)) {
- return
- }
-
- const selections = toLineSelections(e.selections)
- if (this._editor === e.textEditor && this.includes(selections)) {
- return
- }
-
- this._editor = e.textEditor
- this._selections = selections
- if (this._selections && this._selections[0]) {
- const s = this._selections.map((item) => item.active + 1)
- await setContext('codewhisperer.activeLine', s)
- }
-
- this.notifyLinesChanged('selection')
- }
-
- // @VisibleForTesting
- onContentChanged(e: vscode.TextDocumentChangeEvent) {
- const editor = vscode.window.activeTextEditor
- if (e.document === editor?.document && e.contentChanges.length > 0 && editorUtilities.isTextEditor(editor)) {
- this._editor = editor
- this._selections = toLineSelections(this._editor?.selections)
-
- this.notifyLinesChanged('content')
- }
- }
-
- notifyLinesChanged(reason: 'editor' | 'selection' | 'content') {
- const e: LinesChangeEvent = { editor: this._editor, selections: this.selections, reason: reason }
- this._onDidChangeActiveLines.fire(e)
- }
-
- includes(selections: LineSelection[]): boolean
- includes(line: number, options?: { activeOnly: boolean }): boolean
- includes(lineOrSelections: number | LineSelection[], options?: { activeOnly: boolean }): boolean {
- if (typeof lineOrSelections !== 'number') {
- return isIncluded(lineOrSelections, this._selections)
- }
-
- if (this._selections === undefined || this._selections.length === 0) {
- return false
- }
-
- const line = lineOrSelections
- const activeOnly = options?.activeOnly ?? true
-
- for (const selection of this._selections) {
- if (
- line === selection.active ||
- (!activeOnly &&
- ((selection.anchor >= line && line >= selection.active) ||
- (selection.active >= line && line >= selection.anchor)))
- ) {
- return true
- }
- }
- return false
- }
-}
-
-function isIncluded(selections: LineSelection[] | undefined, within: LineSelection[] | undefined): boolean {
- if (selections === undefined && within === undefined) {
- return true
- }
- if (selections === undefined || within === undefined || selections.length !== within.length) {
- return false
- }
-
- return selections.every((s, i) => {
- const match = within[i]
- return s.active === match.active && s.anchor === match.anchor
- })
-}
-
-function toLineSelections(selections: readonly vscode.Selection[]): LineSelection[]
-function toLineSelections(selections: readonly vscode.Selection[] | undefined): LineSelection[] | undefined
-function toLineSelections(selections: readonly vscode.Selection[] | undefined) {
- return selections?.map((s) => ({ active: s.active.line, anchor: s.anchor.line }))
-}
diff --git a/packages/amazonq/src/app/inline/telemetryHelper.ts b/packages/amazonq/src/app/inline/telemetryHelper.ts
deleted file mode 100644
index 41db4c7469a..00000000000
--- a/packages/amazonq/src/app/inline/telemetryHelper.ts
+++ /dev/null
@@ -1,162 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import { AuthUtil, getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
-import { CodewhispererLanguage } from 'aws-core-vscode/shared'
-import { CodewhispererTriggerType, telemetry } from 'aws-core-vscode/telemetry'
-import { InlineCompletionTriggerKind } from 'vscode'
-
-export class TelemetryHelper {
- // Variables needed for client component latency
- private _invokeSuggestionStartTime = 0
- private _preprocessEndTime = 0
- private _sdkApiCallStartTime = 0
- private _sdkApiCallEndTime = 0
- private _allPaginationEndTime = 0
- private _firstSuggestionShowTime = 0
- private _firstResponseRequestId = ''
- private _sessionId = ''
- private _language: CodewhispererLanguage = 'java'
- private _triggerType: CodewhispererTriggerType = 'OnDemand'
-
- constructor() {}
-
- static #instance: TelemetryHelper
-
- public static get instance() {
- return (this.#instance ??= new this())
- }
-
- public resetClientComponentLatencyTime() {
- this._invokeSuggestionStartTime = 0
- this._preprocessEndTime = 0
- this._sdkApiCallStartTime = 0
- this._sdkApiCallEndTime = 0
- this._firstSuggestionShowTime = 0
- this._allPaginationEndTime = 0
- this._firstResponseRequestId = ''
- }
-
- public setInvokeSuggestionStartTime() {
- this.resetClientComponentLatencyTime()
- this._invokeSuggestionStartTime = Date.now()
- }
-
- get invokeSuggestionStartTime(): number {
- return this._invokeSuggestionStartTime
- }
-
- public setPreprocessEndTime() {
- this._preprocessEndTime = Date.now()
- }
-
- get preprocessEndTime(): number {
- return this._preprocessEndTime
- }
-
- public setSdkApiCallStartTime() {
- if (this._sdkApiCallStartTime === 0) {
- this._sdkApiCallStartTime = Date.now()
- }
- }
-
- get sdkApiCallStartTime(): number {
- return this._sdkApiCallStartTime
- }
-
- public setSdkApiCallEndTime() {
- if (this._sdkApiCallEndTime === 0 && this._sdkApiCallStartTime !== 0) {
- this._sdkApiCallEndTime = Date.now()
- }
- }
-
- get sdkApiCallEndTime(): number {
- return this._sdkApiCallEndTime
- }
-
- public setAllPaginationEndTime() {
- if (this._allPaginationEndTime === 0 && this._sdkApiCallEndTime !== 0) {
- this._allPaginationEndTime = Date.now()
- }
- }
-
- get allPaginationEndTime(): number {
- return this._allPaginationEndTime
- }
-
- public setFirstSuggestionShowTime() {
- if (this._firstSuggestionShowTime === 0 && this._sdkApiCallEndTime !== 0) {
- this._firstSuggestionShowTime = Date.now()
- }
- }
-
- get firstSuggestionShowTime(): number {
- return this._firstSuggestionShowTime
- }
-
- public setFirstResponseRequestId(requestId: string) {
- if (this._firstResponseRequestId === '') {
- this._firstResponseRequestId = requestId
- }
- }
-
- get firstResponseRequestId(): string {
- return this._firstResponseRequestId
- }
-
- public setSessionId(sessionId: string) {
- if (this._sessionId === '') {
- this._sessionId = sessionId
- }
- }
-
- get sessionId(): string {
- return this._sessionId
- }
-
- public setLanguage(language: CodewhispererLanguage) {
- this._language = language
- }
-
- get language(): CodewhispererLanguage {
- return this._language
- }
-
- public setTriggerType(triggerType: InlineCompletionTriggerKind) {
- if (triggerType === InlineCompletionTriggerKind.Invoke) {
- this._triggerType = 'OnDemand'
- } else if (triggerType === InlineCompletionTriggerKind.Automatic) {
- this._triggerType = 'AutoTrigger'
- }
- }
-
- get triggerType(): string {
- return this._triggerType
- }
-
- // report client component latency after all pagination call finish
- // and at least one suggestion is shown to the user
- public tryRecordClientComponentLatency() {
- if (this._firstSuggestionShowTime === 0 || this._allPaginationEndTime === 0) {
- return
- }
- telemetry.codewhisperer_clientComponentLatency.emit({
- codewhispererAllCompletionsLatency: this._allPaginationEndTime - this._sdkApiCallStartTime,
- codewhispererCompletionType: 'Line',
- codewhispererCredentialFetchingLatency: 0, // no longer relevant, because we don't re-build the sdk. Flare already has that set
- codewhispererCustomizationArn: getSelectedCustomization().arn,
- codewhispererEndToEndLatency: this._firstSuggestionShowTime - this._invokeSuggestionStartTime,
- codewhispererFirstCompletionLatency: this._sdkApiCallEndTime - this._sdkApiCallStartTime,
- codewhispererLanguage: this._language,
- codewhispererPostprocessingLatency: this._firstSuggestionShowTime - this._sdkApiCallEndTime,
- codewhispererPreprocessingLatency: this._preprocessEndTime - this._invokeSuggestionStartTime,
- codewhispererRequestId: this._firstResponseRequestId,
- codewhispererSessionId: this._sessionId,
- codewhispererTriggerType: this._triggerType,
- credentialStartUrl: AuthUtil.instance.startUrl,
- result: 'Succeeded',
- })
- }
-}
diff --git a/packages/amazonq/src/app/inline/tutorials/inlineChatTutorialAnnotation.ts b/packages/amazonq/src/app/inline/tutorials/inlineChatTutorialAnnotation.ts
deleted file mode 100644
index 1208b4766af..00000000000
--- a/packages/amazonq/src/app/inline/tutorials/inlineChatTutorialAnnotation.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import { InlineTutorialAnnotation } from './inlineTutorialAnnotation'
-import { globals } from 'aws-core-vscode/shared'
-
-export class InlineChatTutorialAnnotation {
- private enabled: boolean = true
-
- constructor(private readonly inlineTutorialAnnotation: InlineTutorialAnnotation) {
- globals.context.subscriptions.push(
- vscode.window.onDidChangeTextEditorSelection(async ({ selections, textEditor }) => {
- let showShow = false
-
- if (this.enabled) {
- for (const selection of selections) {
- if (selection.end.line === selection.start.line + 1 && selection.end.character === 0) {
- // dont show if the selection is just a newline
- } else if (selection.start.line !== selection.end.line) {
- showShow = true
- break
- }
- }
- }
-
- await this.setVisible(textEditor, showShow)
- }, this)
- )
- }
-
- private async setVisible(editor: vscode.TextEditor, visible: boolean) {
- let needsRefresh: boolean
- if (visible) {
- needsRefresh = await this.inlineTutorialAnnotation.tryShowInlineHint()
- } else {
- needsRefresh = await this.inlineTutorialAnnotation.tryHideInlineHint()
- }
- if (needsRefresh) {
- await this.inlineTutorialAnnotation.refresh(editor, 'codewhisperer')
- }
- }
-
- async hide(editor: vscode.TextEditor) {
- await this.setVisible(editor, false)
- }
-
- enable() {
- this.enabled = true
- }
-
- async disable(editor: vscode.TextEditor) {
- this.enabled = false
- await this.setVisible(editor, false)
- }
-}
diff --git a/packages/amazonq/src/app/inline/tutorials/inlineTutorialAnnotation.ts b/packages/amazonq/src/app/inline/tutorials/inlineTutorialAnnotation.ts
deleted file mode 100644
index ad0807df94c..00000000000
--- a/packages/amazonq/src/app/inline/tutorials/inlineTutorialAnnotation.ts
+++ /dev/null
@@ -1,519 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-import * as os from 'os'
-import { AnnotationChangeSource, AuthUtil, inlinehintKey, runtimeLanguageContext } from 'aws-core-vscode/codewhisperer'
-import { editorUtilities, getLogger, globals, setContext, vscodeUtilities } from 'aws-core-vscode/shared'
-import { LinesChangeEvent, LineSelection, LineTracker } from '../stateTracker/lineTracker'
-import { telemetry } from 'aws-core-vscode/telemetry'
-import { cancellableDebounce } from 'aws-core-vscode/utils'
-import { SessionManager } from '../sessionManager'
-
-const case3TimeWindow = 30000 // 30 seconds
-
-const maxSmallIntegerV8 = 2 ** 30 // Max number that can be stored in V8's smis (small integers)
-
-function fromId(id: string | undefined, sessionManager: SessionManager): AnnotationState | undefined {
- switch (id) {
- case AutotriggerState.id:
- return new AutotriggerState(sessionManager)
- case PressTabState.id:
- return new AutotriggerState(sessionManager)
- case ManualtriggerState.id:
- return new ManualtriggerState()
- case TryMoreExState.id:
- return new TryMoreExState()
- case EndState.id:
- return new EndState()
- case InlineChatState.id:
- return new InlineChatState()
- default:
- return undefined
- }
-}
-
-interface AnnotationState {
- id: string
- suppressWhileRunning: boolean
- decorationRenderOptions?: vscode.ThemableDecorationAttachmentRenderOptions
-
- text: () => string
- updateState(changeSource: AnnotationChangeSource, force: boolean): AnnotationState | undefined
- isNextState(state: AnnotationState | undefined): boolean
-}
-
-/**
- * case 1: How Cwspr triggers
- * Trigger Criteria:
- * User opens an editor file &&
- * CW is not providing a suggestion &&
- * User has not accepted any suggestion
- *
- * Exit criteria:
- * User accepts 1 suggestion
- *
- */
-export class AutotriggerState implements AnnotationState {
- static id = 'codewhisperer_learnmore_case_1'
- id = AutotriggerState.id
-
- suppressWhileRunning = true
- text = () => 'Amazon Q Tip 1/3: Start typing to get suggestions ([ESC] to exit)'
- static acceptedCount = 0
-
- constructor(private readonly sessionManager: SessionManager) {}
-
- updateState(changeSource: AnnotationChangeSource, force: boolean): AnnotationState | undefined {
- if (AutotriggerState.acceptedCount < this.sessionManager.acceptedSuggestionCount) {
- return new ManualtriggerState()
- } else if (this.sessionManager.getActiveRecommendation().length > 0) {
- return new PressTabState(this.sessionManager)
- } else {
- return this
- }
- }
-
- isNextState(state: AnnotationState | undefined): boolean {
- return state instanceof ManualtriggerState
- }
-}
-
-/**
- * case 1-a: Tab to accept
- * Trigger Criteria:
- * Case 1 &&
- * Inline suggestion is being shown
- *
- * Exit criteria:
- * User accepts 1 suggestion
- */
-export class PressTabState implements AnnotationState {
- static id = 'codewhisperer_learnmore_case_1a'
- id = PressTabState.id
-
- suppressWhileRunning = false
-
- text = () => 'Amazon Q Tip 1/3: Press [TAB] to accept ([ESC] to exit)'
-
- constructor(private readonly sessionManager: SessionManager) {}
-
- updateState(changeSource: AnnotationChangeSource, force: boolean): AnnotationState | undefined {
- return new AutotriggerState(this.sessionManager).updateState(changeSource, force)
- }
-
- isNextState(state: AnnotationState | undefined): boolean {
- return state instanceof ManualtriggerState
- }
-}
-
-/**
- * case 2: Manual trigger
- * Trigger Criteria:
- * User exists case 1 &&
- * User navigates to a new line
- *
- * Exit criteria:
- * User inokes manual trigger shortcut
- */
-export class ManualtriggerState implements AnnotationState {
- static id = 'codewhisperer_learnmore_case_2'
- id = ManualtriggerState.id
-
- suppressWhileRunning = true
-
- text = () => {
- if (os.platform() === 'win32') {
- return 'Amazon Q Tip 2/3: Invoke suggestions with [Alt] + [C] ([ESC] to exit)'
- }
-
- return 'Amazon Q Tip 2/3: Invoke suggestions with [Option] + [C] ([ESC] to exit)'
- }
- hasManualTrigger: boolean = false
- hasValidResponse: boolean = false
-
- updateState(changeSource: AnnotationChangeSource, force: boolean): AnnotationState | undefined {
- if (this.hasManualTrigger && this.hasValidResponse) {
- if (changeSource !== 'codewhisperer') {
- return new TryMoreExState()
- } else {
- return undefined
- }
- } else {
- return this
- }
- }
-
- isNextState(state: AnnotationState | undefined): boolean {
- return state instanceof TryMoreExState
- }
-}
-
-/**
- * case 3: Learn more
- * Trigger Criteria:
- * User exists case 2 &&
- * User navigates to a new line
- *
- * Exit criteria:
- * User accepts or rejects the suggestion
- */
-export class TryMoreExState implements AnnotationState {
- static id = 'codewhisperer_learnmore_case_3'
- id = TryMoreExState.id
-
- suppressWhileRunning = true
-
- text = () => 'Amazon Q Tip 3/3: For settings, open the Amazon Q menu from the status bar ([ESC] to exit)'
- updateState(changeSource: AnnotationChangeSource, force: boolean): AnnotationState {
- if (force) {
- return new EndState()
- }
- return this
- }
-
- isNextState(state: AnnotationState | undefined): boolean {
- return state instanceof EndState
- }
-
- static learnmoeCount: number = 0
-}
-
-export class EndState implements AnnotationState {
- static id = 'codewhisperer_learnmore_end'
- id = EndState.id
-
- suppressWhileRunning = true
- text = () => ''
- updateState(changeSource: AnnotationChangeSource, force: boolean): AnnotationState {
- return this
- }
- isNextState(state: AnnotationState): boolean {
- return false
- }
-}
-
-export class InlineChatState implements AnnotationState {
- static id = 'amazonq_annotation_inline_chat'
- id = InlineChatState.id
- suppressWhileRunning = false
-
- text = () => {
- if (os.platform() === 'darwin') {
- return 'Amazon Q: Edit \u2318I'
- }
- return 'Amazon Q: Edit (Ctrl+I)'
- }
- updateState(_changeSource: AnnotationChangeSource, _force: boolean): AnnotationState {
- return this
- }
- isNextState(_state: AnnotationState | undefined): boolean {
- return false
- }
-}
-
-/**
- * There are
- * - existing users
- * - new users
- * -- new users who has not seen tutorial
- * -- new users who has seen tutorial
- *
- * "existing users" should have the context key "CODEWHISPERER_AUTO_TRIGGER_ENABLED"
- * "new users who has seen tutorial" should have the context key "inlineKey" and "CODEWHISPERER_AUTO_TRIGGER_ENABLED"
- * the remaining grouop of users should belong to "new users who has not seen tutorial"
- */
-export class InlineTutorialAnnotation implements vscode.Disposable {
- private readonly _disposable: vscode.Disposable
- private _editor: vscode.TextEditor | undefined
-
- private _currentState: AnnotationState
-
- private readonly cwLineHintDecoration: vscode.TextEditorDecorationType =
- vscode.window.createTextEditorDecorationType({
- after: {
- margin: '0 0 0 3em',
- // "borderRadius" and "padding" are not available on "after" type of decoration, this is a hack to inject these css prop to "after" content. Refer to https://github.com/microsoft/vscode/issues/68845
- textDecoration: ';border-radius:0.25rem;padding:0rem 0.5rem;',
- width: 'fit-content',
- },
- rangeBehavior: vscode.DecorationRangeBehavior.OpenOpen,
- })
-
- constructor(
- private readonly lineTracker: LineTracker,
- private readonly sessionManager: SessionManager
- ) {
- const cachedState = fromId(globals.globalState.get(inlinehintKey), sessionManager)
- const cachedAutotriggerEnabled = globals.globalState.get('CODEWHISPERER_AUTO_TRIGGER_ENABLED')
-
- // new users (has or has not seen tutorial)
- if (cachedAutotriggerEnabled === undefined || cachedState !== undefined) {
- this._currentState = cachedState ?? new AutotriggerState(this.sessionManager)
- getLogger().debug(
- `codewhisperer: new user login, activating inline tutorial. (autotriggerEnabled=${cachedAutotriggerEnabled}; inlineState=${cachedState?.id})`
- )
- } else {
- this._currentState = new EndState()
- getLogger().debug(`codewhisperer: existing user login, disabling inline tutorial.`)
- }
-
- this._disposable = vscode.Disposable.from(
- vscodeUtilities.subscribeOnce(this.lineTracker.onReady)(async (_) => {
- await this.onReady()
- }),
- this.lineTracker.onDidChangeActiveLines(async (e) => {
- await this.onActiveLinesChanged(e)
- }),
- AuthUtil.instance.auth.onDidChangeConnectionState(async (e) => {
- if (e.state !== 'authenticating') {
- await this.refresh(vscode.window.activeTextEditor, 'editor')
- }
- }),
- AuthUtil.instance.secondaryAuth.onDidChangeActiveConnection(async () => {
- await this.refresh(vscode.window.activeTextEditor, 'editor')
- })
- )
- }
-
- dispose() {
- this._disposable.dispose()
- }
-
- private _isReady: boolean = false
-
- private async onReady(): Promise {
- this._isReady = !(this._currentState instanceof EndState)
- await this._refresh(vscode.window.activeTextEditor, 'editor')
- }
-
- async triggered(triggerType: vscode.InlineCompletionTriggerKind): Promise {
- // TODO: this logic will take ~200ms each trigger, need to root cause and re-enable once it's fixed, or it should only be invoked when the tutorial is actually needed
- // await telemetry.withTraceId(async () => {
- // if (!this._isReady) {
- // return
- // }
- // if (this._currentState instanceof ManualtriggerState) {
- // if (
- // triggerType === vscode.InlineCompletionTriggerKind.Invoke &&
- // this._currentState.hasManualTrigger === false
- // ) {
- // this._currentState.hasManualTrigger = true
- // }
- // if (
- // this.sessionManager.getActiveRecommendation().length > 0 &&
- // this._currentState.hasValidResponse === false
- // ) {
- // this._currentState.hasValidResponse = true
- // }
- // }
- // await this.refresh(vscode.window.activeTextEditor, 'codewhisperer')
- // }, TelemetryHelper.instance.traceId)
- }
-
- isTutorialDone(): boolean {
- return this._currentState.id === new EndState().id
- }
-
- isInlineChatHint(): boolean {
- return this._currentState.id === new InlineChatState().id
- }
-
- async dismissTutorial() {
- this._currentState = new EndState()
- await setContext('aws.codewhisperer.tutorial.workInProgress', false)
- await globals.globalState.update(inlinehintKey, this._currentState.id)
- }
-
- /**
- * Trys to show the inline hint, if the tutorial is not finished it will not be shown
- */
- async tryShowInlineHint(): Promise {
- if (this.isTutorialDone()) {
- this._isReady = true
- this._currentState = new InlineChatState()
- return true
- }
- return false
- }
-
- async tryHideInlineHint(): Promise {
- if (this._currentState instanceof InlineChatState) {
- this._currentState = new EndState()
- return true
- }
- return false
- }
-
- private async onActiveLinesChanged(e: LinesChangeEvent) {
- if (!this._isReady) {
- return
- }
-
- this.clear()
-
- await this.refresh(e.editor, e.reason)
- }
-
- clear() {
- this._editor?.setDecorations(this.cwLineHintDecoration, [])
- }
-
- async refresh(editor: vscode.TextEditor | undefined, source: AnnotationChangeSource, force?: boolean) {
- if (force) {
- this.refreshDebounced.cancel()
- await this._refresh(editor, source, true)
- } else {
- await this.refreshDebounced.promise(editor, source)
- }
- }
-
- private readonly refreshDebounced = cancellableDebounce(
- async (editor: vscode.TextEditor | undefined, source: AnnotationChangeSource, force?: boolean) => {
- await this._refresh(editor, source, force)
- },
- 250
- )
-
- private async _refresh(editor: vscode.TextEditor | undefined, source: AnnotationChangeSource, force?: boolean) {
- if (!this._isReady) {
- this.clear()
- return
- }
-
- if (this.isTutorialDone()) {
- this.clear()
- return
- }
-
- if (editor === undefined && this._editor === undefined) {
- this.clear()
- return
- }
-
- const selections = this.lineTracker.selections
- if (editor === undefined || selections === undefined || !editorUtilities.isTextEditor(editor)) {
- this.clear()
- return
- }
-
- if (this._editor !== editor) {
- // Clear any annotations on the previously active editor
- this.clear()
- this._editor = editor
- }
-
- // Make sure the editor hasn't died since the await above and that we are still on the same line(s)
- if (editor.document === undefined || !this.lineTracker.includes(selections)) {
- this.clear()
- return
- }
-
- if (!AuthUtil.instance.isConnectionValid()) {
- this.clear()
- return
- }
-
- // Disable Tips when language is not supported by Amazon Q.
- if (!runtimeLanguageContext.isLanguageSupported(editor.document)) {
- return
- }
-
- await this.updateDecorations(editor, selections, source, force)
- }
-
- private async updateDecorations(
- editor: vscode.TextEditor,
- lines: LineSelection[],
- source: AnnotationChangeSource,
- force?: boolean
- ) {
- const range = editor.document.validateRange(
- new vscode.Range(lines[0].active, maxSmallIntegerV8, lines[0].active, maxSmallIntegerV8)
- )
-
- const decorationOptions = this.getInlineDecoration(editor, lines, source, force) as
- | vscode.DecorationOptions
- | undefined
-
- if (decorationOptions === undefined) {
- this.clear()
- await setContext('aws.codewhisperer.tutorial.workInProgress', false)
- return
- } else if (this.isTutorialDone()) {
- // special case
- // Endstate is meaningless and doesnt need to be rendered
- this.clear()
- await this.dismissTutorial()
- return
- } else if (decorationOptions.renderOptions?.after?.contentText === new TryMoreExState().text()) {
- // special case
- // case 3 exit criteria is to fade away in 30s
- setTimeout(async () => {
- await this.refresh(editor, source, true)
- }, case3TimeWindow)
- }
-
- decorationOptions.range = range
-
- await globals.globalState.update(inlinehintKey, this._currentState.id)
- if (!this.isInlineChatHint()) {
- await setContext('aws.codewhisperer.tutorial.workInProgress', true)
- }
- editor.setDecorations(this.cwLineHintDecoration, [decorationOptions])
- }
-
- getInlineDecoration(
- editor: vscode.TextEditor,
- lines: LineSelection[],
- source: AnnotationChangeSource,
- force?: boolean
- ): Partial | undefined {
- const isCWRunning = this.sessionManager.getActiveSession()?.isRequestInProgress ?? false
-
- const textOptions: vscode.ThemableDecorationAttachmentRenderOptions = {
- contentText: '',
- fontWeight: 'normal',
- fontStyle: 'normal',
- textDecoration: 'none',
- color: 'var(--vscode-editor-background)',
- backgroundColor: 'var(--vscode-foreground)',
- }
-
- if (isCWRunning && this._currentState.suppressWhileRunning) {
- return undefined
- }
-
- const updatedState: AnnotationState | undefined = this._currentState.updateState(source, force ?? false)
-
- if (updatedState === undefined) {
- return undefined
- }
-
- if (this._currentState.isNextState(updatedState)) {
- // special case because PressTabState is part of case_1 (1a) which possibly jumps directly from case_1a to case_2 and miss case_1
- if (this._currentState instanceof PressTabState) {
- telemetry.ui_click.emit({ elementId: AutotriggerState.id, passive: true })
- }
- telemetry.ui_click.emit({ elementId: this._currentState.id, passive: true })
- }
-
- // update state
- this._currentState = updatedState
-
- // take snapshot of accepted session so that we can compre if there is delta -> users accept 1 suggestion after seeing this state
- AutotriggerState.acceptedCount = this.sessionManager.acceptedSuggestionCount
-
- textOptions.contentText = this._currentState.text()
-
- return {
- renderOptions: { after: textOptions },
- }
- }
-
- public get currentState(): AnnotationState {
- return this._currentState
- }
-}
diff --git a/packages/amazonq/src/app/inline/webViewPanel.ts b/packages/amazonq/src/app/inline/webViewPanel.ts
deleted file mode 100644
index 2effa94429c..00000000000
--- a/packages/amazonq/src/app/inline/webViewPanel.ts
+++ /dev/null
@@ -1,450 +0,0 @@
-/*!
- * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
- * SPDX-License-Identifier: Apache-2.0
- */
-
-import * as vscode from 'vscode'
-/* eslint-disable no-restricted-imports */
-import fs from 'fs'
-import { getLogger } from 'aws-core-vscode/shared'
-
-/**
- * Interface for JSON request log data
- */
-interface RequestLogEntry {
- timestamp: string
- request: string
- response: string
- endpoint: string
- error: string
- requestId: string
- responseCode: number
- applicationLogs?: {
- rts?: string[]
- ceo?: string[]
- [key: string]: string[] | undefined
- }
- latency?: number
- latencyBreakdown?: {
- rts?: number
- ceo?: number
- [key: string]: number | undefined
- }
- miscellaneous?: any
-}
-
-/**
- * Manages the webview panel for displaying insert text content and request logs
- */
-export class NextEditPredictionPanel implements vscode.Disposable {
- public static readonly viewType = 'nextEditPrediction'
-
- private static instance: NextEditPredictionPanel | undefined
- private panel: vscode.WebviewPanel | undefined
- private disposables: vscode.Disposable[] = []
- private statusBarItem: vscode.StatusBarItem
- private isVisible = false
- private fileWatcher: vscode.FileSystemWatcher | undefined
- private requestLogs: RequestLogEntry[] = []
- private logFilePath = '/tmp/request_log.jsonl'
- private fileReadTimeout: NodeJS.Timeout | undefined
-
- private constructor() {
- // Create status bar item - higher priority (1) to ensure visibility
- this.statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 1)
- this.statusBarItem.text = '$(eye) NEP' // Add icon for better visibility
- this.statusBarItem.tooltip = 'Toggle Next Edit Prediction Panel'
- this.statusBarItem.command = 'aws.amazonq.toggleNextEditPredictionPanel'
- this.statusBarItem.show()
-
- // Register command for toggling the panel
- this.disposables.push(
- vscode.commands.registerCommand('aws.amazonq.toggleNextEditPredictionPanel', () => {
- this.toggle()
- })
- )
- }
-
- /**
- * Get or create the NextEditPredictionPanel instance
- */
- public static getInstance(): NextEditPredictionPanel {
- if (!NextEditPredictionPanel.instance) {
- NextEditPredictionPanel.instance = new NextEditPredictionPanel()
- }
- return NextEditPredictionPanel.instance
- }
-
- /**
- * Setup file watcher to monitor the request log file
- */
- private setupFileWatcher(): void {
- if (this.fileWatcher) {
- return
- }
-
- try {
- // Create the watcher for the specific file
- this.fileWatcher = vscode.workspace.createFileSystemWatcher(this.logFilePath)
-
- // When file is changed, read it after a delay
- this.fileWatcher.onDidChange(() => {
- this.scheduleFileRead()
- })
-
- // When file is created, read it after a delay
- this.fileWatcher.onDidCreate(() => {
- this.scheduleFileRead()
- })
-
- this.disposables.push(this.fileWatcher)
-
- // Initial read of the file if it exists
- if (fs.existsSync(this.logFilePath)) {
- this.scheduleFileRead()
- }
-
- getLogger('nextEditPrediction').info(`File watcher set up for ${this.logFilePath}`)
- } catch (error) {
- getLogger('nextEditPrediction').error(`Error setting up file watcher: ${error}`)
- }
- }
-
- /**
- * Schedule file read with a delay to ensure file is fully written
- */
- private scheduleFileRead(): void {
- // Clear any existing timeout
- if (this.fileReadTimeout) {
- clearTimeout(this.fileReadTimeout)
- }
-
- // Schedule new read after 1 second delay
- this.fileReadTimeout = setTimeout(() => {
- this.readRequestLogFile()
- }, 1000)
- }
-
- /**
- * Read the request log file and update the panel content
- */
- private readRequestLogFile(): void {
- getLogger('nextEditPrediction').info(`Attempting to read log file: ${this.logFilePath}`)
- try {
- if (!fs.existsSync(this.logFilePath)) {
- getLogger('nextEditPrediction').info(`Log file does not exist: ${this.logFilePath}`)
- return
- }
-
- const content = fs.readFileSync(this.logFilePath, 'utf8')
- this.requestLogs = []
-
- // Process JSONL format (one JSON object per line)
- const lines = content.split('\n').filter((line: string) => line.trim() !== '')
- for (let i = 0; i < lines.length; i++) {
- const line = lines[i].trim()
- try {
- // Try to parse the JSON, handling potential trailing characters
- let jsonString = line
-
- // Find the last valid JSON by looking for the last closing brace/bracket
- const lastClosingBrace = line.lastIndexOf('}')
- const lastClosingBracket = line.lastIndexOf(']')
- const lastValidChar = Math.max(lastClosingBrace, lastClosingBracket)
-
- if (lastValidChar > 0 && lastValidChar < line.length - 1) {
- // If there are characters after the last valid JSON ending, trim them
- jsonString = line.substring(0, lastValidChar + 1)
- getLogger('nextEditPrediction').info(`Trimmed extra characters from line ${i + 1}`)
- }
-
- // Step 1: Parse the JSON string to get an object
- const parsed = JSON.parse(jsonString)
- // Step 2: Stringify the object to normalize it
- const normalized = JSON.stringify(parsed)
- // Step 3: Parse the normalized string back to an object
- const logEntry = JSON.parse(normalized) as RequestLogEntry
-
- // Parse request and response fields if they're JSON stringss
- if (typeof logEntry.request === 'string') {
- try {
- // Apply the same double-parse technique to nested JSON
- const requestObj = JSON.parse(logEntry.request)
- const requestNormalized = JSON.stringify(requestObj)
- logEntry.request = JSON.parse(requestNormalized)
- } catch (e) {
- // Keep as string if it's not valid JSON
- getLogger('nextEditPrediction').info(`Could not parse request as JSON: ${e}`)
- }
- }
-
- if (typeof logEntry.response === 'string') {
- try {
- // Apply the same double-parse technique to nested JSON
- const responseObj = JSON.parse(logEntry.response)
- const responseNormalized = JSON.stringify(responseObj)
- logEntry.response = JSON.parse(responseNormalized)
- } catch (e) {
- // Keep as string if it's not valid JSON
- getLogger('nextEditPrediction').info(`Could not parse response as JSON: ${e}`)
- }
- }
-
- this.requestLogs.push(logEntry)
- } catch (e) {
- getLogger('nextEditPrediction').error(`Error parsing log entry ${i + 1}: ${e}`)
- getLogger('nextEditPrediction').error(
- `Problematic line: ${line.length > 100 ? line.substring(0, 100) + '...' : line}`
- )
- }
- }
-
- if (this.isVisible && this.panel) {
- this.updateRequestLogsView()
- }
-
- getLogger('nextEditPrediction').info(`Read ${this.requestLogs.length} log entries`)
- } catch (error) {
- getLogger('nextEditPrediction').error(`Error reading log file: ${error}`)
- }
- }
-
- /**
- * Update the panel with request logs data
- */
- private updateRequestLogsView(): void {
- if (this.panel) {
- this.panel.webview.html = this.getWebviewContent()
- getLogger('nextEditPrediction').info('Webview panel updated with request logs')
- }
- }
-
- /**
- * Toggle the panel visibility
- */
- public toggle(): void {
- if (this.isVisible) {
- this.hide()
- } else {
- this.show()
- }
- }
-
- /**
- * Show the panel
- */
- public show(): void {
- if (!this.panel) {
- // Create the webview panel
- this.panel = vscode.window.createWebviewPanel(
- NextEditPredictionPanel.viewType,
- 'Next Edit Prediction',
- vscode.ViewColumn.Beside,
- {
- enableScripts: true,
- retainContextWhenHidden: true,
- }
- )
-
- // Set initial content
- this.panel.webview.html = this.getWebviewContent()
-
- // Handle panel disposal
- this.panel.onDidDispose(
- () => {
- this.panel = undefined
- this.isVisible = false
- this.updateStatusBarItem()
- },
- undefined,
- this.disposables
- )
-
- // Handle webview messages
- this.panel.webview.onDidReceiveMessage(
- (message) => {
- switch (message.command) {
- case 'refresh':
- getLogger('nextEditPrediction').info(`Refresh button clicked`)
- this.readRequestLogFile()
- break
- case 'clear':
- getLogger('nextEditPrediction').info(`Clear logs button clicked`)
- this.clearLogFile()
- break
- }
- },
- undefined,
- this.disposables
- )
- } else {
- this.panel.reveal()
- }
-
- this.isVisible = true
- this.updateStatusBarItem()
-
- // Setup file watcher when panel is shown
- this.setupFileWatcher()
-
- // If we already have logs, update the view
- if (this.requestLogs.length > 0) {
- this.updateRequestLogsView()
- } else {
- // Try to read the log file
- this.scheduleFileRead()
- }
- }
-
- /**
- * Hide the panel
- */
- private hide(): void {
- if (this.panel) {
- this.panel.dispose()
- this.panel = undefined
- this.isVisible = false
- this.updateStatusBarItem()
- }
- }
-
- /**
- * Update the status bar item appearance based on panel state
- */
- private updateStatusBarItem(): void {
- if (this.isVisible) {
- this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.warningBackground')
- } else {
- this.statusBarItem.backgroundColor = undefined
- }
- }
-
- /**
- * Update the panel content with new text
- */
- public updateContent(text: string): void {
- if (this.panel) {
- try {
- // Store the text for display in a separate section
- const customContent = text
-
- // Update the panel with both the custom content and the request logs
- this.panel.webview.html = this.getWebviewContent(customContent)
- getLogger('nextEditPrediction').info('Webview panel content updated')
- } catch (error) {
- getLogger('nextEditPrediction').error(`Error updating webview: ${error}`)
- }
- }
- }
-
- /**
- * Generate HTML content for the webview
- */
- private getWebviewContent(customContent?: string): string {
- // Path to the debug.html file
- const debugHtmlPath = vscode.Uri.file(
- vscode.Uri.joinPath(
- vscode.Uri.file(__dirname),
- '..',
- '..',
- '..',
- 'app',
- 'inline',
- 'EditRendering',
- 'debug.html'
- ).fsPath
- )
-
- // Read the HTML file content
- try {
- const htmlContent = fs.readFileSync(debugHtmlPath.fsPath, 'utf8')
- getLogger('nextEditPrediction').info(`Successfully loaded debug.html from ${debugHtmlPath.fsPath}`)
-
- // Modify the HTML to add vscode API initialization
- return htmlContent.replace(
- '
- Error loading visualization
- Failed to load debug.html file: ${error}
-
-