Skip to content

Commit 173a11d

Browse files
committed
Merge branch 'master' into model-selection
2 parents 51ec3be + c1bdcfc commit 173a11d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1387
-2093
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ If you need to report an issue attach these to give the most detailed informatio
387387
4. Open the Command Palette again and select `Reload Window`.
388388
5. Now you should see additional `[debug]` prefixed logs in the output.
389389
- ![](./docs/images/logsDebugLog.png)
390+
6. To export logs, click the kebab (`...`), select `Export Logs`, and then select the appropriate channel (`Amazon Q Logs` for Amazon Q)
391+
- ![](./docs/images/openExportLogs.png)
392+
- ![](./docs/images/exportAmazonQLogs.png)
390393
391394
### Telemetry
392395

docs/images/exportAmazonQLogs.png

114 KB
Loading

docs/images/openExportLogs.png

108 KB
Loading

package-lock.json

Lines changed: 362 additions & 1454 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"skippedTestReport": "ts-node ./scripts/skippedTestReport.ts ./packages/amazonq/test/e2e/"
4242
},
4343
"devDependencies": {
44-
"@aws-toolkits/telemetry": "^1.0.318",
44+
"@aws-toolkits/telemetry": "^1.0.322",
4545
"@playwright/browser-chromium": "^1.43.1",
4646
"@stylistic/eslint-plugin": "^2.11.0",
4747
"@types/he": "^1.2.3",

packages/amazonq/.changes/1.67.0.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"date": "2025-05-14",
3+
"version": "1.67.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Previous and subsequent cells are used as context for completion in a Jupyter notebook"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Support chat in AL2 aarch64"
12+
}
13+
]
14+
}

packages/amazonq/.changes/1.68.0.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"date": "2025-05-15",
3+
"version": "1.68.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Fix Error: 'Amazon Q service is not signed in'"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Fix Error: 'Amazon Q Profile is not selected for IDC connection type'"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "Add inline completion support for abap language"
16+
}
17+
]
18+
}

packages/amazonq/.changes/1.69.0.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"date": "2025-05-22",
3+
"version": "1.69.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "/transform: avoid prompting user for target JDK path unnecessarily"
8+
},
9+
{
10+
"type": "Removal",
11+
"description": "/transform: remove option to select multiple diffs"
12+
}
13+
]
14+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Removal",
3+
"description": "Disable local workspace LSP"
4+
}

packages/amazonq/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 1.69.0 2025-05-22
2+
3+
- **Bug Fix** /transform: avoid prompting user for target JDK path unnecessarily
4+
- **Removal** /transform: remove option to select multiple diffs
5+
6+
## 1.68.0 2025-05-15
7+
8+
- **Bug Fix** Fix Error: 'Amazon Q service is not signed in'
9+
- **Bug Fix** Fix Error: 'Amazon Q Profile is not selected for IDC connection type'
10+
- **Feature** Add inline completion support for abap language
11+
12+
## 1.67.0 2025-05-14
13+
14+
- **Bug Fix** Previous and subsequent cells are used as context for completion in a Jupyter notebook
15+
- **Bug Fix** Support chat in AL2 aarch64
16+
117
## 1.66.0 2025-05-09
218

319
- **Bug Fix** Avoid inline completion 'Improperly formed request' errors when file is too large

