Roo-Code/src/core
Daniel 0851769450
Improve read_file tool description with examples (#9422)
* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.
2025-11-20 07:21:48 -05:00
..
assistant-message perf: reduce excessive getModel() calls & implement disk cache fallback (#9410) 2025-11-19 23:13:39 -05:00
auto-approval Move auto-approval from ChatView to Task (#9157) 2025-11-10 17:01:50 -08:00
checkpoints Fix checkpoints test (#8803) 2025-10-24 10:18:19 -04:00
condense Enable browser-use tool for all image-capable models (#8121) 2025-10-21 22:23:42 -04:00
config feat: auto-switch to imported mode with architect fallback (#9003) 2025-11-06 16:40:27 -05:00
context/context-management Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
context-management rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (#9206) 2025-11-12 22:16:25 -05:00
context-tracking fix: use safeWriteJson for all JSON file writes with race condition fix (#4733) 2025-06-25 16:05:02 -04:00
diff feat(chat): Improve diff appearance in main chat view (#8932) 2025-11-06 16:18:01 -05:00
environment feat: add git status to environment details (#9310) 2025-11-17 14:10:32 -05:00
ignore Follow symlinks in rooignore checks (#7405) 2025-08-26 10:12:20 -04:00
mentions Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (#9261) 2025-11-14 00:43:45 -05:00
message-queue Move message queue to the extension host (#7604) 2025-09-02 19:12:18 -07:00
prompts Improve read_file tool description with examples (#9422) 2025-11-20 07:21:48 -05:00
protect Mark code-workspace files as protected (#7403) 2025-08-26 00:09:14 -04:00
task Improve read_file tool description with examples (#9422) 2025-11-20 07:21:48 -05:00
task-persistence Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203) 2025-11-12 19:50:24 -05:00
tools fix: Include nativeArgs in tool repetition detection (#9377) 2025-11-18 21:20:29 -05:00
webview Add a RCC credit balance display (#9386) 2025-11-19 21:36:19 -05:00