diff --git a/src/core/checkpoints/__tests__/checkpoint.test.ts b/src/core/checkpoints/__tests__/checkpoint.test.ts index 299ff823b87..c3dbffa492f 100644 --- a/src/core/checkpoints/__tests__/checkpoint.test.ts +++ b/src/core/checkpoints/__tests__/checkpoint.test.ts @@ -475,7 +475,9 @@ describe("Checkpoint functionality", () => { const provider = mockTask.providerRef.deref() provider?.postMessageToWebview({ type: "checkpointInitWarning", - checkpointWarning: i18nModule.t("common:errors.wait_checkpoint_long_time", { timeout: 5 }), + checkpointWarning: i18nModule.t("common:errors.wait_checkpoint_long_time", { + timeout: mockTask.checkpointTimeout, + }), }) } @@ -490,7 +492,7 @@ describe("Checkpoint functionality", () => { expect(simulateConditionCheck(5000)).toBe(false) expect(mockProvider.postMessageToWebview).toHaveBeenCalledWith({ type: "checkpointInitWarning", - checkpointWarning: "Checkpoint initialization is taking longer than 5 seconds...", + checkpointWarning: "Checkpoint initialization is taking longer than 15 seconds...", }) // Test: At 6 seconds, warning should not be sent again (warningShown is true) diff --git a/src/core/checkpoints/index.ts b/src/core/checkpoints/index.ts index 26a137b939c..17223d5923f 100644 --- a/src/core/checkpoints/index.ts +++ b/src/core/checkpoints/index.ts @@ -86,7 +86,7 @@ export async function getCheckpointService(task: Task, { interval = 250 }: { int // Show warning if we're past the threshold and haven't shown it yet if (!warningShown && elapsed >= WARNING_THRESHOLD_MS) { warningShown = true - sendCheckpointInitWarn(task, "WAIT_TIMEOUT", WARNING_THRESHOLD_MS / 1000) + sendCheckpointInitWarn(task, "WAIT_TIMEOUT", task.checkpointTimeout) } console.log(