packages/amazonq/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI",
5-
"version": "1.67.0-SNAPSHOT",
5+
"version": "1.70.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],
@@ -805,6 +805,11 @@
805805
{
806806
"command": "aws.amazonq.walkthrough.show",
807807
"title": "%AWS.amazonq.welcomeWalkthrough%"
808+
},
809+
{
810+
"command": "aws.amazonq.clearCache",
811+
"title": "%AWS.amazonq.clearCache%",
812+
"category": "%AWS.amazonq.title%"
808813
}
809814
],
810815
"keybindings": [

packages/amazonq/src/app/chat/activation.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,14 @@
66
import * as vscode from 'vscode'
77
import { ExtensionContext } from 'vscode'
88
import { telemetry } from 'aws-core-vscode/telemetry'
9-
import { AuthUtil, CodeWhispererSettings } from 'aws-core-vscode/codewhisperer'
10-
import { Commands, placeholder, funcUtil } from 'aws-core-vscode/shared'
9+
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
10+
import { Commands, placeholder } from 'aws-core-vscode/shared'
1111
import * as amazonq from 'aws-core-vscode/amazonq'
1212

1313
export async function activate(context: ExtensionContext) {
1414
const appInitContext = amazonq.DefaultAmazonQAppInitContext.instance
1515
await amazonq.TryChatCodeLensProvider.register(appInitContext.onDidChangeAmazonQVisibility.event)
1616

17-
const setupLsp = funcUtil.debounce(async () => {
18-
void amazonq.LspController.instance.trySetupLsp(context, {
19-
startUrl: AuthUtil.instance.startUrl,
20-
maxIndexSize: CodeWhispererSettings.instance.getMaxIndexSize(),
21-
isVectorIndexEnabled: false,
22-
})
23-
}, 5000)
24-
2517
context.subscriptions.push(
2618
amazonq.focusAmazonQChatWalkthrough.register(),
2719
amazonq.walkthroughInlineSuggestionsExample.register(),
@@ -37,7 +29,6 @@ export async function activate(context: ExtensionContext) {
3729
void vscode.env.openExternal(vscode.Uri.parse(amazonq.amazonQHelpUrl))
3830
})
3931

40-
void setupLsp()
4132
void setupAuthNotification()
4233
}
4334

packages/amazonq/src/commands.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
import * as vscode from 'vscode'
1010
import { Auth } from 'aws-core-vscode/auth'
1111
import { Commands } from 'aws-core-vscode/shared'
12+
import { clearCacheDeclaration } from './util/clearCache'
1213

1314
export function registerCommands(context: vscode.ExtensionContext) {
14-
context.subscriptions.push(Commands.register('_aws.amazonq.auth.autoConnect', Auth.instance.tryAutoConnect))
15+
context.subscriptions.push(
16+
Commands.register('_aws.amazonq.auth.autoConnect', Auth.instance.tryAutoConnect),
17+
clearCacheDeclaration.register()
18+
)
1519
}

packages/amazonq/src/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
maybeShowMinVscodeWarning,
3434
Experiments,
3535
isSageMaker,
36-
isAmazonInternalOs,
36+
isAmazonLinux2,
3737
} from 'aws-core-vscode/shared'
3838
import { ExtStartUpSources } from 'aws-core-vscode/telemetry'
3939
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
@@ -123,7 +123,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
123123
await activateCodeWhisperer(extContext as ExtContext)
124124
if (
125125
(Experiments.instance.get('amazonqLSP', true) || Auth.instance.isInternalAmazonUser()) &&
126-
(!isAmazonInternalOs() || (await hasGlibcPatch()))
126+
(!isAmazonLinux2() || hasGlibcPatch())
127127
) {
128128
// start the Amazon Q LSP for internal users first
129129
// for AL2, start LSP if glibc patch is found

packages/amazonq/src/lsp/auth.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { AuthUtil } from 'aws-core-vscode/codewhisperer'
1818
import { Writable } from 'stream'
1919
import { onceChanged } from 'aws-core-vscode/utils'
2020
import { getLogger, oneMinute } from 'aws-core-vscode/shared'
21+
import { isSsoConnection } from 'aws-core-vscode/auth'
2122

2223
export const encryptionKey = crypto.randomBytes(32)
2324

@@ -76,8 +77,8 @@ export class AmazonQLspAuth {
7677
* @param force bypass memoization, and forcefully update the bearer token
7778
*/
7879
async refreshConnection(force: boolean = false) {
79-
const activeConnection = this.authUtil.auth.activeConnection
80-
if (activeConnection?.state === 'valid' && activeConnection?.type === 'sso') {
80+
const activeConnection = this.authUtil.conn
81+
if (this.authUtil.isConnectionValid() && isSsoConnection(activeConnection)) {
8182
// send the token to the language server
8283
const token = await this.authUtil.getBearerToken()
8384
await (force ? this._updateBearerToken(token) : this.updateBearerToken(token))
@@ -118,7 +119,7 @@ export class AmazonQLspAuth {
118119
data: jwt,
119120
metadata: {
120121
sso: {
121-
startUrl: AuthUtil.instance.auth.startUrl,
122+
startUrl: AuthUtil.instance.startUrl,
122123
},
123124
},
124125
encrypted: true,

packages/amazonq/src/lsp/chat/activation.ts

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,11 @@ import { Commands, getLogger, globals, undefinedIfEmpty } from 'aws-core-vscode/
1212
import { activate as registerLegacyChatListeners } from '../../app/chat/activation'
1313
import { DefaultAmazonQAppInitContext } from 'aws-core-vscode/amazonq'
1414
import { AuthUtil, getSelectedCustomization } from 'aws-core-vscode/codewhisperer'
15-
import {
16-
DidChangeConfigurationNotification,
17-
updateConfigurationRequestType,
18-
} from '@aws/language-server-runtimes/protocol'
15+
import { pushConfigUpdate } from '../config'
1916

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

23-
// Make sure we've sent an auth profile to the language server before even initializing the UI
24-
await pushConfigUpdate(languageClient, {
25-
type: 'profile',
26-
profileArn: AuthUtil.instance.regionProfileManager.activeRegionProfile?.arn,
27-
})
28-
2920
const provider = new AmazonQChatViewProvider(mynahUIPath)
3021

3122
disposables.push(
@@ -74,10 +65,6 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu
7465

7566
disposables.push(
7667
AuthUtil.instance.regionProfileManager.onDidChangeRegionProfile(async () => {
77-
void pushConfigUpdate(languageClient, {
78-
type: 'profile',
79-
profileArn: AuthUtil.instance.regionProfileManager.activeRegionProfile?.arn,
80-
})
8168
await provider.refreshWebview()
8269
}),
8370
Commands.register('aws.amazonq.updateCustomizations', () => {
@@ -94,45 +81,3 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu
9481
})
9582
)
9683
}
97-
98-
/**
99-
* Push a config value to the language server, effectively updating it with the
100-
* latest configuration from the client.
101-
*
102-
* The issue is we need to push certain configs to different places, since there are
103-
* different handlers for specific configs. So this determines the correct place to
104-
* push the given config.
105-
*/
106-
async function pushConfigUpdate(client: LanguageClient, config: QConfigs) {
107-
switch (config.type) {
108-
case 'profile':
109-
await client.sendRequest(updateConfigurationRequestType.method, {
110-
section: 'aws.q',
111-
settings: { profileArn: config.profileArn },
112-
})
113-
break
114-
case 'customization':
115-
client.sendNotification(DidChangeConfigurationNotification.type.method, {
116-
section: 'aws.q',
117-
settings: { customization: config.customization },
118-
})
119-
break
120-
case 'logLevel':
121-
client.sendNotification(DidChangeConfigurationNotification.type.method, {
122-
section: 'aws.logLevel',
123-
})
124-
break
125-
}
126-
}
127-
type ProfileConfig = {
128-
type: 'profile'
129-
profileArn: string | undefined
130-
}
131-
type CustomizationConfig = {
132-
type: 'customization'
133-
customization: string | undefined
134-
}
135-
type LogLevelConfig = {
136-
type: 'logLevel'
137-
}
138-
type QConfigs = ProfileConfig | CustomizationConfig | LogLevelConfig

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import {
3232
getSerializedChatRequestType,
3333
listConversationsRequestType,
3434
conversationClickRequestType,
35+
listMcpServersRequestType,
36+
mcpServerClickRequestType,
3537
ShowSaveFileDialogRequestType,
3638
ShowSaveFileDialogParams,
3739
LSPErrorCodes,
@@ -315,6 +317,8 @@ export function registerMessageListeners(
315317
}
316318
case listConversationsRequestType.method:
317319
case conversationClickRequestType.method:
320+
case listMcpServersRequestType.method:
321+
case mcpServerClickRequestType.method:
318322
case tabBarActionRequestType.method:
319323
await resolveChatResponse(message.command, message.params, languageClient, webview)
320324
break

0 commit comments

Comments
 (0)