Skip to content

Commit b5223d4

Browse files
committed
add repomap from Flare
1 parent 8f25509 commit b5223d4

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export async function activate(languageClient: LanguageClient, encryptionKey: Bu
8484
}),
8585
Commands.register('aws.amazonq.manageSubscription', () => {
8686
focusAmazonQPanel().catch((e) => languageClient.error(`[VSCode Client] focusAmazonQPanel() failed`))
87-
8887
languageClient
8988
.sendRequest('workspace/executeCommand', {
9089
command: 'aws/chat/manageSubscription',

packages/amazonq/src/lsp/client.ts

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
CodeWhispererSettings,
2424
getSelectedCustomization,
2525
TelemetryHelper,
26-
vsCodeState,
2726
} from 'aws-core-vscode/codewhisperer'
2827
import {
2928
Settings,
@@ -347,7 +346,26 @@ async function onLanguageServerReady(
347346
// use language server for inline completion
348347
const inlineManager = new InlineCompletionManager(client, sessionManager, lineTracker, inlineTutorialAnnotation)
349348
inlineManager.registerInlineCompletion()
350-
toDispose.push(inlineManager)
349+
toDispose.push(
350+
inlineManager,
351+
Commands.register('aws.amazonq.showPrev', async () => {
352+
await sessionManager.maybeRefreshSessionUx()
353+
await vscode.commands.executeCommand('editor.action.inlineSuggest.showPrevious')
354+
sessionManager.onPrevSuggestion()
355+
}),
356+
Commands.register('aws.amazonq.showNext', async () => {
357+
await sessionManager.maybeRefreshSessionUx()
358+
await vscode.commands.executeCommand('editor.action.inlineSuggest.showNext')
359+
sessionManager.onNextSuggestion()
360+
}),
361+
// this is a workaround since handleDidShowCompletionItem is not public API
362+
Commands.register('aws.amazonq.checkInlineSuggestionVisibility', async () => {
363+
sessionManager.checkInlineSuggestionVisibility()
364+
}),
365+
vscode.workspace.onDidCloseTextDocument(async () => {
366+
await vscode.commands.executeCommand('aws.amazonq.rejectCodeSuggestion')
367+
})
368+
)
351369
}
352370

353371
activateInlineChat(extensionContext, client, encryptionKey, inlineChatTutorialAnnotation)
@@ -364,24 +382,6 @@ async function onLanguageServerReady(
364382
await initializeLanguageServerConfiguration(client, 'startup')
365383

366384
toDispose.push(
367-
Commands.register('aws.amazonq.showPrev', async () => {
368-
await sessionManager.maybeRefreshSessionUx()
369-
await vscode.commands.executeCommand('editor.action.inlineSuggest.showPrevious')
370-
sessionManager.onPrevSuggestion()
371-
}),
372-
Commands.register('aws.amazonq.showNext', async () => {
373-
await sessionManager.maybeRefreshSessionUx()
374-
await vscode.commands.executeCommand('editor.action.inlineSuggest.showNext')
375-
sessionManager.onNextSuggestion()
376-
}),
377-
// this is a workaround since handleDidShowCompletionItem is not public API
378-
Commands.register('aws.amazonq.checkInlineSuggestionVisibility', async () => {
379-
sessionManager.checkInlineSuggestionVisibility()
380-
}),
381-
Commands.register({ id: 'aws.amazonq.invokeInlineCompletion', autoconnect: true }, async () => {
382-
vsCodeState.lastManualTriggerTime = performance.now()
383-
await vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
384-
}),
385385
Commands.register('aws.amazonq.refreshAnnotation', async (forceProceed: boolean) => {
386386
telemetry.record({
387387
traceId: TelemetryHelper.instance.traceId,
@@ -407,9 +407,6 @@ async function onLanguageServerReady(
407407
getLogger().debug(`codewhisperer: user dismiss tutorial.`)
408408
}
409409
}),
410-
vscode.workspace.onDidCloseTextDocument(async () => {
411-
await vscode.commands.executeCommand('aws.amazonq.rejectCodeSuggestion')
412-
}),
413410
AuthUtil.instance.auth.onDidChangeActiveConnection(async () => {
414411
await auth.refreshConnection()
415412
}),

packages/core/src/codewhisperer/service/recommendationHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class RecommendationHandler {
124124
}
125125

126126
setLanguageClient(languageClient: LanguageClient) {
127-
this.languageClient = this.languageClient
127+
this.languageClient = languageClient
128128
}
129129

130130
async getServerResponse(

0 commit comments

Comments
 (0)