Skip to content

Commit 2053d27

Browse files
authored
Default to full file reads (#3936)
1 parent e86c0a1 commit 2053d27

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

evals/packages/types/src/roo-code-defaults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const rooCodeDefaults: RooCodeSettings = {
5353
maxOpenTabsContext: 20,
5454
maxWorkspaceFiles: 200,
5555
showRooIgnoredFiles: true,
56-
maxReadFileLine: 500, // -1 to enable full file reading.
56+
maxReadFileLine: -1, // -1 to enable full file reading.
5757

5858
language: "en",
5959
telemetrySetting: "enabled",

src/core/tools/readFileTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function readFileTool(
4949
return
5050
}
5151

52-
const { maxReadFileLine = 500 } = (await cline.providerRef.deref()?.getState()) ?? {}
52+
const { maxReadFileLine = -1 } = (await cline.providerRef.deref()?.getState()) ?? {}
5353
const isFullRead = maxReadFileLine === -1
5454

5555
// Check if we're doing a line range read

src/core/webview/ClineProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
13441344
showRooIgnoredFiles: showRooIgnoredFiles ?? true,
13451345
language: language ?? formatLanguage(vscode.env.language),
13461346
renderContext: this.renderContext,
1347-
maxReadFileLine: maxReadFileLine ?? 500,
1347+
maxReadFileLine: maxReadFileLine ?? -1,
13481348
settingsImportedAt: this.settingsImportedAt,
13491349
terminalCompressProgressBar: terminalCompressProgressBar ?? true,
13501350
hasSystemPromptOverride,
@@ -1451,7 +1451,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
14511451
browserToolEnabled: stateValues.browserToolEnabled ?? true,
14521452
telemetrySetting: stateValues.telemetrySetting || "unset",
14531453
showRooIgnoredFiles: stateValues.showRooIgnoredFiles ?? true,
1454-
maxReadFileLine: stateValues.maxReadFileLine ?? 500,
1454+
maxReadFileLine: stateValues.maxReadFileLine ?? -1,
14551455
historyPreviewCollapsed: stateValues.historyPreviewCollapsed ?? false,
14561456
// Explicitly add condensing settings
14571457
condensingApiConfigId: stateValues.condensingApiConfigId,

webview-ui/src/components/settings/ContextManagementSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const ContextManagementSettings = ({
100100
type="number"
101101
pattern="-?[0-9]*"
102102
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"
103-
value={maxReadFileLine ?? 500}
103+
value={maxReadFileLine ?? -1}
104104
min={-1}
105105
onChange={(e) => {
106106
const newValue = parseInt(e.target.value, 10)

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
283283
vscode.postMessage({ type: "maxOpenTabsContext", value: maxOpenTabsContext })
284284
vscode.postMessage({ type: "maxWorkspaceFiles", value: maxWorkspaceFiles ?? 200 })
285285
vscode.postMessage({ type: "showRooIgnoredFiles", bool: showRooIgnoredFiles })
286-
vscode.postMessage({ type: "maxReadFileLine", value: maxReadFileLine ?? 500 })
286+
vscode.postMessage({ type: "maxReadFileLine", value: maxReadFileLine ?? -1 })
287287
vscode.postMessage({ type: "currentApiConfigName", text: currentApiConfigName })
288288
vscode.postMessage({ type: "updateExperimental", values: experiments })
289289
vscode.postMessage({ type: "alwaysAllowModeSwitch", bool: alwaysAllowModeSwitch })

webview-ui/src/context/ExtensionStateContext.tsx

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

0 commit comments

Comments
 (0)