Skip to content

Merge master into feature/logs #7319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 31 commits into
base: feature/logs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6898221
fix(amazonq): Profile needing to be selected on server restart (#7316)
nkomonen-amazon May 15, 2025
327fb56
fix(chat): adding new events for list mcp server and click mcp events…
ashishrp-aws May 15, 2025
dbb24b7
Release 3.62.0
May 15, 2025
9881fae
Release 1.68.0
May 15, 2025
c81f7dd
Update version to snapshot version: 3.63.0-SNAPSHOT
May 15, 2025
c35805e
Update version to snapshot version: 1.69.0-SNAPSHOT
May 15, 2025
fbf8bd0
Merge release into master
May 15, 2025
340309c
feat(amazonq): Command to clear extension cache (#7335)
nkomonen-amazon May 16, 2025
ea593e2
fix(amazonq): remove target JDK path prompt (#7328)
dhasani23 May 16, 2025
e564ef6
feat(codewhisperer): add fileUri to FileContext (#7294)
LiGaCu May 19, 2025
1d585e9
feat(chat): Add ripgrep path and make it executable (#7325)
jguoamz May 19, 2025
3d30dcd
feat(amazonq): parse new transformation plan (#7340)
dhasani23 May 20, 2025
196de6f
feat(amazonq): remove option to select multiple diffs (#7327)
dhasani23 May 20, 2025
2b6aa85
config(amazonq): remove .acds file extension from abap language (#7356)
Will-ShaoHua May 21, 2025
c17efa1
refactor(clearcache): Delete the LSP cache dir (#7361)
nkomonen-amazon May 22, 2025
040b10b
fix(amazonq): throw if no region profiles are available (#7360)
opieter-aws May 22, 2025
a2dec23
Release 1.69.0
May 22, 2025
0e91c36
Release 3.63.0
May 22, 2025
0412ac4
Update version to snapshot version: 1.70.0-SNAPSHOT
May 22, 2025
51a71d5
Update version to snapshot version: 3.64.0-SNAPSHOT
May 22, 2025
33ba274
Merge release into master
May 22, 2025
00c220a
fix(sso): increase SSO timeout (#7367)
nkomonen-amazon May 23, 2025
1d72423
fix(workspace): remove non-flare workspace lsp (#7359)
leigaol May 23, 2025
82f5d76
fix(amazonq): show notification when user switches tabs (#7374)
dhasani23 May 23, 2025
f2b8091
deps(mynah): Bump mynah to 4.34.1 (#7391)
nkomonen-amazon May 28, 2025
77b54ab
Update CONTRIBUTING.md
nkomonen-amazon May 28, 2025
4caebad
Release 1.70.0
May 28, 2025
5bf8bfc
Update version to snapshot version: 1.71.0-SNAPSHOT
May 28, 2025
6cbe787
feat(amazonq): add the mcp field to client capabilities
yueny2020 May 29, 2025
fb1dae8
Merge pull request #7402 from yueny2020/mcpfromclient
yueny2020 May 29, 2025
9b13c5f
fix(tests): "rejected promise not handled" (#7403)
justinmk3 May 30, 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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ If you need to report an issue attach these to give the most detailed informatio
- ![](./docs/images/logsView.png)
2. Click the gear icon on the bottom right and select `Debug`
- ![](./docs/images/logsSetDebug.png)
3. Click the gear icon again and select `Set As Default`. This will ensure we stay in `Debug` until explicitly changed
3. Click the gear icon again and select `Set As Default`. This will ensure we stay in `Debug` until explicitly changed.
- ![](./docs/images/logsSetDefault.png)
4. Open the Command Palette again and select `Reload Window`.
5. Now you should see additional `[debug]` prefixed logs in the output.
Expand Down
1,815 changes: 361 additions & 1,454 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions packages/amazonq/.changes/1.68.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"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"
}
]
}
14 changes: 14 additions & 0 deletions packages/amazonq/.changes/1.69.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"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"
}
]
}
10 changes: 10 additions & 0 deletions packages/amazonq/.changes/1.70.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"date": "2025-05-28",
"version": "1.70.0",
"entries": [
{
"type": "Removal",
"description": "Disable local workspace LSP"
}
]
}

This file was deleted.

15 changes: 15 additions & 0 deletions packages/amazonq/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 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
Expand Down
7 changes: 6 additions & 1 deletion 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.68.0-SNAPSHOT",
"version": "1.71.0-SNAPSHOT",
"extensionKind": [
"workspace"
],
Expand Down Expand Up @@ -805,6 +805,11 @@
{
"command": "aws.amazonq.walkthrough.show",
"title": "%AWS.amazonq.welcomeWalkthrough%"
},
{
"command": "aws.amazonq.clearCache",
"title": "%AWS.amazonq.clearCache%",
"category": "%AWS.amazonq.title%"
}
],
"keybindings": [
Expand Down
17 changes: 5 additions & 12 deletions packages/amazonq/src/app/chat/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,14 @@
import * as vscode 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 { 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)

const setupLsp = funcUtil.debounce(async () => {
void amazonq.LspController.instance.trySetupLsp(context, {
startUrl: AuthUtil.instance.startUrl,
maxIndexSize: CodeWhispererSettings.instance.getMaxIndexSize(),
isVectorIndexEnabled: false,
})
}, 5000)

context.subscriptions.push(
amazonq.focusAmazonQChatWalkthrough.register(),
amazonq.walkthroughInlineSuggestionsExample.register(),
Expand All @@ -37,7 +29,6 @@ export async function activate(context: ExtensionContext) {
void vscode.env.openExternal(vscode.Uri.parse(amazonq.amazonQHelpUrl))
})

void setupLsp()
void setupAuthNotification()
}

Expand Down Expand Up @@ -76,7 +67,9 @@ async function setupAuthNotification() {
const selection = await vscode.window.showWarningMessage('Start using Amazon Q', buttonAction)

if (selection === buttonAction) {
void amazonq.focusAmazonQPanel.execute(placeholder, source)
amazonq.focusAmazonQPanel.execute(placeholder, source).catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}
}
}
6 changes: 5 additions & 1 deletion packages/amazonq/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
import * as vscode from 'vscode'
import { Auth } from 'aws-core-vscode/auth'
import { Commands } from 'aws-core-vscode/shared'
import { clearCacheDeclaration } from './util/clearCache'

export function registerCommands(context: vscode.ExtensionContext) {
context.subscriptions.push(Commands.register('_aws.amazonq.auth.autoConnect', Auth.instance.tryAutoConnect))
context.subscriptions.push(
Commands.register('_aws.amazonq.auth.autoConnect', Auth.instance.tryAutoConnect),
clearCacheDeclaration.register()
)
}
4 changes: 3 additions & 1 deletion packages/amazonq/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
// Give time for the extension to finish initializing.
globals.clock.setTimeout(async () => {
CommonAuthWebview.authSource = ExtStartUpSources.firstStartUp
void focusAmazonQPanel.execute(placeholder, ExtStartUpSources.firstStartUp)
focusAmazonQPanel.execute(placeholder, ExtStartUpSources.firstStartUp).catch((e) => {
getLogger().error('focusAmazonQPanel failed: %s', e)
})
}, 1000)
}

Expand Down
7 changes: 4 additions & 3 deletions packages/amazonq/src/lsp/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { AuthUtil } from 'aws-core-vscode/codewhisperer'
import { Writable } from 'stream'
import { onceChanged } from 'aws-core-vscode/utils'
import { getLogger, oneMinute } from 'aws-core-vscode/shared'
import { isSsoConnection } from 'aws-core-vscode/auth'

export const encryptionKey = crypto.randomBytes(32)

Expand Down Expand Up @@ -76,8 +77,8 @@ export class AmazonQLspAuth {
* @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') {
const activeConnection = this.authUtil.conn
if (this.authUtil.isConnectionValid() && isSsoConnection(activeConnection)) {
// send the token to the language server
const token = await this.authUtil.getBearerToken()
await (force ? this._updateBearerToken(token) : this.updateBearerToken(token))
Expand Down Expand Up @@ -118,7 +119,7 @@ export class AmazonQLspAuth {
data: jwt,
metadata: {
sso: {
startUrl: AuthUtil.instance.auth.startUrl,
startUrl: AuthUtil.instance.startUrl,
},
},
encrypted: true,
Expand Down
62 changes: 1 addition & 61 deletions packages/amazonq/src/lsp/chat/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,11 @@ import { Commands, getLogger, globals, undefinedIfEmpty } from 'aws-core-vscode/
import { activate as registerLegacyChatListeners } from '../../app/chat/activation'
import { DefaultAmazonQAppInitContext } from 'aws-core-vscode/amazonq'
import { AuthUtil, getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
import {
DidChangeConfigurationNotification,
updateConfigurationRequestType,
} from '@aws/language-server-runtimes/protocol'
import { pushConfigUpdate } from '../config'

export async function activate(languageClient: LanguageClient, encryptionKey: Buffer, mynahUIPath: string) {
const disposables = globals.context.subscriptions

// Make sure we've sent an auth profile to the language server before even initializing the UI
await pushConfigUpdate(languageClient, {
type: 'profile',
profileArn: AuthUtil.instance.regionProfileManager.activeRegionProfile?.arn,
})
// We need to push the cached customization on startup explicitly
await pushConfigUpdate(languageClient, {
type: 'customization',
customization: getSelectedCustomization(),
})

const provider = new AmazonQChatViewProvider(mynahUIPath)

disposables.push(
Expand Down Expand Up @@ -79,10 +65,6 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu

disposables.push(
AuthUtil.instance.regionProfileManager.onDidChangeRegionProfile(async () => {
void pushConfigUpdate(languageClient, {
type: 'profile',
profileArn: AuthUtil.instance.regionProfileManager.activeRegionProfile?.arn,
})
await provider.refreshWebview()
}),
Commands.register('aws.amazonq.updateCustomizations', () => {
Expand All @@ -99,45 +81,3 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu
})
)
}

/**
* Push a config value to the language server, effectively updating it with the
* latest configuration from the client.
*
* The issue is we need to push certain configs to different places, since there are
* different handlers for specific configs. So this determines the correct place to
* push the given config.
*/
async function pushConfigUpdate(client: LanguageClient, config: QConfigs) {
switch (config.type) {
case 'profile':
await client.sendRequest(updateConfigurationRequestType.method, {
section: 'aws.q',
settings: { profileArn: config.profileArn },
})
break
case 'customization':
client.sendNotification(DidChangeConfigurationNotification.type.method, {
section: 'aws.q',
settings: { customization: config.customization },
})
break
case 'logLevel':
client.sendNotification(DidChangeConfigurationNotification.type.method, {
section: 'aws.logLevel',
})
break
}
}
type ProfileConfig = {
type: 'profile'
profileArn: string | undefined
}
type CustomizationConfig = {
type: 'customization'
customization: string | undefined
}
type LogLevelConfig = {
type: 'logLevel'
}
type QConfigs = ProfileConfig | CustomizationConfig | LogLevelConfig
4 changes: 4 additions & 0 deletions packages/amazonq/src/lsp/chat/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import {
getSerializedChatRequestType,
listConversationsRequestType,
conversationClickRequestType,
listMcpServersRequestType,
mcpServerClickRequestType,
ShowSaveFileDialogRequestType,
ShowSaveFileDialogParams,
LSPErrorCodes,
Expand Down Expand Up @@ -313,6 +315,8 @@ export function registerMessageListeners(
}
case listConversationsRequestType.method:
case conversationClickRequestType.method:
case listMcpServersRequestType.method:
case mcpServerClickRequestType.method:
case tabBarActionRequestType.method:
await resolveChatResponse(message.command, message.params, languageClient, webview)
break
Expand Down
Loading