Skip to content

Commit 18603fa

Browse files
committed
clean up logging, fix predictionTracker tests
1 parent 25cc9f9 commit 18603fa

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55

66
import * as vscode from 'vscode'
7-
import { getLogger } from '../../shared/logger/logger'
87
import { PredictionTracker } from './PredictionTracker'
98

109
/**
@@ -78,7 +77,6 @@ export class PredictionKeyStrokeHandler {
7877
private updateShadowCopy(document: vscode.TextDocument): void {
7978
if (document.uri.scheme === 'file') {
8079
this.shadowCopies.set(document.uri.fsPath, document.getText())
81-
getLogger('nextEditPrediction').debug(`Updated shadow copy for ${document.uri.fsPath}`)
8280
}
8381
}
8482

@@ -92,7 +90,6 @@ export class PredictionKeyStrokeHandler {
9290
const prevContent = this.shadowCopies.get(filePath)
9391

9492
// Skip if there are no content changes or if the file is not visible
95-
// This avoids tracking bulk edits on non-visible files
9693
if (
9794
event.contentChanges.length === 0 ||
9895
event.document.uri.scheme !== 'file' ||

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ export let predictionTracker: PredictionTracker | undefined
1313
let keyStrokeHandler: PredictionKeyStrokeHandler | undefined
1414

1515
export function activateEditTracking(context: ExtContext): void {
16-
// Initialize the tracker
1716
predictionTracker = new PredictionTracker(context.extensionContext)
1817

19-
// Initialize the keystroke handler
2018
keyStrokeHandler = new PredictionKeyStrokeHandler(predictionTracker)
2119
context.extensionContext.subscriptions.push(
2220
vscode.Disposable.from({

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import globals from '../../../shared/extensionGlobals'
1919
describe('PredictionTracker', function () {
2020
let sandbox: sinon.SinonSandbox
2121
let mockExtensionContext: vscode.ExtensionContext
22-
let storagePath: string
2322
let tracker: PredictionTracker
2423
let clock: sinon.SinonFakeTimers
2524
let dateNowStub: sinon.SinonStub
@@ -38,7 +37,6 @@ describe('PredictionTracker', function () {
3837
dateNowStub = sandbox.stub(globals.clock.Date, 'now')
3938
dateNowStub.returns(startTime)
4039

41-
storagePath = '/fake/storage/path'
4240
mockExtensionContext = await FakeExtensionContext.create()
4341
})
4442

0 commit comments

Comments
 (0)