Skip to content

Commit 19dc1b0

Browse files
committed
merge: resolve merge conflicts
2 parents 2f7c3d9 + 8e85476 commit 19dc1b0

File tree

18 files changed

+170
-16
lines changed

18 files changed

+170
-16
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+
}
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/messages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
103103
break
104104
}
105105
}
106+
languageClient.info(`[Telemetry] Emitting ${telemetryName} telemetry: ${JSON.stringify(e.data)}`)
106107
telemetry[telemetryName as keyof TelemetryBase].emit(e.data)
107108
}
108109
})

packages/amazonq/src/lsp/client.ts

Lines changed: 11 additions & 4 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'
@@ -39,6 +38,8 @@ import {
3938
getOptOutPreference,
4039
isAmazonInternalOs,
4140
fs,
41+
getClientId,
42+
extensionVersion,
4243
} from 'aws-core-vscode/shared'
4344
import { processUtils } from 'aws-core-vscode/shared'
4445
import { activate } from './chat/activation'
@@ -129,9 +130,9 @@ export async function startLanguageServer(
129130
version: version,
130131
extension: {
131132
name: 'AmazonQ-For-VSCode',
132-
version: '0.0.1',
133+
version: extensionVersion,
133134
},
134-
clientId: crypto.randomUUID(),
135+
clientId: getClientId(globals.globalState),
135136
},
136137
awsClientCapabilities: {
137138
q: {
@@ -143,7 +144,7 @@ export async function startLanguageServer(
143144
},
144145
},
145146
contextConfiguration: {
146-
workspaceIdentifier: extensionContext.storageUri,
147+
workspaceIdentifier: extensionContext.storageUri?.path,
147148
},
148149
logLevel: toAmazonQLSPLogLevel(globals.logOutputChannel.logLevel),
149150
},
@@ -336,6 +337,12 @@ function onServerRestartHandler(client: LanguageClient, auth: AmazonQLspAuth) {
336337
return
337338
}
338339

340+
// Emit telemetry that a crash was detected.
341+
// It is not guaranteed to 100% be a crash since somehow the server may have been intentionally restarted,
342+
// but most of the time it probably will have been due to a crash.
343+
// TODO: Port this metric override to common definitions
344+
telemetry.languageServer_crash.emit({ id: 'AmazonQ' })
345+
339346
// Need to set the auth token in the again
340347
await auth.refreshConnection(true)
341348
})

packages/amazonq/test/unit/codewhisperer/util/runtimeLanguageContext.test.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,40 @@ describe('runtimeLanguageContext', function () {
333333
}
334334
})
335335

336+
describe('getSingleLineCommentPrefix', function () {
337+
it('should return the correct comment prefix for supported languages', function () {
338+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('java'), '// ')
339+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('javascript'), '// ')
340+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('jsonc'), '// ')
341+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('kotlin'), '// ')
342+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('lua'), '-- ')
343+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('python'), '# ')
344+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('ruby'), '# ')
345+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('sql'), '-- ')
346+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('tf'), '# ')
347+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('typescript'), '// ')
348+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('vue'), '')
349+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('yaml'), '# ')
350+
})
351+
352+
it('should normalize language ID before getting comment prefix', function () {
353+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('hcl'), '# ')
354+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('javascriptreact'), '// ')
355+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('shellscript'), '# ')
356+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('typescriptreact'), '// ')
357+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('yml'), '# ')
358+
})
359+
360+
it('should return empty string for unsupported languages', function () {
361+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('nonexistent'), '')
362+
assert.strictEqual(languageContext.getSingleLineCommentPrefix(undefined), '')
363+
})
364+
365+
it('should return empty string for plaintext', function () {
366+
assert.strictEqual(languageContext.getSingleLineCommentPrefix('plaintext'), '')
367+
})
368+
})
369+
336370
// for now we will only jsx mapped to javascript, tsx mapped to typescript, all other language should remain the same
337371
describe('test covertCwsprRequest', function () {
338372
const leftFileContent = 'left'

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) {

0 commit comments

Comments
 (0)