Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 4, 2025

Fixes the issue where @ mentioned files were silently truncated according to the maxReadFileLine setting.

Changes

When a user explicitly @ mentions a file (e.g., @src/file.ts), they expect to see the full content regardless of the maxReadFileLine setting. This PR ensures that @ mentioned files always bypass the auto-truncate threshold by passing -1 (unlimited) to extractTextFromFile.

Modified Files

Behavior

  • Before: @ mentioned files were subject to maxReadFileLine truncation (silently)
  • After: @ mentioned files are always read in full
  • Tool-based reads: Continue to respect maxReadFileLine setting (unchanged)

Testing

All existing tests pass:

  • ✅ Mentions module tests (22 tests)
  • ✅ Type checking
  • ✅ Linting

View task on Roo Code Cloud

When a user explicitly @ mentions a file, they expect to see the full
content regardless of the maxReadFileLine setting. This change ensures
that @ mentioned files always use -1 (unlimited) for maxReadFileLine,
bypassing the auto-truncate threshold.

Changes:
- Modified getFileOrFolderContent to always pass -1 to extractTextFromFile
- This applies to both individual file mentions and files in folder mentions
- The maxReadFileLine setting continues to work for tool-based file reads
@roomote
Copy link
Contributor Author

roomote bot commented Dec 4, 2025

Rooviewer Clock   See task on Roo Cloud

Review completed. No issues found.

This PR successfully removes the unused maxReadFileLine parameter from the mentions processing chain. Since @ mentioned files always bypass the truncation limit (by passing -1 to extractTextFromFile), there's no need to thread this parameter through the entire call stack. The refactoring is complete and consistent across all affected files.

Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 4, 2025
@mrubens
Copy link
Collaborator

mrubens commented Dec 5, 2025

@roomote any reason to still pass in maxReadFileLine or can we get rid of that?

@roomote
Copy link
Contributor Author

roomote bot commented Dec 5, 2025

Fixaroo Clock   See task on Roo Cloud

Removed the unused maxReadFileLine parameter from the mentions functions. All local checks passed.

View commit | Revert commit

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

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

4 participants