Răsfoiți Sursa

fix: move context condensing prompt to Prompts section (#4924) (#5279)

* feat: move context condensing prompt from context to prompts page

* fix: remove unused imports after lint fixes
SannidhyaSah 5 luni în urmă
părinte
comite
de13d8a5cf

+ 5 - 0
src/core/webview/webviewMessageHandler.ts

@@ -1282,6 +1282,11 @@ export const webviewMessageHandler = async (
 			await provider.postStateToWebview()
 			break
 		case "updateCondensingPrompt":
+			// Store the condensing prompt in customSupportPrompts["CONDENSE"] instead of customCondensingPrompt
+			const currentSupportPrompts = getGlobalState("customSupportPrompts") ?? {}
+			const updatedSupportPrompts = { ...currentSupportPrompts, CONDENSE: message.text }
+			await updateGlobalState("customSupportPrompts", updatedSupportPrompts)
+			// Also update the old field for backward compatibility during migration
 			await updateGlobalState("customCondensingPrompt", message.text)
 			await provider.postStateToWebview()
 			break

+ 40 - 0
src/shared/support-prompt.ts

@@ -35,6 +35,7 @@ interface SupportPromptConfig {
 
 type SupportPromptType =
 	| "ENHANCE"
+	| "CONDENSE"
 	| "EXPLAIN"
 	| "FIX"
 	| "IMPROVE"
@@ -49,6 +50,45 @@ const supportPromptConfigs: Record<SupportPromptType, SupportPromptConfig> = {
 		template: `Generate an enhanced version of this prompt (reply with only the enhanced prompt - no conversation, explanations, lead-in, bullet points, placeholders, or surrounding quotes):
 
 \${userInput}`,
+	},
+	CONDENSE: {
+		template: `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.`,
 	},
 	EXPLAIN: {
 		template: `Explain the following code from file path \${filePath}:\${startLine}-\${endLine}

+ 2 - 133
webview-ui/src/components/settings/ContextManagementSettings.tsx

@@ -1,62 +1,20 @@
 import { HTMLAttributes } from "react"
 import React from "react"
 import { useAppTranslation } from "@/i18n/TranslationContext"
-import { VSCodeCheckbox, VSCodeTextArea } from "@vscode/webview-ui-toolkit/react"
+import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
 import { Database, FoldVertical } from "lucide-react"
 
 import { cn } from "@/lib/utils"
-import { Button, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider } from "@/components/ui"
+import { 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<HTMLDivElement> & {
 	autoCondenseContext: boolean
 	autoCondenseContextPercent: number
-	condensingApiConfigId?: string
-	customCondensingPrompt?: string
 	listApiConfigMeta: any[]
 	maxOpenTabsContext: number
 	maxWorkspaceFiles: number
@@ -67,8 +25,6 @@ type ContextManagementSettingsProps = HTMLAttributes<HTMLDivElement> & {
 	setCachedStateField: SetCachedStateField<
 		| "autoCondenseContext"
 		| "autoCondenseContextPercent"
-		| "condensingApiConfigId"
-		| "customCondensingPrompt"
 		| "maxOpenTabsContext"
 		| "maxWorkspaceFiles"
 		| "showRooIgnoredFiles"
@@ -81,8 +37,6 @@ type ContextManagementSettingsProps = HTMLAttributes<HTMLDivElement> & {
 export const ContextManagementSettings = ({
 	autoCondenseContext,
 	autoCondenseContextPercent,
-	condensingApiConfigId,
-	customCondensingPrompt,
 	listApiConfigMeta,
 	maxOpenTabsContext,
 	maxWorkspaceFiles,
@@ -321,91 +275,6 @@ export const ContextManagementSettings = ({
 									: t("settings:contextManagement.condensingThreshold.profileDescription")}
 							</div>
 						</div>
-
-						{/* API Configuration Selection */}
-						<div>
-							<div className="flex items-center gap-4 font-bold">
-								<span className="codicon codicon-settings-gear" />
-								<div>{t("settings:contextManagement.condensingApiConfiguration.label")}</div>
-							</div>
-							<div>
-								<div className="text-[13px] text-vscode-descriptionForeground mb-2">
-									{t("settings:contextManagement.condensingApiConfiguration.description")}
-								</div>
-								<Select
-									value={condensingApiConfigId || "-"}
-									onValueChange={(value) => {
-										const newConfigId = value === "-" ? "" : value
-										setCachedStateField("condensingApiConfigId", newConfigId)
-										vscode.postMessage({
-											type: "condensingApiConfigId",
-											text: newConfigId,
-										})
-									}}
-									data-testid="condensing-api-config-select">
-									<SelectTrigger className="w-full">
-										<SelectValue
-											placeholder={t(
-												"settings:contextManagement.condensingApiConfiguration.useCurrentConfig",
-											)}
-										/>
-									</SelectTrigger>
-									<SelectContent>
-										<SelectItem value="-">
-											{t(
-												"settings:contextManagement.condensingApiConfiguration.useCurrentConfig",
-											)}
-										</SelectItem>
-										{(listApiConfigMeta || []).map((config) => (
-											<SelectItem key={config.id} value={config.id}>
-												{config.name}
-											</SelectItem>
-										))}
-									</SelectContent>
-								</Select>
-							</div>
-						</div>
-
-						{/* Custom Prompt Section */}
-						<div>
-							<div className="flex items-center gap-4 font-bold">
-								<span className="codicon codicon-edit" />
-								<div>{t("settings:contextManagement.customCondensingPrompt.label")}</div>
-							</div>
-							<div>
-								<div className="text-[13px] text-vscode-descriptionForeground mb-2">
-									{t("settings:contextManagement.customCondensingPrompt.description")}
-								</div>
-								<VSCodeTextArea
-									resize="vertical"
-									value={customCondensingPrompt || SUMMARY_PROMPT}
-									onChange={(e) => {
-										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"
-								/>
-								<div className="mt-2">
-									<Button
-										variant="secondary"
-										size="sm"
-										onClick={() => {
-											setCachedStateField("customCondensingPrompt", SUMMARY_PROMPT)
-											vscode.postMessage({
-												type: "updateCondensingPrompt",
-												text: SUMMARY_PROMPT,
-											})
-										}}>
-										{t("settings:contextManagement.customCondensingPrompt.reset")}
-									</Button>
-								</div>
-							</div>
-						</div>
 					</div>
 				)}
 			</Section>

+ 90 - 35
webview-ui/src/components/settings/PromptsSettings.tsx

@@ -26,7 +26,15 @@ interface PromptsSettingsProps {
 
 const PromptsSettings = ({ customSupportPrompts, setCustomSupportPrompts }: PromptsSettingsProps) => {
 	const { t } = useAppTranslation()
-	const { listApiConfigMeta, enhancementApiConfigId, setEnhancementApiConfigId } = useExtensionState()
+	const {
+		listApiConfigMeta,
+		enhancementApiConfigId,
+		setEnhancementApiConfigId,
+		condensingApiConfigId,
+		setCondensingApiConfigId,
+		customCondensingPrompt,
+		setCustomCondensingPrompt,
+	} = useExtensionState()
 
 	const [testPrompt, setTestPrompt] = useState("")
 	const [isEnhancing, setIsEnhancing] = useState(false)
@@ -48,17 +56,36 @@ const PromptsSettings = ({ customSupportPrompts, setCustomSupportPrompts }: Prom
 	}, [])
 
 	const updateSupportPrompt = (type: SupportPromptType, value: string | undefined) => {
-		const updatedPrompts = { ...customSupportPrompts, [type]: value }
-		setCustomSupportPrompts(updatedPrompts)
+		if (type === "CONDENSE") {
+			setCustomCondensingPrompt(value || supportPrompt.default.CONDENSE)
+			vscode.postMessage({
+				type: "updateCondensingPrompt",
+				text: value || supportPrompt.default.CONDENSE,
+			})
+		} else {
+			const updatedPrompts = { ...customSupportPrompts, [type]: value }
+			setCustomSupportPrompts(updatedPrompts)
+		}
 	}
 
 	const handleSupportReset = (type: SupportPromptType) => {
-		const updatedPrompts = { ...customSupportPrompts }
-		delete updatedPrompts[type]
-		setCustomSupportPrompts(updatedPrompts)
+		if (type === "CONDENSE") {
+			setCustomCondensingPrompt(supportPrompt.default.CONDENSE)
+			vscode.postMessage({
+				type: "updateCondensingPrompt",
+				text: supportPrompt.default.CONDENSE,
+			})
+		} else {
+			const updatedPrompts = { ...customSupportPrompts }
+			delete updatedPrompts[type]
+			setCustomSupportPrompts(updatedPrompts)
+		}
 	}
 
 	const getSupportPromptValue = (type: SupportPromptType): string => {
+		if (type === "CONDENSE") {
+			return customCondensingPrompt || supportPrompt.default.CONDENSE
+		}
 		return supportPrompt.get(customSupportPrompts, type)
 	}
 
@@ -129,29 +156,50 @@ const PromptsSettings = ({ customSupportPrompts, setCustomSupportPrompts }: Prom
 						className="w-full"
 					/>
 
-					{activeSupportOption === "ENHANCE" && (
+					{(activeSupportOption === "ENHANCE" || activeSupportOption === "CONDENSE") && (
 						<div className="mt-4 flex flex-col gap-3 pl-3 border-l-2 border-vscode-button-background">
 							<div>
 								<label className="block font-medium mb-1">
-									{t("prompts:supportPrompts.enhance.apiConfiguration")}
+									{activeSupportOption === "ENHANCE"
+										? t("prompts:supportPrompts.enhance.apiConfiguration")
+										: t("prompts:supportPrompts.condense.apiConfiguration")}
 								</label>
 								<Select
-									value={enhancementApiConfigId || "-"}
+									value={
+										activeSupportOption === "ENHANCE"
+											? enhancementApiConfigId || "-"
+											: condensingApiConfigId || "-"
+									}
 									onValueChange={(value) => {
-										setEnhancementApiConfigId(value === "-" ? "" : value)
-										vscode.postMessage({
-											type: "enhancementApiConfigId",
-											text: value,
-										})
+										const newConfigId = value === "-" ? "" : value
+										if (activeSupportOption === "ENHANCE") {
+											setEnhancementApiConfigId(newConfigId)
+											vscode.postMessage({
+												type: "enhancementApiConfigId",
+												text: value,
+											})
+										} else {
+											setCondensingApiConfigId(newConfigId)
+											vscode.postMessage({
+												type: "condensingApiConfigId",
+												text: newConfigId,
+											})
+										}
 									}}>
 									<SelectTrigger data-testid="api-config-select" className="w-full">
 										<SelectValue
-											placeholder={t("prompts:supportPrompts.enhance.useCurrentConfig")}
+											placeholder={
+												activeSupportOption === "ENHANCE"
+													? t("prompts:supportPrompts.enhance.useCurrentConfig")
+													: t("prompts:supportPrompts.condense.useCurrentConfig")
+											}
 										/>
 									</SelectTrigger>
 									<SelectContent>
 										<SelectItem value="-">
-											{t("prompts:supportPrompts.enhance.useCurrentConfig")}
+											{activeSupportOption === "ENHANCE"
+												? t("prompts:supportPrompts.enhance.useCurrentConfig")
+												: t("prompts:supportPrompts.condense.useCurrentConfig")}
 										</SelectItem>
 										{(listApiConfigMeta || []).map((config) => (
 											<SelectItem
@@ -164,29 +212,36 @@ const PromptsSettings = ({ customSupportPrompts, setCustomSupportPrompts }: Prom
 									</SelectContent>
 								</Select>
 								<div className="text-sm text-vscode-descriptionForeground mt-1">
-									{t("prompts:supportPrompts.enhance.apiConfigDescription")}
+									{activeSupportOption === "ENHANCE"
+										? t("prompts:supportPrompts.enhance.apiConfigDescription")
+										: t("prompts:supportPrompts.condense.apiConfigDescription")}
 								</div>
 							</div>
 
-							<div>
-								<label className="block font-medium mb-1">
-									{t("prompts:supportPrompts.enhance.testEnhancement")}
-								</label>
-								<VSCodeTextArea
-									resize="vertical"
-									value={testPrompt}
-									onChange={(e) => setTestPrompt((e.target as HTMLTextAreaElement).value)}
-									placeholder={t("prompts:supportPrompts.enhance.testPromptPlaceholder")}
-									rows={3}
-									className="w-full"
-									data-testid="test-prompt-textarea"
-								/>
-								<div className="mt-2 flex justify-start items-center gap-2">
-									<Button variant="default" onClick={handleTestEnhancement} disabled={isEnhancing}>
-										{t("prompts:supportPrompts.enhance.previewButton")}
-									</Button>
+							{activeSupportOption === "ENHANCE" && (
+								<div>
+									<label className="block font-medium mb-1">
+										{t("prompts:supportPrompts.enhance.testEnhancement")}
+									</label>
+									<VSCodeTextArea
+										resize="vertical"
+										value={testPrompt}
+										onChange={(e) => setTestPrompt((e.target as HTMLTextAreaElement).value)}
+										placeholder={t("prompts:supportPrompts.enhance.testPromptPlaceholder")}
+										rows={3}
+										className="w-full"
+										data-testid="test-prompt-textarea"
+									/>
+									<div className="mt-2 flex justify-start items-center gap-2">
+										<Button
+											variant="default"
+											onClick={handleTestEnhancement}
+											disabled={isEnhancing}>
+											{t("prompts:supportPrompts.enhance.previewButton")}
+										</Button>
+									</div>
 								</div>
-							</div>
+							)}
 						</div>
 					)}
 				</div>

+ 0 - 2
webview-ui/src/components/settings/SettingsView.tsx

@@ -659,8 +659,6 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
 						<ContextManagementSettings
 							autoCondenseContext={autoCondenseContext}
 							autoCondenseContextPercent={autoCondenseContextPercent}
-							condensingApiConfigId={condensingApiConfigId}
-							customCondensingPrompt={customCondensingPrompt}
 							listApiConfigMeta={listApiConfigMeta ?? []}
 							maxOpenTabsContext={maxOpenTabsContext}
 							maxWorkspaceFiles={maxWorkspaceFiles ?? 200}

+ 8 - 132
webview-ui/src/components/settings/__tests__/ContextManagementSettings.spec.tsx

@@ -10,7 +10,6 @@ vitest.mock("@/i18n/TranslationContext", () => ({
 }))
 
 // Mock vscode utilities - this is necessary since we're not in a VSCode environment
-import { vscode } from "@/utils/vscode"
 
 vitest.mock("@/utils/vscode", () => ({
 	vscode: {
@@ -169,8 +168,6 @@ describe("ContextManagementSettings", () => {
 			...defaultProps,
 			autoCondenseContext: true,
 			autoCondenseContextPercent: 75,
-			condensingApiConfigId: "test-config",
-			customCondensingPrompt: "Test prompt",
 		}
 		render(<ContextManagementSettings {...propsWithAutoCondense} />)
 
@@ -182,13 +179,9 @@ describe("ContextManagementSettings", () => {
 		const slider = screen.getByTestId("condense-threshold-slider")
 		expect(slider).toBeInTheDocument()
 
-		// Should render both select dropdowns (profile and API config)
+		// Should render the profile select dropdown
 		const selects = screen.getAllByRole("combobox")
-		expect(selects).toHaveLength(2)
-
-		// Should render the custom prompt textarea
-		const textarea = screen.getByRole("textbox")
-		expect(textarea).toBeInTheDocument()
+		expect(selects).toHaveLength(1)
 	})
 
 	describe("Auto Condense Context functionality", () => {
@@ -196,8 +189,6 @@ describe("ContextManagementSettings", () => {
 			...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" },
@@ -217,14 +208,13 @@ describe("ContextManagementSettings", () => {
 			expect(mockSetCachedStateField).toHaveBeenCalledWith("autoCondenseContext", false)
 		})
 
-		it("shows additional settings when auto condense is enabled", () => {
+		it("shows threshold settings when auto condense is enabled", () => {
 			render(<ContextManagementSettings {...autoCondenseProps} />)
 
-			// Additional settings should be visible
+			// Threshold settings should be visible
 			expect(screen.getByTestId("condense-threshold-slider")).toBeInTheDocument()
-			// Two comboboxes: one for profile selection, one for API config
-			expect(screen.getAllByRole("combobox")).toHaveLength(2)
-			expect(screen.getByRole("textbox")).toBeInTheDocument()
+			// One combobox for profile selection
+			expect(screen.getAllByRole("combobox")).toHaveLength(1)
 		})
 
 		it("updates auto condense context percent", () => {
@@ -246,112 +236,6 @@ describe("ContextManagementSettings", () => {
 			render(<ContextManagementSettings {...autoCondenseProps} />)
 			expect(screen.getByText("75%")).toBeInTheDocument()
 		})
-
-		it("updates condensing API configuration", () => {
-			const mockSetCachedStateField = vitest.fn()
-			const mockPostMessage = vitest.fn()
-			const postMessageSpy = vitest.spyOn(vscode, "postMessage")
-			postMessageSpy.mockImplementation(mockPostMessage)
-
-			const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField }
-			render(<ContextManagementSettings {...props} />)
-
-			// Get the second combobox (API config select)
-			const selects = screen.getAllByRole("combobox")
-			const apiSelect = selects[1]
-			fireEvent.click(apiSelect)
-
-			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 = vitest.fn()
-			const mockPostMessage = vitest.fn()
-			const postMessageSpy = vitest.spyOn(vscode, "postMessage")
-			postMessageSpy.mockImplementation(mockPostMessage)
-
-			const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField }
-			render(<ContextManagementSettings {...props} />)
-
-			// Test selecting default config - get the second combobox (API config)
-			const selects = screen.getAllByRole("combobox")
-			const apiSelect = selects[1]
-			fireEvent.click(apiSelect)
-			const defaultOption = screen.getByText(
-				"settings:contextManagement.condensingApiConfiguration.useCurrentConfig",
-			)
-			fireEvent.click(defaultOption)
-
-			expect(mockSetCachedStateField).toHaveBeenCalledWith("condensingApiConfigId", "")
-			expect(mockPostMessage).toHaveBeenCalledWith({
-				type: "condensingApiConfigId",
-				text: "",
-			})
-		})
-
-		it("updates custom condensing prompt", () => {
-			const mockSetCachedStateField = vitest.fn()
-			const mockPostMessage = vitest.fn()
-			const postMessageSpy = vitest.spyOn(vscode, "postMessage")
-			postMessageSpy.mockImplementation(mockPostMessage)
-
-			const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField }
-			render(<ContextManagementSettings {...props} />)
-
-			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 = vitest.fn()
-			const mockPostMessage = vitest.fn()
-			const postMessageSpy = vitest.spyOn(vscode, "postMessage")
-			postMessageSpy.mockImplementation(mockPostMessage)
-
-			const props = { ...autoCondenseProps, setCachedStateField: mockSetCachedStateField }
-			render(<ContextManagementSettings {...props} />)
-
-			const resetButton = screen.getByRole("button", {
-				name: "settings:contextManagement.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(<ContextManagementSettings {...propsWithoutCustomPrompt} />)
-
-			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", () => {
@@ -427,8 +311,6 @@ describe("ContextManagementSettings", () => {
 				...defaultProps,
 				showRooIgnoredFiles: undefined,
 				maxReadFileLine: undefined,
-				condensingApiConfigId: undefined,
-				customCondensingPrompt: undefined,
 			}
 
 			expect(() => {
@@ -442,21 +324,15 @@ describe("ContextManagementSettings", () => {
 	})
 
 	describe("Conditional rendering", () => {
-		it("does not render auto condense section when autoCondenseContext is false", () => {
+		it("does not render threshold settings when autoCondenseContext is false", () => {
 			const propsWithoutAutoCondense = {
 				...defaultProps,
 				autoCondenseContext: false,
 			}
 			render(<ContextManagementSettings {...propsWithoutAutoCondense} />)
 
-			// When auto condense is false, all condensing-related UI should not be visible
+			// When auto condense is false, threshold slider should not be visible
 			expect(screen.queryByTestId("condense-threshold-slider")).not.toBeInTheDocument()
-			expect(
-				screen.queryByText("settings:contextManagement.condensingApiConfiguration.label"),
-			).not.toBeInTheDocument()
-			expect(
-				screen.queryByText("settings:contextManagement.customCondensingPrompt.label"),
-			).not.toBeInTheDocument()
 		})
 
 		it("renders max read file controls with default value when maxReadFileLine is undefined", () => {

+ 10 - 0
webview-ui/src/components/settings/__tests__/SettingsView.spec.tsx

@@ -58,6 +58,16 @@ vi.mock("@vscode/webview-ui-toolkit/react", () => ({
 		<input type="radio" value={value} checked={checked} onChange={onChange} />
 	),
 	VSCodeRadioGroup: ({ children, onChange }: any) => <div onChange={onChange}>{children}</div>,
+	VSCodeTextArea: ({ value, onChange, rows, className, "data-testid": dataTestId }: any) => (
+		<textarea
+			value={value}
+			onChange={onChange}
+			rows={rows}
+			className={className}
+			data-testid={dataTestId}
+			role="textbox"
+		/>
+	),
 }))
 
 vi.mock("../../../components/common/Tab", () => ({

+ 9 - 0
webview-ui/src/i18n/locales/ca/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Previsualització de la millora del prompt",
 			"testEnhancement": "Prova la millora"
 		},
+		"condense": {
+			"apiConfiguration": "Configuració de l'API per a la condensació de context",
+			"apiConfigDescription": "Seleccioneu quina configuració d'API voleu utilitzar per a les operacions de condensació de context. Deixeu-ho sense seleccionar per utilitzar la configuració activa actual.",
+			"useCurrentConfig": "Utilitza la configuració de l'API seleccionada actualment"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Millorar prompt",
 				"description": "Utilitzeu la millora de prompts per obtenir suggeriments o millores personalitzades per a les vostres entrades. Això assegura que Roo entengui la vostra intenció i proporcioni les millors respostes possibles. Disponible a través de la icona ✨ al xat."
 			},
+			"CONDENSE": {
+				"label": "Condensació de context",
+				"description": "Configureu com es condensa el context de la conversa per gestionar els límits de testimonis. Aquest indicador s'utilitza tant per a les operacions de condensació de context manuals com automàtiques."
+			},
 			"EXPLAIN": {
 				"label": "Explicar codi",
 				"description": "Obtingueu explicacions detallades de fragments de codi, funcions o fitxers sencers. Útil per entendre codi complex o aprendre nous patrons. Disponible a les accions de codi (icona de bombeta a l'editor) i al menú contextual de l'editor (clic dret al codi seleccionat)."

+ 9 - 0
webview-ui/src/i18n/locales/de/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Vorschau der Prompt-Verbesserung",
 			"testEnhancement": "Verbesserung testen"
 		},
+		"condense": {
+			"apiConfiguration": "API-Konfiguration für die Kontextverdichtung",
+			"apiConfigDescription": "Wählen Sie aus, welche API-Konfiguration für Kontextverdichtungsvorgänge verwendet werden soll. Lassen Sie die Auswahl leer, um die aktuell aktive Konfiguration zu verwenden.",
+			"useCurrentConfig": "Derzeit ausgewählte API-Konfiguration verwenden"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Prompt verbessern",
 				"description": "Verwenden Sie die Prompt-Verbesserung, um maßgeschneiderte Vorschläge oder Verbesserungen für Ihre Eingaben zu erhalten. Dies stellt sicher, dass Roo Ihre Absicht versteht und die bestmöglichen Antworten liefert. Verfügbar über das ✨-Symbol im Chat."
 			},
+			"CONDENSE": {
+				"label": "Kontextverdichtung",
+				"description": "Konfigurieren Sie, wie der Konversationskontext verdichtet wird, um Token-Limits zu verwalten. Dieser Prompt wird sowohl für manuelle als auch für automatische Kontextverdichtungsvorgänge verwendet."
+			},
 			"EXPLAIN": {
 				"label": "Code erklären",
 				"description": "Erhalten Sie detaillierte Erklärungen zu Code-Schnipseln, Funktionen oder ganzen Dateien. Nützlich zum Verständnis komplexen Codes oder zum Erlernen neuer Muster. Verfügbar in Code-Aktionen (Glühbirnen-Symbol im Editor) und im Kontextmenü des Editors (Rechtsklick auf ausgewählten Code)."

+ 9 - 0
webview-ui/src/i18n/locales/en/prompts.json

@@ -95,11 +95,20 @@
 			"previewButton": "Preview Prompt Enhancement",
 			"testEnhancement": "Test Enhancement"
 		},
+		"condense": {
+			"apiConfiguration": "API Configuration for Context Condensing",
+			"apiConfigDescription": "Select which API configuration to use for context condensing operations. Leave unselected to use the current active configuration.",
+			"useCurrentConfig": "Use currently selected API configuration"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Enhance Prompt",
 				"description": "Use prompt enhancement to get tailored suggestions or improvements for your inputs. This ensures Roo understands your intent and provides the best possible responses. Available via the ✨ icon in chat."
 			},
+			"CONDENSE": {
+				"label": "Context Condensing",
+				"description": "Configure how conversation context is condensed to manage token limits. This prompt is used for both manual and automatic context condensing operations."
+			},
 			"EXPLAIN": {
 				"label": "Explain Code",
 				"description": "Get detailed explanations of code snippets, functions, or entire files. Useful for understanding complex code or learning new patterns. Available in code actions (lightbulb icon in the editor) and the editor context menu (right-click on selected code)."

+ 9 - 0
webview-ui/src/i18n/locales/es/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Vista previa de la mejora de solicitud",
 			"testEnhancement": "Probar mejora"
 		},
+		"condense": {
+			"apiConfiguration": "Configuración de API para la condensación de contexto",
+			"apiConfigDescription": "Selecciona qué configuración de API usar para las operaciones de condensación de contexto. Deja sin seleccionar para usar la configuración activa actual.",
+			"useCurrentConfig": "Usar la configuración de API actualmente seleccionada"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Mejorar solicitud",
 				"description": "Utiliza la mejora de solicitudes para obtener sugerencias o mejoras personalizadas para tus entradas. Esto asegura que Roo entienda tu intención y proporcione las mejores respuestas posibles. Disponible a través del icono ✨ en el chat."
 			},
+			"CONDENSE": {
+				"label": "Condensación de contexto",
+				"description": "Configura cómo se condensa el contexto de la conversación para gestionar los límites de tokens. Este prompt se utiliza tanto para operaciones de condensación de contexto manuales como automáticas."
+			},
 			"EXPLAIN": {
 				"label": "Explicar código",
 				"description": "Obtén explicaciones detalladas de fragmentos de código, funciones o archivos completos. Útil para entender código complejo o aprender nuevos patrones. Disponible en acciones de código (icono de bombilla en el editor) y en el menú contextual del editor (clic derecho en el código seleccionado)."

+ 9 - 0
webview-ui/src/i18n/locales/fr/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Aperçu de l'amélioration du prompt",
 			"testEnhancement": "Tester l'amélioration"
 		},
+		"condense": {
+			"apiConfiguration": "Configuration de l'API pour la condensation du contexte",
+			"apiConfigDescription": "Sélectionnez la configuration d'API à utiliser pour les opérations de condensation de contexte. Laissez non sélectionné pour utiliser la configuration active actuelle.",
+			"useCurrentConfig": "Utiliser la configuration d'API actuellement sélectionnée"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Améliorer le prompt",
 				"description": "Utilisez l'amélioration de prompt pour obtenir des suggestions ou des améliorations personnalisées pour vos entrées. Cela garantit que Roo comprend votre intention et fournit les meilleures réponses possibles. Disponible via l'icône ✨ dans le chat."
 			},
+			"CONDENSE": {
+				"label": "Condensation du contexte",
+				"description": "Configurez la manière dont le contexte de la conversation est condensé pour gérer les limites de jetons. Ce prompt est utilisé pour les opérations de condensation de contexte manuelles et automatiques."
+			},
 			"EXPLAIN": {
 				"label": "Expliquer le code",
 				"description": "Obtenez des explications détaillées sur des extraits de code, des fonctions ou des fichiers entiers. Utile pour comprendre un code complexe ou apprendre de nouveaux modèles. Disponible dans les actions de code (icône d'ampoule dans l'éditeur) et dans le menu contextuel de l'éditeur (clic droit sur le code sélectionné)."

+ 9 - 0
webview-ui/src/i18n/locales/hi/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "प्रॉम्प्ट वृद्धि का पूर्वावलोकन",
 			"testEnhancement": "वृद्धि का परीक्षण करें"
 		},
+		"condense": {
+			"apiConfiguration": "संदर्भ संघनन के लिए API कॉन्फ़िगरेशन",
+			"apiConfigDescription": "संदर्भ संघनन कार्यों के लिए कौन सा API कॉन्फ़िgerेशन उपयोग करना है, इसका चयन करें। वर्तमान सक्रिय कॉन्फ़िगरेशन का उपयोग करने के लिए अचयनित छोड़ दें।",
+			"useCurrentConfig": "वर्तमान में चयनित API कॉन्फ़िगरेशन का उपयोग करें"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "प्रॉम्प्ट बढ़ाएँ",
 				"description": "अपने इनपुट के लिए अनुकूलित सुझाव या सुधार प्राप्त करने के लिए प्रॉम्प्ट वृद्धि का उपयोग करें। यह सुनिश्चित करता है कि Roo आपके इरादे को समझता है और सर्वोत्तम संभव प्रतिक्रियाएँ प्रदान करता है। चैट में ✨ आइकन के माध्यम से उपलब्ध है।"
 			},
+			"CONDENSE": {
+				"label": "संदर्भ संघनन",
+				"description": "टोकन सीमाओं का प्रबंधन करने के लिए बातचीत के संदर्भ को कैसे संघनित किया जाता है, इसे कॉन्फ़iger करें। इस प्रॉम्प्ट का उपयोग मैनुअल और स्वचालित दोनों संदर्भ संघनन संचालन के लिए किया जाता है।"
+			},
 			"EXPLAIN": {
 				"label": "कोड समझाएँ",
 				"description": "कोड स्निपेट, फंक्शन या पूरी फाइलों के विस्तृत स्पष्टीकरण प्राप्त करें। जटिल कोड को समझने या नए पैटर्न सीखने के लिए उपयोगी। कोड कार्रवाइयों (एडिटर में बल्ब आइकन) और एडिटर के कंटेक्स्ट मेनू (चयनित कोड पर राइट-क्लिक) में उपलब्ध है।"

+ 9 - 0
webview-ui/src/i18n/locales/id/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Pratinjau Peningkatan Prompt",
 			"testEnhancement": "Uji Peningkatan"
 		},
+		"condense": {
+			"apiConfiguration": "Konfigurasi API untuk Peringkasan Konteks",
+			"apiConfigDescription": "Pilih konfigurasi API mana yang akan digunakan untuk operasi peringkasan konteks. Biarkan tidak dipilih untuk menggunakan konfigurasi aktif saat ini.",
+			"useCurrentConfig": "Gunakan konfigurasi API yang saat ini dipilih"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Tingkatkan Prompt",
 				"description": "Gunakan peningkatan prompt untuk mendapatkan saran atau perbaikan yang disesuaikan untuk input Anda. Ini memastikan Roo memahami maksud Anda dan memberikan respons terbaik. Tersedia melalui ikon ✨ di chat."
 			},
+			"CONDENSE": {
+				"label": "Peringkasan Konteks",
+				"description": "Konfigurasikan bagaimana konteks percakapan diringkas untuk mengelola batas token. Prompt ini digunakan untuk operasi peringkasan konteks manual dan otomatis."
+			},
 			"EXPLAIN": {
 				"label": "Jelaskan Kode",
 				"description": "Dapatkan penjelasan detail tentang snippet kode, fungsi, atau seluruh file. Berguna untuk memahami kode kompleks atau mempelajari pola baru. Tersedia di code actions (ikon lightbulb di editor) dan menu konteks editor (klik kanan pada kode yang dipilih)."

+ 9 - 0
webview-ui/src/i18n/locales/it/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Anteprima miglioramento prompt",
 			"testEnhancement": "Testa miglioramento"
 		},
+		"condense": {
+			"apiConfiguration": "Configurazione API per la condensazione del contesto",
+			"apiConfigDescription": "Seleziona quale configurazione API utilizzare per le operazioni di condensazione del contesto. Lascia deselezionato per utilizzare la configurazione attiva corrente.",
+			"useCurrentConfig": "Usa la configurazione API currently selezionata"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Migliora prompt",
 				"description": "Utilizza il miglioramento dei prompt per ottenere suggerimenti o miglioramenti personalizzati per i tuoi input. Questo assicura che Roo comprenda la tua intenzione e fornisca le migliori risposte possibili. Disponibile tramite l'icona ✨ nella chat."
 			},
+			"CONDENSE": {
+				"label": "Condensazione del contesto",
+				"description": "Configura come viene condensato il contesto della conversazione per gestire i limiti dei token. Questo prompt viene utilizzato sia per le operazioni di condensazione del contesto manuali che automatiche."
+			},
 			"EXPLAIN": {
 				"label": "Spiega codice",
 				"description": "Ottieni spiegazioni dettagliate di frammenti di codice, funzioni o file interi. Utile per comprendere codice complesso o imparare nuovi pattern. Disponibile nelle azioni di codice (icona della lampadina nell'editor) e nel menu contestuale dell'editor (clic destro sul codice selezionato)."

+ 9 - 0
webview-ui/src/i18n/locales/ja/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "プロンプト強化のプレビュー",
 			"testEnhancement": "強化をテスト"
 		},
+		"condense": {
+			"apiConfiguration": "コンテキスト圧縮のためのAPI構成",
+			"apiConfigDescription": "コンテキスト圧縮操作に使用するAPI構成を選択します。現在アクティブな構成を使用するには、選択しないままにします。",
+			"useCurrentConfig": "現在選択されているAPI構成を使用する"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "プロンプトを強化",
 				"description": "プロンプト強化を使用して、入力に合わせたカスタマイズされた提案や改善を得ることができます。これにより、Rooがあなたの意図を理解し、最適な回答を提供できます。チャットの✨アイコンから利用できます。"
 			},
+			"CONDENSE": {
+				"label": "コンテキスト圧縮",
+				"description": "トークン制限を管理するために会話のコンテキストを圧縮する方法を設定します。このプロンプトは、手動および自動のコンテキスト圧縮操作の両方に使用されます。"
+			},
 			"EXPLAIN": {
 				"label": "コードを説明",
 				"description": "コードスニペット、関数、またはファイル全体の詳細な説明を得ることができます。複雑なコードを理解したり、新しいパターンを学んだりするのに役立ちます。コードアクション(エディタの電球アイコン)やエディタのコンテキストメニュー(選択したコードで右クリック)から利用できます。"

+ 9 - 0
webview-ui/src/i18n/locales/ko/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "프롬프트 향상 미리보기",
 			"testEnhancement": "향상 테스트"
 		},
+		"condense": {
+			"apiConfiguration": "컨텍스트 압축을 위한 API 구성",
+			"apiConfigDescription": "컨텍스트 압축 작업에 사용할 API 구성을 선택합니다. 현재 활성 구성을 사용하려면 선택하지 않은 상태로 둡니다.",
+			"useCurrentConfig": "현재 선택된 API 구성 사용"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "프롬프트 향상",
 				"description": "입력에 맞춤화된 제안이나 개선을 얻기 위해 프롬프트 향상을 사용하세요. 이를 통해 Roo가 의도를 이해하고 최상의 응답을 제공할 수 있습니다. 채팅에서 ✨ 아이콘을 통해 이용 가능합니다."
 			},
+			"CONDENSE": {
+				"label": "컨텍스트 압축",
+				"description": "토큰 제한을 관리하기 위해 대화 컨텍스트를 압축하는 방법을 구성합니다. 이 프롬프트는 수동 및 자동 컨텍스트 압축 작업 모두에 사용됩니다."
+			},
 			"EXPLAIN": {
 				"label": "코드 설명",
 				"description": "코드 스니펫, 함수 또는 전체 파일에 대한 상세한 설명을 얻을 수 있습니다. 복잡한 코드를 이해하거나 새로운 패턴을 배우는 데 유용합니다. 코드 액션(에디터의 전구 아이콘)과 에디터 컨텍스트 메뉴(선택한 코드에서 우클릭)에서 이용 가능합니다."

+ 9 - 0
webview-ui/src/i18n/locales/nl/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Voorbeeld promptverbetering",
 			"testEnhancement": "Test verbetering"
 		},
+		"condense": {
+			"apiConfiguration": "API-configuratie voor contextcondensatie",
+			"apiConfigDescription": "Selecteer welke API-configuratie moet worden gebruikt voor contextcondensatiebewerkingen. Laat leeg om de huidige actieve configuratie te gebruiken.",
+			"useCurrentConfig": "Gebruik de momenteel geselecteerde API-configuratie"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Prompt verbeteren",
 				"description": "Gebruik promptverbetering om op maat gemaakte suggesties of verbeteringen voor je invoer te krijgen. Zo begrijpt Roo je intentie en krijg je de best mogelijke antwoorden. Beschikbaar via het ✨-icoon in de chat."
 			},
+			"CONDENSE": {
+				"label": "Contextcondensatie",
+				"description": "Configureer hoe de gesprekscontext wordt gecondenseerd om tokenlimieten te beheren.Deze prompt wordt gebruikt voor zowel handmatige als automatische contextcondensatiebewerkingen."
+			},
 			"EXPLAIN": {
 				"label": "Code uitleggen",
 				"description": "Krijg gedetailleerde uitleg over codefragmenten, functies of hele bestanden. Handig om complexe code te begrijpen of nieuwe patronen te leren. Beschikbaar via codeacties (lampje in de editor) en het contextmenu (rechtsklik op geselecteerde code)."

+ 9 - 0
webview-ui/src/i18n/locales/pl/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Podgląd ulepszenia podpowiedzi",
 			"testEnhancement": "Testuj ulepszenie"
 		},
+		"condense": {
+			"apiConfiguration": "Konfiguracja API do kondensacji kontekstu",
+			"apiConfigDescription": "Wybierz, której konfiguracji API użyć do operacji kondensacji kontekstu. Pozostaw niewybrane, aby użyć bieżącej aktywnej konfiguracji.",
+			"useCurrentConfig": "Użyj aktualnie wybranej konfiguracji API"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Ulepsz podpowiedź",
 				"description": "Użyj ulepszenia podpowiedzi, aby uzyskać dostosowane sugestie lub ulepszenia dla swoich danych wejściowych. Zapewnia to, że Roo rozumie Twoje intencje i dostarcza najlepsze możliwe odpowiedzi. Dostępne za pośrednictwem ikony ✨ w czacie."
 			},
+			"CONDENSE": {
+				"label": "Kondensacja kontekstu",
+				"description": "Skonfiguruj, w jaki sposób kontekst rozmowy jest kondensowany w celu zarządzania limitami tokenów. Ten monit jest używany zarówno do ręcznych, jak i automatycznych operacji kondensacji kontekstu."
+			},
 			"EXPLAIN": {
 				"label": "Wyjaśnij kod",
 				"description": "Uzyskaj szczegółowe wyjaśnienia fragmentów kodu, funkcji lub całych plików. Przydatne do zrozumienia złożonego kodu lub nauki nowych wzorców. Dostępne w akcjach kodu (ikona żarówki w edytorze) i w menu kontekstowym edytor (prawy przycisk myszy na wybranym kodzie)."

+ 9 - 0
webview-ui/src/i18n/locales/pt-BR/prompts.json

@@ -96,11 +96,20 @@
 			"previewButton": "Visualizar aprimoramento do prompt",
 			"testEnhancement": "Testar aprimoramento"
 		},
+		"condense": {
+			"apiConfiguration": "Configuração da API para condensação de contexto",
+			"apiConfigDescription": "Selecione qual configuração de API usar para operações de condensação de contexto. Deixe desmarcado para usar a configuração ativa atual.",
+			"useCurrentConfig": "Usar a configuração de API selecionada no momento"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Aprimorar Prompt",
 				"description": "Use o aprimoramento de prompt para obter sugestões ou melhorias personalizadas para suas entradas. Isso garante que o Roo entenda sua intenção e forneça as melhores respostas possíveis. Disponível através do ícone ✨ no chat."
 			},
+			"CONDENSE": {
+				"label": "Condensação de Contexto",
+				"description": "Configure como o contexto da conversa é condensado para gerenciar os limites de token. Este prompt é usado para operações de condensação de contexto manuais e automáticas."
+			},
 			"EXPLAIN": {
 				"label": "Explicar Código",
 				"description": "Obtenha explicações detalhadas de trechos de código, funções ou arquivos inteiros. Útil para entender código complexo ou aprender novos padrões. Disponível nas ações de código (ícone de lâmpada no editor) e no menu de contexto do editor (clique direito no código selecionado)."

+ 9 - 0
webview-ui/src/i18n/locales/ru/prompts.json

@@ -93,11 +93,20 @@
 			"previewButton": "Просмотреть улучшенный промпт",
 			"testEnhancement": "Тестировать улучшение"
 		},
+		"condense": {
+			"apiConfiguration": "Конфигурация API для сжатия контекста",
+			"apiConfigDescription": "Выберите, какую конфигурацию API использовать для операций сжатия контекста. Оставьте невыбранным, чтобы использовать текущую активную конфигурацию.",
+			"useCurrentConfig": "Использовать текущую выбранную конфигурацию API"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Улучшить промпт",
 				"description": "Используйте улучшение промпта для получения индивидуальных предложений или улучшений ваших запросов. Это гарантирует, что Roo правильно поймет ваш запрос и даст лучший ответ. Доступно через ✨ в чате."
 			},
+			"CONDENSE": {
+				"label": "Сжатие контекста",
+				"description": "Настройте, как сжимается контекст беседы для управления лимитами токенов. Этот запрос используется как для ручных, так и для автоматических операций сжатия контекста."
+			},
 			"EXPLAIN": {
 				"label": "Объяснить код",
 				"description": "Получите подробные объяснения фрагментов кода, функций или целых файлов. Полезно для понимания сложного кода или изучения новых паттернов. Доступно в действиях с кодом (иконка лампочки в редакторе) и в контекстном меню редактора (ПКМ по выделенному коду)."

+ 9 - 0
webview-ui/src/i18n/locales/tr/prompts.json

@@ -93,11 +93,20 @@
 			"previewButton": "Prompt geliştirmesini önizle",
 			"testEnhancement": "Geliştirmeyi test et"
 		},
+		"condense": {
+			"apiConfiguration": "Bağlam Yoğunlaştırma için API Yapılandırması",
+			"apiConfigDescription": "Bağlam yoğunlaştırma işlemleri için hangi API yapılandırmasının kullanılacağını seçin. Geçerli etkin yapılandırmayı kullanmak için seçilmemiş bırakın.",
+			"useCurrentConfig": "Şu anda seçili olan API yapılandırmasını kullan"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Promptu Geliştir",
 				"description": "Girdileriniz için özel öneriler veya iyileştirmeler almak için prompt geliştirmeyi kullanın. Bu, Roo'nun niyetinizi anlamasını ve mümkün olan en iyi yanıtları sağlamasını garanti eder. Sohbetteki ✨ simgesi aracılığıyla kullanılabilir."
 			},
+			"CONDENSE": {
+				"label": "Bağlam Yoğunlaştırma",
+				"description": "Jeton sınırlarını yönetmek için konuşma bağlamının nasıl yoğunlaştırılacağını yapılandırın. Bu istem, hem manuel hem de otomatik bağlam yoğunlaştırma işlemleri için kullanılır."
+			},
 			"EXPLAIN": {
 				"label": "Kodu Açıkla",
 				"description": "Kod parçaları, fonksiyonlar veya tüm dosyalar hakkında ayrıntılı açıklamalar alın. Karmaşık kodu anlamak veya yeni kalıpları öğrenmek için faydalıdır. Kod eylemlerinde (editördeki ampul simgesi) ve editör bağlam menüsünde (seçili koda sağ tıklayın) kullanılabilir."

+ 9 - 0
webview-ui/src/i18n/locales/vi/prompts.json

@@ -93,11 +93,20 @@
 			"previewButton": "Xem trước nâng cao lời nhắc",
 			"testEnhancement": "Kiểm tra cải tiến"
 		},
+		"condense": {
+			"apiConfiguration": "Cấu hình API để cô đọng ngữ cảnh",
+			"apiConfigDescription": "Chọn cấu hình API nào sẽ sử dụng cho các hoạt động cô đọng ngữ cảnh. Để trống để sử dụng cấu hình hiện đang hoạt động.",
+			"useCurrentConfig": "Sử dụng cấu hình API được chọn hiện tại"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "Nâng cao lời nhắc",
 				"description": "Sử dụng nâng cao lời nhắc để nhận đề xuất hoặc cải tiến phù hợp cho đầu vào của bạn. Điều này đảm bảo Roo hiểu ý định của bạn và cung cấp phản hồi tốt nhất có thể. Có sẵn thông qua biểu tượng ✨ trong chat."
 			},
+			"CONDENSE": {
+				"label": "Cô đọng ngữ cảnh",
+				"description": "Định cấu hình cách cô đọng ngữ cảnh cuộc trò chuyện để quản lý giới hạn token. Lời nhắc này được sử dụng cho cả hoạt động cô đọng ngữ cảnh thủ công và tự động."
+			},
 			"EXPLAIN": {
 				"label": "Giải thích mã",
 				"description": "Nhận giải thích chi tiết về đoạn mã, hàm hoặc toàn bộ tệp. Hữu ích để hiểu mã phức tạp hoặc học các mẫu mới. Có sẵn trong hành động mã (biểu tượng bóng đèn trong trình soạn thảo) và menu ngữ cảnh trình soạn thảo (nhấp chuột phải vào mã đã chọn)."

+ 9 - 0
webview-ui/src/i18n/locales/zh-CN/prompts.json

@@ -93,11 +93,20 @@
 			"previewButton": "测试提示词增强",
 			"testEnhancement": "测试增强"
 		},
+		"condense": {
+			"apiConfiguration": "用于上下文压缩的 API 配置",
+			"apiConfigDescription": "选择用于上下文压缩操作的 API 配置。保留未选择状态以使用当前活动的配置。",
+			"useCurrentConfig": "使用当前选中的 API 配置"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "增强提示词",
 				"description": "优化提示获取更好回答(点击✨使用)"
 			},
+			"CONDENSE": {
+				"label": "上下文压缩",
+				"description": "配置如何压缩对话上下文以管理令牌限制。此提示用于手动和自动上下文压缩操作。"
+			},
 			"EXPLAIN": {
 				"label": "解释代码",
 				"description": "解读代码逻辑(支持文件/片段),可在代码操作(编辑器中的灯泡图标)和编辑器上下文菜单(右键点击选中的代码)中使用。"

+ 9 - 0
webview-ui/src/i18n/locales/zh-TW/prompts.json

@@ -93,11 +93,20 @@
 			"previewButton": "預覽提示詞增強",
 			"testEnhancement": "測試增強"
 		},
+		"condense": {
+			"apiConfiguration": "用於上下文壓縮的 API 設定",
+			"apiConfigDescription": "選取用於上下文壓縮作業的 API 設定。保留未選取狀態以使用目前作用中的設定。",
+			"useCurrentConfig": "使用當前選取的 API 設定"
+		},
 		"types": {
 			"ENHANCE": {
 				"label": "增強提示詞",
 				"description": "使用提示詞增強功能取得針對您輸入的客製化建議或改進。這確保 Roo 能理解您的意圖並提供最佳的回應。可透過聊天中的 ✨ 圖示使用。"
 			},
+			"CONDENSE": {
+				"label": "上下文壓縮",
+				"description": "設定如何壓縮對話上下文以管理權杖限制。此提示用於手動和自動上下文壓縮作業。"
+			},
 			"EXPLAIN": {
 				"label": "解釋程式碼",
 				"description": "取得程式碼片段、函式或整個檔案的詳細解釋。有助於理解複雜程式碼或學習新模式。可在程式碼操作(編輯器中的燈泡圖示)和編輯器右鍵選單中使用。"