Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Aug 19, 2025

Adds a simplified read_file tool and routes it by model.

  • New: simpleReadFileTool using <read_file>...</read_file>
  • Routing: selects simple vs multi-file via shouldUseSingleFileRead(modelId)
  • Config: SINGLE_FILE_READ_MODELS now in @roo-code/types (includes "roo/sonic")
  • Prompts: show simple or multi-file instructions accordingly
  • Consistency: uses the same askApproval flow as the existing tool

Important

Introduces simpleReadFileTool for single-file reads, routing logic, and configuration for specific models, with updates to prompts and tool descriptions.

  • Behavior:
    • Adds simpleReadFileTool in simpleReadFileTool.ts for single-file reads using <read_file><path>...</path></read_file> format.
    • Routes to simpleReadFileTool or readFileTool based on shouldUseSingleFileRead(modelId) in presentAssistantMessage.ts.
  • Configuration:
    • Introduces SINGLE_FILE_READ_MODELS in single-file-read-models.ts to list models using single-file reads.
    • Adds shouldUseSingleFileRead() function in single-file-read-models.ts for model ID checks.
  • Prompts:
    • Updates generatePrompt() and SYSTEM_PROMPT in system.ts to include modelId for tool description selection.
    • Modifies getToolDescriptionsForMode() in tools/index.ts to choose between simple and regular read file descriptions based on model ID.
  • Misc:
    • Adds getSimpleReadFileToolDescription() in simple-read-file.ts for generating tool descriptions.
    • Ensures consistent approval flow with existing tools.

This description was created by Ellipsis for 4cf6082. You can customize this summary. It will automatically update as commits are pushed.

- Created simpleReadFileTool for models that only support single file reads
- Uses simpler XML format: <read_file><path>file/path</path></read_file>
- Added SINGLE_FILE_READ_MODELS configuration in types package
- Tool routing automatically selects simple vs multi-file version based on model ID
- Prompt generation adapts to show appropriate tool description

This allows less capable models to use a simpler read_file format while maintaining
backward compatibility for models that support concurrent multi-file reads.
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Aug 19, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Aug 19, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 19, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 19, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've reviewed the changes and found some issues that need attention. The implementation looks good overall, but there are critical gaps in test coverage and some opportunities for improvement.

@cte cte merged commit 9a7ddab into main Aug 19, 2025
19 checks passed
@cte cte deleted the feat/simple-read-file-tool branch August 19, 2025 17:57
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 19, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Aug 19, 2025
@UriZafrir
Copy link

could you explain why you chose grok-code-fast not to use the regular read_line tool? as it can't read parts of file at the moment..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants