mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: remove unused FileEntry.limit from types and parser
The limit parameter was defined in FileEntry but intentionally ignored by ReadFileTool since the line limit is controlled by the maxReadFileLine setting. This removes the unused type field and parsing code to align the types with actual behavior. - Remove limit from FileEntry interface in tool-params.ts - Remove limit parsing from NativeToolCallParser.convertFileEntries() - Remove limit from FileResult interface in ReadFileTool.ts - Update comment to remove obsolete limit mention
This commit is contained in:
parent
d2122e6c9c
commit
e098a86e4b
3 changed files with 1 additions and 12 deletions
|
|
@ -27,8 +27,6 @@ export interface FileEntry {
|
|||
path: string
|
||||
/** 1-indexed line number to start reading from (default: 1) */
|
||||
offset?: number
|
||||
/** Maximum number of lines to return (default: 2000) */
|
||||
limit?: number
|
||||
/** Reading mode: "slice" for simple reading, "indentation" for smart block extraction */
|
||||
mode?: ReadMode
|
||||
/** Configuration for indentation mode */
|
||||
|
|
|
|||
|
|
@ -315,14 +315,6 @@ export class NativeToolCallParser {
|
|||
}
|
||||
}
|
||||
|
||||
// Map limit parameter
|
||||
if (file.limit !== undefined) {
|
||||
const limit = Number(file.limit)
|
||||
if (!isNaN(limit) && limit > 0) {
|
||||
entry.limit = limit
|
||||
}
|
||||
}
|
||||
|
||||
// Map mode parameter
|
||||
if (file.mode === "slice" || file.mode === "indentation") {
|
||||
entry.mode = file.mode
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ interface FileResult {
|
|||
notice?: string
|
||||
// Slice/indentation mode parameters
|
||||
offset?: number
|
||||
limit?: number
|
||||
mode?: ReadMode
|
||||
indentation?: IndentationConfig
|
||||
xmlContent?: string
|
||||
|
|
@ -105,7 +104,7 @@ export class ReadFileTool extends BaseTool<"read_file"> {
|
|||
const fileResults: FileResult[] = fileEntries.map((entry) => ({
|
||||
path: entry.path,
|
||||
status: "pending",
|
||||
// Map slice/indentation mode parameters (limit is not mapped - always use maxReadFileLine setting)
|
||||
// Map slice/indentation mode parameters
|
||||
offset: entry.offset,
|
||||
mode: entry.mode,
|
||||
indentation: entry.indentation,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue