Default to full file reads (#3936)

This commit is contained in:
Matt Rubens 2025-05-24 15:17:48 -04:00 committed by GitHub
parent e86c0a165d
commit 2053d27d63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 7 additions and 7 deletions

View file

@ -53,7 +53,7 @@ export const rooCodeDefaults: RooCodeSettings = {
maxOpenTabsContext: 20,
maxWorkspaceFiles: 200,
showRooIgnoredFiles: true,
maxReadFileLine: 500, // -1 to enable full file reading.
maxReadFileLine: -1, // -1 to enable full file reading.
language: "en",
telemetrySetting: "enabled",

View file

@ -49,7 +49,7 @@ export async function readFileTool(
return
}
const { maxReadFileLine = 500 } = (await cline.providerRef.deref()?.getState()) ?? {}
const { maxReadFileLine = -1 } = (await cline.providerRef.deref()?.getState()) ?? {}
const isFullRead = maxReadFileLine === -1
// Check if we're doing a line range read

View file

@ -1344,7 +1344,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
showRooIgnoredFiles: showRooIgnoredFiles ?? true,
language: language ?? formatLanguage(vscode.env.language),
renderContext: this.renderContext,
maxReadFileLine: maxReadFileLine ?? 500,
maxReadFileLine: maxReadFileLine ?? -1,
settingsImportedAt: this.settingsImportedAt,
terminalCompressProgressBar: terminalCompressProgressBar ?? true,
hasSystemPromptOverride,
@ -1451,7 +1451,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
browserToolEnabled: stateValues.browserToolEnabled ?? true,
telemetrySetting: stateValues.telemetrySetting || "unset",
showRooIgnoredFiles: stateValues.showRooIgnoredFiles ?? true,
maxReadFileLine: stateValues.maxReadFileLine ?? 500,
maxReadFileLine: stateValues.maxReadFileLine ?? -1,
historyPreviewCollapsed: stateValues.historyPreviewCollapsed ?? false,
// Explicitly add condensing settings
condensingApiConfigId: stateValues.condensingApiConfigId,

View file

@ -100,7 +100,7 @@ export const ContextManagementSettings = ({
type="number"
pattern="-?[0-9]*"
className="w-24 bg-vscode-input-background text-vscode-input-foreground border border-vscode-input-border px-2 py-1 rounded text-right [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none disabled:opacity-50"
value={maxReadFileLine ?? 500}
value={maxReadFileLine ?? -1}
min={-1}
onChange={(e) => {
const newValue = parseInt(e.target.value, 10)

View file

@ -283,7 +283,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
vscode.postMessage({ type: "maxOpenTabsContext", value: maxOpenTabsContext })
vscode.postMessage({ type: "maxWorkspaceFiles", value: maxWorkspaceFiles ?? 200 })
vscode.postMessage({ type: "showRooIgnoredFiles", bool: showRooIgnoredFiles })
vscode.postMessage({ type: "maxReadFileLine", value: maxReadFileLine ?? 500 })
vscode.postMessage({ type: "maxReadFileLine", value: maxReadFileLine ?? -1 })
vscode.postMessage({ type: "currentApiConfigName", text: currentApiConfigName })
vscode.postMessage({ type: "updateExperimental", values: experiments })
vscode.postMessage({ type: "alwaysAllowModeSwitch", bool: alwaysAllowModeSwitch })

View file

@ -177,7 +177,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
telemetrySetting: "unset",
showRooIgnoredFiles: true, // Default to showing .rooignore'd files with lock symbol (current behavior).
renderContext: "sidebar",
maxReadFileLine: 500, // Default max read file line limit
maxReadFileLine: -1, // Default max read file line limit
pinnedApiConfigs: {}, // Empty object for pinned API configs
terminalZshOhMy: false, // Default Oh My Zsh integration setting
terminalZshP10k: false, // Default Powerlevel10k integration setting