From a7bf984574aba49a76a5f3fdddefb8cd6a1a16b8 Mon Sep 17 00:00:00 2001 From: Canyon Robins Date: Wed, 28 May 2025 13:22:12 -0700 Subject: [PATCH 01/10] [Condense] Move condense settings out of experimental and defualt enable --- evals/packages/types/src/roo-code.ts | 3 +- packages/types/src/experiment.ts | 3 +- packages/types/src/global-settings.ts | 2 + src/core/task/Task.ts | 3 +- src/core/webview/ClineProvider.ts | 3 + .../webview/__tests__/ClineProvider.test.ts | 19 ++ src/core/webview/webviewMessageHandler.ts | 4 + src/shared/ExtensionMessage.ts | 1 + src/shared/WebviewMessage.ts | 1 + src/shared/__tests__/experiments.test.ts | 28 --- src/shared/experiments.ts | 2 - .../settings/ContextManagementSettings.tsx | 171 +++++++++++++++++- .../settings/ExperimentalSettings.tsx | 164 +---------------- .../src/components/settings/SettingsView.tsx | 13 +- .../ContextManagementSettings.test.tsx | 3 + .../src/context/ExtensionStateContext.tsx | 4 + .../__tests__/ExtensionStateContext.test.tsx | 1 + 17 files changed, 217 insertions(+), 208 deletions(-) diff --git a/evals/packages/types/src/roo-code.ts b/evals/packages/types/src/roo-code.ts index b397d37b64..0363c888b6 100644 --- a/evals/packages/types/src/roo-code.ts +++ b/evals/packages/types/src/roo-code.ts @@ -297,7 +297,7 @@ export type CommandExecutionStatus = z.infer */ const experimentsSchema = z.object({ - autoCondenseContext: z.boolean(), powerSteering: z.boolean(), }) diff --git a/packages/types/src/experiment.ts b/packages/types/src/experiment.ts index 6b43327207..c8e39f5c38 100644 --- a/packages/types/src/experiment.ts +++ b/packages/types/src/experiment.ts @@ -6,7 +6,7 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js" * ExperimentId */ -export const experimentIds = ["autoCondenseContext", "powerSteering"] as const +export const experimentIds = ["powerSteering"] as const export const experimentIdsSchema = z.enum(experimentIds) @@ -17,7 +17,6 @@ export type ExperimentId = z.infer */ export const experimentsSchema = z.object({ - autoCondenseContext: z.boolean(), powerSteering: z.boolean(), }) diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 10b7d6ab18..3d9a414a59 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -46,6 +46,7 @@ export const globalSettingsSchema = z.object({ alwaysAllowExecute: z.boolean().optional(), allowedCommands: z.array(z.string()).optional(), allowedMaxRequests: z.number().nullish(), + autoCondenseContext: z.boolean().optional(), autoCondenseContextPercent: z.number().optional(), browserToolEnabled: z.boolean().optional(), @@ -131,6 +132,7 @@ export const GLOBAL_SETTINGS_KEYS = keysOf()([ "alwaysAllowExecute", "allowedCommands", "allowedMaxRequests", + "autoCondenseContext", "autoCondenseContextPercent", "browserToolEnabled", diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 8165953e7d..667c1ba3ba 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -1527,8 +1527,8 @@ export class Task extends EventEmitter { autoApprovalEnabled, alwaysApproveResubmit, requestDelaySeconds, - experiments, mode, + autoCondenseContext = true, autoCondenseContextPercent = 100, } = state ?? {} @@ -1592,7 +1592,6 @@ export class Task extends EventEmitter { const contextWindow = modelInfo.contextWindow - const autoCondenseContext = experiments?.autoCondenseContext ?? false const truncateResult = await truncateConversationIfNeeded({ messages: this.apiConversationHistory, totalTokens: contextTokens, diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 13121531a7..99577a256a 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -1219,6 +1219,7 @@ export class ClineProvider alwaysAllowModeSwitch, alwaysAllowSubtasks, allowedMaxRequests, + autoCondenseContext, autoCondenseContextPercent, soundEnabled, ttsEnabled, @@ -1295,6 +1296,7 @@ export class ClineProvider alwaysAllowModeSwitch: alwaysAllowModeSwitch ?? false, alwaysAllowSubtasks: alwaysAllowSubtasks ?? false, allowedMaxRequests, + autoCondenseContext: autoCondenseContext ?? true, autoCondenseContextPercent: autoCondenseContextPercent ?? 100, uriScheme: vscode.env.uriScheme, currentTaskItem: this.getCurrentCline()?.taskId @@ -1409,6 +1411,7 @@ export class ClineProvider alwaysAllowModeSwitch: stateValues.alwaysAllowModeSwitch ?? false, alwaysAllowSubtasks: stateValues.alwaysAllowSubtasks ?? false, allowedMaxRequests: stateValues.allowedMaxRequests, + autoCondenseContext: stateValues.autoCondenseContext ?? true, autoCondenseContextPercent: stateValues.autoCondenseContextPercent ?? 100, taskHistory: stateValues.taskHistory, allowedCommands: stateValues.allowedCommands, diff --git a/src/core/webview/__tests__/ClineProvider.test.ts b/src/core/webview/__tests__/ClineProvider.test.ts index f141dace36..f545dccb1a 100644 --- a/src/core/webview/__tests__/ClineProvider.test.ts +++ b/src/core/webview/__tests__/ClineProvider.test.ts @@ -422,6 +422,7 @@ describe("ClineProvider", () => { showRooIgnoredFiles: true, renderContext: "sidebar", maxReadFileLine: 500, + autoCondenseContext: true, autoCondenseContextPercent: 100, } @@ -594,6 +595,24 @@ describe("ClineProvider", () => { expect(state.alwaysApproveResubmit).toBe(false) }) + test("autoCondenseContext defaults to true", async () => { + // Mock globalState.get to return undefined for autoCondenseContext + ;(mockContext.globalState.get as jest.Mock).mockImplementation((key: string) => + key === "autoCondenseContext" ? undefined : null, + ) + const state = await provider.getState() + expect(state.autoCondenseContext).toBe(true) + }) + + test("handles autoCondenseContext message", async () => { + await provider.resolveWebviewView(mockWebviewView) + const messageHandler = (mockWebviewView.webview.onDidReceiveMessage as jest.Mock).mock.calls[0][0] + await messageHandler({ type: "autoCondenseContext", bool: false }) + expect(updateGlobalStateSpy).toHaveBeenCalledWith("autoCondenseContext", false) + expect(mockContext.globalState.update).toHaveBeenCalledWith("autoCondenseContext", false) + expect(mockPostMessage).toHaveBeenCalled() + }) + test("autoCondenseContextPercent defaults to 100", async () => { // Mock globalState.get to return undefined for autoCondenseContextPercent ;(mockContext.globalState.get as jest.Mock).mockImplementation((key: string) => diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index 1a0b64605d..fea39d175c 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -173,6 +173,10 @@ export const webviewMessageHandler = async (provider: ClineProvider, message: We case "askResponse": provider.getCurrentCline()?.handleWebviewAskResponse(message.askResponse!, message.text, message.images) break + case "autoCondenseContext": + await updateGlobalState("autoCondenseContext", message.bool) + await provider.postStateToWebview() + break case "autoCondenseContextPercent": await updateGlobalState("autoCondenseContextPercent", message.value) await provider.postStateToWebview() diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 5586e1327b..bb6c1ded52 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -210,6 +210,7 @@ export type ExtensionState = Pick< renderContext: "sidebar" | "editor" settingsImportedAt?: number historyPreviewCollapsed?: boolean + autoCondenseContext: boolean autoCondenseContextPercent: number } diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 9ce596deb7..f26c4ab822 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -60,6 +60,7 @@ export interface WebviewMessage { | "alwaysAllowModeSwitch" | "allowedMaxRequests" | "alwaysAllowSubtasks" + | "autoCondenseContext" | "autoCondenseContextPercent" | "condensingApiConfigId" | "updateCondensingPrompt" diff --git a/src/shared/__tests__/experiments.test.ts b/src/shared/__tests__/experiments.test.ts index 1e7ce0993a..9902f57888 100644 --- a/src/shared/__tests__/experiments.test.ts +++ b/src/shared/__tests__/experiments.test.ts @@ -14,20 +14,10 @@ describe("experiments", () => { }) }) - describe("AUTO_CONDENSE_CONTEXT", () => { - it("is configured correctly", () => { - expect(EXPERIMENT_IDS.AUTO_CONDENSE_CONTEXT).toBe("autoCondenseContext") - expect(experimentConfigsMap.AUTO_CONDENSE_CONTEXT).toMatchObject({ - enabled: false, - }) - }) - }) - describe("isEnabled", () => { it("returns false when POWER_STEERING experiment is not enabled", () => { const experiments: Record = { powerSteering: false, - autoCondenseContext: false, } expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false) }) @@ -35,7 +25,6 @@ describe("experiments", () => { it("returns true when experiment POWER_STEERING is enabled", () => { const experiments: Record = { powerSteering: true, - autoCondenseContext: false, } expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(true) }) @@ -43,25 +32,8 @@ describe("experiments", () => { it("returns false when experiment is not present", () => { const experiments: Record = { powerSteering: false, - autoCondenseContext: false, } expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false) }) - - it("returns false when AUTO_CONDENSE_CONTEXT experiment is not enabled", () => { - const experiments: Record = { - powerSteering: false, - autoCondenseContext: false, - } - expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.AUTO_CONDENSE_CONTEXT)).toBe(false) - }) - - it("returns true when AUTO_CONDENSE_CONTEXT experiment is enabled", () => { - const experiments: Record = { - powerSteering: false, - autoCondenseContext: true, - } - expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.AUTO_CONDENSE_CONTEXT)).toBe(true) - }) }) }) diff --git a/src/shared/experiments.ts b/src/shared/experiments.ts index fbcea728ac..a34fcbe5bb 100644 --- a/src/shared/experiments.ts +++ b/src/shared/experiments.ts @@ -2,7 +2,6 @@ import type { AssertEqual, Equals, Keys, Values, ExperimentId } from "@roo-code/ export const EXPERIMENT_IDS = { POWER_STEERING: "powerSteering", - AUTO_CONDENSE_CONTEXT: "autoCondenseContext", } as const satisfies Record type _AssertExperimentIds = AssertEqual>> @@ -15,7 +14,6 @@ interface ExperimentConfig { export const experimentConfigsMap: Record = { POWER_STEERING: { enabled: false }, - AUTO_CONDENSE_CONTEXT: { enabled: false }, // Keep this last, there is a slider below it in the UI } export const experimentDefault = Object.fromEntries( diff --git a/webview-ui/src/components/settings/ContextManagementSettings.tsx b/webview-ui/src/components/settings/ContextManagementSettings.tsx index d400f941df..65a8bfc69d 100644 --- a/webview-ui/src/components/settings/ContextManagementSettings.tsx +++ b/webview-ui/src/components/settings/ContextManagementSettings.tsx @@ -1,26 +1,84 @@ import { HTMLAttributes } from "react" import { useAppTranslation } from "@/i18n/TranslationContext" -import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" +import { VSCodeCheckbox, VSCodeTextArea } from "@vscode/webview-ui-toolkit/react" import { Database } from "lucide-react" import { cn } from "@/lib/utils" -import { Input, Slider } from "@/components/ui" +import { Button, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider } from "@/components/ui" import { SetCachedStateField } from "./types" import { SectionHeader } from "./SectionHeader" import { Section } from "./Section" +import { vscode } from "@/utils/vscode" + +const SUMMARY_PROMPT = `\ +Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. +This summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing with the conversation and supporting any continuing tasks. + +Your summary should be structured as follows: +Context: The context to continue the conversation with. If applicable based on the current task, this should include: + 1. Previous Conversation: High level details about what was discussed throughout the entire conversation with the user. This should be written to allow someone to be able to follow the general overarching conversation flow. + 2. Current Work: Describe in detail what was being worked on prior to this request to summarize the conversation. Pay special attention to the more recent messages in the conversation. + 3. Key Technical Concepts: List all important technical concepts, technologies, coding conventions, and frameworks discussed, which might be relevant for continuing with this work. + 4. Relevant Files and Code: If applicable, enumerate specific files and code sections examined, modified, or created for the task continuation. Pay special attention to the most recent messages and changes. + 5. Problem Solving: Document problems solved thus far and any ongoing troubleshooting efforts. + 6. Pending Tasks and Next Steps: Outline all pending tasks that you have explicitly been asked to work on, as well as list the next steps you will take for all outstanding work, if applicable. Include code snippets where they add clarity. For any next steps, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no information loss in context between tasks. + +Example summary structure: +1. Previous Conversation: + [Detailed description] +2. Current Work: + [Detailed description] +3. Key Technical Concepts: + - [Concept 1] + - [Concept 2] + - [...] +4. Relevant Files and Code: + - [File Name 1] + - [Summary of why this file is important] + - [Summary of the changes made to this file, if any] + - [Important Code Snippet] + - [File Name 2] + - [Important Code Snippet] + - [...] +5. Problem Solving: + [Detailed description] +6. Pending Tasks and Next Steps: + - [Task 1 details & next steps] + - [Task 2 details & next steps] + - [...] + +Output only the summary of the conversation so far, without any additional commentary or explanation. +` type ContextManagementSettingsProps = HTMLAttributes & { + autoCondenseContext: boolean + autoCondenseContextPercent: number + condensingApiConfigId?: string + customCondensingPrompt?: string + listApiConfigMeta: any[] maxOpenTabsContext: number maxWorkspaceFiles: number showRooIgnoredFiles?: boolean maxReadFileLine?: number setCachedStateField: SetCachedStateField< - "maxOpenTabsContext" | "maxWorkspaceFiles" | "showRooIgnoredFiles" | "maxReadFileLine" + | "autoCondenseContext" + | "autoCondenseContextPercent" + | "condensingApiConfigId" + | "customCondensingPrompt" + | "maxOpenTabsContext" + | "maxWorkspaceFiles" + | "showRooIgnoredFiles" + | "maxReadFileLine" > } export const ContextManagementSettings = ({ + autoCondenseContext, + autoCondenseContextPercent, + condensingApiConfigId, + customCondensingPrompt, + listApiConfigMeta, maxOpenTabsContext, maxWorkspaceFiles, showRooIgnoredFiles, @@ -40,6 +98,113 @@ export const ContextManagementSettings = ({
+ {autoCondenseContext && ( +
+
+ +
{t("settings:experimental.autoCondenseContextPercent.label")}
+
+
+
+ + setCachedStateField("autoCondenseContextPercent", value) + } + /> + {autoCondenseContextPercent}% +
+
+ {t("settings:experimental.autoCondenseContextPercent.description")} +
+
+ + {/* API Configuration Selection */} +
+
+ +
{t("settings:experimental.condensingApiConfiguration.label")}
+
+
+
+ {t("settings:experimental.condensingApiConfiguration.description")} +
+ +
+
+ + {/* Custom Prompt Section */} +
+
+ +
{t("settings:experimental.customCondensingPrompt.label")}
+
+
+
+ {t("settings:experimental.customCondensingPrompt.description")} +
+ { + const value = (e.target as HTMLTextAreaElement).value + setCachedStateField("customCondensingPrompt", value) + vscode.postMessage({ + type: "updateCondensingPrompt", + text: value, + }) + }} + rows={8} + className="w-full font-mono text-sm" + /> +
+ +
+
+
+
+ )}
{t("settings:contextManagement.openTabs.label")}
diff --git a/webview-ui/src/components/settings/ExperimentalSettings.tsx b/webview-ui/src/components/settings/ExperimentalSettings.tsx index ee7cde49fb..a317e45a55 100644 --- a/webview-ui/src/components/settings/ExperimentalSettings.tsx +++ b/webview-ui/src/components/settings/ExperimentalSettings.tsx @@ -1,16 +1,13 @@ import { HTMLAttributes } from "react" -import { VSCodeTextArea } from "@vscode/webview-ui-toolkit/react" import { FlaskConical } from "lucide-react" import type { ExperimentId, CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "@roo-code/types" import { EXPERIMENT_IDS, experimentConfigsMap } from "@roo/experiments" -import { vscode } from "@src/utils/vscode" import { ExtensionStateContextType } from "@src/context/ExtensionStateContext" import { useAppTranslation } from "@src/i18n/TranslationContext" import { cn } from "@src/lib/utils" -import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider } from "@src/components/ui" import { SetCachedStateField, SetExperimentEnabled } from "./types" import { SectionHeader } from "./SectionHeader" @@ -18,56 +15,10 @@ import { Section } from "./Section" import { ExperimentalFeature } from "./ExperimentalFeature" import { CodeIndexSettings } from "./CodeIndexSettings" -const SUMMARY_PROMPT = `\ -Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. -This summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing with the conversation and supporting any continuing tasks. - -Your summary should be structured as follows: -Context: The context to continue the conversation with. If applicable based on the current task, this should include: - 1. Previous Conversation: High level details about what was discussed throughout the entire conversation with the user. This should be written to allow someone to be able to follow the general overarching conversation flow. - 2. Current Work: Describe in detail what was being worked on prior to this request to summarize the conversation. Pay special attention to the more recent messages in the conversation. - 3. Key Technical Concepts: List all important technical concepts, technologies, coding conventions, and frameworks discussed, which might be relevant for continuing with this work. - 4. Relevant Files and Code: If applicable, enumerate specific files and code sections examined, modified, or created for the task continuation. Pay special attention to the most recent messages and changes. - 5. Problem Solving: Document problems solved thus far and any ongoing troubleshooting efforts. - 6. Pending Tasks and Next Steps: Outline all pending tasks that you have explicitly been asked to work on, as well as list the next steps you will take for all outstanding work, if applicable. Include code snippets where they add clarity. For any next steps, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no information loss in context between tasks. - -Example summary structure: -1. Previous Conversation: - [Detailed description] -2. Current Work: - [Detailed description] -3. Key Technical Concepts: - - [Concept 1] - - [Concept 2] - - [...] -4. Relevant Files and Code: - - [File Name 1] - - [Summary of why this file is important] - - [Summary of the changes made to this file, if any] - - [Important Code Snippet] - - [File Name 2] - - [Important Code Snippet] - - [...] -5. Problem Solving: - [Detailed description] -6. Pending Tasks and Next Steps: - - [Task 1 details & next steps] - - [Task 2 details & next steps] - - [...] - -Output only the summary of the conversation so far, without any additional commentary or explanation. -` - type ExperimentalSettingsProps = HTMLAttributes & { experiments: Record setExperimentEnabled: SetExperimentEnabled - autoCondenseContextPercent: number - setCachedStateField: SetCachedStateField<"autoCondenseContextPercent" | "codebaseIndexConfig"> - condensingApiConfigId?: string - setCondensingApiConfigId: (value: string) => void - customCondensingPrompt?: string - setCustomCondensingPrompt: (value: string) => void - listApiConfigMeta: any[] + setCachedStateField: SetCachedStateField<"codebaseIndexConfig"> // CodeIndexSettings props codebaseIndexModels: CodebaseIndexModels | undefined codebaseIndexConfig: CodebaseIndexConfig | undefined @@ -79,13 +30,7 @@ type ExperimentalSettingsProps = HTMLAttributes & { export const ExperimentalSettings = ({ experiments, setExperimentEnabled, - autoCondenseContextPercent, setCachedStateField, - condensingApiConfigId, - setCondensingApiConfigId, - customCondensingPrompt, - setCustomCondensingPrompt, - listApiConfigMeta, codebaseIndexModels, codebaseIndexConfig, apiConfiguration, @@ -118,113 +63,6 @@ export const ExperimentalSettings = ({ } /> ))} - {experiments[EXPERIMENT_IDS.AUTO_CONDENSE_CONTEXT] && ( -
-
- -
{t("settings:experimental.autoCondenseContextPercent.label")}
-
-
-
- - setCachedStateField("autoCondenseContextPercent", value) - } - /> - {autoCondenseContextPercent}% -
-
- {t("settings:experimental.autoCondenseContextPercent.description")} -
-
- - {/* API Configuration Selection */} -
-
- -
{t("settings:experimental.condensingApiConfiguration.label")}
-
-
-
- {t("settings:experimental.condensingApiConfiguration.description")} -
- -
-
- - {/* Custom Prompt Section */} -
-
- -
{t("settings:experimental.customCondensingPrompt.label")}
-
-
-
- {t("settings:experimental.customCondensingPrompt.description")} -
- { - const value = (e.target as HTMLTextAreaElement).value - setCustomCondensingPrompt(value) - vscode.postMessage({ - type: "updateCondensingPrompt", - text: value, - }) - }} - rows={8} - className="w-full font-mono text-sm" - /> -
- -
-
-
-
- )} (({ onDone, t alwaysAllowWrite, alwaysAllowWriteOutsideWorkspace, alwaysApproveResubmit, + autoCondenseContext, autoCondenseContextPercent, browserToolEnabled, browserViewportSize, @@ -253,6 +254,7 @@ const SettingsView = forwardRef(({ onDone, t vscode.postMessage({ type: "alwaysAllowMcp", bool: alwaysAllowMcp }) vscode.postMessage({ type: "allowedCommands", commands: allowedCommands ?? [] }) vscode.postMessage({ type: "allowedMaxRequests", value: allowedMaxRequests ?? undefined }) + vscode.postMessage({ type: "autoCondenseContext", bool: autoCondenseContext }) vscode.postMessage({ type: "autoCondenseContextPercent", value: autoCondenseContextPercent }) vscode.postMessage({ type: "browserToolEnabled", bool: browserToolEnabled }) vscode.postMessage({ type: "soundEnabled", bool: soundEnabled }) @@ -610,6 +612,11 @@ const SettingsView = forwardRef(({ onDone, t {/* Context Management Section */} {activeTab === "contextManagement" && ( (({ onDone, t setCachedStateField("condensingApiConfigId", value)} - customCondensingPrompt={customCondensingPrompt} - setCustomCondensingPrompt={(value) => setCachedStateField("customCondensingPrompt", value)} - listApiConfigMeta={listApiConfigMeta ?? []} setCachedStateField={setCachedStateField} codebaseIndexModels={codebaseIndexModels} codebaseIndexConfig={codebaseIndexConfig} diff --git a/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx b/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx index 955ce61936..e58985888e 100644 --- a/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx @@ -26,6 +26,9 @@ jest.mock("@/components/ui", () => ({ describe("ContextManagementSettings", () => { const defaultProps = { + autoCondenseContext: true, + autoCondenseContextPercent: 100, + listApiConfigMeta: [], maxOpenTabsContext: 20, maxWorkspaceFiles: 200, showRooIgnoredFiles: false, diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index b7cdf75f25..f3cb99f9ad 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -108,6 +108,8 @@ export interface ExtensionStateContextType extends ExtensionState { terminalCompressProgressBar?: boolean setTerminalCompressProgressBar: (value: boolean) => void setHistoryPreviewCollapsed: (value: boolean) => void + autoCondenseContext: boolean + setAutoCondenseContext: (value: boolean) => void autoCondenseContextPercent: number setAutoCondenseContextPercent: (value: number) => void routerModels?: RouterModels @@ -191,6 +193,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode terminalZdotdir: false, // Default ZDOTDIR handling setting terminalCompressProgressBar: true, // Default to compress progress bar output historyPreviewCollapsed: false, // Initialize the new state (default to expanded) + autoCondenseContext: true, autoCondenseContextPercent: 100, codebaseIndexConfig: { codebaseIndexEnabled: false, @@ -385,6 +388,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode }), setHistoryPreviewCollapsed: (value) => setState((prevState) => ({ ...prevState, historyPreviewCollapsed: value })), + setAutoCondenseContext: (value) => setState((prevState) => ({ ...prevState, autoCondenseContext: value })), setAutoCondenseContextPercent: (value) => setState((prevState) => ({ ...prevState, autoCondenseContextPercent: value })), setCondensingApiConfigId: (value) => setState((prevState) => ({ ...prevState, condensingApiConfigId: value })), diff --git a/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx b/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx index 911d516caa..36684969d7 100644 --- a/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx +++ b/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx @@ -203,6 +203,7 @@ describe("mergeExtensionState", () => { showRooIgnoredFiles: true, renderContext: "sidebar", maxReadFileLine: 500, + autoCondenseContext: true, autoCondenseContextPercent: 100, } From 8acc275e11661b28426a06d3dba9b3f035b16cab Mon Sep 17 00:00:00 2001 From: Canyon Robins Date: Wed, 28 May 2025 13:36:58 -0700 Subject: [PATCH 02/10] tests --- .../ContextManagementSettings.test.tsx | 131 +++++++++++++++--- 1 file changed, 114 insertions(+), 17 deletions(-) diff --git a/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx b/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx index e58985888e..44603cc4b3 100644 --- a/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx @@ -1,5 +1,6 @@ // npx jest src/components/settings/__tests__/ContextManagementSettings.test.ts +import React from "react" import { render, screen, fireEvent } from "@testing-library/react" import { ContextManagementSettings } from "@src/components/settings/ContextManagementSettings" @@ -12,16 +13,32 @@ class MockResizeObserver { global.ResizeObserver = MockResizeObserver -jest.mock("@/components/ui", () => ({ - ...jest.requireActual("@/components/ui"), - Slider: ({ value, onValueChange, "data-testid": dataTestId }: any) => ( - onValueChange([parseFloat(e.target.value)])} - data-testid={dataTestId} - /> - ), +// Mock lucide-react icons - these don't work well in Jest/JSDOM environment +jest.mock("lucide-react", () => { + return { + Database: React.forwardRef((props: any, ref: any) =>
), + ChevronDown: React.forwardRef((props: any, ref: any) => ( +
+ )), + ChevronUp: React.forwardRef((props: any, ref: any) => ( +
+ )), + Check: React.forwardRef((props: any, ref: any) =>
), + } +}) + +// Mock translation hook to return the key as the translation +jest.mock("@/i18n/TranslationContext", () => ({ + useAppTranslation: () => ({ + t: (key: string) => key, + }), +})) + +// Mock vscode utilities - this is necessary since we're not in a VSCode environment +jest.mock("@/utils/vscode", () => ({ + vscode: { + postMessage: jest.fn(), + }, })) describe("ContextManagementSettings", () => { @@ -57,21 +74,41 @@ describe("ContextManagementSettings", () => { }) it("updates open tabs context limit", () => { - render() + const mockSetCachedStateField = jest.fn() + const props = { ...defaultProps, setCachedStateField: mockSetCachedStateField } + render() const slider = screen.getByTestId("open-tabs-limit-slider") - fireEvent.change(slider, { target: { value: "50" } }) + expect(slider).toBeInTheDocument() - expect(defaultProps.setCachedStateField).toHaveBeenCalledWith("maxOpenTabsContext", 50) + // Check that the current value is displayed + expect(screen.getByText("20")).toBeInTheDocument() + + // Test slider interaction using keyboard events (ArrowRight increases value) + slider.focus() + fireEvent.keyDown(slider, { key: "ArrowRight" }) + + // The callback should have been called with the new value (20 + 1 = 21) + expect(mockSetCachedStateField).toHaveBeenCalledWith("maxOpenTabsContext", 21) }) - it("updates workspace files contextlimit", () => { - render() + it("updates workspace files limit", () => { + const mockSetCachedStateField = jest.fn() + const props = { ...defaultProps, setCachedStateField: mockSetCachedStateField } + render() const slider = screen.getByTestId("workspace-files-limit-slider") - fireEvent.change(slider, { target: { value: "50" } }) + expect(slider).toBeInTheDocument() - expect(defaultProps.setCachedStateField).toHaveBeenCalledWith("maxWorkspaceFiles", 50) + // Check that the current value is displayed + expect(screen.getByText("200")).toBeInTheDocument() + + // Test slider interaction using keyboard events (ArrowRight increases value) + slider.focus() + fireEvent.keyDown(slider, { key: "ArrowRight" }) + + // The callback should have been called with the new value (200 + 1 = 201) + expect(mockSetCachedStateField).toHaveBeenCalledWith("maxWorkspaceFiles", 201) }) it("updates show rooignored files setting", () => { @@ -82,4 +119,64 @@ describe("ContextManagementSettings", () => { expect(defaultProps.setCachedStateField).toHaveBeenCalledWith("showRooIgnoredFiles", true) }) + + it("renders max read file line controls", () => { + const propsWithMaxReadFileLine = { + ...defaultProps, + maxReadFileLine: 500, + } + render() + + // Max read file line input + const maxReadFileInput = screen.getByTestId("max-read-file-line-input") + expect(maxReadFileInput).toBeInTheDocument() + expect(maxReadFileInput).toHaveValue(500) + + // Always full read checkbox + const alwaysFullReadCheckbox = screen.getByTestId("max-read-file-always-full-checkbox") + expect(alwaysFullReadCheckbox).toBeInTheDocument() + expect(alwaysFullReadCheckbox).not.toBeChecked() + }) + + it("updates max read file line setting", () => { + const propsWithMaxReadFileLine = { + ...defaultProps, + maxReadFileLine: 500, + } + render() + + const input = screen.getByTestId("max-read-file-line-input") + fireEvent.change(input, { target: { value: "1000" } }) + + expect(defaultProps.setCachedStateField).toHaveBeenCalledWith("maxReadFileLine", 1000) + }) + + it("toggles always full read setting", () => { + const propsWithMaxReadFileLine = { + ...defaultProps, + maxReadFileLine: 500, + } + render() + + const checkbox = screen.getByTestId("max-read-file-always-full-checkbox") + fireEvent.click(checkbox) + + expect(defaultProps.setCachedStateField).toHaveBeenCalledWith("maxReadFileLine", -1) + }) + + it("renders with autoCondenseContext enabled", () => { + const propsWithAutoCondense = { + ...defaultProps, + autoCondenseContext: true, + autoCondenseContextPercent: 75, + condensingApiConfigId: "test-config", + customCondensingPrompt: "Test prompt", + } + render() + + // Should render the auto condense section + expect(screen.getByText("settings:experimental.autoCondenseContextPercent.label")).toBeInTheDocument() + expect(screen.getByText("settings:experimental.condensingApiConfiguration.label")).toBeInTheDocument() + expect(screen.getByText("settings:experimental.customCondensingPrompt.label")).toBeInTheDocument() + }) }) From 5241e452f1ed0e28c1dc55a2b98607d96f1b114c Mon Sep 17 00:00:00 2001 From: Canyon Robins Date: Wed, 28 May 2025 13:53:12 -0700 Subject: [PATCH 03/10] wip --- .../settings/ContextManagementSettings.tsx | 203 ++++++------ .../ContextManagementSettings.test.tsx | 296 ++++++++++++++++++ webview-ui/src/i18n/locales/en/settings.json | 39 ++- 3 files changed, 422 insertions(+), 116 deletions(-) diff --git a/webview-ui/src/components/settings/ContextManagementSettings.tsx b/webview-ui/src/components/settings/ContextManagementSettings.tsx index 65a8bfc69d..5d5e5f45fe 100644 --- a/webview-ui/src/components/settings/ContextManagementSettings.tsx +++ b/webview-ui/src/components/settings/ContextManagementSettings.tsx @@ -98,11 +98,107 @@ export const ContextManagementSettings = ({
+
+ {t("settings:contextManagement.openTabs.label")} +
+ setCachedStateField("maxOpenTabsContext", value)} + data-testid="open-tabs-limit-slider" + /> + {maxOpenTabsContext ?? 20} +
+
+ {t("settings:contextManagement.openTabs.description")} +
+
+ +
+ + {t("settings:contextManagement.workspaceFiles.label")} + +
+ setCachedStateField("maxWorkspaceFiles", value)} + data-testid="workspace-files-limit-slider" + /> + {maxWorkspaceFiles ?? 200} +
+
+ {t("settings:contextManagement.workspaceFiles.description")} +
+
+ +
+ setCachedStateField("showRooIgnoredFiles", e.target.checked)} + data-testid="show-rooignored-files-checkbox"> + + +
+ {t("settings:contextManagement.rooignore.description")} +
+
+ +
+
+ {t("settings:contextManagement.maxReadFile.label")} +
+ { + const newValue = parseInt(e.target.value, 10) + if (!isNaN(newValue) && newValue >= -1) { + setCachedStateField("maxReadFileLine", newValue) + } + }} + onClick={(e) => e.currentTarget.select()} + data-testid="max-read-file-line-input" + disabled={maxReadFileLine === -1} + /> + {t("settings:contextManagement.maxReadFile.lines")} + + setCachedStateField("maxReadFileLine", e.target.checked ? -1 : 500) + } + data-testid="max-read-file-always-full-checkbox"> + {t("settings:contextManagement.maxReadFile.always_full_read")} + +
+
+
+ {t("settings:contextManagement.maxReadFile.description")} +
+
+
+ +
+ setCachedStateField("autoCondenseContext", e.target.checked)} + data-testid="auto-condense-context-checkbox"> + {t("settings:contextManagement.autoCondenseContext.name")} + {autoCondenseContext && (
-
{t("settings:experimental.autoCondenseContextPercent.label")}
+
{t("settings:contextManagement.autoCondenseContextPercent.label")}
@@ -118,7 +214,7 @@ export const ContextManagementSettings = ({ {autoCondenseContextPercent}%
- {t("settings:experimental.autoCondenseContextPercent.description")} + {t("settings:contextManagement.autoCondenseContextPercent.description")}
@@ -126,11 +222,11 @@ export const ContextManagementSettings = ({
-
{t("settings:experimental.condensingApiConfiguration.label")}
+
{t("settings:contextManagement.condensingApiConfiguration.label")}
- {t("settings:experimental.condensingApiConfiguration.description")} + {t("settings:contextManagement.condensingApiConfiguration.description")}
{ - const newValue = parseInt(e.target.value, 10) - if (!isNaN(newValue) && newValue >= -1) { - setCachedStateField("maxReadFileLine", newValue) - } - }} - onClick={(e) => e.currentTarget.select()} - data-testid="max-read-file-line-input" - disabled={maxReadFileLine === -1} - /> - {t("settings:contextManagement.maxReadFile.lines")} - - setCachedStateField("maxReadFileLine", e.target.checked ? -1 : 500) - } - data-testid="max-read-file-always-full-checkbox"> - {t("settings:contextManagement.maxReadFile.always_full_read")} - -
-
-
- {t("settings:contextManagement.maxReadFile.description")} -
-
) diff --git a/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx b/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx index 44603cc4b3..ac41c452fb 100644 --- a/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ContextManagementSettings.test.tsx @@ -179,4 +179,300 @@ describe("ContextManagementSettings", () => { expect(screen.getByText("settings:experimental.condensingApiConfiguration.label")).toBeInTheDocument() expect(screen.getByText("settings:experimental.customCondensingPrompt.label")).toBeInTheDocument() }) + + describe("Auto Condense Context functionality", () => { + const autoCondenseProps = { + ...defaultProps, + autoCondenseContext: true, + autoCondenseContextPercent: 75, + condensingApiConfigId: "test-config", + customCondensingPrompt: "Custom test prompt", + listApiConfigMeta: [ + { id: "config-1", name: "Config 1" }, + { id: "config-2", name: "Config 2" }, + ], + } + + it("updates auto condense context percent", () => { + const mockSetCachedStateField = jest.fn() + const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField } + render() + + // Find the auto condense percent slider + const sliders = screen.getAllByRole("slider") + const autoCondenseSlider = sliders[0] // First slider should be auto condense + + // Test slider interaction + autoCondenseSlider.focus() + fireEvent.keyDown(autoCondenseSlider, { key: "ArrowRight" }) + + expect(mockSetCachedStateField).toHaveBeenCalledWith("autoCondenseContextPercent", 76) + }) + + it("displays correct auto condense context percent value", () => { + render() + expect(screen.getByText("75%")).toBeInTheDocument() + }) + + it("updates condensing API configuration", () => { + const mockSetCachedStateField = jest.fn() + const mockPostMessage = jest.fn() + require("@/utils/vscode").vscode.postMessage = mockPostMessage + + const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField } + render() + + // Find and click the select trigger + const selectTrigger = screen.getByRole("combobox") + fireEvent.click(selectTrigger) + + // Select a different config + const configOption = screen.getByText("Config 1") + fireEvent.click(configOption) + + expect(mockSetCachedStateField).toHaveBeenCalledWith("condensingApiConfigId", "config-1") + expect(mockPostMessage).toHaveBeenCalledWith({ + type: "condensingApiConfigId", + text: "config-1", + }) + }) + + it("handles selecting default config option", () => { + const mockSetCachedStateField = jest.fn() + const mockPostMessage = jest.fn() + require("@/utils/vscode").vscode.postMessage = mockPostMessage + + const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField } + render() + + // Find and click the select trigger + const selectTrigger = screen.getByRole("combobox") + fireEvent.click(selectTrigger) + + // Select the default option (use current config) + const defaultOption = screen.getByText("settings:experimental.condensingApiConfiguration.useCurrentConfig") + fireEvent.click(defaultOption) + + expect(mockSetCachedStateField).toHaveBeenCalledWith("condensingApiConfigId", "") + expect(mockPostMessage).toHaveBeenCalledWith({ + type: "condensingApiConfigId", + text: "", + }) + }) + + it("updates custom condensing prompt", () => { + const mockSetCachedStateField = jest.fn() + const mockPostMessage = jest.fn() + require("@/utils/vscode").vscode.postMessage = mockPostMessage + + const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField } + render() + + const textarea = screen.getByRole("textbox") + const newPrompt = "Updated custom prompt" + fireEvent.change(textarea, { target: { value: newPrompt } }) + + expect(mockSetCachedStateField).toHaveBeenCalledWith("customCondensingPrompt", newPrompt) + expect(mockPostMessage).toHaveBeenCalledWith({ + type: "updateCondensingPrompt", + text: newPrompt, + }) + }) + + it("resets custom condensing prompt to default", () => { + const mockSetCachedStateField = jest.fn() + const mockPostMessage = jest.fn() + require("@/utils/vscode").vscode.postMessage = mockPostMessage + + const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField } + render() + + const resetButton = screen.getByText("settings:experimental.customCondensingPrompt.reset") + fireEvent.click(resetButton) + + // Should reset to the default SUMMARY_PROMPT + expect(mockSetCachedStateField).toHaveBeenCalledWith( + "customCondensingPrompt", + expect.stringContaining("Your task is to create a detailed summary"), + ) + expect(mockPostMessage).toHaveBeenCalledWith({ + type: "updateCondensingPrompt", + text: expect.stringContaining("Your task is to create a detailed summary"), + }) + }) + + it("uses default prompt when customCondensingPrompt is undefined", () => { + const propsWithoutCustomPrompt = { + ...autoCondenseProps, + customCondensingPrompt: undefined, + } + render() + + const textarea = screen.getByRole("textbox") as HTMLTextAreaElement + // The textarea should contain the full default SUMMARY_PROMPT + expect(textarea.value).toContain("Your task is to create a detailed summary") + }) + }) + + describe("Edge cases and validation", () => { + it("handles invalid max read file line input", () => { + const mockSetCachedStateField = jest.fn() + const propsWithMaxReadFileLine = { + ...defaultProps, + maxReadFileLine: 500, + setCachedStateField: mockSetCachedStateField, + } + render() + + const input = screen.getByTestId("max-read-file-line-input") + + // Test invalid input (non-numeric) + fireEvent.change(input, { target: { value: "abc" } }) + expect(mockSetCachedStateField).not.toHaveBeenCalled() + + // Test negative value below -1 + fireEvent.change(input, { target: { value: "-5" } }) + expect(mockSetCachedStateField).not.toHaveBeenCalled() + + // Test valid input + fireEvent.change(input, { target: { value: "1000" } }) + expect(mockSetCachedStateField).toHaveBeenCalledWith("maxReadFileLine", 1000) + }) + + it("selects input text on click", () => { + const propsWithMaxReadFileLine = { + ...defaultProps, + maxReadFileLine: 500, + } + render() + + const input = screen.getByTestId("max-read-file-line-input") as HTMLInputElement + const selectSpy = jest.spyOn(input, "select") + + fireEvent.click(input) + expect(selectSpy).toHaveBeenCalled() + }) + + it("disables max read file input when always full read is checked", () => { + const propsWithAlwaysFullRead = { + ...defaultProps, + maxReadFileLine: -1, + } + render() + + const input = screen.getByTestId("max-read-file-line-input") + expect(input).toBeDisabled() + + const checkbox = screen.getByTestId("max-read-file-always-full-checkbox") + expect(checkbox).toBeChecked() + }) + + it("handles boundary values for sliders", () => { + const mockSetCachedStateField = jest.fn() + const props = { + ...defaultProps, + maxOpenTabsContext: 0, + maxWorkspaceFiles: 500, + setCachedStateField: mockSetCachedStateField, + } + render() + + // Check boundary values are displayed + expect(screen.getByText("0")).toBeInTheDocument() // min open tabs + expect(screen.getByText("500")).toBeInTheDocument() // max workspace files + }) + + it("handles undefined optional props gracefully", () => { + const propsWithUndefined = { + ...defaultProps, + showRooIgnoredFiles: undefined, + maxReadFileLine: undefined, + condensingApiConfigId: undefined, + customCondensingPrompt: undefined, + } + + expect(() => { + render() + }).not.toThrow() + + // Should use default values + expect(screen.getByText("20")).toBeInTheDocument() // default maxOpenTabsContext + expect(screen.getByText("200")).toBeInTheDocument() // default maxWorkspaceFiles + }) + }) + + describe("Conditional rendering", () => { + it("does not render auto condense section when autoCondenseContext is false", () => { + const propsWithoutAutoCondense = { + ...defaultProps, + autoCondenseContext: false, + } + render() + + expect(screen.queryByText("settings:experimental.autoCondenseContextPercent.label")).not.toBeInTheDocument() + expect(screen.queryByText("settings:experimental.condensingApiConfiguration.label")).not.toBeInTheDocument() + expect(screen.queryByText("settings:experimental.customCondensingPrompt.label")).not.toBeInTheDocument() + }) + + it("renders max read file controls with default value when maxReadFileLine is undefined", () => { + const propsWithoutMaxReadFile = { + ...defaultProps, + maxReadFileLine: undefined, + } + render() + + // Controls should still be rendered with default value of -1 + const input = screen.getByTestId("max-read-file-line-input") + const checkbox = screen.getByTestId("max-read-file-always-full-checkbox") + + expect(input).toBeInTheDocument() + expect(input).toHaveValue(-1) + expect(input).not.toBeDisabled() // Input is not disabled when maxReadFileLine is undefined (only when explicitly set to -1) + expect(checkbox).toBeInTheDocument() + expect(checkbox).not.toBeChecked() // Checkbox is not checked when maxReadFileLine is undefined (only when explicitly set to -1) + }) + }) + + describe("Accessibility", () => { + it("has proper labels and descriptions", () => { + render() + + // Check that labels are present + expect(screen.getByText("settings:contextManagement.openTabs.label")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.workspaceFiles.label")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.rooignore.label")).toBeInTheDocument() + + // Check that descriptions are present + expect(screen.getByText("settings:contextManagement.openTabs.description")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.workspaceFiles.description")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.rooignore.description")).toBeInTheDocument() + }) + + it("has proper test ids for all interactive elements", () => { + const propsWithMaxReadFile = { + ...defaultProps, + maxReadFileLine: 500, + } + render() + + expect(screen.getByTestId("open-tabs-limit-slider")).toBeInTheDocument() + expect(screen.getByTestId("workspace-files-limit-slider")).toBeInTheDocument() + expect(screen.getByTestId("show-rooignored-files-checkbox")).toBeInTheDocument() + expect(screen.getByTestId("max-read-file-line-input")).toBeInTheDocument() + expect(screen.getByTestId("max-read-file-always-full-checkbox")).toBeInTheDocument() + }) + }) + + describe("Integration with translation system", () => { + it("uses translation keys for all text content", () => { + render() + + // Verify that translation keys are being used (mocked to return the key) + expect(screen.getByText("settings:sections.contextManagement")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.description")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.openTabs.label")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.workspaceFiles.label")).toBeInTheDocument() + expect(screen.getByText("settings:contextManagement.rooignore.label")).toBeInTheDocument() + }) + }) }) diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index d77e2b3081..9bbcff276a 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Control what information is included in the AI's context window, affecting token usage and response quality", + "autoCondenseContextPercent": { + "label": "Threshold to trigger intelligent context condensing", + "description": "When the context window reaches this threshold, Roo will automatically condense it." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Custom Context Condensing Prompt", + "description": "Customize the system prompt used for context condensing. Leave empty to use the default prompt.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Automatically trigger intelligent context condensing" + }, "openTabs": { "label": "Open tabs context limit", "description": "Maximum number of VSCode open tabs to include in context. Higher values provide more context but increase token usage." @@ -430,26 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "Threshold to trigger intelligent context condensing", - "description": "When the context window reaches this threshold, Roo will automatically condense it." - }, - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Custom Context Condensing Prompt", - "description": "Customize the system prompt used for context condensing. Leave empty to use the default prompt.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Automatically trigger intelligent context condensing", - "description": "Intelligent context condensing uses an LLM call to summarize the past conversation when the task's context window reaches a preset threshold, rather than dropping old messages when the context fills." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Use experimental unified diff strategy", "description": "Enable the experimental unified diff strategy. This strategy might reduce the number of retries caused by model errors but may cause unexpected behavior or incorrect edits. Only enable if you understand the risks and are willing to carefully review all changes." From 298a922f69ba8607af57df39fb121f90a806f39d Mon Sep 17 00:00:00 2001 From: Canyon Robins Date: Wed, 28 May 2025 15:55:41 -0700 Subject: [PATCH 04/10] Update translations --- webview-ui/src/i18n/locales/ca/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/de/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/es/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/fr/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/hi/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/it/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/ja/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/ko/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/nl/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/pl/settings.json | 39 +++++++++---------- .../src/i18n/locales/pt-BR/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/ru/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/tr/settings.json | 39 +++++++++---------- webview-ui/src/i18n/locales/vi/settings.json | 39 +++++++++---------- .../src/i18n/locales/zh-CN/settings.json | 39 +++++++++---------- .../src/i18n/locales/zh-TW/settings.json | 39 +++++++++---------- 16 files changed, 304 insertions(+), 320 deletions(-) diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 2a90eda13d..dd5d367d62 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Controleu quina informació s'inclou a la finestra de context de la IA, afectant l'ús de token i la qualitat de resposta", + "autoCondenseContextPercent": { + "label": "Llindar per activar la condensació intel·ligent de context", + "description": "Quan la finestra de context assoleix aquest llindar, Roo la condensarà automàticament." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Custom Context Condensing Prompt", + "description": "Customize the system prompt used for context condensing. Leave empty to use the default prompt.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Activar automàticament la condensació intel·ligent de context" + }, "openTabs": { "label": "Límit de context de pestanyes obertes", "description": "Nombre màxim de pestanyes obertes de VSCode a incloure al context. Valors més alts proporcionen més context però augmenten l'ús de token." @@ -430,14 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "Llindar per activar la condensació intel·ligent de context", - "description": "Quan la finestra de context assoleix aquest llindar, Roo la condensarà automàticament." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Activar automàticament la condensació intel·ligent de context", - "description": "La condensació intel·ligent de context utilitza una crida LLM per resumir la conversa anterior quan la finestra de context de la tasca assoleix un llindar predefinit, en lloc d'eliminar missatges antics quan el context s'omple." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Utilitzar estratègia diff unificada experimental", "description": "Activar l'estratègia diff unificada experimental. Aquesta estratègia podria reduir el nombre de reintents causats per errors del model, però pot causar comportaments inesperats o edicions incorrectes. Activeu-la només si enteneu els riscos i esteu disposats a revisar acuradament tots els canvis." @@ -457,18 +468,6 @@ "MULTI_SEARCH_AND_REPLACE": { "name": "Utilitzar eina diff de blocs múltiples experimental", "description": "Quan està activat, Roo utilitzarà l'eina diff de blocs múltiples. Això intentarà actualitzar múltiples blocs de codi a l'arxiu en una sola petició." - }, - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Custom Context Condensing Prompt", - "description": "Customize the system prompt used for context condensing. Leave empty to use the default prompt.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" } }, "promptCaching": { diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 6543f989c4..c1d833fccc 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Steuern Sie, welche Informationen im KI-Kontextfenster enthalten sind, was den Token-Verbrauch und die Antwortqualität beeinflusst", + "autoCondenseContextPercent": { + "label": "Schwellenwert für intelligente Kontextkomprimierung", + "description": "Wenn das Kontextfenster diesen Schwellenwert erreicht, wird Roo es automatisch komprimieren." + }, + "condensingApiConfiguration": { + "label": "API-Konfiguration für Kontextkomprimierung", + "description": "Wählen Sie, welche API-Konfiguration für Kontextkomprimierungsoperationen verwendet werden soll. Lassen Sie unausgewählt, um die aktuelle aktive Konfiguration zu verwenden.", + "useCurrentConfig": "Aktuelle Konfiguration verwenden" + }, + "customCondensingPrompt": { + "label": "Benutzerdefinierter Kontextkomprimierungs-Prompt", + "description": "Passen Sie den System-Prompt an, der für die Kontextkomprimierung verwendet wird. Lassen Sie leer, um den Standard-Prompt zu verwenden.", + "placeholder": "Geben Sie hier Ihren benutzerdefinierten Komprimierungs-Prompt ein...\n\nSie können die gleiche Struktur wie der Standard-Prompt verwenden:\n- Vorherige Konversation\n- Aktuelle Arbeit\n- Wichtige technische Konzepte\n- Relevante Dateien und Code\n- Problemlösung\n- Ausstehende Aufgaben und nächste Schritte", + "reset": "Auf Standard zurücksetzen", + "hint": "Leer = Standard-Prompt verwenden" + }, + "autoCondenseContext": { + "name": "Intelligente Kontextkomprimierung automatisch auslösen" + }, "openTabs": { "label": "Geöffnete Tabs Kontextlimit", "description": "Maximale Anzahl von geöffneten VSCode-Tabs, die im Kontext enthalten sein sollen. Höhere Werte bieten mehr Kontext, erhöhen aber den Token-Verbrauch." @@ -430,26 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "Schwellenwert für intelligente Kontextkomprimierung", - "description": "Wenn das Kontextfenster diesen Schwellenwert erreicht, wird Roo es automatisch komprimieren." - }, - "condensingApiConfiguration": { - "label": "API-Konfiguration für Kontextkomprimierung", - "description": "Wählen Sie, welche API-Konfiguration für Kontextkomprimierungsoperationen verwendet werden soll. Lassen Sie unausgewählt, um die aktuelle aktive Konfiguration zu verwenden.", - "useCurrentConfig": "Aktuelle Konfiguration verwenden" - }, - "customCondensingPrompt": { - "label": "Benutzerdefinierter Kontextkomprimierungs-Prompt", - "description": "Passen Sie den System-Prompt an, der für die Kontextkomprimierung verwendet wird. Lassen Sie leer, um den Standard-Prompt zu verwenden.", - "placeholder": "Geben Sie hier Ihren benutzerdefinierten Komprimierungs-Prompt ein...\n\nSie können die gleiche Struktur wie der Standard-Prompt verwenden:\n- Vorherige Konversation\n- Aktuelle Arbeit\n- Wichtige technische Konzepte\n- Relevante Dateien und Code\n- Problemlösung\n- Ausstehende Aufgaben und nächste Schritte", - "reset": "Auf Standard zurücksetzen", - "hint": "Leer = Standard-Prompt verwenden" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Intelligente Kontextkomprimierung automatisch auslösen", - "description": "Intelligente Kontextkomprimierung verwendet einen LLM-Aufruf, um das vorherige Gespräch zusammenzufassen, wenn das Kontextfenster der Aufgabe einen voreingestellten Schwellenwert erreicht, anstatt alte Nachrichten zu verwerfen, wenn der Kontext voll ist." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Experimentelle einheitliche Diff-Strategie verwenden", "description": "Aktiviert die experimentelle einheitliche Diff-Strategie. Diese Strategie könnte die Anzahl der durch Modellfehler verursachten Wiederholungen reduzieren, kann aber unerwartetes Verhalten oder falsche Bearbeitungen verursachen. Nur aktivieren, wenn du die Risiken verstehst und bereit bist, alle Änderungen sorgfältig zu überprüfen." diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 90601ba0d4..149a3ae66c 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Controle qué información se incluye en la ventana de contexto de la IA, afectando el uso de token y la calidad de respuesta", + "autoCondenseContextPercent": { + "label": "Umbral para activar la condensación inteligente de contexto", + "description": "Cuando la ventana de contexto alcanza este umbral, Roo la condensará automáticamente." + }, + "condensingApiConfiguration": { + "label": "Configuración de API para condensación de contexto", + "description": "Seleccione qué configuración de API usar para operaciones de condensación de contexto. Deje sin seleccionar para usar la configuración activa actual.", + "useCurrentConfig": "Usar configuración actual" + }, + "customCondensingPrompt": { + "label": "Prompt personalizado para condensación de contexto", + "description": "Personalice el prompt del sistema utilizado para la condensación de contexto. Deje vacío para usar el prompt predeterminado.", + "placeholder": "Ingrese su prompt de condensación personalizado aquí...\n\nPuede usar la misma estructura que el prompt predeterminado:\n- Conversación anterior\n- Trabajo actual\n- Conceptos técnicos clave\n- Archivos y código relevantes\n- Resolución de problemas\n- Tareas pendientes y próximos pasos", + "reset": "Restablecer a predeterminado", + "hint": "Vacío = usar prompt predeterminado" + }, + "autoCondenseContext": { + "name": "Activar automáticamente la condensación inteligente de contexto" + }, "openTabs": { "label": "Límite de contexto de pestañas abiertas", "description": "Número máximo de pestañas abiertas de VSCode a incluir en el contexto. Valores más altos proporcionan más contexto pero aumentan el uso de token." @@ -430,26 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "Umbral para activar la condensación inteligente de contexto", - "description": "Cuando la ventana de contexto alcanza este umbral, Roo la condensará automáticamente." - }, - "condensingApiConfiguration": { - "label": "Configuración de API para condensación de contexto", - "description": "Seleccione qué configuración de API usar para operaciones de condensación de contexto. Deje sin seleccionar para usar la configuración activa actual.", - "useCurrentConfig": "Usar configuración actual" - }, - "customCondensingPrompt": { - "label": "Prompt personalizado para condensación de contexto", - "description": "Personalice el prompt del sistema utilizado para la condensación de contexto. Deje vacío para usar el prompt predeterminado.", - "placeholder": "Ingrese su prompt de condensación personalizado aquí...\n\nPuede usar la misma estructura que el prompt predeterminado:\n- Conversación anterior\n- Trabajo actual\n- Conceptos técnicos clave\n- Archivos y código relevantes\n- Resolución de problemas\n- Tareas pendientes y próximos pasos", - "reset": "Restablecer a predeterminado", - "hint": "Vacío = usar prompt predeterminado" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Activar automáticamente la condensación inteligente de contexto", - "description": "La condensación inteligente de contexto utiliza una llamada LLM para resumir la conversación anterior cuando la ventana de contexto de la tarea alcanza un umbral preestablecido, en lugar de eliminar mensajes antiguos cuando el contexto se llena." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Usar estrategia de diff unificada experimental", "description": "Habilitar la estrategia de diff unificada experimental. Esta estrategia podría reducir el número de reintentos causados por errores del modelo, pero puede causar comportamientos inesperados o ediciones incorrectas. Habilítela solo si comprende los riesgos y está dispuesto a revisar cuidadosamente todos los cambios." diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index f3ae43f05d..58af54b3e0 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Contrôlez quelles informations sont incluses dans la fenêtre de contexte de l'IA, affectant l'utilisation de token et la qualité des réponses", + "autoCondenseContextPercent": { + "label": "Seuil de déclenchement de la condensation intelligente du contexte", + "description": "Lorsque la fenêtre de contexte atteint ce seuil, Roo la condensera automatiquement." + }, + "condensingApiConfiguration": { + "label": "Configuration API pour la condensation du contexte", + "description": "Sélectionnez quelle configuration API utiliser pour les opérations de condensation du contexte. Laissez non sélectionné pour utiliser la configuration active actuelle.", + "useCurrentConfig": "Par défaut" + }, + "customCondensingPrompt": { + "label": "Prompt personnalisé de condensation du contexte", + "description": "Personnalisez le prompt système utilisé pour la condensation du contexte. Laissez vide pour utiliser le prompt par défaut.", + "placeholder": "Entrez votre prompt de condensation personnalisé ici...\n\nVous pouvez utiliser la même structure que le prompt par défaut :\n- Conversation précédente\n- Travail en cours\n- Concepts techniques clés\n- Fichiers et code pertinents\n- Résolution de problèmes\n- Tâches en attente et prochaines étapes", + "reset": "Réinitialiser par défaut", + "hint": "Vide = utiliser le prompt par défaut" + }, + "autoCondenseContext": { + "name": "Déclencher automatiquement la condensation intelligente du contexte" + }, "openTabs": { "label": "Limite de contexte des onglets ouverts", "description": "Nombre maximum d'onglets VSCode ouverts à inclure dans le contexte. Des valeurs plus élevées fournissent plus de contexte mais augmentent l'utilisation de token." @@ -430,26 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "Seuil pour déclencher la condensation intelligente du contexte", - "description": "Lorsque la fenêtre de contexte atteint ce seuil, Roo la condensera automatiquement." - }, - "condensingApiConfiguration": { - "label": "Configuration API pour la condensation du contexte", - "description": "Sélectionnez quelle configuration API utiliser pour les opérations de condensation du contexte. Laissez non sélectionné pour utiliser la configuration active actuelle.", - "useCurrentConfig": "Utiliser la configuration actuelle" - }, - "customCondensingPrompt": { - "label": "Prompt personnalisé pour la condensation du contexte", - "description": "Personnalisez le prompt système utilisé pour la condensation du contexte. Laissez vide pour utiliser le prompt par défaut.", - "placeholder": "Entrez votre prompt de condensation personnalisé ici...\n\nVous pouvez utiliser la même structure que le prompt par défaut :\n- Conversation précédente\n- Travail actuel\n- Concepts techniques clés\n- Fichiers et code pertinents\n- Résolution de problèmes\n- Tâches en attente et prochaines étapes", - "reset": "Réinitialiser par défaut", - "hint": "Vide = utiliser le prompt par défaut" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Déclencher automatiquement la condensation intelligente du contexte", - "description": "La condensation intelligente du contexte utilise un appel LLM pour résumer la conversation passée lorsque la fenêtre de contexte de la tâche atteint un seuil prédéfini, plutôt que de supprimer les anciens messages lorsque le contexte est plein." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Utiliser la stratégie diff unifiée expérimentale", "description": "Activer la stratégie diff unifiée expérimentale. Cette stratégie pourrait réduire le nombre de tentatives causées par des erreurs de modèle, mais peut provoquer des comportements inattendus ou des modifications incorrectes. Activez-la uniquement si vous comprenez les risques et êtes prêt à examiner attentivement tous les changements." diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index fc02f508f6..8d77bf4e90 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "AI के संदर्भ विंडो में शामिल जानकारी को नियंत्रित करें, जो token उपयोग और प्रतिक्रिया गुणवत्ता को प्रभावित करता है", + "autoCondenseContextPercent": { + "label": "बुद्धिमान संदर्भ संघनन को ट्रिगर करने की सीमा", + "description": "जब संदर्भ विंडो इस सीमा तक पहुंचती है, तो Roo इसे स्वचालित रूप से संघनित कर देगा।" + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "कस्टम संदर्भ संघनन प्रॉम्प्ट", + "description": "संदर्भ संघनन के लिए कस्टम सिस्टम प्रॉम्प्ट। डिफ़ॉल्ट प्रॉम्प्ट का उपयोग करने के लिए खाली छोड़ें।", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "बुद्धिमान संदर्भ संघनन को स्वचालित रूप से ट्रिगर करें" + }, "openTabs": { "label": "खुले टैब संदर्भ सीमा", "description": "संदर्भ में शामिल करने के लिए VSCode खुले टैब की अधिकतम संख्या। उच्च मान अधिक संदर्भ प्रदान करते हैं लेकिन token उपयोग बढ़ाते हैं।" @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "कस्टम संदर्भ संघनन प्रॉम्प्ट", - "description": "संदर्भ संघनन के लिए कस्टम सिस्टम प्रॉम्प्ट। डिफ़ॉल्ट प्रॉम्प्ट का उपयोग करने के लिए खाली छोड़ें।", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "बुद्धिमान संदर्भ संघनन को ट्रिगर करने की सीमा", - "description": "जब संदर्भ विंडो इस सीमा तक पहुंचती है, तो Roo इसे स्वचालित रूप से संघनित कर देगा।" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "बुद्धिमान संदर्भ संघनन को स्वचालित रूप से ट्रिगर करें", - "description": "बुद्धिमान संदर्भ संघनन कार्य के संदर्भ विंडो के पूर्व-निर्धारित सीमा तक पहुंचने पर पिछली बातचीत को संक्षेप में प्रस्तुत करने के लिए LLM कॉल का उपयोग करता है, बजाय इसके कि संदर्भ भरने पर पुराने संदेशों को हटा दिया जाए।" - }, "DIFF_STRATEGY_UNIFIED": { "name": "प्रायोगिक एकीकृत diff रणनीति का उपयोग करें", "description": "प्रायोगिक एकीकृत diff रणनीति सक्षम करें। यह रणनीति मॉडल त्रुटियों के कारण पुनः प्रयासों की संख्या को कम कर सकती है, लेकिन अप्रत्याशित व्यवहार या गलत संपादन का कारण बन सकती है। केवल तभी सक्षम करें जब आप जोखिमों को समझते हों और सभी परिवर्तनों की सावधानीपूर्वक समीक्षा करने के लिए तैयार हों।" diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index cca396698f..c9ec9ab1bd 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Controlla quali informazioni sono incluse nella finestra di contesto dell'IA, influenzando l'utilizzo di token e la qualità delle risposte", + "autoCondenseContextPercent": { + "label": "Soglia per attivare la condensazione intelligente del contesto", + "description": "Quando la finestra di contesto raggiunge questa soglia, Roo la condenserà automaticamente." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Prompt personalizzato condensazione contesto", + "description": "Prompt di sistema personalizzato per la condensazione del contesto. Lascia vuoto per utilizzare il prompt predefinito.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Attiva automaticamente la condensazione intelligente del contesto" + }, "openTabs": { "label": "Limite contesto schede aperte", "description": "Numero massimo di schede VSCode aperte da includere nel contesto. Valori più alti forniscono più contesto ma aumentano l'utilizzo di token." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Prompt personalizzato condensazione contesto", - "description": "Prompt di sistema personalizzato per la condensazione del contesto. Lascia vuoto per utilizzare il prompt predefinito.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Soglia per attivare la condensazione intelligente del contesto", - "description": "Quando la finestra di contesto raggiunge questa soglia, Roo la condenserà automaticamente." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Attiva automaticamente la condensazione intelligente del contesto", - "description": "La condensazione intelligente del contesto utilizza una chiamata LLM per riassumere la conversazione precedente quando la finestra di contesto dell'attività raggiunge una soglia preimpostata, invece di eliminare i messaggi vecchi quando il contesto si riempie." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Usa strategia diff unificata sperimentale", "description": "Abilita la strategia diff unificata sperimentale. Questa strategia potrebbe ridurre il numero di tentativi causati da errori del modello, ma può causare comportamenti imprevisti o modifiche errate. Abilitala solo se comprendi i rischi e sei disposto a rivedere attentamente tutte le modifiche." diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index c960751ae8..c883b98458 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "AIのコンテキストウィンドウに含まれる情報を制御し、token使用量とレスポンスの品質に影響します", + "autoCondenseContextPercent": { + "label": "インテリジェントなコンテキスト圧縮をトリガーするしきい値", + "description": "コンテキストウィンドウがこのしきい値に達すると、Rooは自動的に圧縮します。" + }, + "condensingApiConfiguration": { + "label": "コンテキスト圧縮用のAPI設定", + "description": "コンテキスト圧縮操作に使用するAPI設定を選択します。選択しない場合は現在のアクティブな設定が使用されます。", + "useCurrentConfig": "現在の設定を使用" + }, + "customCondensingPrompt": { + "label": "カスタムコンテキスト圧縮プロンプト", + "description": "コンテキスト圧縮に使用するシステムプロンプトをカスタマイズします。空のままにするとデフォルトのプロンプトが使用されます。", + "placeholder": "ここにカスタム圧縮プロンプトを入力してください...\n\nデフォルトプロンプトと同じ構造を使用できます:\n- 過去の会話\n- 現在の作業\n- 重要な技術的概念\n- 関連するファイルとコード\n- 問題解決\n- 保留中のタスクと次のステップ", + "reset": "デフォルトにリセット", + "hint": "空 = デフォルトプロンプトを使用" + }, + "autoCondenseContext": { + "name": "インテリジェントなコンテキスト圧縮を自動的にトリガーする" + }, "openTabs": { "label": "オープンタブコンテキスト制限", "description": "コンテキストに含めるVSCodeオープンタブの最大数。高い値はより多くのコンテキストを提供しますが、token使用量が増加します。" @@ -430,26 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "インテリジェントなコンテキスト圧縮をトリガーするしきい値", - "description": "コンテキストウィンドウがこのしきい値に達すると、Rooは自動的に圧縮します。" - }, - "condensingApiConfiguration": { - "label": "コンテキスト圧縮用のAPI設定", - "description": "コンテキスト圧縮操作に使用するAPI設定を選択します。選択しない場合は現在のアクティブな設定が使用されます。", - "useCurrentConfig": "現在の設定を使用" - }, - "customCondensingPrompt": { - "label": "カスタムコンテキスト圧縮プロンプト", - "description": "コンテキスト圧縮に使用するシステムプロンプトをカスタマイズします。空のままにするとデフォルトのプロンプトが使用されます。", - "placeholder": "ここにカスタム圧縮プロンプトを入力してください...\n\nデフォルトプロンプトと同じ構造を使用できます:\n- 過去の会話\n- 現在の作業\n- 重要な技術的概念\n- 関連するファイルとコード\n- 問題解決\n- 保留中のタスクと次のステップ", - "reset": "デフォルトにリセット", - "hint": "空 = デフォルトプロンプトを使用" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "インテリジェントなコンテキスト圧縮を自動的にトリガーする", - "description": "インテリジェントなコンテキスト圧縮は、タスクのコンテキストウィンドウが事前設定されたしきい値に達したとき、コンテキストがいっぱいになって古いメッセージを削除する代わりに、LLM呼び出しを使用して過去の会話を要約します。" - }, "DIFF_STRATEGY_UNIFIED": { "name": "実験的な統合diff戦略を使用する", "description": "実験的な統合diff戦略を有効にします。この戦略はモデルエラーによる再試行の回数を減らす可能性がありますが、予期しない動作や不正確な編集を引き起こす可能性があります。リスクを理解し、すべての変更を注意深く確認する準備がある場合にのみ有効にしてください。" diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index aff0025e66..f6398c8d46 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "AI의 컨텍스트 창에 포함되는 정보를 제어하여 token 사용량과 응답 품질에 영향을 미칩니다", + "autoCondenseContextPercent": { + "label": "지능적 컨텍스트 압축을 트리거하는 임계값", + "description": "컨텍스트 창이 이 임계값에 도달하면 Roo가 자동으로 압축합니다." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "사용자 지정 컨텍스트 압축 프롬프트", + "description": "컨텍스트 압축을 위한 사용자 지정 시스템 프롬프트입니다. 기본 프롬프트를 사용하려면 비워 두세요.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "지능적 컨텍스트 압축 자동 트리거" + }, "openTabs": { "label": "열린 탭 컨텍스트 제한", "description": "컨텍스트에 포함할 VSCode 열린 탭의 최대 수. 높은 값은 더 많은 컨텍스트를 제공하지만 token 사용량이 증가합니다." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "사용자 지정 컨텍스트 압축 프롬프트", - "description": "컨텍스트 압축을 위한 사용자 지정 시스템 프롬프트입니다. 기본 프롬프트를 사용하려면 비워 두세요.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "지능적 컨텍스트 압축을 트리거하는 임계값", - "description": "컨텍스트 창이 이 임계값에 도달하면 Roo가 자동으로 압축합니다." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "지능적 컨텍스트 압축 자동 트리거", - "description": "지능적 컨텍스트 압축은 작업의 컨텍스트 창이 사전 설정된 임계값에 도달했을 때 컨텍스트가 가득 차서 이전 메시지를 삭제하는 대신 LLM 호출을 사용하여 이전 대화를 요약합니다." - }, "DIFF_STRATEGY_UNIFIED": { "name": "실험적 통합 diff 전략 사용", "description": "실험적 통합 diff 전략을 활성화합니다. 이 전략은 모델 오류로 인한 재시도 횟수를 줄일 수 있지만 예기치 않은 동작이나 잘못된 편집을 일으킬 수 있습니다. 위험을 이해하고 모든 변경 사항을 신중하게 검토할 의향이 있는 경우에만 활성화하십시오." diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index 0d1393ab51..6a0b9ca1be 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Bepaal welke informatie wordt opgenomen in het contextvenster van de AI, wat invloed heeft op tokengebruik en antwoordkwaliteit", + "autoCondenseContextPercent": { + "label": "Drempelwaarde om intelligente contextcompressie te activeren", + "description": "Wanneer het contextvenster deze drempelwaarde bereikt, zal Roo het automatisch comprimeren." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Aangepaste contextcondensatieprompt", + "description": "Aangepaste systeemprompt voor contextcondensatie. Laat leeg om de standaardprompt te gebruiken.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Automatisch intelligente contextcompressie activeren" + }, "openTabs": { "label": "Limiet geopende tabbladen in context", "description": "Maximaal aantal geopende VSCode-tabbladen dat in de context wordt opgenomen. Hogere waarden geven meer context maar verhogen het tokengebruik." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Aangepaste contextcondensatieprompt", - "description": "Aangepaste systeemprompt voor contextcondensatie. Laat leeg om de standaardprompt te gebruiken.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Drempelwaarde om intelligente contextcompressie te activeren", - "description": "Wanneer het contextvenster deze drempelwaarde bereikt, zal Roo het automatisch comprimeren." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Automatisch intelligente contextcompressie activeren", - "description": "Intelligente contextcompressie gebruikt een LLM-aanroep om eerdere gesprekken samen te vatten wanneer het contextvenster van de taak een vooraf ingestelde drempelwaarde bereikt, in plaats van oude berichten te verwijderen wanneer de context vol is." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Experimentele unified diff-strategie gebruiken", "description": "Schakel de experimentele unified diff-strategie in. Deze strategie kan het aantal herhalingen door model fouten verminderen, maar kan onverwacht gedrag of onjuiste bewerkingen veroorzaken. Alleen inschakelen als je de risico's begrijpt en wijzigingen zorgvuldig wilt controleren." diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index ba7d7e8b31..94fccde6ac 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Kontroluj, jakie informacje są zawarte w oknie kontekstu AI, wpływając na zużycie token i jakość odpowiedzi", + "autoCondenseContextPercent": { + "label": "Próg wyzwalający inteligentną kondensację kontekstu", + "description": "Gdy okno kontekstu osiągnie ten próg, Roo automatycznie je skondensuje." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Niestandardowy monit kondensacji kontekstu", + "description": "Niestandardowy monit systemowy dla kondensacji kontekstu. Pozostaw puste, aby użyć domyślnego monitu.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Automatycznie wyzwalaj inteligentną kondensację kontekstu" + }, "openTabs": { "label": "Limit kontekstu otwartych kart", "description": "Maksymalna liczba otwartych kart VSCode do uwzględnienia w kontekście. Wyższe wartości zapewniają więcej kontekstu, ale zwiększają zużycie token." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Niestandardowy monit kondensacji kontekstu", - "description": "Niestandardowy monit systemowy dla kondensacji kontekstu. Pozostaw puste, aby użyć domyślnego monitu.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Próg wyzwalający inteligentną kondensację kontekstu", - "description": "Gdy okno kontekstu osiągnie ten próg, Roo automatycznie je skondensuje." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Automatycznie wyzwalaj inteligentną kondensację kontekstu", - "description": "Inteligentna kondensacja kontekstu używa wywołania LLM do podsumowania wcześniejszej rozmowy, gdy okno kontekstu zadania osiągnie ustawiony próg, zamiast usuwać stare wiadomości, gdy kontekst się zapełni." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Użyj eksperymentalnej ujednoliconej strategii diff", "description": "Włącz eksperymentalną ujednoliconą strategię diff. Ta strategia może zmniejszyć liczbę ponownych prób spowodowanych błędami modelu, ale może powodować nieoczekiwane zachowanie lub nieprawidłowe edycje. Włącz tylko jeśli rozumiesz ryzyko i jesteś gotów dokładnie przeglądać wszystkie zmiany." diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index c4df622806..f50d93d2b2 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Controle quais informações são incluídas na janela de contexto da IA, afetando o uso de token e a qualidade da resposta", + "autoCondenseContextPercent": { + "label": "Limite para acionar a condensação inteligente de contexto", + "description": "Quando a janela de contexto atingir este limite, o Roo a condensará automaticamente." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Prompt Personalizado de Condensação de Contexto", + "description": "Prompt de sistema personalizado para condensação de contexto. Deixe em branco para usar o prompt padrão.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Acionar automaticamente a condensação inteligente de contexto" + }, "openTabs": { "label": "Limite de contexto de abas abertas", "description": "Número máximo de abas abertas do VSCode a incluir no contexto. Valores mais altos fornecem mais contexto, mas aumentam o uso de token." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Prompt Personalizado de Condensação de Contexto", - "description": "Prompt de sistema personalizado para condensação de contexto. Deixe em branco para usar o prompt padrão.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Limite para acionar a condensação inteligente de contexto", - "description": "Quando a janela de contexto atingir este limite, o Roo a condensará automaticamente." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Acionar automaticamente a condensação inteligente de contexto", - "description": "A condensação inteligente de contexto usa uma chamada LLM para resumir a conversa anterior quando a janela de contexto da tarefa atinge um limite predefinido, em vez de descartar mensagens antigas quando o contexto estiver cheio." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Usar estratégia diff unificada experimental", "description": "Ativar a estratégia diff unificada experimental. Esta estratégia pode reduzir o número de novas tentativas causadas por erros do modelo, mas pode causar comportamento inesperado ou edições incorretas. Ative apenas se compreender os riscos e estiver disposto a revisar cuidadosamente todas as alterações." diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index eb4e11bf12..a34e1f14f8 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Управляйте, какая информация включается в окно контекста ИИ, что влияет на расход токенов и качество ответов", + "autoCondenseContextPercent": { + "label": "Порог для запуска интеллектуального сжатия контекста", + "description": "Когда контекстное окно достигает этого порога, Roo автоматически его сожмёт." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Пользовательская подсказка для сжатия контекста", + "description": "Пользовательская системная подсказка для сжатия контекста. Оставьте пустым, чтобы использовать подсказку по умолчанию.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Автоматически запускать интеллектуальное сжатие контекста" + }, "openTabs": { "label": "Лимит контекста открытых вкладок", "description": "Максимальное количество открытых вкладок VSCode, включаемых в контекст. Большее значение даёт больше контекста, но увеличивает расход токенов." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Пользовательская подсказка для сжатия контекста", - "description": "Пользовательская системная подсказка для сжатия контекста. Оставьте пустым, чтобы использовать подсказку по умолчанию.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Порог для запуска интеллектуального сжатия контекста", - "description": "Когда контекстное окно достигает этого порога, Roo автоматически его сожмёт." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Автоматически запускать интеллектуальное сжатие контекста", - "description": "Интеллектуальное сжатие контекста использует вызов LLM для обобщения предыдущего разговора, когда контекстное окно задачи достигает заданного порога, вместо удаления старых сообщений при заполнении контекста." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Использовать экспериментальную стратегию унифицированного диффа", "description": "Включает экспериментальную стратегию унифицированного диффа. Может уменьшить количество повторных попыток из-за ошибок модели, но может привести к неожиданному поведению или неверным правкам. Включайте только если готовы внимательно проверять все изменения." diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 766d2b7aa9..6924f7e49b 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Yapay zekanın bağlam penceresine hangi bilgilerin dahil edileceğini kontrol edin, token kullanımını ve yanıt kalitesini etkiler", + "autoCondenseContextPercent": { + "label": "Akıllı bağlam sıkıştırmayı tetikleyecek eşik", + "description": "Bağlam penceresi bu eşiğe ulaştığında, Roo otomatik olarak sıkıştıracaktır." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Özel Bağlam Yoğunlaştırma İstemcisi", + "description": "Bağlam yoğunlaştırma için özel sistem istemcisi. Varsayılan istemciyi kullanmak için boş bırakın.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Akıllı bağlam sıkıştırmayı otomatik olarak tetikle" + }, "openTabs": { "label": "Açık sekmeler bağlam sınırı", "description": "Bağlama dahil edilecek maksimum VSCode açık sekme sayısı. Daha yüksek değerler daha fazla bağlam sağlar ancak token kullanımını artırır." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Özel Bağlam Yoğunlaştırma İstemcisi", - "description": "Bağlam yoğunlaştırma için özel sistem istemcisi. Varsayılan istemciyi kullanmak için boş bırakın.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Akıllı bağlam sıkıştırmayı tetikleyecek eşik", - "description": "Bağlam penceresi bu eşiğe ulaştığında, Roo otomatik olarak sıkıştıracaktır." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Akıllı bağlam sıkıştırmayı otomatik olarak tetikle", - "description": "Akıllı bağlam sıkıştırma, görevin bağlam penceresi önceden belirlenmiş bir eşiğe ulaştığında, bağlam dolduğunda eski mesajları atmak yerine önceki konuşmayı özetlemek için bir LLM çağrısı kullanır." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Deneysel birleştirilmiş diff stratejisini kullan", "description": "Deneysel birleştirilmiş diff stratejisini etkinleştir. Bu strateji, model hatalarından kaynaklanan yeniden deneme sayısını azaltabilir, ancak beklenmeyen davranışlara veya hatalı düzenlemelere neden olabilir. Yalnızca riskleri anlıyorsanız ve tüm değişiklikleri dikkatlice incelemeye istekliyseniz etkinleştirin." diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index a64574c9c1..f1bdb88dc5 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "Kiểm soát thông tin nào được đưa vào cửa sổ ngữ cảnh của AI, ảnh hưởng đến việc sử dụng token và chất lượng phản hồi", + "autoCondenseContextPercent": { + "label": "Ngưỡng kích hoạt nén ngữ cảnh thông minh", + "description": "Khi cửa sổ ngữ cảnh đạt đến ngưỡng này, Roo sẽ tự động nén nó." + }, + "condensingApiConfiguration": { + "label": "API Configuration for Context Condensing", + "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", + "useCurrentConfig": "Default" + }, + "customCondensingPrompt": { + "label": "Lời nhắc nén ngữ cảnh tùy chỉnh", + "description": "Lời nhắc hệ thống tùy chỉnh cho việc nén ngữ cảnh. Để trống để sử dụng lời nhắc mặc định.", + "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", + "reset": "Reset to Default", + "hint": "Empty = use default prompt" + }, + "autoCondenseContext": { + "name": "Tự động kích hoạt nén ngữ cảnh thông minh" + }, "openTabs": { "label": "Giới hạn ngữ cảnh tab đang mở", "description": "Số lượng tab VSCode đang mở tối đa để đưa vào ngữ cảnh. Giá trị cao hơn cung cấp nhiều ngữ cảnh hơn nhưng tăng sử dụng token." @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "Lời nhắc nén ngữ cảnh tùy chỉnh", - "description": "Lời nhắc hệ thống tùy chỉnh cho việc nén ngữ cảnh. Để trống để sử dụng lời nhắc mặc định.", - "placeholder": "Enter your custom condensing prompt here...\n\nYou can use the same structure as the default prompt:\n- Previous Conversation\n- Current Work\n- Key Technical Concepts\n- Relevant Files and Code\n- Problem Solving\n- Pending Tasks and Next Steps", - "reset": "Reset to Default", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "Ngưỡng kích hoạt nén ngữ cảnh thông minh", - "description": "Khi cửa sổ ngữ cảnh đạt đến ngưỡng này, Roo sẽ tự động nén nó." - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "Tự động kích hoạt nén ngữ cảnh thông minh", - "description": "Nén ngữ cảnh thông minh sử dụng một lệnh gọi LLM để tóm tắt cuộc trò chuyện trước đó khi cửa sổ ngữ cảnh của tác vụ đạt đến ngưỡng đã định, thay vì loại bỏ các tin nhắn cũ khi ngữ cảnh đầy." - }, "DIFF_STRATEGY_UNIFIED": { "name": "Sử dụng chiến lược diff thống nhất thử nghiệm", "description": "Bật chiến lược diff thống nhất thử nghiệm. Chiến lược này có thể giảm số lần thử lại do lỗi mô hình nhưng có thể gây ra hành vi không mong muốn hoặc chỉnh sửa không chính xác. Chỉ bật nếu bạn hiểu rõ các rủi ro và sẵn sàng xem xét cẩn thận tất cả các thay đổi." diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 6416b9e824..68fa84696b 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "管理AI上下文信息(影响token用量和回答质量)", + "autoCondenseContextPercent": { + "label": "触发智能上下文压缩的阈值", + "description": "当上下文窗口达到此阈值时,Roo 将自动压缩它。" + }, + "condensingApiConfiguration": { + "label": "上下文压缩的API配置", + "description": "选择用于上下文压缩操作的API配置。留空则使用当前活动的配置。", + "useCurrentConfig": "使用当前配置" + }, + "customCondensingPrompt": { + "label": "自定义上下文压缩提示词", + "description": "自定义用于上下文压缩的系统提示词。留空则使用默认提示词。", + "placeholder": "在此输入您的自定义压缩提示词...\n\n您可以使用与默认提示词相同的结构:\n- 之前的对话\n- 当前工作\n- 关键技术概念\n- 相关文件和代码\n- 问题解决\n- 待处理任务和下一步", + "reset": "重置为默认值", + "hint": "留空 = 使用默认提示词" + }, + "autoCondenseContext": { + "name": "自动触发智能上下文压缩" + }, "openTabs": { "label": "标签页数量限制", "description": "允许纳入上下文的最大标签页数(数值越大消耗token越多)" @@ -430,26 +449,6 @@ } }, "experimental": { - "autoCondenseContextPercent": { - "label": "触发智能上下文压缩的阈值", - "description": "当上下文窗口达到此阈值时,Roo 将自动压缩它。" - }, - "condensingApiConfiguration": { - "label": "上下文压缩的API配置", - "description": "选择用于上下文压缩操作的API配置。留空则使用当前活动的配置。", - "useCurrentConfig": "使用当前配置" - }, - "customCondensingPrompt": { - "label": "自定义上下文压缩提示词", - "description": "自定义用于上下文压缩的系统提示词。留空则使用默认提示词。", - "placeholder": "在此输入您的自定义压缩提示词...\n\n您可以使用与默认提示词相同的结构:\n- 之前的对话\n- 当前工作\n- 关键技术概念\n- 相关文件和代码\n- 问题解决\n- 待处理任务和下一步", - "reset": "重置为默认值", - "hint": "留空 = 使用默认提示词" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "自动触发智能上下文压缩", - "description": "智能上下文压缩使用 LLM 调用来总结过去的对话,在任务上下文窗口达到预设阈值时进行,而不是在上下文填满时丢弃旧消息。" - }, "DIFF_STRATEGY_UNIFIED": { "name": "启用diff更新工具", "description": "可减少因模型错误导致的重复尝试,但可能引发意外操作。启用前请确保理解风险并会仔细检查所有修改。" diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 9c682569fc..accc9a8a9a 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -333,6 +333,25 @@ }, "contextManagement": { "description": "控制 AI 上下文視窗中要包含哪些資訊,會影響 token 用量和回應品質", + "autoCondenseContextPercent": { + "label": "觸發智慧上下文壓縮的閾值", + "description": "當上下文視窗達到此閾值時,Roo 將自動壓縮它。" + }, + "condensingApiConfiguration": { + "label": "上下文壓縮的API配置", + "description": "選擇用於上下文壓縮操作的API配置。留空則使用當前活動的配置。", + "useCurrentConfig": "使用當前配置" + }, + "customCondensingPrompt": { + "label": "自訂上下文壓縮提示", + "description": "自訂用於上下文壓縮的系統提示。留空則使用預設提示。", + "placeholder": "請在此輸入您的自訂上下文壓縮提示...\n\n您可以參考預設提示的結構:\n- 先前對話\n- 目前工作\n- 主要技術概念\n- 相關檔案與程式碼\n- 問題解決\n- 未完成的任務與後續步驟", + "reset": "重設為預設值", + "hint": "留空 = 使用預設提示" + }, + "autoCondenseContext": { + "name": "自動觸發智慧上下文壓縮" + }, "openTabs": { "label": "開啟分頁的上下文限制", "description": "上下文中最多包含多少個 VS Code 開啟的分頁。數值越高提供的上下文越多,但 token 用量也會增加。" @@ -430,26 +449,6 @@ } }, "experimental": { - "condensingApiConfiguration": { - "label": "API Configuration for Context Condensing", - "description": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.", - "useCurrentConfig": "Default" - }, - "customCondensingPrompt": { - "label": "自訂上下文壓縮提示", - "description": "自訂用於上下文壓縮的系統提示。留空則使用預設提示。", - "placeholder": "請在此輸入您的自訂上下文壓縮提示...\n\n您可以參考預設提示的結構:\n- 先前對話\n- 目前工作\n- 主要技術概念\n- 相關檔案與程式碼\n- 問題解決\n- 未完成的任務與後續步驟", - "reset": "重設為預設值", - "hint": "Empty = use default prompt" - }, - "autoCondenseContextPercent": { - "label": "觸發智慧上下文壓縮的閾值", - "description": "當上下文視窗達到此閾值時,Roo 將自動壓縮它。" - }, - "AUTO_CONDENSE_CONTEXT": { - "name": "自動觸發智慧上下文壓縮", - "description": "智慧上下文壓縮使用 LLM 呼叫來摘要過去的對話,在工作的上下文視窗達到預設閾值時進行,而非在上下文填滿時捨棄舊訊息。" - }, "DIFF_STRATEGY_UNIFIED": { "name": "使用實驗性統一差異比對策略", "description": "啟用實驗性的統一差異比對策略。此策略可能減少因模型錯誤而導致的重試次數,但也可能導致意外行為或錯誤的編輯。請務必了解風險,並願意仔細檢查所有變更後再啟用。" From 34fc431f9c61165e44b5d59335ce4c56f92903e3 Mon Sep 17 00:00:00 2001 From: Canyon Robins Date: Wed, 28 May 2025 16:06:56 -0700 Subject: [PATCH 05/10] fixes --- .../settings/ContextManagementSettings.tsx | 6 +- .../ContextManagementSettings.test.tsx | 61 ++++++++++++------- 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/webview-ui/src/components/settings/ContextManagementSettings.tsx b/webview-ui/src/components/settings/ContextManagementSettings.tsx index 5d5e5f45fe..dc6ff3744b 100644 --- a/webview-ui/src/components/settings/ContextManagementSettings.tsx +++ b/webview-ui/src/components/settings/ContextManagementSettings.tsx @@ -210,6 +210,7 @@ export const ContextManagementSettings = ({ onValueChange={([value]) => setCachedStateField("autoCondenseContextPercent", value) } + data-testid="auto-condense-percent-slider" /> {autoCondenseContextPercent}%
@@ -237,7 +238,8 @@ export const ContextManagementSettings = ({ type: "condensingApiConfigId", text: newConfigId, }) - }}> + }} + data-testid="condensing-api-config-select"> { const value = (e.target as HTMLTextAreaElement).value setCachedStateField("customCondensingPrompt", value) @@ -289,6 +292,7 @@ export const ContextManagementSettings = ({