Skip to content

Commit 16ad88b

Browse files
committed
fix(amazonq): cleanup
1 parent e5cc9a7 commit 16ad88b

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
@@ -145,7 +145,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
145145
private readonly languageClient: LanguageClient,
146146
private readonly recommendationService: RecommendationService,
147147
private readonly sessionManager: SessionManager,
148-
private readonly isNewSesion: boolean = true
148+
private readonly isNewSession: boolean = true
149149
) {}
150150

151151
async provideInlineCompletionItems(
@@ -154,7 +154,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
154154
context: InlineCompletionContext,
155155
token: CancellationToken
156156
): Promise<InlineCompletionItem[] | InlineCompletionList> {
157-
if (this.isNewSesion) {
157+
if (this.isNewSession) {
158158
// make service requests if it's a new session
159159
await this.recommendationService.getAllRecommendations(
160160
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)