Revert "feat: add truncate file URIs opt-in setting"

This reverts commit 9409490cf7.
This commit is contained in:
hannesrudolph 2025-06-16 12:23:58 -06:00
parent 9409490cf7
commit 6d4dc1a654
6 changed files with 0 additions and 31 deletions

View file

@ -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<GlobalSettings>()([
"maxWorkspaceFiles",
"showRooIgnoredFiles",
"maxReadFileLine",
"truncateFileUris",
"terminalOutputLineLimit",
"terminalShellIntegrationTimeout",

View file

@ -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)

View file

@ -137,7 +137,6 @@ export interface WebviewMessage {
| "remoteBrowserEnabled"
| "language"
| "maxReadFileLine"
| "truncateFileUris"
| "maxConcurrentFileReads"
| "searchFiles"
| "toggleApiConfigPin"

View file

@ -61,7 +61,6 @@ type ContextManagementSettingsProps = HTMLAttributes<HTMLDivElement> & {
maxWorkspaceFiles: number
showRooIgnoredFiles?: boolean
maxReadFileLine?: number
truncateFileUris?: boolean
setCachedStateField: SetCachedStateField<
| "autoCondenseContext"
| "autoCondenseContextPercent"
@ -71,7 +70,6 @@ type ContextManagementSettingsProps = HTMLAttributes<HTMLDivElement> & {
| "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")}
</div>
</div>
<div>
<VSCodeCheckbox
checked={truncateFileUris}
onChange={(e: any) => setCachedStateField("truncateFileUris", e.target.checked)}
data-testid="truncate-file-uris-checkbox">
<label className="block font-medium mb-1">
{t("settings:contextManagement.truncateFileUris.label")}
</label>
</VSCodeCheckbox>
<div className="text-vscode-descriptionForeground text-sm mt-1">
{t("settings:contextManagement.truncateFileUris.description")}
</div>
</div>
</Section>
<Section>

View file

@ -164,7 +164,6 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
showRooIgnoredFiles,
remoteBrowserEnabled,
maxReadFileLine,
truncateFileUris,
terminalCompressProgressBar,
maxConcurrentFileReads,
condensingApiConfigId,
@ -291,7 +290,6 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ 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<SettingsViewRef, SettingsViewProps>(({ onDone, t
maxWorkspaceFiles={maxWorkspaceFiles ?? 200}
showRooIgnoredFiles={showRooIgnoredFiles}
maxReadFileLine={maxReadFileLine}
truncateFileUris={truncateFileUris}
setCachedStateField={setCachedStateField}
/>
)}

View file

@ -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": {