@@ -43,8 +43,6 @@ export async function getCheckpointService(
4343 }
4444 }
4545
46- console . log ( "[Task#getCheckpointService] initializing checkpoints service" )
47-
4846 try {
4947 const workspaceDir = task . cwd || getWorkspacePath ( )
5048
@@ -72,7 +70,6 @@ export async function getCheckpointService(
7270 if ( task . checkpointServiceInitializing ) {
7371 await pWaitFor (
7472 ( ) => {
75- console . log ( "[Task#getCheckpointService] waiting for service to initialize" )
7673 return ! ! task . checkpointService && ! ! task ?. checkpointService ?. isInitialized
7774 } ,
7875 { interval, timeout } ,
@@ -133,22 +130,9 @@ async function checkGitInstallation(
133130 log ( "[Task#getCheckpointService] service initialized" )
134131
135132 try {
136- // Debug logging to understand checkpoint detection
137- console . log ( "[DEBUG] Checkpoint detection - total messages:" , task . clineMessages . length )
138- console . log (
139- "[DEBUG] Checkpoint detection - message types:" ,
140- task . clineMessages . map ( ( m ) => ( { ts : m . ts , type : m . type , say : m . say , ask : m . ask } ) ) ,
141- )
142-
143133 const checkpointMessages = task . clineMessages . filter ( ( { say } ) => say === "checkpoint_saved" )
144- console . log (
145- "[DEBUG] Found checkpoint messages:" ,
146- checkpointMessages . length ,
147- checkpointMessages . map ( ( m ) => ( { ts : m . ts , text : m . text } ) ) ,
148- )
149134
150135 const isCheckpointNeeded = checkpointMessages . length === 0
151- console . log ( "[DEBUG] isCheckpointNeeded result:" , isCheckpointNeeded )
152136
153137 task . checkpointService = service
154138 task . checkpointServiceInitializing = false
@@ -375,7 +359,6 @@ export async function getInitializedCheckpointService(
375359 try {
376360 await pWaitFor (
377361 ( ) => {
378- console . log ( "[Task#getCheckpointService] waiting for service to initialize" )
379362 return service . isInitialized
380363 } ,
381364 { interval, timeout } ,
@@ -418,20 +401,17 @@ export async function checkpointSave(task: Task, force = false, files?: vscode.U
418401 const provider = task . providerRef . deref ( )
419402
420403 // Capture the previous checkpoint BEFORE saving the new one
421- const previousCheckpoint = service . baseHash
422- console . log ( `[checkpointSave] Previous checkpoint: ${ previousCheckpoint } ` )
404+ const previousCheckpoint = service . getCurrentCheckpoint ( )
423405
424406 // Start the checkpoint process in the background and track it
425407 const savePromise = service
426408 . saveCheckpoint ( `Task: ${ task . taskId } , Time: ${ Date . now ( ) } ` , { allowEmpty : force , files, suppressMessage } )
427409 . then ( async ( result : any ) => {
428- console . log ( `[checkpointSave] New checkpoint created: ${ result ?. commit } ` )
429-
430410 // Notify FCO that checkpoint was created
431411 if ( provider && result ) {
432412 try {
433413 provider . postMessageToWebview ( {
434- type : "checkpoint_created " ,
414+ type : "checkpointCreated " ,
435415 checkpoint : result . commit ,
436416 previousCheckpoint : previousCheckpoint ,
437417 } as any )
@@ -440,9 +420,6 @@ export async function checkpointSave(task: Task, force = false, files?: vscode.U
440420 // to avoid duplicate/conflicting messages that override cumulative tracking.
441421 // The checkpoint event handler calculates cumulative changes from the baseline
442422 // and sends the complete filesChanged message with all accumulated changes.
443- console . log (
444- `[checkpointSave] FCO update delegated to checkpoint event for cumulative tracking` ,
445- )
446423 } catch ( error ) {
447424 console . error ( "[Task#checkpointSave] Failed to notify FCO of checkpoint creation:" , error )
448425 }
@@ -509,8 +486,8 @@ export async function checkpointRestore(
509486 }
510487
511488 // Calculate and send current changes with LLM-only filtering (should be empty immediately after restore)
512- if ( cline . taskId && cline . fileContextTracker ) {
513- const changes = await fileChangeManager . getLLMOnlyChanges ( cline . taskId , cline . fileContextTracker )
489+ if ( task . taskId && task . fileContextTracker ) {
490+ const changes = await fileChangeManager . getLLMOnlyChanges ( task . taskId , task . fileContextTracker )
514491 provider ?. postMessageToWebview ( {
515492 type : "filesChanged" ,
516493 filesChanged : changes . files . length > 0 ? changes : undefined ,
@@ -525,7 +502,7 @@ export async function checkpointRestore(
525502 // Notify FCO that checkpoint was restored
526503 try {
527504 await provider ?. postMessageToWebview ( {
528- type : "checkpoint_restored " ,
505+ type : "checkpointRestored " ,
529506 checkpoint : commitHash ,
530507 } as any )
531508 } catch ( error ) {
0 commit comments