Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 18, 2025

This PR attempts to address Issue #9345 by adding support for MetaQuotes Language (MQL) file extensions.

Summary

Added support for MQL file extensions (.mq4, .mq5, .mqh) to enable indexing of MetaTrader trading strategies, expert advisors, and libraries.

Changes

  • Added MQL extensions (.mq4, .mq5, .mqh) to the tree-sitter extensions list in src/services/tree-sitter/index.ts
  • Added MQL extensions to the fallback chunking list in src/services/code-index/shared/supported-extensions.ts
  • Added comprehensive tests for MQL file handling in src/services/code-index/processors/__tests__/parser.vb.spec.ts

Testing

All tests pass successfully:

  • Unit tests for MQL file parsing
  • Fallback chunking verification
  • Linting and type checking pass

Impact

This change enables Roo Code to properly index and analyze MQL files without crashes, using the fallback chunking strategy similar to how Scala and Swift files are handled.

Feedback and guidance are welcome!

Fixes #9345


Important

Adds support for MQL file extensions (.mq4, .mq5, .mqh) to enable indexing and analysis using fallback chunking.

  • Behavior:
    • Adds support for MQL file extensions (.mq4, .mq5, .mqh) in index.ts for tree-sitter parsing.
    • Updates supported-extensions.ts to include MQL extensions in the fallback chunking list.
    • Enables Roo Code to index and analyze MQL files using fallback chunking.
  • Testing:
    • Adds tests for MQL file handling in parser.vb.spec.ts to verify fallback chunking for .mq4, .mq5, and .mqh files.
    • Tests ensure fallback chunking is applied and file content is correctly processed.
  • Misc:

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

- Added MQL extensions to tree-sitter extensions list
- Added MQL extensions to fallback chunking list for indexing
- Added comprehensive tests for MQL file handling
- Ensures MQL files are properly indexed without crashes

Fixes #9345
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 18, 2025 09:20
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Nov 18, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 18, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The implementation correctly adds MQL file support using fallback chunking, following the established pattern for languages without tree-sitter parsers (like VB.NET, Scala, and Swift). All changes are properly tested and consistent with the codebase architecture.

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 Nov 18, 2025
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. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add support for MQL file extensions (.mq4, .mq5, .mqh)

3 participants