You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add pagination support to read_file tool (EXT-617)
- Add offset, limit, format, and maxCharsPerLine params to FileEntry type
- Create pagination helper functions with cat_n formatting
- Implement bounded reads with stable line numbering
- Add pagination metadata to tool output (nextOffset, reachedEof, truncated)
- Update tool schema to support new pagination parameters
- Maintain backward compatibility with existing behavior
- Add comprehensive tests for pagination functionality
Implements spec requirements:
- Default limit of 2000 lines per request
- 0-based offset for pagination
- cat_n format with right-aligned line numbers
- Line truncation with configurable maxCharsPerLine (default 2000)
- Clear truncation signals and continuation hints
- Pagination message includes next offset for continuation
? "The 'line_ranges' is optional for reading specific sections. Each range is a [start, end] tuple (1-based inclusive). "
53
53
: ""
54
54
55
+
constpaginationDescription=
56
+
"Pagination: Use 'offset' (0-based line offset, default: 0) and 'limit' (max lines to return, default: 2000) for bounded reads. When truncated, the response includes the next offset value for continuation. "
constnotice=`File truncated: showing ${result.lineCount} lines (${result.tokenCount} tokens) due to context budget. Use line_range to read specific sections.`
constnotice=`File truncated: showing ${result.lineCount} lines (${result.tokenCount} tokens) due to context budget. Use line_range or offset/limit parameters to read specific sections.`
0 commit comments