Skip to content

Commit 0f6791e

Browse files
committed
Merge branch 'master' of github.com:leigaol/aws-toolkit-vscode into al2_arm
2 parents f39ed61 + a14b9a2 commit 0f6791e

File tree

13 files changed

+71
-12
lines changed

13 files changed

+71
-12
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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.

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/client.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import vscode, { env, version } from 'vscode'
77
import * as nls from 'vscode-nls'
8-
import * as crypto from 'crypto'
98
import { LanguageClient, LanguageClientOptions, RequestType, State } from 'vscode-languageclient'
109
import { InlineCompletionManager } from '../app/inline/completion'
1110
import { AmazonQLspAuth, encryptionKey, notificationTypes } from './auth'
@@ -34,11 +33,13 @@ import {
3433
getOptOutPreference,
3534
isAmazonLinux2,
3635
fs,
36+
getClientId,
3737
} from 'aws-core-vscode/shared'
3838
import { processUtils } from 'aws-core-vscode/shared'
3939
import { activate } from './chat/activation'
4040
import { AmazonQResourcePaths } from './lspInstaller'
4141
import { ConfigSection, isValidConfigSection, toAmazonQLSPLogLevel } from './config'
42+
import { telemetry } from 'aws-core-vscode/telemetry'
4243

4344
const localize = nls.loadMessageBundle()
4445
const logger = getLogger('amazonqLsp.lspClient')
@@ -124,7 +125,7 @@ export async function startLanguageServer(
124125
name: 'AmazonQ-For-VSCode',
125126
version: '0.0.1',
126127
},
127-
clientId: crypto.randomUUID(),
128+
clientId: getClientId(globals.globalState),
128129
},
129130
awsClientCapabilities: {
130131
q: {
@@ -292,6 +293,12 @@ function onServerRestartHandler(client: LanguageClient, auth: AmazonQLspAuth) {
292293
return
293294
}
294295

296+
// Emit telemetry that a crash was detected.
297+
// It is not guaranteed to 100% be a crash since somehow the server may have been intentionally restarted,
298+
// but most of the time it probably will have been due to a crash.
299+
// TODO: Port this metric override to common definitions
300+
telemetry.languageServer_crash.emit({ id: 'AmazonQ' })
301+
295302
// Need to set the auth token in the again
296303
await auth.refreshConnection(true)
297304
})

packages/core/src/amazonq/webview/ui/quickActions/handler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ export class QuickActionHandler {
355355
loadingChat: true,
356356
cancelButtonWhenLoading: false,
357357
})
358+
} else {
359+
this.mynahUI.updateStore(affectedTabId, { promptInputOptions: [] })
358360
}
359361

360362
if (affectedTabId && this.isHybridChatEnabled) {

packages/core/src/amazonqFeatureDev/session/sessionState.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ export class FeatureDevCodeGenState extends BaseCodeGenState {
205205
429
206206
)
207207
}
208+
case codegenResult.codeGenerationStatusDetail?.includes('FileCreationFailed'): {
209+
return new ApiServiceError(
210+
i18n('AWS.amazonq.featureDev.error.codeGen.default'),
211+
'GetTaskAssistCodeGeneration',
212+
'FileCreationFailedException',
213+
500
214+
)
215+
}
208216
default: {
209217
return new ApiServiceError(
210218
i18n('AWS.amazonq.featureDev.error.codeGen.default'),

packages/core/src/codewhisperer/util/customizationUtil.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const onProfileChangedListener: (event: ProfileChangedEvent) => any = asy
5959
if (event.intent === 'customization') {
6060
return
6161
}
62-
62+
const logger = getLogger()
6363
if (!event.profile) {
6464
await setSelectedCustomization(baseCustomization)
6565
return
@@ -69,7 +69,16 @@ export const onProfileChangedListener: (event: ProfileChangedEvent) => any = asy
6969
const selectedCustomization = getSelectedCustomization()
7070
// No need to validate base customization which has empty arn.
7171
if (selectedCustomization.arn.length > 0) {
72-
await switchToBaseCustomizationAndNotify()
72+
const customizationProvider = await CustomizationProvider.init(event.profile)
73+
const customizations = await customizationProvider.listAvailableCustomizations()
74+
75+
const r = customizations.find((it) => it.arn === selectedCustomization.arn)
76+
if (!r) {
77+
logger.debug(
78+
`profile ${event.profile.name} doesnt have access to customization ${selectedCustomization.name} but has access to ${customizations.map((it) => it.name)}`
79+
)
80+
await switchToBaseCustomizationAndNotify()
81+
}
7382
}
7483
}
7584

packages/core/src/shared/telemetry/vscodeTelemetry.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,15 @@
10191019
}
10201020
]
10211021
},
1022+
{
1023+
"name": "languageServer_crash",
1024+
"description": "Called when a language server crash is detected. TODO: Port this to common",
1025+
"metadata": [
1026+
{
1027+
"type": "id"
1028+
}
1029+
]
1030+
},
10221031
{
10231032
"name": "ide_heartbeat",
10241033
"description": "A heartbeat sent by the extension",

0 commit comments

Comments
 (0)