Skip to content

Commit 6f11238

Browse files
committed
fix: fix logs
1 parent 5341dbd commit 6f11238

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/core/task/Task.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,11 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
372372
if (historyItem) {
373373
this._taskMode = historyItem.mode || defaultModeSlug
374374
this.taskModeReady = Promise.resolve()
375-
provider.log(`[Task#${this.taskId}] Initialized from history with mode: ${this._taskMode}`)
376375
TelemetryService.instance.captureTaskRestarted(this.taskId)
377376
} else {
378377
// For new tasks, don't set the mode yet - wait for async initialization.
379378
this._taskMode = undefined
380379
this.taskModeReady = this.initializeTaskMode(provider)
381-
provider.log(`[Task#${this.taskId}] New task - will initialize mode asynchronously`)
382380
TelemetryService.instance.captureTaskCreated(this.taskId)
383381
}
384382

@@ -457,14 +455,12 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
457455
try {
458456
const state = await provider.getState()
459457
this._taskMode = state?.mode || defaultModeSlug
460-
provider.log(`[Task#${this.taskId}] Initialized mode from provider state: ${this._taskMode}`)
461458
} catch (error) {
462459
// If there's an error getting state, use the default mode
463460
this._taskMode = defaultModeSlug
464461
// Use the provider's log method for better error visibility
465462
const errorMessage = `Failed to initialize task mode: ${error instanceof Error ? error.message : String(error)}`
466463
provider.log(errorMessage)
467-
provider.log(`[Task#${this.taskId}] Fell back to default mode: ${this._taskMode}`)
468464
}
469465
}
470466

0 commit comments

Comments
 (0)