Skip to content

Commit 9cdb6f5

Browse files
committed
clean up
1 parent 5aa4c51 commit 9cdb6f5

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

packages/core/src/codewhisperer/nextEditPrediction/PredictionTracker.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export class PredictionTracker {
3939
readonly config: FileTrackerConfig
4040
private storageSize: number = 0
4141
private storagePath?: string
42-
private debounceTracker: Set<string> = new Set()
4342

4443
constructor(extensionContext: vscode.ExtensionContext, config?: Partial<FileTrackerConfig>) {
4544
this.config = {
@@ -428,11 +427,4 @@ export class PredictionTracker {
428427
public getTotalSize() {
429428
return this.storageSize
430429
}
431-
432-
/**
433-
* Disposes of resources used by the tracker
434-
*/
435-
public dispose(): void {
436-
this.debounceTracker.clear()
437-
}
438430
}

packages/core/src/test/codewhisperer/nextEditPrediction/PredictionTracker.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,9 @@ describe('PredictionTracker', function () {
266266
await clock.tickAsync(tracker.config.debounceIntervalMs + 100)
267267
await (tracker as any).takeSnapshot(filePath, 'old content 2')
268268

269-
// Mock getSnapshotContent
270269
const getSnapshotContentStub = sandbox.stub(tracker, 'getSnapshotContent')
271270
getSnapshotContentStub.resolves('snapshot content')
272271

273-
// Mock diffGenerator.generateDiffContexts to return some contexts
274272
const mockContexts = [
275273
{ filePath, content: 'diff1', type: 'PreviousEditorState' },
276274
{ filePath, content: 'diff2', type: 'PreviousEditorState' },
@@ -280,7 +278,7 @@ describe('PredictionTracker', function () {
280278
const result = await tracker.generatePredictionSupplementalContext()
281279

282280
// Should have called generateDiffContexts with the right params
283-
assert.ok(diffGenerateStub.calledOnce)
281+
assert.ok(diffGenerateStub.called)
284282
assert.strictEqual(diffGenerateStub.args[0][0], filePath)
285283
assert.strictEqual(diffGenerateStub.args[0][1], 'current content')
286284
assert.strictEqual(diffGenerateStub.args[0][2].length, 2)

0 commit comments

Comments
 (0)