From 6d4dc1a6541ea228b0a4530930935fef524d548e Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Mon, 16 Jun 2025 12:23:58 -0600 Subject: [PATCH] Revert "feat: add truncate file URIs opt-in setting" This reverts commit 9409490cf7bf62f0259eb0b4bedea1fb07c74893. --- packages/types/src/global-settings.ts | 2 -- src/core/webview/webviewMessageHandler.ts | 4 ---- src/shared/WebviewMessage.ts | 1 - .../settings/ContextManagementSettings.tsx | 17 ----------------- .../src/components/settings/SettingsView.tsx | 3 --- webview-ui/src/i18n/locales/en/settings.json | 4 ---- 6 files changed, 31 deletions(-) diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index 1dbec0a7ca..e0eeb70a33 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -68,7 +68,6 @@ export const globalSettingsSchema = z.object({ maxWorkspaceFiles: z.number().optional(), showRooIgnoredFiles: z.boolean().optional(), maxReadFileLine: z.number().optional(), - truncateFileUris: z.boolean().optional(), terminalOutputLineLimit: z.number().optional(), terminalShellIntegrationTimeout: z.number().optional(), @@ -155,7 +154,6 @@ export const GLOBAL_SETTINGS_KEYS = keysOf()([ "maxWorkspaceFiles", "showRooIgnoredFiles", "maxReadFileLine", - "truncateFileUris", "terminalOutputLineLimit", "terminalShellIntegrationTimeout", diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index 70e22b922a..6568b4aaee 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -1001,10 +1001,6 @@ export const webviewMessageHandler = async ( await updateGlobalState("maxReadFileLine", message.value) await provider.postStateToWebview() break - case "truncateFileUris": - await updateGlobalState("truncateFileUris", message.bool ?? false) - await provider.postStateToWebview() - break case "maxConcurrentFileReads": const valueToSave = message.value // Capture the value intended for saving await updateGlobalState("maxConcurrentFileReads", valueToSave) diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 3b70ebb716..d27b931f10 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -137,7 +137,6 @@ export interface WebviewMessage { | "remoteBrowserEnabled" | "language" | "maxReadFileLine" - | "truncateFileUris" | "maxConcurrentFileReads" | "searchFiles" | "toggleApiConfigPin" diff --git a/webview-ui/src/components/settings/ContextManagementSettings.tsx b/webview-ui/src/components/settings/ContextManagementSettings.tsx index 847871865b..6b558bdfbd 100644 --- a/webview-ui/src/components/settings/ContextManagementSettings.tsx +++ b/webview-ui/src/components/settings/ContextManagementSettings.tsx @@ -61,7 +61,6 @@ type ContextManagementSettingsProps = HTMLAttributes & { maxWorkspaceFiles: number showRooIgnoredFiles?: boolean maxReadFileLine?: number - truncateFileUris?: boolean setCachedStateField: SetCachedStateField< | "autoCondenseContext" | "autoCondenseContextPercent" @@ -71,7 +70,6 @@ type ContextManagementSettingsProps = HTMLAttributes & { | "maxWorkspaceFiles" | "showRooIgnoredFiles" | "maxReadFileLine" - | "truncateFileUris" > } @@ -86,7 +84,6 @@ export const ContextManagementSettings = ({ showRooIgnoredFiles, setCachedStateField, maxReadFileLine, - truncateFileUris, className, ...props }: ContextManagementSettingsProps) => { @@ -188,20 +185,6 @@ export const ContextManagementSettings = ({ {t("settings:contextManagement.maxReadFile.description")} - -
- setCachedStateField("truncateFileUris", e.target.checked)} - data-testid="truncate-file-uris-checkbox"> - - -
- {t("settings:contextManagement.truncateFileUris.description")} -
-
diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 4af025a727..d3d6e89dad 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -164,7 +164,6 @@ const SettingsView = forwardRef(({ onDone, t showRooIgnoredFiles, remoteBrowserEnabled, maxReadFileLine, - truncateFileUris, terminalCompressProgressBar, maxConcurrentFileReads, condensingApiConfigId, @@ -291,7 +290,6 @@ const SettingsView = forwardRef(({ onDone, t vscode.postMessage({ type: "maxWorkspaceFiles", value: maxWorkspaceFiles ?? 200 }) vscode.postMessage({ type: "showRooIgnoredFiles", bool: showRooIgnoredFiles }) vscode.postMessage({ type: "maxReadFileLine", value: maxReadFileLine ?? -1 }) - vscode.postMessage({ type: "truncateFileUris", bool: truncateFileUris }) vscode.postMessage({ type: "maxConcurrentFileReads", value: cachedState.maxConcurrentFileReads ?? 15 }) vscode.postMessage({ type: "currentApiConfigName", text: currentApiConfigName }) vscode.postMessage({ type: "updateExperimental", values: experiments }) @@ -629,7 +627,6 @@ const SettingsView = forwardRef(({ onDone, t maxWorkspaceFiles={maxWorkspaceFiles ?? 200} showRooIgnoredFiles={showRooIgnoredFiles} maxReadFileLine={maxReadFileLine} - truncateFileUris={truncateFileUris} setCachedStateField={setCachedStateField} /> )} diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 7af3073ac1..37a22bdca5 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -389,10 +389,6 @@ "description": "Roo reads this number of lines when the model omits start/end values. If this number is less than the file's total, Roo generates a line number index of code definitions. Special cases: -1 instructs Roo to read the entire file (without indexing), and 0 instructs it to read no lines and provides line indexes only for minimal context. Lower values minimize initial context usage, enabling precise subsequent line-range reads. Explicit start/end requests are not limited by this setting.", "lines": "lines", "always_full_read": "Always read entire file" - }, - "truncateFileUris": { - "label": "Truncate long file URIs", - "description": "When enabled, long file paths in the context window will be truncated to save tokens. The full path is shown on hover." } }, "terminal": {