Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 93806b7

Browse files
committed
fix: add maxReadFileLine to ExtensionState type for webview compatibility
1 parent eb23efd commit 93806b7

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

packages/types/src/vscode-extension-host.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ export type ExtensionState = Pick<
351351
maxWorkspaceFiles: number // Maximum number of files to include in current working directory details (0-500)
352352
showRooIgnoredFiles: boolean // Whether to show .rooignore'd files in listings
353353
enableSubfolderRules: boolean // Whether to load rules from subdirectories
354+
maxReadFileLine?: number // Maximum line limit for read_file tool (-1 for default)
354355
maxImageFileSize: number // Maximum size of image files to process in MB
355356
maxTotalImageSize: number // Maximum total size for all images in a single read operation in MB
356357

webview-ui/src/context/ExtensionStateContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
241241
showRooIgnoredFiles: true, // Default to showing .rooignore'd files with lock symbol (current behavior).
242242
enableSubfolderRules: false, // Default to disabled - must be enabled to load rules from subdirectories
243243
renderContext: "sidebar",
244+
maxReadFileLine: -1, // Default max line limit for read_file tool (-1 for default)
244245
maxImageFileSize: 5, // Default max image file size in MB
245246
maxTotalImageSize: 20, // Default max total image size in MB
246247
pinnedApiConfigs: {}, // Empty object for pinned API configs

webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ describe("mergeExtensionState", () => {
219219
featureRoomoteControlEnabled: false,
220220
isBrowserSessionActive: false,
221221
checkpointTimeout: DEFAULT_CHECKPOINT_TIMEOUT_SECONDS, // Add the checkpoint timeout property
222+
maxReadFileLine: -1,
222223
}
223224

224225
const prevState: ExtensionState = {

0 commit comments

Comments
 (0)