Skip to content

Commit

Permalink
telemtry: implement telemetry for amazonQLSP
Browse files Browse the repository at this point in the history
  • Loading branch information
Hweinstock committed Jan 24, 2025
1 parent c7b97e2 commit 5284763
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/amazonq/src/lsp/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ import vscode from 'vscode'
import { startLanguageServer } from './client'
import { AmazonQLSPResolver } from './lspInstaller'
import { ToolkitError } from 'aws-core-vscode/shared'
import { lspSetupStage } from 'aws-core-vscode/amazonq'

export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
try {
const installResult = await new AmazonQLSPResolver().resolve()
await startLanguageServer(ctx, installResult.resourcePaths)
await lspSetupStage('all', async () => {
const installResult = await new AmazonQLSPResolver().resolve()
await lspSetupStage('launch', async () => await startLanguageServer(ctx, installResult.resourcePaths))
})
} catch (err) {
const e = err as ToolkitError
void vscode.window.showInformationMessage(`Unable to launch amazonq language server: ${e.message}`)
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/amazonq/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export {
} from './onboardingPage/walkthrough'
export { LspController } from './lsp/lspController'
export { LspClient } from './lsp/lspClient'
export { lspSetupStage } from './lsp/util'
export { api } from './extApi'
export { AmazonQChatViewProvider } from './webview/webView'
export { init as cwChatAppInit } from '../codewhispererChat/app'
Expand Down

0 comments on commit 5284763

Please sign in to comment.