Commit graph

13 commits

Author SHA1 Message Date
Daniel
a84f7ef77f
fix: respect nested .gitignore files in search_files (#8804) 2025-10-24 16:16:22 -04:00
roomote[bot]
7b0f489ea2
fix: add --no-messages flag to ripgrep to suppress file access errors (#6757)
Fixes #6756

When ripgrep encounters file access errors (e.g., permission denied), it would cause the search_files tool to return empty results. Adding the --no-messages flag suppresses these error messages while still showing pattern syntax errors, allowing the search to continue and return valid results from accessible files.

Co-authored-by: Roo Code <roomote@roocode.com>
2025-08-12 17:51:06 -04:00
Chris Estreich
62c3914034
Farewell jest (#4607)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-16 21:39:45 -07:00
Chris Estreich
395f55b31f
Convert jest tests to vitest and disable default watch mode for vitest (#4568)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-11 14:48:01 -07:00
Noritaka Kobayashi
472943281f
refactor: simplify object assignment & use startsWith (#3891) 2025-05-23 23:48:55 -07:00
Chris Estreich
1924e10e72
Fix all linter errors (and fix the lint scripts too) (#2958) 2025-04-26 09:45:26 -07:00
KJ7LNW
9fadd3dbe2
fix: ripgrep search result handling and formatting (#1831)
Problem:
- Previous implementation incorrectly grouped context lines with matches
- Context lines were split into beforeContext/afterContext arrays, making it difficult to maintain proper line order
- Output format was inconsistent with read_file output
- Non-contiguous search results were sometimes broken or incorrectly grouped
- Example of incorrect output:
  # bench/bundle-test/rollup.config.mjs
   16 |       file: 'dist/index-wasm.min.mjs',
   17 |       format: 'es',
   24 |     output: {
  ----
   25 |       file: 'dist/index-lite.min.mjs',
   26 |       format: 'es',
  ----

  # packages/rehype/package.json
  ----
   10 | it('run', async () => {
   27 |   "files": [
   28 |     "dist"
  ----

Solution:
- Replace separate context arrays with a single 'lines' array containing both matches and context
- Add isMatch flag to distinguish between match and context lines
- Improve contiguity detection by checking if line numbers are sequential
- Standardize output format to match read_file output
- Properly handle non-contiguous search results by creating new result groups
- Example of correct output:
  # bench/bundle-test/rollup.config.mjs
   16 |       file: 'dist/index-wasm.min.mjs',
   17 |       format: 'es',
  ----
   24 |     output: {
   25 |       file: 'dist/index-lite.min.mjs',
   26 |       format: 'es',
  ----

This change ensures search results are properly grouped and displayed with the correct context.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-20 09:10:22 -04:00
Sam Hoang Van
70a476e722
feat read file range (#1440)
* feat read file range

feat: add file truncation with code structure preview

Add configurable line limit for large file handling with source code structure preview. This improves performance and memory usage while maintaining code readability.

Key changes:

Add maxReadFileLine setting (default: 4500) with UI controls
Create efficient line counter utility using streams
Add parseSourceCodeDefinitionsForFile for single file parsing
Show truncation notice with code structure for large files
Add comprehensive tests for new functionality
Move file extensions to shared constant

add line number

pr comment

Return definition ranges from tree-sitter

make treesitter always add line

add line number to rg search

enhance tree siter output & fix test

update snapshot

fix test

* Add translations, tweak range

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-20 00:55:47 -04:00
Matt Rubens
f181da1454
Move context-mention file/folder search to the server (#1824) 2025-03-20 00:45:27 -04:00
Matt Rubens
7e0e3d0f1f Add support for a .rooignore file 2025-03-05 10:17:43 -05:00
Matt Rubens
dfa019e7f4 Truncate results from search_files to 500 chars max 2025-02-26 17:50:04 -05:00
Mark Percival
93e70c62f1
Chore: Prettier for consistant formatting (#794)
* Chore: Pretier for consistant formatting

- TODO: This PR needs to be updated by Saoud after he runs `npm install` & `npm format:fix` and commits the results of the prettier changes.

* Revert prettier config

* Run npm install

* Fix prettier config and ignore package lock

* Run format

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2024-11-21 13:13:54 -08:00
Saoud Rizwan
24bad56785 Refactor services 2024-09-24 11:15:24 -04:00