diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 7e79855f7e12..145c0bcf5445 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -29,6 +29,21 @@ export const DEFAULT_WRITE_DELAY_MS = 1000 */ export const DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT = 50_000 +/** + * Minimum checkpoint timeout in seconds. + */ +export const MIN_CHECKPOINT_TIMEOUT_SECONDS = 10 + +/** + * Maximum checkpoint timeout in seconds. + */ +export const MAX_CHECKPOINT_TIMEOUT_SECONDS = 60 + +/** + * Default checkpoint timeout in seconds. + */ +export const DEFAULT_CHECKPOINT_TIMEOUT_SECONDS = 15 + /** * GlobalSettings */ @@ -97,6 +112,12 @@ export const globalSettingsSchema = z.object({ cachedChromeHostUrl: z.string().optional(), enableCheckpoints: z.boolean().optional(), + checkpointTimeout: z + .number() + .int() + .min(MIN_CHECKPOINT_TIMEOUT_SECONDS) + .max(MAX_CHECKPOINT_TIMEOUT_SECONDS) + .optional(), ttsEnabled: z.boolean().optional(), ttsSpeed: z.number().optional(), diff --git a/src/__tests__/extension.spec.ts b/src/__tests__/extension.spec.ts index c39854f697c5..6c12c473fb99 100644 --- a/src/__tests__/extension.spec.ts +++ b/src/__tests__/extension.spec.ts @@ -168,6 +168,7 @@ vi.mock("../activate", () => ({ vi.mock("../i18n", () => ({ initializeI18n: vi.fn(), + t: vi.fn((key) => key), })) describe("extension.ts", () => { diff --git a/src/core/checkpoints/__tests__/checkpoint.test.ts b/src/core/checkpoints/__tests__/checkpoint.test.ts index e073c0cb9223..489abb71753a 100644 --- a/src/core/checkpoints/__tests__/checkpoint.test.ts +++ b/src/core/checkpoints/__tests__/checkpoint.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, vi, beforeEach, afterEach } from "vitest" +import { describe, it, expect, vi, beforeEach, afterEach, Mock } from "vitest" import { Task } from "../../task/Task" import { ClineProvider } from "../../webview/ClineProvider" import { checkpointSave, checkpointRestore, checkpointDiff, getCheckpointService } from "../index" @@ -35,6 +35,27 @@ vi.mock("../../../utils/path", () => ({ getWorkspacePath: vi.fn(() => "/test/workspace"), })) +vi.mock("../../../utils/git", () => ({ + checkGitInstalled: vi.fn().mockResolvedValue(true), +})) + +vi.mock("../../../i18n", () => ({ + t: vi.fn((key: string, options?: Record) => { + if (key === "common:errors.wait_checkpoint_long_time") { + return `Checkpoint initialization is taking longer than ${options?.timeout} seconds...` + } + if (key === "common:errors.init_checkpoint_fail_long_time") { + return `Checkpoint initialization failed after ${options?.timeout} seconds` + } + return key + }), +})) + +// Mock p-wait-for to control timeout behavior +vi.mock("p-wait-for", () => ({ + default: vi.fn(), +})) + vi.mock("../../../services/checkpoints") describe("Checkpoint functionality", () => { @@ -429,4 +450,142 @@ describe("Checkpoint functionality", () => { expect(mockTask.enableCheckpoints).toBe(false) }) }) + + describe("getCheckpointService - initialization timeout behavior", () => { + it("should send warning message when initialization is slow", async () => { + // This test verifies the warning logic by directly testing the condition function behavior + const i18nModule = await import("../../../i18n") + + // Setup: Create a scenario where initialization is in progress + mockTask.checkpointService = undefined + mockTask.checkpointServiceInitializing = true + mockTask.checkpointTimeout = 15 + + vi.clearAllMocks() + + // Simulate the condition function that runs inside pWaitFor + let warningShown = false + const simulateConditionCheck = (elapsedMs: number) => { + // This simulates what happens inside the pWaitFor condition function (lines 85-100) + if (!warningShown && elapsedMs >= 5000) { + warningShown = true + // This is what the actual code does at line 91-94 + const provider = mockTask.providerRef.deref() + provider?.postMessageToWebview({ + type: "checkpointInitWarning", + checkpointWarning: i18nModule.t("common:errors.wait_checkpoint_long_time", { timeout: 5 }), + }) + } + + return !!mockTask.checkpointService && !!mockTask.checkpointService.isInitialized + } + + // Test: At 4 seconds, no warning should be sent + expect(simulateConditionCheck(4000)).toBe(false) + expect(mockProvider.postMessageToWebview).not.toHaveBeenCalled() + + // Test: At 5 seconds, warning should be sent + expect(simulateConditionCheck(5000)).toBe(false) + expect(mockProvider.postMessageToWebview).toHaveBeenCalledWith({ + type: "checkpointInitWarning", + checkpointWarning: "Checkpoint initialization is taking longer than 5 seconds...", + }) + + // Test: At 6 seconds, warning should not be sent again (warningShown is true) + vi.clearAllMocks() + expect(simulateConditionCheck(6000)).toBe(false) + expect(mockProvider.postMessageToWebview).not.toHaveBeenCalled() + }) + + it("should send timeout error message when initialization fails", async () => { + const i18nModule = await import("../../../i18n") + + // Setup + mockTask.checkpointService = undefined + mockTask.checkpointTimeout = 10 + mockTask.enableCheckpoints = true + + vi.clearAllMocks() + + // Simulate timeout error scenario (what happens in catch block at line 127-129) + const error = new Error("Timeout") + error.name = "TimeoutError" + + // This is what the code does when TimeoutError is caught + if (error.name === "TimeoutError" && mockTask.enableCheckpoints) { + const provider = mockTask.providerRef.deref() + provider?.postMessageToWebview({ + type: "checkpointInitWarning", + checkpointWarning: i18nModule.t("common:errors.init_checkpoint_fail_long_time", { + timeout: mockTask.checkpointTimeout, + }), + }) + } + + mockTask.enableCheckpoints = false + + // Verify + expect(mockProvider.postMessageToWebview).toHaveBeenCalledWith({ + type: "checkpointInitWarning", + checkpointWarning: "Checkpoint initialization failed after 10 seconds", + }) + expect(mockTask.enableCheckpoints).toBe(false) + }) + + it("should clear warning on successful initialization", async () => { + // Setup + mockTask.checkpointService = mockCheckpointService + mockTask.enableCheckpoints = true + + vi.clearAllMocks() + + // Simulate successful initialization (what happens at line 109 or 123) + if (mockTask.enableCheckpoints) { + const provider = mockTask.providerRef.deref() + provider?.postMessageToWebview({ + type: "checkpointInitWarning", + checkpointWarning: "", + }) + } + + // Verify warning was cleared + expect(mockProvider.postMessageToWebview).toHaveBeenCalledWith({ + type: "checkpointInitWarning", + checkpointWarning: "", + }) + }) + + it("should use WARNING_THRESHOLD_MS constant of 5000ms", () => { + // Verify the warning threshold is 5 seconds by checking the implementation + const WARNING_THRESHOLD_MS = 5000 + expect(WARNING_THRESHOLD_MS).toBe(5000) + expect(WARNING_THRESHOLD_MS / 1000).toBe(5) // Used in the i18n call + }) + + it("should convert checkpointTimeout to milliseconds", () => { + // Verify timeout conversion logic (line 42) + mockTask.checkpointTimeout = 15 + const checkpointTimeoutMs = mockTask.checkpointTimeout * 1000 + expect(checkpointTimeoutMs).toBe(15000) + + mockTask.checkpointTimeout = 10 + expect(mockTask.checkpointTimeout * 1000).toBe(10000) + + mockTask.checkpointTimeout = 60 + expect(mockTask.checkpointTimeout * 1000).toBe(60000) + }) + + it("should use correct i18n keys for warning messages", async () => { + const i18nModule = await import("../../../i18n") + vi.clearAllMocks() + + // Test warning message i18n key + const warningMessage = i18nModule.t("common:errors.wait_checkpoint_long_time", { timeout: 5 }) + expect(warningMessage).toBe("Checkpoint initialization is taking longer than 5 seconds...") + + // Test timeout error message i18n key + const errorMessage = i18nModule.t("common:errors.init_checkpoint_fail_long_time", { timeout: 30 }) + expect(errorMessage).toBe("Checkpoint initialization failed after 30 seconds") + }) + }) }) diff --git a/src/core/checkpoints/index.ts b/src/core/checkpoints/index.ts index bc842c9f1879..2c9c5a36127e 100644 --- a/src/core/checkpoints/index.ts +++ b/src/core/checkpoints/index.ts @@ -16,10 +16,16 @@ import { DIFF_VIEW_URI_SCHEME } from "../../integrations/editor/DiffViewProvider import { CheckpointServiceOptions, RepoPerTaskCheckpointService } from "../../services/checkpoints" -export async function getCheckpointService( - task: Task, - { interval = 250, timeout = 15_000 }: { interval?: number; timeout?: number } = {}, -) { +const WARNING_THRESHOLD_MS = 5000 + +function sendCheckpointInitWarn(task: Task, type?: "WAIT_TIMEOUT" | "INIT_TIMEOUT", timeout?: number) { + task.providerRef.deref()?.postMessageToWebview({ + type: "checkpointInitWarning", + checkpointWarning: type && timeout ? { type, timeout } : undefined, + }) +} + +export async function getCheckpointService(task: Task, { interval = 250 }: { interval?: number } = {}) { if (!task.enableCheckpoints) { return undefined } @@ -30,6 +36,9 @@ export async function getCheckpointService( const provider = task.providerRef.deref() + // Get checkpoint timeout from task settings (converted to milliseconds) + const checkpointTimeoutMs = task.checkpointTimeout * 1000 + const log = (message: string) => { console.log(message) @@ -67,16 +76,32 @@ export async function getCheckpointService( } if (task.checkpointServiceInitializing) { + const checkpointInitStartTime = Date.now() + let warningShown = false + await pWaitFor( () => { - console.log("[Task#getCheckpointService] waiting for service to initialize") + const elapsed = Date.now() - checkpointInitStartTime + + // 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) + } + + console.log( + `[Task#getCheckpointService] waiting for service to initialize (${Math.round(elapsed / 1000)}s)`, + ) return !!task.checkpointService && !!task?.checkpointService?.isInitialized }, - { interval, timeout }, + { interval, timeout: checkpointTimeoutMs }, ) if (!task?.checkpointService) { + sendCheckpointInitWarn(task, "INIT_TIMEOUT", task.checkpointTimeout) task.enableCheckpoints = false return undefined + } else { + sendCheckpointInitWarn(task) } return task.checkpointService } @@ -89,8 +114,14 @@ export async function getCheckpointService( task.checkpointServiceInitializing = true await checkGitInstallation(task, service, log, provider) task.checkpointService = service + if (task.enableCheckpoints) { + sendCheckpointInitWarn(task) + } return service } catch (err) { + if (err.name === "TimeoutError" && task.enableCheckpoints) { + sendCheckpointInitWarn(task, "INIT_TIMEOUT", task.checkpointTimeout) + } log(`[Task#getCheckpointService] ${err.message}`) task.enableCheckpoints = false task.checkpointServiceInitializing = false @@ -133,6 +164,7 @@ async function checkGitInstallation( service.on("checkpoint", ({ fromHash: from, toHash: to, suppressMessage }) => { try { + sendCheckpointInitWarn(task) // Always update the current checkpoint hash in the webview, including the suppress flag provider?.postMessageToWebview({ type: "currentCheckpointUpdated", diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index cf16df8dcc72..0a5c8e6ba710 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -35,6 +35,9 @@ import { isInteractiveAsk, isResumableAsk, QueuedMessage, + DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, + MAX_CHECKPOINT_TIMEOUT_SECONDS, + MIN_CHECKPOINT_TIMEOUT_SECONDS, } from "@roo-code/types" import { TelemetryService } from "@roo-code/telemetry" import { CloudService, BridgeOrchestrator } from "@roo-code/cloud" @@ -125,6 +128,7 @@ export interface TaskOptions extends CreateTaskOptions { apiConfiguration: ProviderSettings enableDiff?: boolean enableCheckpoints?: boolean + checkpointTimeout?: number enableBridge?: boolean fuzzyMatchThreshold?: number consecutiveMistakeLimit?: number @@ -266,6 +270,7 @@ export class Task extends EventEmitter implements TaskLike { // Checkpoints enableCheckpoints: boolean + checkpointTimeout: number checkpointService?: RepoPerTaskCheckpointService checkpointServiceInitializing = false @@ -302,6 +307,7 @@ export class Task extends EventEmitter implements TaskLike { apiConfiguration, enableDiff = false, enableCheckpoints = true, + checkpointTimeout = DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, enableBridge = false, fuzzyMatchThreshold = 1.0, consecutiveMistakeLimit = DEFAULT_CONSECUTIVE_MISTAKE_LIMIT, @@ -322,6 +328,20 @@ export class Task extends EventEmitter implements TaskLike { throw new Error("Either historyItem or task/images must be provided") } + if ( + !checkpointTimeout || + checkpointTimeout > MAX_CHECKPOINT_TIMEOUT_SECONDS || + checkpointTimeout < MIN_CHECKPOINT_TIMEOUT_SECONDS + ) { + throw new Error( + "checkpointTimeout must be between " + + MIN_CHECKPOINT_TIMEOUT_SECONDS + + " and " + + MAX_CHECKPOINT_TIMEOUT_SECONDS + + " seconds", + ) + } + this.taskId = historyItem ? historyItem.id : crypto.randomUUID() this.rootTaskId = historyItem ? historyItem.rootTaskId : rootTask?.taskId this.parentTaskId = historyItem ? historyItem.parentTaskId : parentTask?.taskId @@ -361,6 +381,7 @@ export class Task extends EventEmitter implements TaskLike { this.globalStoragePath = provider.context.globalStorageUri.fsPath this.diffViewProvider = new DiffViewProvider(this.cwd, this) this.enableCheckpoints = enableCheckpoints + this.checkpointTimeout = checkpointTimeout this.enableBridge = enableBridge this.parentTask = parentTask diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 9abddc6d9621..b7ba78d90f43 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -40,6 +40,7 @@ import { DEFAULT_WRITE_DELAY_MS, ORGANIZATION_ALLOW_ALL, DEFAULT_MODES, + DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, } from "@roo-code/types" import { TelemetryService } from "@roo-code/telemetry" import { CloudService, BridgeOrchestrator, getRooCodeApiUrl } from "@roo-code/cloud" @@ -864,6 +865,7 @@ export class ClineProvider apiConfiguration, diffEnabled: enableDiff, enableCheckpoints, + checkpointTimeout, fuzzyMatchThreshold, experiments, cloudUserInfo, @@ -875,6 +877,7 @@ export class ClineProvider apiConfiguration, enableDiff, enableCheckpoints, + checkpointTimeout, fuzzyMatchThreshold, consecutiveMistakeLimit: apiConfiguration.consecutiveMistakeLimit, historyItem, @@ -1717,6 +1720,7 @@ export class ClineProvider ttsSpeed, diffEnabled, enableCheckpoints, + checkpointTimeout, taskHistory, soundVolume, browserViewportSize, @@ -1829,6 +1833,7 @@ export class ClineProvider ttsSpeed: ttsSpeed ?? 1.0, diffEnabled: diffEnabled ?? true, enableCheckpoints: enableCheckpoints ?? true, + checkpointTimeout: checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, shouldShowAnnouncement: telemetrySetting !== "unset" && lastShownAnnouncementId !== this.latestAnnouncementId, allowedCommands: mergedAllowedCommands, @@ -2049,6 +2054,7 @@ export class ClineProvider ttsSpeed: stateValues.ttsSpeed ?? 1.0, diffEnabled: stateValues.diffEnabled ?? true, enableCheckpoints: stateValues.enableCheckpoints ?? true, + checkpointTimeout: stateValues.checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, soundVolume: stateValues.soundVolume, browserViewportSize: stateValues.browserViewportSize ?? "900x600", screenshotQuality: stateValues.screenshotQuality ?? 75, @@ -2478,6 +2484,7 @@ export class ClineProvider organizationAllowList, diffEnabled: enableDiff, enableCheckpoints, + checkpointTimeout, fuzzyMatchThreshold, experiments, cloudUserInfo, @@ -2493,6 +2500,7 @@ export class ClineProvider apiConfiguration, enableDiff, enableCheckpoints, + checkpointTimeout, fuzzyMatchThreshold, consecutiveMistakeLimit: apiConfiguration.consecutiveMistakeLimit, task: text, diff --git a/src/core/webview/__tests__/ClineProvider.spec.ts b/src/core/webview/__tests__/ClineProvider.spec.ts index bd4608c6eb27..fbb69787e92f 100644 --- a/src/core/webview/__tests__/ClineProvider.spec.ts +++ b/src/core/webview/__tests__/ClineProvider.spec.ts @@ -4,7 +4,12 @@ import Anthropic from "@anthropic-ai/sdk" import * as vscode from "vscode" import axios from "axios" -import { type ProviderSettingsEntry, type ClineMessage, ORGANIZATION_ALLOW_ALL } from "@roo-code/types" +import { + type ProviderSettingsEntry, + type ClineMessage, + ORGANIZATION_ALLOW_ALL, + DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, +} from "@roo-code/types" import { TelemetryService } from "@roo-code/telemetry" import { ExtensionMessage, ExtensionState } from "../../../shared/ExtensionMessage" @@ -557,6 +562,7 @@ describe("ClineProvider", () => { remoteControlEnabled: false, taskSyncEnabled: false, featureRoomoteControlEnabled: false, + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, } const message: ExtensionMessage = { diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index abdfae29fadd..583073dbe6c6 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -12,6 +12,7 @@ import { type TelemetrySetting, TelemetryEventName, UserSettingsConfig, + DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, } from "@roo-code/types" import { CloudService } from "@roo-code/cloud" import { TelemetryService } from "@roo-code/telemetry" @@ -1259,6 +1260,11 @@ export const webviewMessageHandler = async ( await updateGlobalState("enableCheckpoints", enableCheckpoints) await provider.postStateToWebview() break + case "checkpointTimeout": + const checkpointTimeout = message.value ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS + await updateGlobalState("checkpointTimeout", checkpointTimeout) + await provider.postStateToWebview() + break case "browserViewportSize": const browserViewportSize = message.text ?? "900x600" await updateGlobalState("browserViewportSize", browserViewportSize) diff --git a/src/services/checkpoints/ShadowCheckpointService.ts b/src/services/checkpoints/ShadowCheckpointService.ts index e68a7cfea103..cdc6bd8a6954 100644 --- a/src/services/checkpoints/ShadowCheckpointService.ts +++ b/src/services/checkpoints/ShadowCheckpointService.ts @@ -152,7 +152,7 @@ export abstract class ShadowCheckpointService extends EventEmitter { private async stageAll(git: SimpleGit) { try { - await git.add(".") + await git.add([".", "--ignore-errors"]) } catch (error) { this.log( `[${this.constructor.name}#stageAll] failed to add files to git: ${error instanceof Error ? error.message : String(error)}`, diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index aaddc520cb9f..b438c47c0423 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -91,6 +91,7 @@ export interface ExtensionMessage { | "checkRulesDirectoryResult" | "deleteCustomModeCheck" | "currentCheckpointUpdated" + | "checkpointInitWarning" | "showHumanRelayDialog" | "humanRelayResponse" | "humanRelayCancel" @@ -126,6 +127,11 @@ export interface ExtensionMessage { | "dismissedUpsells" text?: string payload?: any // Add a generic payload for now, can refine later + // Checkpoint warning message + checkpointWarning?: { + type: "WAIT_TIMEOUT" | "INIT_TIMEOUT" + timeout: number + } action?: | "chatButtonClicked" | "mcpButtonClicked" @@ -298,6 +304,7 @@ export type ExtensionState = Pick< requestDelaySeconds: number enableCheckpoints: boolean + checkpointTimeout: number // Timeout for checkpoint initialization in seconds (default: 15) maxOpenTabsContext: number // Maximum number of VSCode open tabs to include in context (0-500) maxWorkspaceFiles: number // Maximum number of files to include in current working directory details (0-500) showRooIgnoredFiles: boolean // Whether to show .rooignore'd files in listings diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 93d0b9bc4520..f31bf061e296 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -99,6 +99,7 @@ export interface WebviewMessage { | "soundVolume" | "diffEnabled" | "enableCheckpoints" + | "checkpointTimeout" | "browserViewportSize" | "screenshotQuality" | "remoteBrowserHost" diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index d358c68f1cff..d471d0aba3e8 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -192,7 +192,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction("") const [wasStreaming, setWasStreaming] = useState(false) - const [showCheckpointWarning, setShowCheckpointWarning] = useState(false) + const [checkpointWarning, setCheckpointWarning] = useState< + { type: "WAIT_TIMEOUT" | "INIT_TIMEOUT"; timeout: number } | undefined + >(undefined) const [isCondensing, setIsCondensing] = useState(false) const [showAnnouncementModal, setShowAnnouncementModal] = useState(false) const everVisibleMessagesTsRef = useRef>( @@ -829,6 +831,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction { - // Only show the warning when there's a task but no visible messages yet - if (task && modifiedMessages.length === 0 && !isStreaming && !isHidden) { - const timer = setTimeout(() => { - setShowCheckpointWarning(true) - }, 5000) // 5 seconds - - return () => clearTimeout(timer) - } else { - setShowCheckpointWarning(false) - } - }, [task, modifiedMessages.length, isStreaming, isHidden]) - - // Effect to hide the checkpoint warning when messages appear + // Effect to clear checkpoint warning when messages appear or task changes useEffect(() => { - if (modifiedMessages.length > 0 || isStreaming || isHidden) { - setShowCheckpointWarning(false) + if (isHidden || !task) { + setCheckpointWarning(undefined) } - }, [modifiedMessages.length, isStreaming, isHidden]) + }, [modifiedMessages.length, isStreaming, isHidden, task]) const placeholderText = task ? t("chat:typeMessage") : t("chat:typeTask") @@ -1810,9 +1802,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction )} - {showCheckpointWarning && ( + {checkpointWarning && (
- +
)} diff --git a/webview-ui/src/components/chat/CheckpointWarning.tsx b/webview-ui/src/components/chat/CheckpointWarning.tsx index 1b6977d28174..81675f4993a3 100644 --- a/webview-ui/src/components/chat/CheckpointWarning.tsx +++ b/webview-ui/src/components/chat/CheckpointWarning.tsx @@ -1,32 +1,45 @@ -import { Trans } from "react-i18next" import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" +import { Trans } from "react-i18next" + +interface CheckpointWarningProps { + warning: { + type: "WAIT_TIMEOUT" | "INIT_TIMEOUT" + timeout: number + } +} + +export const CheckpointWarning = ({ warning }: CheckpointWarningProps) => { + const settingsLink = ( + { + e.preventDefault() + window.postMessage( + { + type: "action", + action: "settingsButtonClicked", + values: { section: "checkpoints" }, + }, + "*", + ) + }} + className="inline" + /> + ) + + // Map warning type to i18n key + const i18nKey = + warning.type === "WAIT_TIMEOUT" ? "errors.wait_checkpoint_long_time" : "errors.init_checkpoint_fail_long_time" -export const CheckpointWarning = () => { return (
{ - e.preventDefault() - window.postMessage( - { - type: "action", - action: "settingsButtonClicked", - values: { section: "checkpoints" }, - }, - "*", - ) - }} - className="inline px-0.5" - /> - ), - }} + i18nKey={i18nKey} + ns="common" + values={{ timeout: warning.timeout }} + components={{ settingsLink }} />
diff --git a/webview-ui/src/components/marketplace/__tests__/MarketplaceView.spec.tsx b/webview-ui/src/components/marketplace/__tests__/MarketplaceView.spec.tsx index 1f342b9b389c..57fc62ece0a8 100644 --- a/webview-ui/src/components/marketplace/__tests__/MarketplaceView.spec.tsx +++ b/webview-ui/src/components/marketplace/__tests__/MarketplaceView.spec.tsx @@ -5,6 +5,7 @@ import { vscode } from "@/utils/vscode" import { MarketplaceView } from "../MarketplaceView" import { MarketplaceViewStateManager } from "../MarketplaceViewStateManager" +import { DEFAULT_CHECKPOINT_TIMEOUT_SECONDS } from "@roo-code/types" vi.mock("@/utils/vscode", () => ({ vscode: { @@ -66,6 +67,7 @@ describe("MarketplaceView", () => { setFollowupAutoApproveTimeoutMs: vi.fn(), profileThresholds: {}, setProfileThresholds: vi.fn(), + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, // ... other required context properties } }) @@ -86,6 +88,7 @@ describe("MarketplaceView", () => { mockExtensionState = { ...mockExtensionState, organizationSettingsVersion: 2, + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, } // Re-render with updated context diff --git a/webview-ui/src/components/settings/CheckpointSettings.tsx b/webview-ui/src/components/settings/CheckpointSettings.tsx index bc5f656bb972..d992eb0313b4 100644 --- a/webview-ui/src/components/settings/CheckpointSettings.tsx +++ b/webview-ui/src/components/settings/CheckpointSettings.tsx @@ -4,17 +4,29 @@ import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { GitBranch } from "lucide-react" import { Trans } from "react-i18next" import { buildDocLink } from "@src/utils/docLinks" +import { Slider } from "@/components/ui" import { SetCachedStateField } from "./types" import { SectionHeader } from "./SectionHeader" import { Section } from "./Section" +import { + DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, + MAX_CHECKPOINT_TIMEOUT_SECONDS, + MIN_CHECKPOINT_TIMEOUT_SECONDS, +} from "@roo-code/types" type CheckpointSettingsProps = HTMLAttributes & { enableCheckpoints?: boolean - setCachedStateField: SetCachedStateField<"enableCheckpoints"> + checkpointTimeout?: number + setCachedStateField: SetCachedStateField<"enableCheckpoints" | "checkpointTimeout"> } -export const CheckpointSettings = ({ enableCheckpoints, setCachedStateField, ...props }: CheckpointSettingsProps) => { +export const CheckpointSettings = ({ + enableCheckpoints, + checkpointTimeout, + setCachedStateField, + ...props +}: CheckpointSettingsProps) => { const { t } = useAppTranslation() return (
@@ -44,6 +56,33 @@ export const CheckpointSettings = ({ enableCheckpoints, setCachedStateField, ...
+ + {enableCheckpoints && ( +
+ +
+ { + setCachedStateField("checkpointTimeout", value) + }} + className="flex-1" + data-testid="checkpoint-timeout-slider" + /> + + {checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS} + +
+
+ {t("settings:checkpoints.timeout.description")} +
+
+ )} ) diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 66b7ff680fe4..423f013627e2 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -147,6 +147,7 @@ const SettingsView = forwardRef(({ onDone, t browserToolEnabled, browserViewportSize, enableCheckpoints, + checkpointTimeout, diffEnabled, experiments, fuzzyMatchThreshold, @@ -324,6 +325,7 @@ const SettingsView = forwardRef(({ onDone, t vscode.postMessage({ type: "soundVolume", value: soundVolume }) vscode.postMessage({ type: "diffEnabled", bool: diffEnabled }) vscode.postMessage({ type: "enableCheckpoints", bool: enableCheckpoints }) + vscode.postMessage({ type: "checkpointTimeout", value: checkpointTimeout }) vscode.postMessage({ type: "browserViewportSize", text: browserViewportSize }) vscode.postMessage({ type: "remoteBrowserHost", text: remoteBrowserHost }) vscode.postMessage({ type: "remoteBrowserEnabled", bool: remoteBrowserEnabled }) @@ -691,6 +693,7 @@ const SettingsView = forwardRef(({ onDone, t {activeTab === "checkpoints" && ( )} diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 5534686db660..f3f04553d69e 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -10,6 +10,7 @@ import { type TelemetrySetting, type OrganizationAllowList, ORGANIZATION_ALLOW_ALL, + DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, } from "@roo-code/types" import { ExtensionMessage, ExtensionState, MarketplaceInstalledMetadata, Command } from "@roo/ExtensionMessage" @@ -86,6 +87,8 @@ export interface ExtensionStateContextType extends ExtensionState { setTtsSpeed: (value: number) => void setDiffEnabled: (value: boolean) => void setEnableCheckpoints: (value: boolean) => void + checkpointTimeout: number + setCheckpointTimeout: (value: number) => void setBrowserViewportSize: (value: string) => void setFuzzyMatchThreshold: (value: number) => void setWriteDelayMs: (value: number) => void @@ -194,6 +197,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode ttsSpeed: 1.0, diffEnabled: false, enableCheckpoints: true, + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, // Default to 15 seconds fuzzyMatchThreshold: 1.0, language: "en", // Default language code writeDelayMs: 1000, @@ -454,6 +458,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode setTtsSpeed: (value) => setState((prevState) => ({ ...prevState, ttsSpeed: value })), setDiffEnabled: (value) => setState((prevState) => ({ ...prevState, diffEnabled: value })), setEnableCheckpoints: (value) => setState((prevState) => ({ ...prevState, enableCheckpoints: value })), + setCheckpointTimeout: (value) => setState((prevState) => ({ ...prevState, checkpointTimeout: value })), setBrowserViewportSize: (value: string) => setState((prevState) => ({ ...prevState, browserViewportSize: value })), setFuzzyMatchThreshold: (value) => setState((prevState) => ({ ...prevState, fuzzyMatchThreshold: value })), diff --git a/webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx b/webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx index 33d7dc0ec7a5..92652733ddf1 100644 --- a/webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx +++ b/webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx @@ -1,6 +1,6 @@ import { render, screen, act } from "@/utils/test-utils" -import { ProviderSettings, ExperimentId } from "@roo-code/types" +import { ProviderSettings, ExperimentId, DEFAULT_CHECKPOINT_TIMEOUT_SECONDS } from "@roo-code/types" import { ExtensionState } from "@roo/ExtensionMessage" @@ -214,12 +214,14 @@ describe("mergeExtensionState", () => { remoteControlEnabled: false, taskSyncEnabled: false, featureRoomoteControlEnabled: false, + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, // Add the checkpoint timeout property } const prevState: ExtensionState = { ...baseState, apiConfiguration: { modelMaxTokens: 1234, modelMaxThinkingTokens: 123 }, experiments: {} as Record, + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS - 5, } const newState: ExtensionState = { @@ -236,6 +238,7 @@ describe("mergeExtensionState", () => { imageGeneration: false, runSlashCommand: false, } as Record, + checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS + 5, } const result = mergeExtensionState(prevState, newState) diff --git a/webview-ui/src/i18n/locales/ca/common.json b/webview-ui/src/i18n/locales/ca/common.json index 69f18d94115b..883e9c562882 100644 --- a/webview-ui/src/i18n/locales/ca/common.json +++ b/webview-ui/src/i18n/locales/ca/common.json @@ -95,5 +95,9 @@ "months_ago": "fa {{count}} mesos", "year_ago": "fa un any", "years_ago": "fa {{count}} anys" + }, + "errors": { + "wait_checkpoint_long_time": "Has esperat {{timeout}} segons per inicialitzar el punt de control. Si no necessites aquesta funció, desactiva-la a la configuració del punt de control.", + "init_checkpoint_fail_long_time": "La inicialització del punt de control ha trigat més de {{timeout}} segons, per això els punts de control estan desactivats per a aquesta tasca. Pots desactivar els punts de control o augmentar el temps d'espera a la configuració del punt de control." } } diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 4f3e4d992499..4affe72733d1 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Temps d'espera per inicialitzar el punt de control (segons)", + "description": "Temps màxim d'espera per inicialitzar el servei de punts de control. El valor per defecte és 15 segons. Rang: 10-60 segons." + }, "enable": { "label": "Habilitar punts de control automàtics", "description": "Quan està habilitat, Roo crearà automàticament punts de control durant l'execució de tasques, facilitant la revisió de canvis o la reversió a estats anteriors. <0>Més informació" diff --git a/webview-ui/src/i18n/locales/de/common.json b/webview-ui/src/i18n/locales/de/common.json index b21dba3b347b..fe1d6c41c748 100644 --- a/webview-ui/src/i18n/locales/de/common.json +++ b/webview-ui/src/i18n/locales/de/common.json @@ -95,5 +95,9 @@ "months_ago": "vor {{count}} Monaten", "year_ago": "vor einem Jahr", "years_ago": "vor {{count}} Jahren" + }, + "errors": { + "wait_checkpoint_long_time": "Du hast {{timeout}} Sekunden auf die Initialisierung des Checkpoints gewartet. Wenn du die Checkpoint-Funktion nicht brauchst, kannst du sie in den Checkpoint-Einstellungen ausschalten.", + "init_checkpoint_fail_long_time": "Die Initialisierung des Checkpoints dauert länger als {{timeout}} Sekunden, deshalb sind Checkpoints für diese Aufgabe deaktiviert. Du kannst Checkpoints ausschalten oder die Wartezeit in den Checkpoint-Einstellungen verlängern." } } diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 4e75f6af2a0a..437b75c6ddf9 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Timeout für Checkpoint-Initialisierung (Sekunden)", + "description": "Maximale Wartezeit für die Initialisierung des Checkpoint-Dienstes. Standard ist 15 Sekunden. Bereich: 10-60 Sekunden." + }, "enable": { "label": "Automatische Kontrollpunkte aktivieren", "description": "Wenn aktiviert, erstellt Roo automatisch Kontrollpunkte während der Aufgabenausführung, was die Überprüfung von Änderungen oder die Rückkehr zu früheren Zuständen erleichtert. <0>Mehr erfahren" diff --git a/webview-ui/src/i18n/locales/en/common.json b/webview-ui/src/i18n/locales/en/common.json index 2f7298826507..e0c36548e573 100644 --- a/webview-ui/src/i18n/locales/en/common.json +++ b/webview-ui/src/i18n/locales/en/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} months ago", "year_ago": "a year ago", "years_ago": "{{count}} years ago" + }, + "errors": { + "wait_checkpoint_long_time": "Waited {{timeout}} seconds for checkpoint initialization. If you don't need the checkpoint feature, please turn it off in the checkpoint settings.", + "init_checkpoint_fail_long_time": "Checkpoint initialization has taken more than {{timeout}} seconds, so checkpoints are disabled for this task. You can disable checkpoints or extend the waiting time in the checkpoint settings." } } diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 1be824b37e37..bcaaf1a59919 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -505,6 +505,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Checkpoint initialization timeout (seconds)", + "description": "Maximum time to wait for checkpoint service initialization. Default is 15 seconds. Range: 10-60 seconds." + }, "enable": { "label": "Enable automatic checkpoints", "description": "When enabled, Roo will automatically create checkpoints during task execution, making it easy to review changes or revert to earlier states. <0>Learn more" diff --git a/webview-ui/src/i18n/locales/es/common.json b/webview-ui/src/i18n/locales/es/common.json index 7e0994e81ca9..28707a5e358f 100644 --- a/webview-ui/src/i18n/locales/es/common.json +++ b/webview-ui/src/i18n/locales/es/common.json @@ -95,5 +95,9 @@ "months_ago": "hace {{count}} meses", "year_ago": "hace un año", "years_ago": "hace {{count}} años" + }, + "errors": { + "wait_checkpoint_long_time": "Has esperado {{timeout}} segundos para la inicialización del punto de control. Si no necesitas esta función, desactívala en la configuración del punto de control.", + "init_checkpoint_fail_long_time": "La inicialización del punto de control ha tardado más de {{timeout}} segundos, por lo que los puntos de control están desactivados para esta tarea. Puedes desactivar los puntos de control o aumentar el tiempo de espera en la configuración del punto de control." } } diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index deb2bc7a227a..16525325c6e1 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Tiempo de espera para inicializar el punto de control (segundos)", + "description": "Tiempo máximo de espera para inicializar el servicio de puntos de control. El valor por defecto es 15 segundos. Rango: 10-60 segundos." + }, "enable": { "label": "Habilitar puntos de control automáticos", "description": "Cuando está habilitado, Roo creará automáticamente puntos de control durante la ejecución de tareas, facilitando la revisión de cambios o la reversión a estados anteriores. <0>Más información" diff --git a/webview-ui/src/i18n/locales/fr/common.json b/webview-ui/src/i18n/locales/fr/common.json index 488ec4935a5f..f52b20c9a1b8 100644 --- a/webview-ui/src/i18n/locales/fr/common.json +++ b/webview-ui/src/i18n/locales/fr/common.json @@ -95,5 +95,9 @@ "months_ago": "il y a {{count}} mois", "year_ago": "il y a un an", "years_ago": "il y a {{count}} ans" + }, + "errors": { + "wait_checkpoint_long_time": "Tu as attendu {{timeout}} secondes pour l'initialisation du checkpoint. Si tu n'as pas besoin de cette fonction, désactive-la dans les paramètres du checkpoint.", + "init_checkpoint_fail_long_time": "L'initialisation du checkpoint a pris plus de {{timeout}} secondes, donc les checkpoints sont désactivés pour cette tâche. Tu peux désactiver les checkpoints ou prolonger le délai dans les paramètres du checkpoint." } } diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index ccb8e61d7a02..025176ce94f4 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Délai d'initialisation du point de contrôle (secondes)", + "description": "Temps d'attente maximum pour l'initialisation du service de points de contrôle. Par défaut : 15 secondes. Plage : 10-60 secondes." + }, "enable": { "label": "Activer les points de contrôle automatiques", "description": "Lorsque cette option est activée, Roo créera automatiquement des points de contrôle pendant l'exécution des tâches, facilitant la révision des modifications ou le retour à des états antérieurs. <0>En savoir plus" diff --git a/webview-ui/src/i18n/locales/hi/common.json b/webview-ui/src/i18n/locales/hi/common.json index 00b46dbb0990..544ec3334dba 100644 --- a/webview-ui/src/i18n/locales/hi/common.json +++ b/webview-ui/src/i18n/locales/hi/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} महीने पहले", "year_ago": "एक साल पहले", "years_ago": "{{count}} साल पहले" + }, + "errors": { + "wait_checkpoint_long_time": "तुमने {{timeout}} सेकंड तक चेकपॉइंट इनिशियलाइज़ेशन का इंतजार किया। अगर तुम्हें यह फ़ीचर नहीं चाहिए, तो चेकपॉइंट सेटिंग्स में बंद कर दो।", + "init_checkpoint_fail_long_time": "चेकपॉइंट इनिशियलाइज़ेशन {{timeout}} सेकंड से ज़्यादा समय ले रहा है, इसलिए इस कार्य के लिए चेकपॉइंट बंद कर दिए गए हैं। तुम चेकपॉइंट बंद कर सकते हो या चेकपॉइंट सेटिंग्स में इंतजार का समय बढ़ा सकते हो।" } } diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 3d879e2ca746..5d9ae1cc8fa7 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "चेकपॉइंट इनिशियलाइज़ेशन टाइमआउट (सेकंड)", + "description": "चेकपॉइंट सेवा इनिशियलाइज़ करने के लिए अधिकतम प्रतीक्षा समय। डिफ़ॉल्ट 15 सेकंड है। सीमा: 10-60 सेकंड।" + }, "enable": { "label": "स्वचालित चेकपॉइंट सक्षम करें", "description": "जब सक्षम होता है, तो Roo कार्य निष्पादन के दौरान स्वचालित रूप से चेकपॉइंट बनाएगा, जिससे परिवर्तनों की समीक्षा करना या पहले की स्थितियों पर वापस जाना आसान हो जाएगा। <0>अधिक जानें" diff --git a/webview-ui/src/i18n/locales/id/common.json b/webview-ui/src/i18n/locales/id/common.json index 697765e1c3a9..a302aa06a58e 100644 --- a/webview-ui/src/i18n/locales/id/common.json +++ b/webview-ui/src/i18n/locales/id/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} bulan yang lalu", "year_ago": "satu tahun yang lalu", "years_ago": "{{count}} tahun yang lalu" + }, + "errors": { + "wait_checkpoint_long_time": "Kamu sudah menunggu {{timeout}} detik untuk inisialisasi checkpoint. Kalau tidak butuh fitur ini, matikan saja di pengaturan checkpoint.", + "init_checkpoint_fail_long_time": "Inisialisasi checkpoint sudah lebih dari {{timeout}} detik, jadi checkpoint dinonaktifkan untuk tugas ini. Kamu bisa mematikan checkpoint atau menambah waktu tunggu di pengaturan checkpoint." } } diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index 8138726c3358..e643e36268e7 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -510,6 +510,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Batas waktu inisialisasi checkpoint (detik)", + "description": "Waktu maksimum menunggu inisialisasi layanan checkpoint. Default 15 detik. Rentang: 10-60 detik." + }, "enable": { "label": "Aktifkan checkpoint otomatis", "description": "Ketika diaktifkan, Roo akan secara otomatis membuat checkpoint selama eksekusi tugas, memudahkan untuk meninjau perubahan atau kembali ke state sebelumnya. <0>Pelajari lebih lanjut" diff --git a/webview-ui/src/i18n/locales/it/common.json b/webview-ui/src/i18n/locales/it/common.json index e7fbed4d85c7..78f4db654895 100644 --- a/webview-ui/src/i18n/locales/it/common.json +++ b/webview-ui/src/i18n/locales/it/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} mesi fa", "year_ago": "un anno fa", "years_ago": "{{count}} anni fa" + }, + "errors": { + "wait_checkpoint_long_time": "Hai aspettato {{timeout}} secondi per l'inizializzazione del checkpoint. Se non ti serve questa funzione, disattivala nelle impostazioni del checkpoint.", + "init_checkpoint_fail_long_time": "L'inizializzazione del checkpoint ha impiegato più di {{timeout}} secondi, quindi i checkpoint sono disabilitati per questa attività. Puoi disattivare i checkpoint o aumentare il tempo di attesa nelle impostazioni del checkpoint." } } diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 80ff0f8a718b..9a760a472601 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Timeout inizializzazione checkpoint (secondi)", + "description": "Tempo massimo di attesa per l'inizializzazione del servizio checkpoint. Predefinito: 15 secondi. Intervallo: 10-60 secondi." + }, "enable": { "label": "Abilita punti di controllo automatici", "description": "Quando abilitato, Roo creerà automaticamente punti di controllo durante l'esecuzione dei compiti, facilitando la revisione delle modifiche o il ritorno a stati precedenti. <0>Scopri di più" diff --git a/webview-ui/src/i18n/locales/ja/common.json b/webview-ui/src/i18n/locales/ja/common.json index 815da42952bc..d82ff96eb9c5 100644 --- a/webview-ui/src/i18n/locales/ja/common.json +++ b/webview-ui/src/i18n/locales/ja/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}}ヶ月前", "year_ago": "1年前", "years_ago": "{{count}}年前" + }, + "errors": { + "wait_checkpoint_long_time": "{{timeout}} 秒間チェックポイントの初期化を待機しました。チェックポイント機能が不要な場合は、チェックポイント設定でオフにしてください。", + "init_checkpoint_fail_long_time": "チェックポイントの初期化が {{timeout}} 秒以上かかったため、このタスクではチェックポイントが無効化されました。チェックポイントをオフにするか、チェックポイント設定で待機時間を延長できます。" } } diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index 264d774473b2..413856b78f3c 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "チェックポイント初期化タイムアウト(秒)", + "description": "チェックポイントサービスの初期化を待つ最大時間。デフォルトは15秒。範囲:10~60秒。" + }, "enable": { "label": "自動チェックポイントを有効化", "description": "有効にすると、Rooはタスク実行中に自動的にチェックポイントを作成し、変更の確認や以前の状態への復帰を容易にします。 <0>詳細情報" diff --git a/webview-ui/src/i18n/locales/ko/common.json b/webview-ui/src/i18n/locales/ko/common.json index da90bf11b92e..0b0bc4b6085a 100644 --- a/webview-ui/src/i18n/locales/ko/common.json +++ b/webview-ui/src/i18n/locales/ko/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}}개월 전", "year_ago": "1년 전", "years_ago": "{{count}}년 전" + }, + "errors": { + "wait_checkpoint_long_time": "{{timeout}}초 동안 체크포인트 초기화를 기다렸어. 체크포인트 기능이 필요 없다면 체크포인트 설정에서 꺼 줘.", + "init_checkpoint_fail_long_time": "체크포인트 초기화가 {{timeout}}초 이상 걸려서 이 작업에 대해 체크포인트가 꺼졌어. 체크포인트를 끄거나 체크포인트 설정에서 대기 시간을 늘릴 수 있어." } } diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index e490e31f78e7..5efd38c406fe 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "체크포인트 초기화 타임아웃(초)", + "description": "체크포인트 서비스 초기화를 기다리는 최대 시간입니다. 기본값은 15초. 범위: 10~60초." + }, "enable": { "label": "자동 체크포인트 활성화", "description": "활성화되면 Roo는 작업 실행 중에 자동으로 체크포인트를 생성하여 변경 사항을 검토하거나 이전 상태로 되돌리기 쉽게 합니다. <0>더 알아보기" diff --git a/webview-ui/src/i18n/locales/nl/common.json b/webview-ui/src/i18n/locales/nl/common.json index 1fb09ee41a04..8017cb408a5f 100644 --- a/webview-ui/src/i18n/locales/nl/common.json +++ b/webview-ui/src/i18n/locales/nl/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} maanden geleden", "year_ago": "een jaar geleden", "years_ago": "{{count}} jaar geleden" + }, + "errors": { + "wait_checkpoint_long_time": "Je hebt {{timeout}} seconden gewacht op de initialisatie van de checkpoint. Als je deze functie niet nodig hebt, schakel hem dan uit in de checkpoint-instellingen.", + "init_checkpoint_fail_long_time": "De initialisatie van de checkpoint duurde meer dan {{timeout}} seconden, dus checkpoints zijn uitgeschakeld voor deze taak. Je kunt checkpoints uitschakelen of de wachttijd in de checkpoint-instellingen verhogen." } } diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index ee0ba193e5c4..2e269ba0a1d1 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Timeout voor checkpoint-initialisatie (seconden)", + "description": "Maximale wachttijd voor het initialiseren van de checkpointservice. Standaard is 15 seconden. Bereik: 10-60 seconden." + }, "enable": { "label": "Automatische checkpoints inschakelen", "description": "Indien ingeschakeld, maakt Roo automatisch checkpoints tijdens het uitvoeren van taken, zodat je eenvoudig wijzigingen kunt bekijken of terugzetten. <0>Meer informatie" diff --git a/webview-ui/src/i18n/locales/pl/common.json b/webview-ui/src/i18n/locales/pl/common.json index ea6ada357de7..a938ab1ef155 100644 --- a/webview-ui/src/i18n/locales/pl/common.json +++ b/webview-ui/src/i18n/locales/pl/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} miesięcy temu", "year_ago": "rok temu", "years_ago": "{{count}} lat temu" + }, + "errors": { + "wait_checkpoint_long_time": "Czekałeś {{timeout}} sekund na inicjalizację punktu kontrolnego. Jeśli nie potrzebujesz tej funkcji, wyłącz ją w ustawieniach punktu kontrolnego.", + "init_checkpoint_fail_long_time": "Inicjalizacja punktu kontrolnego trwała ponad {{timeout}} sekund, więc punkty kontrolne zostały wyłączone dla tego zadania. Możesz wyłączyć punkty kontrolne lub wydłużyć czas oczekiwania w ustawieniach punktu kontrolnego." } } diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index 2d30547d9f43..467a2eb9e3f6 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Limit czasu inicjalizacji punktu kontrolnego (sekundy)", + "description": "Maksymalny czas oczekiwania na inicjalizację usługi punktów kontrolnych. Domyślnie 15 sekund. Zakres: 10-60 sekund." + }, "enable": { "label": "Włącz automatyczne punkty kontrolne", "description": "Gdy włączone, Roo automatycznie utworzy punkty kontrolne podczas wykonywania zadań, ułatwiając przeglądanie zmian lub powrót do wcześniejszych stanów. <0>Dowiedz się więcej" diff --git a/webview-ui/src/i18n/locales/pt-BR/common.json b/webview-ui/src/i18n/locales/pt-BR/common.json index 1528567c9a06..7bf0cc6d227f 100644 --- a/webview-ui/src/i18n/locales/pt-BR/common.json +++ b/webview-ui/src/i18n/locales/pt-BR/common.json @@ -95,5 +95,9 @@ "months_ago": "há {{count}} meses", "year_ago": "há um ano", "years_ago": "há {{count}} anos" + }, + "errors": { + "wait_checkpoint_long_time": "Você esperou {{timeout}} segundos para inicializar o checkpoint. Se não precisa dessa função, desative nas configurações do checkpoint.", + "init_checkpoint_fail_long_time": "A inicialização do checkpoint levou mais de {{timeout}} segundos, então os checkpoints foram desativados para esta tarefa. Você pode desativar os checkpoints ou aumentar o tempo de espera nas configurações do checkpoint." } } diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index 338ab9f6b1f7..a6cea32610ab 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Tempo limite para inicialização do checkpoint (segundos)", + "description": "Tempo máximo de espera para inicializar o serviço de checkpoint. Padrão: 15 segundos. Faixa: 10-60 segundos." + }, "enable": { "label": "Ativar pontos de verificação automáticos", "description": "Quando ativado, o Roo criará automaticamente pontos de verificação durante a execução de tarefas, facilitando a revisão de alterações ou o retorno a estados anteriores. <0>Saiba mais" diff --git a/webview-ui/src/i18n/locales/ru/common.json b/webview-ui/src/i18n/locales/ru/common.json index cd5ba42c0146..a455721c105a 100644 --- a/webview-ui/src/i18n/locales/ru/common.json +++ b/webview-ui/src/i18n/locales/ru/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} месяцев назад", "year_ago": "год назад", "years_ago": "{{count}} лет назад" + }, + "errors": { + "wait_checkpoint_long_time": "Ожидание инициализации контрольной точки заняло {{timeout}} секунд. Если тебе не нужна эта функция, отключи её в настройках контрольных точек.", + "init_checkpoint_fail_long_time": "Инициализация контрольной точки заняла более {{timeout}} секунд, поэтому контрольные точки отключены для этой задачи. Ты можешь отключить контрольные точки или увеличить время ожидания в настройках контрольных точек." } } diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index be494c571b09..7ce4c24b7562 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Таймаут инициализации контрольной точки (секунды)", + "description": "Максимальное время ожидания инициализации сервиса контрольных точек. По умолчанию 15 секунд. Диапазон: 10-60 секунд." + }, "enable": { "label": "Включить автоматические контрольные точки", "description": "Если включено, Roo будет автоматически создавать контрольные точки во время выполнения задач, что упрощает просмотр изменений или возврат к предыдущим состояниям. <0>Подробнее" diff --git a/webview-ui/src/i18n/locales/tr/common.json b/webview-ui/src/i18n/locales/tr/common.json index aa049fc35d1e..2b0fed19eaa5 100644 --- a/webview-ui/src/i18n/locales/tr/common.json +++ b/webview-ui/src/i18n/locales/tr/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} ay önce", "year_ago": "bir yıl önce", "years_ago": "{{count}} yıl önce" + }, + "errors": { + "wait_checkpoint_long_time": "{{timeout}} saniye boyunca kontrol noktası başlatılması beklendi. Bu özelliğe ihtiyacın yoksa kontrol noktası ayarlarından kapatabilirsin.", + "init_checkpoint_fail_long_time": "Kontrol noktası başlatılması {{timeout}} saniyeden fazla sürdü, bu yüzden bu görev için kontrol noktaları devre dışı bırakıldı. Kontrol noktalarını kapatabilir veya kontrol noktası ayarlarından bekleme süresini artırabilirsin." } } diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index fe4508495ba6..35f78d4e9194 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Kontrol noktası başlatma zaman aşımı (saniye)", + "description": "Kontrol noktası servisini başlatmak için maksimum bekleme süresi. Varsayılan 15 saniye. Aralık: 10-60 saniye." + }, "enable": { "label": "Otomatik kontrol noktalarını etkinleştir", "description": "Etkinleştirildiğinde, Roo görev yürütme sırasında otomatik olarak kontrol noktaları oluşturarak değişiklikleri gözden geçirmeyi veya önceki durumlara dönmeyi kolaylaştırır. <0>Daha fazla bilgi" diff --git a/webview-ui/src/i18n/locales/vi/common.json b/webview-ui/src/i18n/locales/vi/common.json index f9fad7dbc336..a7f8c692f9df 100644 --- a/webview-ui/src/i18n/locales/vi/common.json +++ b/webview-ui/src/i18n/locales/vi/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} tháng trước", "year_ago": "một năm trước", "years_ago": "{{count}} năm trước" + }, + "errors": { + "wait_checkpoint_long_time": "Bạn đã chờ {{timeout}} giây để khởi tạo điểm kiểm tra. Nếu không cần chức năng này, hãy tắt nó trong cài đặt điểm kiểm tra.", + "init_checkpoint_fail_long_time": "Khởi tạo điểm kiểm tra mất hơn {{timeout}} giây, vì vậy các điểm kiểm tra đã bị vô hiệu hóa cho tác vụ này. Bạn có thể tắt các điểm kiểm tra hoặc tăng thời gian chờ trong cài đặt điểm kiểm tra." } } diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index 0f03de47a513..a3bf9b08cb75 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "Thời gian chờ khởi tạo điểm kiểm tra (giây)", + "description": "Thời gian tối đa chờ khởi tạo dịch vụ điểm kiểm tra. Mặc định là 15 giây. Khoảng: 10-60 giây." + }, "enable": { "label": "Bật điểm kiểm tra tự động", "description": "Khi được bật, Roo sẽ tự động tạo các điểm kiểm tra trong quá trình thực hiện nhiệm vụ, giúp dễ dàng xem lại các thay đổi hoặc quay lại trạng thái trước đó. <0>Tìm hiểu thêm" diff --git a/webview-ui/src/i18n/locales/zh-CN/common.json b/webview-ui/src/i18n/locales/zh-CN/common.json index 8b422be06068..8271e0a25eb6 100644 --- a/webview-ui/src/i18n/locales/zh-CN/common.json +++ b/webview-ui/src/i18n/locales/zh-CN/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}}个月前", "year_ago": "1年前", "years_ago": "{{count}}年前" + }, + "errors": { + "wait_checkpoint_long_time": "初始化存档点已等待 {{timeout}} 秒。如果你不需要存档点功能,请在存档点设置中关闭。", + "init_checkpoint_fail_long_time": "存档点初始化已超过 {{timeout}} 秒,因此本任务已禁用存档点。你可以关闭存档点或在存档点设置中延长等待时间。" } } diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 51db19562a48..499d123d9249 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "存档点初始化超时时间(秒)", + "description": "存档点服务初始化最长等待时间。默认 15 秒。范围:10-60 秒。" + }, "enable": { "label": "启用自动存档点", "description": "开启后自动创建任务存档点,方便回溯修改。 <0>了解更多" diff --git a/webview-ui/src/i18n/locales/zh-TW/common.json b/webview-ui/src/i18n/locales/zh-TW/common.json index 85e4ce53cc17..783129920f61 100644 --- a/webview-ui/src/i18n/locales/zh-TW/common.json +++ b/webview-ui/src/i18n/locales/zh-TW/common.json @@ -95,5 +95,9 @@ "months_ago": "{{count}} 個月前", "year_ago": "1 年前", "years_ago": "{{count}} 年前" + }, + "errors": { + "wait_checkpoint_long_time": "初始化存檔點已等待 {{timeout}} 秒。如果你不需要存檔點功能,請在存檔點設定中關閉。", + "init_checkpoint_fail_long_time": "存檔點初始化已超過 {{timeout}} 秒,因此此工作已停用存檔點。你可以關閉存檔點或在存檔點設定中延長等待時間。" } } diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 89d517f5b578..3e39f2f5c609 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -506,6 +506,10 @@ } }, "checkpoints": { + "timeout": { + "label": "檢查點初始化逾時(秒)", + "description": "檢查點服務初始化的最長等待時間。預設為 15 秒。範圍:10-60 秒。" + }, "enable": { "label": "啟用自動檢查點", "description": "啟用後,Roo 將在工作執行期間自動建立檢查點,使審核變更或回到早期狀態變得容易。 <0>了解更多"