Skip to content

Commit 4369fb5

Browse files
authored
fix(amazonq): flare clientId changes on every instance (aws#7273)
## Problem clientId from `clientParams.initializationOptions?.aws?.clientInfo?.clientId` is random on every restart ## Solution use the client id from telemetry utils --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8a02d60 commit 4369fb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/amazonq/src/lsp/client.ts

Lines changed: 2 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,6 +33,7 @@ import {
3433
getOptOutPreference,
3534
isAmazonInternalOs,
3635
fs,
36+
getClientId,
3737
} from 'aws-core-vscode/shared'
3838
import { processUtils } from 'aws-core-vscode/shared'
3939
import { activate } from './chat/activation'
@@ -120,7 +120,7 @@ export async function startLanguageServer(
120120
name: 'AmazonQ-For-VSCode',
121121
version: '0.0.1',
122122
},
123-
clientId: crypto.randomUUID(),
123+
clientId: getClientId(globals.globalState),
124124
},
125125
awsClientCapabilities: {
126126
q: {

0 commit comments

Comments
 (0)