Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/amazonq/src/lsp/chat/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { AmazonQChatViewProvider } from './webviewProvider'
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
import { AmazonQPromptSettings, messages, openUrl } from 'aws-core-vscode/shared'
import { DefaultAmazonQAppInitContext, messageDispatcher, EditorContentController } from 'aws-core-vscode/amazonq'
import { telemetry, TelemetryBase } from 'aws-core-vscode/telemetry'

export function registerLanguageServerEventListener(languageClient: LanguageClient, provider: AmazonQChatViewProvider) {
languageClient.info(
Expand All @@ -78,7 +79,11 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
})

languageClient.onTelemetry((e) => {
languageClient.info(`[VSCode Client] Received telemetry event from server ${JSON.stringify(e)}`)
const telemetryName: string = e.name

if (telemetryName in telemetry) {
telemetry[telemetryName as keyof TelemetryBase].emit(e.data)
}
})
}

Expand Down
Loading