Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
df3f0a6
Merge master into feature/hybridChat
aws-toolkit-automation Apr 14, 2025
cee5b62
Merge master into feature/hybridChat
aws-toolkit-automation Apr 15, 2025
f79d193
Merge master into feature/hybridChat
aws-toolkit-automation Apr 15, 2025
e827c74
Merge master into feature/hybridChat
aws-toolkit-automation Apr 15, 2025
af581ba
Merge master into feature/hybridChat
aws-toolkit-automation Apr 16, 2025
726ccd8
feat(amazonq): Add hybrid chat (#7032)
jpinkney-aws Apr 16, 2025
b127942
fix(amazonq): quick action handler should add to tab storage (#7070)
jpinkney-aws Apr 16, 2025
05cf555
fix(amazonq): use alpha manifest
jpinkney-aws Apr 16, 2025
772b35f
fix(amazonq): improve lsp cleanup logic (#7075)
jpinkney-aws Apr 16, 2025
938bb37
feat(amazonq): enable amazon q lsp + chat experiment by default
jpinkney-aws Apr 16, 2025
756c286
feat(amazonq): use qAgenticChatServer alpha manifest
jpinkney-aws Apr 16, 2025
d206d3b
fix(amazonq): set amazonq lsp experiment as true by default
jpinkney-aws Apr 17, 2025
721522a
fix(amazonq): duplicate quick actions
jpinkney-aws Apr 17, 2025
e0dbbac
fix(amazonq): acknowledgement is not adding to suppressPrompts when p…
jpinkney-aws Apr 17, 2025
49aa5c7
Merge 'public/master' into feature/hybridChat
justinmk3 Apr 17, 2025
91cd6e3
Merge master into feature/hybridChat
justinmk3 Apr 17, 2025
ebe7b8c
feat(amazonq): sync developer profiles to flare chat panel (#7072)
jpinkney-aws Apr 17, 2025
76b61df
Merge master into feature/hybridChat
aws-toolkit-automation Apr 17, 2025
44b6933
docs(amazonq): update instructions for enabling the chat client frin …
jpinkney-aws Apr 18, 2025
2358ce1
fix(amazonq): duplicate messages in flare chat (#7097)
jpinkney-aws Apr 18, 2025
6b15e9e
docs(amazonq): Add trace server instructions
jpinkney-aws Apr 18, 2025
1b20a6c
Merge remote-tracking branch 'origin/master' into HEAD
jpinkney-aws Apr 19, 2025
f1ced5a
fix(amazonq): de-dup developerProfiles conflict
jpinkney-aws Apr 19, 2025
0bbefa4
Merge pull request #7092 from aws/autoMerge/feature/hybridChat
jpinkney-aws Apr 19, 2025
168806e
fix(amazonq): enable local workspace server through flare (#7089)
jpinkney-aws Apr 20, 2025
50c0363
Update lsp.md (#7111)
aditya169 Apr 20, 2025
2e8d4c7
Merge master into feature/hybridChat
aws-toolkit-automation Apr 20, 2025
3954302
fix(amazonq): send proper cursor position to lsp (#7113)
Hweinstock Apr 20, 2025
c89997e
fix(amazonq): Sync client settings to language server (#7114)
nkomonen-amazon Apr 20, 2025
a7aa25c
feat(amazonq): add pair programming card (#7115)
jpinkney-aws Apr 21, 2025
e1242e8
Merge master into feature/hybridChat
aws-toolkit-automation Apr 21, 2025
893175e
Merge master into feature/hybridChat
aws-toolkit-automation Apr 21, 2025
e544eb0
fix(amazonq): temporarily disable q developer profiles (#7118)
jpinkney-aws Apr 21, 2025
1e48e36
feat(amazonq): handle link clicks in /help (#7120)
jpinkney-aws Apr 21, 2025
7bb66e1
feat(amazonq): Port in chat message error handling (#7121)
nkomonen-amazon Apr 21, 2025
ccbdf48
feat(lsp): add handler for openFileDiff notification (#7119)
ctlai95 Apr 22, 2025
3b619b0
feat(amazonq): handle stop response (#7122)
jpinkney-aws Apr 22, 2025
2055bbf
feat(amazonq): option to show diff in reverse order (#7126)
ctlai95 Apr 22, 2025
52cc07f
fix(amazonq): increase polling frequency for bearer token. (#7123)
Hweinstock Apr 22, 2025
1b107ab
feat(amazonq): add handling for button clicks (#7125)
Hweinstock Apr 22, 2025
61805b7
feat(amazonq): emit flare telemetry events (#7124)
jpinkney-aws Apr 22, 2025
6782509
fix(amazonq): diff not appearing for new files (#7127)
ctlai95 Apr 22, 2025
009258c
fix(amazonq): show empty response when token was cancelled (#7128)
jpinkney-aws Apr 22, 2025
69f6d01
fix(amazonq): add highlight feature config to context commands (#7131)
jpinkney-aws Apr 22, 2025
905d80c
Merge master into feature/hybridChat
aws-toolkit-automation Apr 22, 2025
8da7910
fix(amazonq): forward chat update notification (#7136)
ctlai95 Apr 22, 2025
8b1cca5
Merge master into feature/hybridChat
aws-toolkit-automation Apr 22, 2025
57940ed
Merge master into feature/hybridChat
aws-toolkit-automation Apr 22, 2025
cda61ec
fix(amazonq): simulate refresh of chat (#7142)
jpinkney-aws Apr 23, 2025
7291993
Revert "fix(amazonq): temporarily disable q developer profiles" (#7138)
jpinkney-aws Apr 23, 2025
7cf7897
fix(amazonq): deny restoreTabMessage/contextCommandData messages from…
jpinkney-aws Apr 23, 2025
1b7a86c
fix(amazonq): Add clarifying comment to telemetry pass through mechan…
opieter-aws Apr 23, 2025
4ba5251
fix(amazonq): developer profile api requests are still throttling
jpinkney-aws Apr 23, 2025
0bd3e12
fix(lsp): LSP download timeout message disappears too early (#7145)
nkomonen-amazon Apr 23, 2025
e39a32b
telemetry(amazonq): bump aws-toolkit-common version to 1.0.316 (#7147)
chungjac Apr 23, 2025
c9eb334
fix(amazonq): send sso startUrl on token update (#7148)
jpinkney-aws Apr 23, 2025
dc849e7
feat(amazonq): update mynah version with no style loading option (#7154)
dogusata Apr 24, 2025
d2f6b9a
fix(chat): Resend auth token on server restart (#7156)
nkomonen-amazon Apr 24, 2025
42636aa
telemetry(amazonq): bump aws-toolkit-common #7157
chungjac Apr 24, 2025
d856334
feat(amazonq): Add project context to LSP client
opieter-aws Apr 24, 2025
eb6c9c9
fix(amazonq): accept empty body partial result. (#7158)
Hweinstock Apr 24, 2025
879584e
Revert "feat(amazonq): Add project context to LSP client"
opieter-aws Apr 24, 2025
dd9ad62
feat(amazonq): Pass project configuration to LSP client (#7162)
opieter-aws Apr 25, 2025
1e45112
fix(amazonq): handle response errors from lsp (#7161)
Hweinstock Apr 25, 2025
6db5eda
fix(amazonq): 401 errors on windows (#7168)
avi-alpert Apr 25, 2025
be976e1
Merge master into feature/hybridChat (#7166)
aws-toolkit-automation Apr 25, 2025
4ceed6e
fix(amazonq): handle explain, refactor, fix, optimize, sendToPrompt (…
jpinkney-aws Apr 25, 2025
07a70bc
Merge branch 'feature/hybridChat' into autoMerge/feature/hybridChat
justinmk3 Apr 25, 2025
b23cfdd
Merge master into feature/hybridChat
justinmk3 Apr 25, 2025
59fc729
Merge master into feature/hybridChat
aws-toolkit-automation Apr 25, 2025
3beb8b2
fix(amazonq): enable local context for falcon (#7176)
zixlin7 Apr 26, 2025
947c471
feat(amazonq): support multiple uri in a single diff scheme (#7167)
ctlai95 Apr 26, 2025
a2ab24b
add keybinding for stop chat
yueny2020 Apr 26, 2025
564ddd6
merge from hybrid branch
yueny2020 Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aws-toolkit-vscode.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
{
"path": "packages/amazonq",
},
{
"path": "../language-servers",
},
{
"path": "../language-server-runtimes",
},
],
"settings": {
"typescript.tsdk": "node_modules/typescript/lib",
Expand Down
8 changes: 4 additions & 4 deletions docs/lsp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ sequenceDiagram

## Language Server Debugging

1. Clone https://github.com/aws/language-servers.git and set it up in the same workspace as this project
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.

e.g.


```
/aws-toolkit-vscode
Expand All @@ -53,9 +53,9 @@ sequenceDiagram
"amazonqLSPChat": true // optional: enables chat from flare
}
```
4. Uncomment the `__AMAZONQLSP_PATH` variable in `amazonq/.vscode/launch.json` Extension configuration
1. Uncomment the `__AMAZONQLSP_UI` variable in `amazonq/.vscode/launch.json` Extension configuration if you want to debug the flare chat-client as well
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
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

## Amazon Q Inline Activation

Expand Down
1,524 changes: 512 additions & 1,012 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
},
"devDependencies": {
"@aws-toolkits/telemetry": "^1.0.312",
"@aws-toolkits/telemetry": "^1.0.317",
"@playwright/browser-chromium": "^1.43.1",
"@stylistic/eslint-plugin": "^2.11.0",
"@types/he": "^1.2.3",
Expand Down
14 changes: 14 additions & 0 deletions packages/amazonq/.changes/1.62.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"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"
}
]
}

This file was deleted.

This file was deleted.

7 changes: 4 additions & 3 deletions packages/amazonq/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"env": {
"SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
// "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/token-standalone.js",
// "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
"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"],
Expand Down
5 changes: 5 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 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
Expand Down
46 changes: 44 additions & 2 deletions packages/amazonq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "amazon-q-vscode",
"displayName": "Amazon Q",
"description": "The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI",
"version": "1.62.0-SNAPSHOT",
"version": "1.63.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down Expand Up @@ -132,6 +132,10 @@
"type": "boolean",
"default": false
},
"amazonQChatPairProgramming": {
"type": "boolean",
"default": false
},
"amazonQSelectDeveloperProfile": {
"type": "boolean",
"default": false
Expand Down Expand Up @@ -181,7 +185,25 @@
"amazonQ.workspaceIndexMaxSize": {
"type": "number",
"markdownDescription": "%AWS.configuration.description.amazonq.workspaceIndexMaxSize%",
"default": 250,
"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": {
Expand Down Expand Up @@ -521,6 +543,16 @@
]
},
"commands": [
{
"command": "aws.amazonq.stopToolExecution",
"title": "Stop Amazon Q Tool Execution",
"category": "%AWS.amazonq.title%"
},
{
"command": "aws.amazonq.stopChatResponse",
"title": "Stop Amazon Q Tool Execution",
"category": "%AWS.amazonq.title%"
},
{
"command": "_aws.amazonq.notifications.dismiss",
"title": "%AWS.generic.dismiss%",
Expand Down Expand Up @@ -872,6 +904,16 @@
"command": "aws.amazonq.inline.waitForUserDecisionRejectAll",
"key": "escape",
"when": "editorTextFocus && aws.codewhisperer.connected && amazonq.inline.codelensShortcutEnabled"
},
{
"command": "aws.amazonq.stopToolExecution",
"key": "cmd+alt+h",
"mac": "cmd+alt+h"
},
{
"command": "aws.amazonq.stopChatResponse",
"key": "cmd+alt+c",
"mac": "cmd+alt+c"
}
],
"icons": {
Expand Down
27 changes: 1 addition & 26 deletions packages/amazonq/src/app/chat/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,14 @@
*/

import * as vscode from 'vscode'
import { ExtensionContext, window } from 'vscode'
import { ExtensionContext } from 'vscode'
import { telemetry } from 'aws-core-vscode/telemetry'
import { AuthUtil, CodeWhispererSettings } from 'aws-core-vscode/codewhisperer'
import { Commands, placeholder, funcUtil } from 'aws-core-vscode/shared'
import * as amazonq from 'aws-core-vscode/amazonq'
import { scanChatAppInit } from '../amazonqScan'

export async function activate(context: ExtensionContext) {
const appInitContext = amazonq.DefaultAmazonQAppInitContext.instance

registerApps(appInitContext, context)

const provider = new amazonq.AmazonQChatViewProvider(
context,
appInitContext.getWebViewToAppsMessagePublishers(),
appInitContext.getAppsToWebViewMessageListener(),
appInitContext.onDidChangeAmazonQVisibility
)

await amazonq.TryChatCodeLensProvider.register(appInitContext.onDidChangeAmazonQVisibility.event)

const setupLsp = funcUtil.debounce(async () => {
Expand All @@ -34,11 +23,6 @@ export async function activate(context: ExtensionContext) {
}, 5000)

context.subscriptions.push(
window.registerWebviewViewProvider(amazonq.AmazonQChatViewProvider.viewType, provider, {
webviewOptions: {
retainContextWhenHidden: true,
},
}),
amazonq.focusAmazonQChatWalkthrough.register(),
amazonq.walkthroughInlineSuggestionsExample.register(),
amazonq.walkthroughSecurityScanExample.register(),
Expand All @@ -64,15 +48,6 @@ export async function activate(context: ExtensionContext) {
void setupAuthNotification()
}

function registerApps(appInitContext: amazonq.AmazonQAppInitContext, context: ExtensionContext) {
amazonq.cwChatAppInit(appInitContext)
amazonq.featureDevChatAppInit(appInitContext)
amazonq.gumbyChatAppInit(appInitContext)
amazonq.testChatAppInit(appInitContext)
scanChatAppInit(appInitContext)
amazonq.docChatAppInit(appInitContext)
}

/**
* Display a notification to user for Log In.
*
Expand Down
19 changes: 19 additions & 0 deletions packages/amazonq/src/app/chat/node/activateAgents.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*!
* 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.featureDevChatAppInit(appInitContext)
amazonqNode.gumbyChatAppInit(appInitContext)
amazonqNode.testChatAppInit(appInitContext)
amazonqNode.docChatAppInit(appInitContext)
scanChatAppInit(appInitContext)
}
2 changes: 1 addition & 1 deletion packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
// This contains every lsp agnostic things (auth, security scan, code scan)
await activateCodeWhisperer(extContext as ExtContext)
if (
(Experiments.instance.get('amazonqLSP', false) || Auth.instance.isInternalAmazonUser()) &&
(Experiments.instance.get('amazonqLSP', true) || Auth.instance.isInternalAmazonUser()) &&
!isAmazonInternalOs()
) {
// start the Amazon Q LSP for internal users first
Expand Down
25 changes: 21 additions & 4 deletions packages/amazonq/src/extensionNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import * as vscode from 'vscode'
import { activateAmazonQCommon, amazonQContextPrefix, deactivateCommon } from './extension'
import { DefaultAmazonQAppInitContext } from 'aws-core-vscode/amazonq'
import { activate as activateQGumby } from 'aws-core-vscode/amazonqGumby'
import { DefaultAmazonQAppInitContext, AmazonQChatViewProvider } from 'aws-core-vscode/amazonq'
import { activate as activateTransformationHub } from 'aws-core-vscode/amazonqGumby'
import {
ExtContext,
globals,
Expand All @@ -30,6 +30,7 @@ import { beta } from 'aws-core-vscode/dev'
import { activate as activateNotifications, NotificationsController } from 'aws-core-vscode/notifications'
import { AuthState, AuthUtil } from 'aws-core-vscode/codewhisperer'
import { telemetry, AuthUserState } from 'aws-core-vscode/telemetry'
import { activateAgents } from './app/chat/node/activateAgents'

export async function activate(context: vscode.ExtensionContext) {
// IMPORTANT: No other code should be added to this function. Place it in one of the following 2 functions where appropriate.
Expand All @@ -52,10 +53,26 @@ async function activateAmazonQNode(context: vscode.ExtensionContext) {
extensionContext: context,
}

if (!Experiments.instance.get('amazonqChatLSP', false)) {
if (!Experiments.instance.get('amazonqChatLSP', true)) {
const appInitContext = DefaultAmazonQAppInitContext.instance
const provider = new AmazonQChatViewProvider(
context,
appInitContext.getWebViewToAppsMessagePublishers(),
appInitContext.getAppsToWebViewMessageListener(),
appInitContext.onDidChangeAmazonQVisibility
)
context.subscriptions.push(
vscode.window.registerWebviewViewProvider(AmazonQChatViewProvider.viewType, provider, {
webviewOptions: {
retainContextWhenHidden: true,
},
})
)
// this is registered inside of lsp/chat/activation.ts when the chat experiment is enabled
await activateCWChat(context)
await activateQGumby(extContext as ExtContext)
}
activateAgents()
await activateTransformationHub(extContext as ExtContext)
activateInlineChat(context)

const authProvider = new CommonAuthViewProvider(
Expand Down
42 changes: 29 additions & 13 deletions packages/amazonq/src/lsp/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
*/

import {
bearerCredentialsUpdateRequestType,
ConnectionMetadata,
NotificationType,
RequestType,
ResponseMessage,
UpdateCredentialsParams,
} from '@aws/language-server-runtimes/protocol'
import * as jose from 'jose'
import * as crypto from 'crypto'
Expand Down Expand Up @@ -64,39 +66,48 @@ export const notificationTypes = {
* Facade over our VSCode Auth that does crud operations on the language server auth
*/
export class AmazonQLspAuth {
constructor(private readonly client: LanguageClient) {}
#logErrorIfChanged = onceChanged((s) => getLogger('amazonqLsp').error(s))
constructor(
private readonly client: LanguageClient,
private readonly authUtil: AuthUtil = AuthUtil.instance
) {}

async refreshConnection() {
const activeConnection = AuthUtil.instance.auth.activeConnection
if (activeConnection?.type === 'sso') {
/**
* @param force bypass memoization, and forcefully update the bearer token
*/
async refreshConnection(force: boolean = false) {
const activeConnection = this.authUtil.auth.activeConnection
if (activeConnection?.state === 'valid' && activeConnection?.type === 'sso') {
// send the token to the language server
const token = await AuthUtil.instance.getBearerToken()
await this.updateBearerToken(token)
const token = await this.authUtil.getBearerToken()
await (force ? this._updateBearerToken(token) : this.updateBearerToken(token))
}
}

async logRefreshError(e: unknown) {
const err = e as Error
this.#logErrorIfChanged(`Unable to update bearer token: ${err.name}:${err.message}`)
}

public updateBearerToken = onceChanged(this._updateBearerToken.bind(this))
private async _updateBearerToken(token: string) {
const request = await this.createUpdateCredentialsRequest({
token,
})

await this.client.sendRequest(notificationTypes.updateBearerToken.method, request)
await this.client.sendRequest(bearerCredentialsUpdateRequestType.method, request)

this.client.info(`UpdateBearerToken: ${JSON.stringify(request)}`)
}

public startTokenRefreshInterval(pollingTime: number = oneMinute) {
public startTokenRefreshInterval(pollingTime: number = oneMinute / 2) {
const interval = setInterval(async () => {
await this.refreshConnection().catch((e) => {
getLogger('amazonqLsp').error('Unable to update bearer token: %s', (e as Error).message)
clearInterval(interval)
})
await this.refreshConnection().catch((e) => this.logRefreshError(e))
}, pollingTime)
return interval
}

private async createUpdateCredentialsRequest(data: any) {
private async createUpdateCredentialsRequest(data: any): Promise<UpdateCredentialsParams> {
const payload = new TextEncoder().encode(JSON.stringify({ data }))

const jwt = await new jose.CompactEncrypt(payload)
Expand All @@ -105,6 +116,11 @@ export class AmazonQLspAuth {

return {
data: jwt,
metadata: {
sso: {
startUrl: AuthUtil.instance.auth.startUrl,
},
},
encrypted: true,
}
}
Expand Down
Loading
Loading