Skip to content

Commit 4e1d059

Browse files
aws-toolkit-automationjpinkney-awsjustinmk3leigaolzuoyaofu
authored
Merge master into feature/amazonqLSP-auth (#7225)
## Automatic merge failed - Resolve conflicts and push to this PR branch. - **Do not squash-merge** this PR. Use the "Create a merge commit" option to do a regular merge. ## Command line hint To perform the merge from the command line, you could do something like the following (where "origin" is the name of the remote in your local git repo): ``` git stash git fetch --all git checkout origin/feature/amazonqLSP-auth git merge origin/master git commit git push origin HEAD:refs/heads/autoMerge/feature/amazonqLSP-auth ``` --------- Signed-off-by: nkomonen-amazon <[email protected]> Co-authored-by: Josh Pinkney <[email protected]> Co-authored-by: Josh Pinkney <[email protected]> Co-authored-by: Justin M. Keyes <[email protected]> Co-authored-by: Lei Gao <[email protected]> Co-authored-by: aws-toolkit-automation <> Co-authored-by: zuoyaofu <[email protected]> Co-authored-by: aditya169 <[email protected]> Co-authored-by: Zoe Lin <[email protected]> Co-authored-by: Hweinstock <[email protected]> Co-authored-by: Nikolas Komonen <[email protected]> Co-authored-by: Will Lo <[email protected]> Co-authored-by: Tai Lai <[email protected]> Co-authored-by: opieter-aws <[email protected]> Co-authored-by: chungjac <[email protected]> Co-authored-by: Dogus Atasoy <[email protected]> Co-authored-by: Avi Alpert <[email protected]> Co-authored-by: nkomonen-amazon <[email protected]> Co-authored-by: Frederic Mbea <[email protected]> Co-authored-by: Tom Zu <[email protected]> Co-authored-by: David <[email protected]> Co-authored-by: chengoramazon <[email protected]> Co-authored-by: Laxman Reddy <[email protected]> Co-authored-by: Jiatong Li <[email protected]> Co-authored-by: Adam Khamis <[email protected]> Co-authored-by: Na Yue <[email protected]> Co-authored-by: Jiatong Li <[email protected]> Co-authored-by: Brad Skaggs <[email protected]>
1 parent f79defd commit 4e1d059

File tree

20 files changed

+506
-21
lines changed

20 files changed

+506
-21
lines changed

package-lock.json

Lines changed: 6 additions & 7 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.317",
44+
"@aws-toolkits/telemetry": "^1.0.318",
4545
"@playwright/browser-chromium": "^1.43.1",
4646
"@stylistic/eslint-plugin": "^2.11.0",
4747
"@types/he": "^1.2.3",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"date": "2025-05-09",
3+
"version": "1.66.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Avoid inline completion 'Improperly formed request' errors when file is too large"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Named agent tabs sometimes open with unnecessary input options"
12+
}
13+
]
14+
}

packages/amazonq/.changes/next-release/Bug Fix-75375702-36b5-4e89-af57-4afe983a7238.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Previous and subsequent cells are used as context for completion in a Jupyter notebook"
4+
}

packages/amazonq/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.66.0 2025-05-09
2+
3+
- **Bug Fix** Avoid inline completion 'Improperly formed request' errors when file is too large
4+
- **Bug Fix** Named agent tabs sometimes open with unnecessary input options
5+
16
## 1.65.0 2025-05-05
27

38
- **Feature** Support selecting customizations across all Q profiles with automatic profile switching for enterprise users

packages/amazonq/package.json

Lines changed: 1 addition & 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.66.0-SNAPSHOT",
5+
"version": "1.67.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu
2525
type: 'profile',
2626
profileArn: AuthUtil.instance.regionProfileManager.activeRegionProfile?.arn,
2727
})
28+
// We need to push the cached customization on startup explicitly
29+
await pushConfigUpdate(languageClient, {
30+
type: 'customization',
31+
customization: getSelectedCustomization(),
32+
})
2833

2934
const provider = new AmazonQChatViewProvider(mynahUIPath)
3035

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
9191
const telemetryName: string = e.name
9292

9393
if (telemetryName in telemetry) {
94+
languageClient.info(`[Telemetry] Emitting ${telemetryName} telemetry: ${JSON.stringify(e.data)}`)
9495
telemetry[telemetryName as keyof TelemetryBase].emit(e.data)
9596
}
9697
})

packages/amazonq/src/lsp/client.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import vscode, { env, version } from 'vscode'
77
import * as nls from 'vscode-nls'
88
import * as crypto from 'crypto'
99
import * as jose from 'jose'
10-
import { InlineCompletionManager } from '../app/inline/completion'
1110
import { LanguageClient, LanguageClientOptions, RequestType, State } from 'vscode-languageclient'
11+
import { InlineCompletionManager } from '../app/inline/completion'
1212
import {
1313
CreateFilesParams,
1414
DeleteFilesParams,
@@ -47,12 +47,15 @@ import {
4747
fs,
4848
oidcClientName,
4949
openUrl,
50+
getClientId,
51+
extensionVersion,
5052
} from 'aws-core-vscode/shared'
5153
import { processUtils } from 'aws-core-vscode/shared'
5254
import { activate as activateChat } from './chat/activation'
5355
import { AmazonQResourcePaths } from './lspInstaller'
5456
import { auth2 } from 'aws-core-vscode/auth'
5557
import { ConfigSection, isValidConfigSection, toAmazonQLSPLogLevel } from './config'
58+
import { telemetry } from 'aws-core-vscode/telemetry'
5659

5760
const localize = nls.loadMessageBundle()
5861
const logger = getLogger('amazonqLsp.lspClient')
@@ -134,9 +137,9 @@ export async function startLanguageServer(
134137
version: version,
135138
extension: {
136139
name: 'AmazonQ-For-VSCode',
137-
version: '0.0.1',
140+
version: extensionVersion,
138141
},
139-
clientId: crypto.randomUUID(),
142+
clientId: getClientId(globals.globalState),
140143
},
141144
awsClientCapabilities: {
142145
q: {
@@ -148,7 +151,7 @@ export async function startLanguageServer(
148151
},
149152
},
150153
contextConfiguration: {
151-
workspaceIdentifier: extensionContext.storageUri,
154+
workspaceIdentifier: extensionContext.storageUri?.path,
152155
},
153156
logLevel: toAmazonQLSPLogLevel(globals.logOutputChannel.logLevel),
154157
},
@@ -375,6 +378,12 @@ function onServerRestartHandler(client: LanguageClient) {
375378
return
376379
}
377380

381+
// Emit telemetry that a crash was detected.
382+
// It is not guaranteed to 100% be a crash since somehow the server may have been intentionally restarted,
383+
// but most of the time it probably will have been due to a crash.
384+
// TODO: Port this metric override to common definitions
385+
telemetry.languageServer_crash.emit({ id: 'AmazonQ' })
386+
378387
// Need to set the auth token in the again
379388
await AuthUtil.instance.restore()
380389
})
@@ -412,6 +421,8 @@ function getConfigSection(section: ConfigSection) {
412421
includeSuggestionsWithCodeReferences:
413422
CodeWhispererSettings.instance.isSuggestionsWithCodeReferencesEnabled(),
414423
shareCodeWhispererContentWithAWS: !CodeWhispererSettings.instance.isOptoutEnabled(),
424+
includeImportsWithSuggestions: CodeWhispererSettings.instance.isImportRecommendationEnabled(),
425+
sendUserWrittenCodeMetrics: true,
415426
},
416427
]
417428
case 'aws.logLevel':

0 commit comments

Comments
 (0)