Skip to content

Commit 6c3d6ab

Browse files
authored
Merge branch 'master' into NEP/DataInstrumentationLaunch
2 parents 18603fa + a7732b9 commit 6c3d6ab

File tree

32 files changed

+492
-81
lines changed

32 files changed

+492
-81
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-04-22",
3+
"version": "1.61.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Some users not signaled they needed to select a Region Profile to get features working"
8+
},
9+
{
10+
"type": "bugfix",
11+
"description": "/review: disable auto-review by default"
12+
}
13+
]
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"date": "2025-04-25",
3+
"version": "1.62.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Toast message to warn users if Developer Profile is not selected"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Fix users can not log in successfully with 2+ IDE instnaces open due to throttle error throw by the service"
12+
}
13+
]
14+
}

packages/amazonq/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 1.62.0 2025-04-25
2+
3+
- **Bug Fix** Toast message to warn users if Developer Profile is not selected
4+
- **Bug Fix** Fix users can not log in successfully with 2+ IDE instnaces open due to throttle error throw by the service
5+
6+
## 1.61.0 2025-04-22
7+
8+
- **Bug Fix** Some users not signaled they needed to select a Region Profile to get features working
9+
- **bugfix** /review: disable auto-review by default
10+
111
## 1.60.0 2025-04-18
212

313
- **Bug Fix** Users might be bound to a customization which they dont have access with the selected profile and it causes service throwing 403 when using inline suggestion and chat features

packages/amazonq/package.json

Lines changed: 5 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.61.0-SNAPSHOT",
5+
"version": "1.63.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],
@@ -131,6 +131,10 @@
131131
"amazonQChatDisclaimer": {
132132
"type": "boolean",
133133
"default": false
134+
},
135+
"amazonQSelectDeveloperProfile": {
136+
"type": "boolean",
137+
"default": false
134138
}
135139
},
136140
"additionalProperties": false

packages/amazonq/src/extensionNode.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ async function getAuthState(): Promise<Omit<AuthUserState, 'source'>> {
112112
getLogger().error(`Current Amazon Q connection is not SSO, type is: %s`, currConn?.type)
113113
}
114114

115+
// Pending profile selection state means users already log in with Sso service
116+
if (authState === 'pendingProfileSelection') {
117+
authState = 'connected'
118+
}
119+
115120
return {
116121
authStatus:
117122
authState === 'connected' || authState === 'expired' || authState === 'connectedWithNetworkError'

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,17 @@ export function registerMessageListeners(
295295
languageClient.onRequest<ShowDocumentParams, ShowDocumentResult>(
296296
ShowDocumentRequest.method,
297297
async (params: ShowDocumentParams): Promise<ShowDocumentParams | ResponseError<ShowDocumentResult>> => {
298-
const uri = vscode.Uri.parse(params.uri)
299-
const doc = await vscode.workspace.openTextDocument(uri)
300-
await vscode.window.showTextDocument(doc, { preview: false })
301-
return params
298+
try {
299+
const uri = vscode.Uri.parse(params.uri)
300+
const doc = await vscode.workspace.openTextDocument(uri)
301+
await vscode.window.showTextDocument(doc, { preview: false })
302+
return params
303+
} catch (e) {
304+
return new ResponseError(
305+
LSPErrorCodes.RequestFailed,
306+
`Failed to open document: ${(e as Error).message}`
307+
)
308+
}
302309
}
303310
)
304311

packages/amazonq/test/e2e/inline/inline.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('Amazon Q Inline', async function () {
122122
.query({
123123
metricName: 'codewhisperer_userTriggerDecision',
124124
})
125-
.map((e) => collectionUtil.partialClone(e, 3, ['credentialStartUrl'], '[omitted]'))
125+
.map((e) => collectionUtil.partialClone(e, 3, ['credentialStartUrl'], { replacement: '[omitted]' }))
126126
}
127127

128128
for (const [name, invokeCompletion] of [

packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
pollScanJobStatus,
1717
SecurityScanTimedOutError,
1818
CodeWhispererConstants,
19+
CodeScansState,
1920
} from 'aws-core-vscode/codewhisperer'
2021
import { timeoutUtils } from 'aws-core-vscode/shared'
2122
import assert from 'assert'
@@ -281,6 +282,7 @@ describe('securityScanHandler', function () {
281282
shouldAdvanceTime: true,
282283
})
283284
sinon.stub(timeoutUtils, 'sleep').resolves()
285+
sinon.stub(CodeScansState.instance, 'isScansEnabled').returns(true)
284286
})
285287

286288
afterEach(function () {

packages/core/src/auth/sso/clients.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function addLoggingMiddleware(client: SSOOIDCClient) {
258258
args.input as unknown as Record<string, unknown>,
259259
3,
260260
['clientSecret', 'accessToken', 'refreshToken'],
261-
'[omitted]'
261+
{ replacement: '[omitted]' }
262262
)
263263
getLogger().debug('API request (%s %s): %O', hostname, path, input)
264264
}
@@ -288,7 +288,7 @@ function addLoggingMiddleware(client: SSOOIDCClient) {
288288
result.output as unknown as Record<string, unknown>,
289289
3,
290290
['clientSecret', 'accessToken', 'refreshToken'],
291-
'[omitted]'
291+
{ replacement: '[omitted]' }
292292
)
293293
getLogger().debug('API response (%s %s): %O', hostname, path, output)
294294
}

0 commit comments

Comments
 (0)