Skip to content

Commit cb42ac6

Browse files
committed
fix(amazonq): cleanup
1 parent 96d38e3 commit cb42ac6

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

packages/amazonq/src/app/inline/completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
173173
private readonly languageClient: LanguageClient,
174174
private readonly recommendationService: RecommendationService,
175175
private readonly sessionManager: SessionManager,
176-
private readonly isNewSesion: boolean = true
176+
private readonly isNewSession: boolean = true
177177
) {}
178178

179179
async provideInlineCompletionItems(
@@ -182,7 +182,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
182182
context: InlineCompletionContext,
183183
token: CancellationToken
184184
): Promise<InlineCompletionItem[] | InlineCompletionList> {
185-
if (this.isNewSesion) {
185+
if (this.isNewSession) {
186186
// make service requests if it's a new session
187187
await this.recommendationService.getAllRecommendations(
188188
this.languageClient,

packages/amazonq/test/unit/amazonq/apps/inline/completion.test.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import sinon from 'sinon'
66
import { commands, languages } from 'vscode'
77
import assert from 'assert'
88
import { LanguageClient } from 'vscode-languageclient'
9-
import { AmazonQInlineCompletionItemProvider, InlineCompletionManager } from '../../../../../src/app/inline/completion'
9+
import { InlineCompletionManager } from '../../../../../src/app/inline/completion'
1010

1111
describe('InlineCompletionManager', () => {
1212
let manager: InlineCompletionManager
@@ -28,7 +28,6 @@ describe('InlineCompletionManager', () => {
2828
executeCommandStub = sandbox.stub(commands, 'executeCommand')
2929
sendNotificationStub = sandbox.stub()
3030

31-
// Create mock disposable
3231
const mockDisposable = {
3332
dispose: sandbox.stub(),
3433
}
@@ -48,25 +47,6 @@ describe('InlineCompletionManager', () => {
4847
sandbox.restore()
4948
})
5049

51-
describe('constructor', () => {
52-
it('should initialize with language client and register provider', () => {
53-
assert(registerProviderStub.calledOnce)
54-
assert(
55-
registerProviderStub.calledWith(
56-
sinon.match.any,
57-
sinon.match.instanceOf(AmazonQInlineCompletionItemProvider)
58-
)
59-
)
60-
})
61-
})
62-
63-
describe('dispose', () => {
64-
it('should dispose of the disposable', () => {
65-
manager.dispose()
66-
assert(disposableStub.calledOnce)
67-
})
68-
})
69-
7050
describe('registerInlineCompletion', () => {
7151
beforeEach(() => {
7252
manager.registerInlineCompletion()

0 commit comments

Comments
 (0)