diff --git a/evals/packages/types/src/roo-code-defaults.ts b/evals/packages/types/src/roo-code-defaults.ts index 326f5d5e89..a06e642fd5 100644 --- a/evals/packages/types/src/roo-code-defaults.ts +++ b/evals/packages/types/src/roo-code-defaults.ts @@ -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", diff --git a/src/core/tools/readFileTool.ts b/src/core/tools/readFileTool.ts index fade9b2d11..67fd4b5e96 100644 --- a/src/core/tools/readFileTool.ts +++ b/src/core/tools/readFileTool.ts @@ -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 diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 7b04ee15c4..80c5596743 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -1344,7 +1344,7 @@ export class ClineProvider extends EventEmitter 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 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, diff --git a/webview-ui/src/components/settings/ContextManagementSettings.tsx b/webview-ui/src/components/settings/ContextManagementSettings.tsx index b2624582f1..d400f941df 100644 --- a/webview-ui/src/components/settings/ContextManagementSettings.tsx +++ b/webview-ui/src/components/settings/ContextManagementSettings.tsx @@ -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) diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 005bd23696..16770a15e2 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -283,7 +283,7 @@ const SettingsView = forwardRef(({ 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 }) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index e35e5e27ff..53629f942e 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -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