Commit graph

4066 commits

Author SHA1 Message Date
Matt Rubens
de2dba31ab Add a script to make checking out a PR locally easier 2025-04-29 11:21:48 -04:00
Chris Estreich
60270d1064
Revert "feat: syntax highlighting terminal output with Shiki" (#3023)
Revert "feat: syntax highlighting terminal output with Shiki (#3021)"

This reverts commit 8b072ad126.
2025-04-28 23:08:57 -07:00
Chris Estreich
81e01a9017
Update package-lock.json in webview-ui (#3022) 2025-04-28 22:58:10 -07:00
KJ7LNW
8b072ad126
feat: syntax highlighting terminal output with Shiki (#3021)
* feat: syntax highlighting terminal output with Shiki

Refactored CommandExecution.tsx to:
- Implement CodeBlock component for terminal display
- Use Shiki for syntax highlighting of shell commands and terminal output

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* ui: present same compressed command output that the model will receive

Avoids rendering problems and performance regressions:
- Compresses output using BaseTerminal.compressTerminalOutput
- Eliminates need for Virtuoso by limiting output size

Ensures command output shown in UI matches the compressed format provided to the model:
- Applies same BaseTerminal.compressTerminalOutput processing
- Uses configured terminalOutputLineLimit for consistency

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* test: update CommandExecution tests to use CodeBlock mock

- Replace virtuoso mock with CodeBlock mock to fix shiki import error
- Update CodeBlock mock to properly handle source prop
- Add proper empty output test case verification
- Keep original test values and structure

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

---------

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-04-28 19:54:10 -07:00
Chris Estreich
65958d81b9
Overhaul CodeBlock rendering (#3019) 2025-04-28 17:10:57 -07:00
Julio Navarro
04fa72eebe
Feat: Add a new button to import settings on the welcome screen (#2811) 2025-04-28 16:07:35 -07:00
Ash R
a3d8c0e3f6
feat: vertex/gemini prompt caching (#2996) 2025-04-28 15:11:35 -07:00
Ryan Pfister
2075f26f18
feat: Add Reasoning Effort setting for OpenAI Compatible provider (#2906) 2025-04-28 13:36:47 -07:00
Chris Estreich
21ea433b88
Fix e2e tests (#3014) 2025-04-28 12:52:51 -07:00
Wojciech Kordalski
449d54bdd5
Remove unused ClineSay and -Ask type variants (#2061)
Co-authored-by: cte <cestreich@gmail.com>
2025-04-28 12:33:16 -07:00
Chris Estreich
2e1d949e65
Add support for multiple command execution strategies (#2820) 2025-04-28 08:55:07 -07:00
KJ7LNW
8e85a121f1
feat: standardize tree-sitter test implementations (#2960)
* refactor: standardize C# Tree-Sitter parser tests

This commit standardizes the C# Tree-Sitter parser tests to ensure:
- Variable/function names in sample code match the tests
- Each test only verifies specific identifiers relevant to that test
- Test names clearly indicate what they're testing
- No skipped tests remain
- Only one test exists per structure or combination of structures
- All debug output uses debugLog from helpers.ts

The standardization improves maintainability and clarity while preserving
all existing functionality.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: standardize C Tree-Sitter parser tests

This commit standardizes the C Tree-Sitter parser tests to ensure:
- Variable/function names in sample code match the tests (using snake_case)
- Each test only verifies specific identifiers relevant to that test
- Test names clearly indicate what they're testing
- No skipped tests remain - tests for unsupported features are removed
- Only one test exists per structure or combination of structures
- All debug output uses debugLog from helpers.ts

The standardization improves maintainability and clarity while preserving
all existing functionality. Documentation has been added for C language
constructs that are not currently supported by the parser.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: standardize Kotlin Tree-Sitter parser

Standardized Kotlin Tree-Sitter parser to ensure consistent naming and structure:
- Renamed identifiers to clearly indicate what they're testing
- Ensured all code sections are at least 4 lines long
- Organized query patterns logically with clear comments
- Removed skipped tests and unused query patterns
- Ensured only one test per structure or combination of structures

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: standardize PHP Tree-Sitter parser

Standardized PHP Tree-Sitter parser to ensure consistent naming and structure:
- Renamed identifiers to clearly indicate what they're testing
- Ensured all code sections are at least 4 lines long
- Organized query patterns logically with clear comments
- Consolidated related tests to ensure only one test per structure
- Ensured all debug output uses debugLog from helpers.ts

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: standardize Ruby Tree-Sitter parser

Standardized Ruby Tree-Sitter parser to ensure consistent naming and structure:
- Expanded query to support many more Ruby language constructs
- Added comprehensive test file with clear section headers
- Ensured all code sections are at least 4 lines long
- Added tests for each language construct
- Used consistent naming conventions for test identifiers

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: standardize Swift Tree-Sitter parser

Standardized Swift Tree-Sitter parser to ensure consistent naming and structure:
- Renamed identifiers to clearly indicate what they're testing
- Ensured all code sections are at least 4 lines long
- Organized query patterns logically with clear comments
- Removed skipped tests and unused query patterns
- Ensured only one test per structure or combination of structures

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: dynamically include all tree-sitter WASM files in build process

- Modified esbuild.js to dynamically read and copy all WASM files from tree-sitter-wasms package
- Added error handling and logging for better debugging
- Ensures all language parsers are automatically included without requiring manual updates

* refactor: move test mocks and fixtures to shared locations

Move test mocks to helpers.ts to be shared between test files
Create fixtures directory for shared test data
Move sample TSX content to fixtures/sample-tsx.ts
Update test files to use shared mocks and fixtures

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: simplify tree-sitter debug output

- Remove detailed node inspection to reduce noise
- Keep only essential tree structure output
- Remove duplicate content logging

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: standardize C# tree-sitter test structure

Move C# sample code to dedicated fixture file and create inspectCSharp test
following the same pattern as other language tests. This improves test
organization and maintainability by:

- Extracting sample C# code to fixtures/sample-c-sharp.ts
- Adding inspectCSharp.test.ts for tree structure inspection
- Updating parseSourceCodeDefinitions.c-sharp.test.ts to use fixture

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: add language-specific capture processing

- Add language parameter to processCaptures for language-specific handling
- Implement selective HTML filtering for jsx/tsx files
- Update all call sites to pass correct language parameter
- Fix type safety by properly passing language strings

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: move tree-sitter test samples to fixtures

Move sample code from parseSourceCodeDefinitions test files into dedicated
fixtures directory for better organization and reuse:

- Created fixtures directory for language samples
- Moved sample code for C#, C, JSON, Kotlin, PHP, Ruby, Rust, and Swift
- Created inspect test files for each language
- Updated original test files to import from fixtures
- Standardized test options across languages
- No behavior changes, all tests passing

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: standardize tree-sitter test code across languages

Standardize test code structure and naming across all language parsers:
- Rename identifiers to clearly indicate test purpose
- Ensure each code section has descriptive comments
- Group related code sections together
- Maintain language-specific naming conventions
- Keep test structure consistent across languages
- Remove tests for unsupported features

Changes made to:
- C, JSON, Kotlin, PHP, Ruby, Rust, and Swift test files
- Sample code fixtures
- Parser definition tests
- Inspect structure tests

No functional changes - all tests passing with improved maintainability.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: standardize tree-sitter parser tests across all languages

- Ensure all test structures span at least 4 lines for better parsing
- Create exactly one consolidated test per data structure type
- Use descriptive names that clearly indicate test purpose
- Improve query pattern organization and documentation
- Simplify inspect test files to focus on structure validation
- Implement result caching in test files for better performance
- Remove duplicate and skipped tests
- Follow consistent naming conventions across all languages

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* first pass all but elm-bash

* test: inspectTreeStructure helper now returns a string

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: establish single source of truth for MIN_COMPONENT_LINES

- Move minComponentLines parameter to a file-level constant
- Remove parameter passing to processCaptures function
- Update all references to use the global constant
- Remove redundant local constant declaration in parseFile

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* refactor: improve MIN_COMPONENT_LINES implementation

- Changed MIN_COMPONENT_LINES constant to use getter/setter functions
- Updated references to use getMinComponentLines() function
- Modified test helper to set value to 0 during tests
- This establishes a single source of truth while making testing easier

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* feat: standardize tree-sitter test implementations

Standardized tree-sitter test implementations across all supported languages:
- Removed debugLog calls from test files
- Implemented consistent line number pattern matching
- Ensured proper test structure and execution order
- Added comprehensive test coverage for supported structures
- Maintained 1:1 mapping between queries, tests and samples
- Documented unsupported features in TODO sections

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* docs: document tree-sitter parseable but unsupported structures

Added TODO sections in test files documenting structures that can be parsed
by tree-sitter but currently lack query pattern support:

- Python: f-strings, complex type annotations, pattern matching
- C++: virtual methods, field initializers, base class clauses
- Java: import declarations, field declarations with modifiers
- TSX: React hooks, context providers, event handlers

Added examples and clarifying comments to existing TODO sections.
Enhanced Java query patterns for better structure capture including
lambda expressions, field declarations, and type parameters.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* fix: use correct distDir variable for WASM file copying

The copyWasmFiles plugin was using an undefined targetDir variable when copying
tree-sitter WASM files. Changed to use the correctly defined distDir variable,
fixing the build process.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

* lint: remove unused imports and variables from tree-sitter tests

Removed unused imports and variables from tree-sitter test files to fix linting errors:
- Removed unused goQuery import from helpers.ts
- Removed unused imports and mockedFs variables from language-specific test files
- Cleaned up test files to only import what they use

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>

---------

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-04-28 11:27:49 -04:00
dlab-anton
ecc7473a02
fix UI/UX: Mode switch performance from 1 sec -> instant (#2997)
* Fix mode switching performance in PromptsView by using local state for instant UI updates

* Update webview-ui/src/components/prompts/PromptsView.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-28 11:10:29 -04:00
Matt Rubens
7020d1db2c
Fix ru README contributor section (#2995) 2025-04-27 22:49:16 -04:00
KJ7LNW
0549a02876
test: run linting during npm test (#2981)
Run linting checks alongside tests to catch style and formatting issues before pushing code or creating PRs, saving developers time by identifying problems earlier.

- Added lint:* to npm test command execution
- Maintains parallel execution on non-Windows systems

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-04-27 22:39:56 -04:00
Chris Estreich
1924e10e72
Fix all linter errors (and fix the lint scripts too) (#2958) 2025-04-26 09:45:26 -07:00
Julio Navarro
418791a743
Fix: custom modes export import (#2810)
* Enhance export method in ContextProxy to filter out project custom modes, ensuring only global settings are included in the export.

* Fix issue of customModes not being imported when importing settings.

The problem was that the Custom modes are managed by the CustomModesManager, not by the context proxy.

* * Fix tests

* Update webviewMessageHandler to provide customModeManager to importSettings
2025-04-26 08:46:05 -04:00
R00-B0T
42c1f5f882
Changeset version bump (#2957)
* changeset version bump

* Update package.json

* Update package-lock.json

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-04-26 00:03:17 -04:00
github-actions[bot]
d6860e1114
Update contributors list (#2946)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>
2025-04-25 23:53:45 -04:00
Matt Rubens
5b99e4d50d
Updated tips (#2961)
* Updated tips

* Changeset
2025-04-25 23:51:13 -04:00
Sacha Sayan
83133c6e6d
UI top down homescreen (#2951)
* isotrUpdate welcome screen UI components and fix unused variable

* Save collapsibility.

* Add persistence, locales.

* Top layout, expanded tips.

* Minimal 'tasks' language.

* Adjust announcement positioning/dimensions.

* Fix tests, defaults.

* Fix translations.

* Compromise-compromise.

* Final tweaks.

* More tweaks.

* More tweaks.

* Issues fix.

* Update translations, remove debug.

* Fix transparency issue.

---------

Co-authored-by: hannesrudolph <hrudolph@gmail.com>
2025-04-25 22:39:11 -04:00
Tony Zhang
de22566ea2
Fix: word wrapping in Roo message title (#2948) 2025-04-25 17:13:13 -07:00
shariqriazz
e3d55a36ac
docs: fix file paths in settings.md (#2930) 2025-04-25 18:49:19 -04:00
Chris Estreich
c8b5cdf7b2
Omit reasoning params for non-reasoning models (#2932) 2025-04-25 15:24:03 -07:00
Chris Estreich
cb29e9d56f
Remove ModelInfo objects from settings (#2939) 2025-04-25 15:23:25 -07:00
Matt Rubens
a354c01b0e
Add Boomerang as a default mode (#2934)
* Add Boomerang as a default mode

* Rename boomerang, add emoji
2025-04-25 16:06:50 -04:00
Matt Rubens
547874eed7
Revert "Fix: Preserve editor state and prevent tab unpinning during diffs" (#2956)
Revert "Fix: Preserve editor state and prevent tab unpinning during diffs (#2…"

This reverts commit c2dd743aeb.
2025-04-25 16:04:38 -04:00
Chris Estreich
06db547308
Use a WASM-based tiktoken implementation (#2859)
* Use a WASM-based tiktoken implementation

* Clean up imports
2025-04-25 10:32:35 -07:00
pugazhendhi-m
7e76736e13
Updates default model for Unbound (#2944)
* Updates default model for Unbound

* Adds changeset

---------

Co-authored-by: Pugazhendhi <pugazhendhi@unboundsecurity.ai>
2025-04-25 07:36:25 -04:00
R00-B0T
586e43bd55
Changeset version bump (#2926)
* changeset version bump

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
2025-04-24 16:41:26 -07:00
Chris Estreich
0dfbae64f3
Allow users to toggle Gemini caching on / off for OpenRouter (#2927) 2025-04-24 16:34:22 -07:00
KJ7LNW
5c2511e355
feat: compress terminal output with backspace characters (#2907)
Follow-up to #2562 adding support for backspace character compression.
Optimizes terminal output by handling backspace characters similar to
carriage returns, improving readability of progress spinners and other
terminal output that uses backspace for animation.

- Added processBackspaces function using efficient indexOf approach
- Added comprehensive test suite for backspace handling
- Integrated with terminal output compression pipeline

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-04-24 19:28:09 -04:00
github-actions[bot]
23aa3b636b
Update contributors list (#2903)
docs: update contributors list [skip ci]

Co-authored-by: cte <cte@users.noreply.github.com>
2025-04-24 19:26:00 -04:00
Chris Estreich
a3f1a3f3ad
Gemini caching improvements (#2925) 2025-04-24 14:20:09 -07:00
asychin
7f99c0691e
feat/add-russian-lang (#2909)
* rus

* sad

* fix lang

* Add ru to translate mode instructions

* Add ru to evals types

* Add link to READMEs

* Bring back smart quotes

* Add prompt caching translations

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-04-24 16:03:30 -04:00
Chris Estreich
b75379bed3
Improve OpenRouter model fetching (#2922) 2025-04-24 12:29:36 -07:00
Chris Estreich
ad4782b766
Add an option to enable prompt caching (#2924) 2025-04-24 12:28:43 -07:00
R00-B0T
31600ed3c9
Changeset version bump (#2919)
* changeset version bump

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
2025-04-24 09:27:32 -07:00
Chris Estreich
d46a9b484c
v3.14.1 (#2920) 2025-04-24 09:24:56 -07:00
Chris Estreich
fb91836203
Revert Gemini caching, fix OR supports cache issue (#2918) 2025-04-24 09:15:56 -07:00
R00-B0T
9b73965867
Changeset version bump (#2877)
* changeset version bump

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-04-24 00:51:24 -04:00
Matt Rubens
2e9b1f1824
v3.14.0 (#2902) 2025-04-24 00:44:24 -04:00
github-actions[bot]
37a8a442ac
Update contributors list (#2871)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>
2025-04-24 00:31:27 -04:00
Yikai Liao
b5ffaf1ba2
Fix Terminal Carriage Return Handling for Correct Progress Bar Display (#2562)
* fix(terminal): Ensure correct handling of carriage returns for progress bars

This commit refines the tests for `TerminalProcess` to ensure the correct interpretation of terminal output containing carriage returns (`\\r`), which is essential for properly handling dynamic elements like progress bars (e.g., `tqdm`).

- Validated the `processCarriageReturns` method's behavior in simulating terminal line overwrites caused by `\\r`.
- Corrected the expectation in the `handles carriage returns in mixed content` test to accurately reflect the method's output (final line content + preserved escape sequences), confirming the logic works as intended for progress-bar-like updates.
- Fixed a minor Jest `toBe` syntax error in a related test case.
- Suppressed an expected `console.warn` in the non-shell-integration test for cleaner logs.

By ensuring `processCarriageReturns` is correctly tested, we increase confidence that the component responsible for pre-processing terminal output handles progress bars appropriately before the output is potentially used elsewhere (e.g., sent to an LLM).

* fix(test): Make TerminalProcess integration test reliable

This commit fixes the flaky test case `integrates with getUnretrievedOutput to handle progress bars` in `TerminalProcess.test.ts`.

The test previously failed intermittently due to:
1.  Relying on a fixed `setTimeout` duration to wait for asynchronous stream processing, which created a race condition.
2.  Incorrectly assuming that `await terminalProcess.run(...)` would return the final output directly via its resolved value.

The fix addresses these issues by:
-   Removing the unreliable intermediate check based on `setTimeout`.
-   Modifying the test to correctly obtain the final output by listening for the `completed` event emitted by `TerminalProcess`, which is the intended way to receive the result.

This ensures the test accurately reflects the behavior of `TerminalProcess` and is no longer prone to timing-related failures.

* Add changeset for terminal carriage return fix

* Implement terminal compress progress bar feature

This commit introduces a new feature to compress terminal output by processing carriage returns. The `processCarriageReturns` function has been integrated into the `Terminal` class to handle progress bar updates effectively, ensuring only the final state is displayed.

Additionally, the `terminalCompressProgressBar` setting has been added to the global settings schema, allowing users to enable or disable this feature.

Tests have been updated to validate the new functionality and ensure correct behavior in various scenarios.

A Benchmark is also added to test the performance.

Not that there is still no i18n support for this.

* Add i18n support for compressProgressBar setting in multiple languages

* Optimize processCarriageReturns function for performance and multi-byte character handling

This commit enhances the `processCarriageReturns` function by implementing in-place string operations to improve performance, especially with large outputs. Key features include:
- Line-by-line processing to maximize chunk handling.
- Use of string indexes and substring operations instead of arrays.
- Single-pass traversal of input for efficiency.
- Special handling for multi-byte characters to prevent corruption during overwrites.

Additionally, tests have been updated to validate the new functionality, ensuring correct behavior with various character sets, including emojis and non-ASCII text.

Highly Density CR case is added to Benchmark

* slight performance improvement by caching several variable

* Optimize multi-byte character handling in processCarriageReturns

Refactor the logic within the `processCarriageReturns` function to simplify the detection of partially overwritten multi-byte characters (e.g., emojis).

Removed redundant checks and clarified the conditions for identifying potential character corruption during carriage return processing. This improves code readability and maintainability while preserving the original functionality of replacing potentially corrupted characters with a space.

Also enforced consistent use of semicolons for improved code style.

* docs: standardize carriage return (\r) and line feed (\n) terminology
Improve code clarity by consistently adding escape sequence notation to all
references of carriage returns and line feeds throughout documentation and tests.
This makes the code more readable and avoids ambiguity when discussing these special characters.

* feat: Improve terminal output processing clarity and settings UI

- Add detailed comments to `processCarriageReturns` explaining line feed handling.
- Relocate `terminalCompressProgressBar` setting below `terminalOutputLineLimit` for better context in UI.

* Fix: Compress Progress Bar Setting Checkbox

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-04-24 00:22:47 -04:00
axb
3b65023d0b
feat(diff): improve progress indicator for apply_diff tool (#2758)
Add animated dots to progress indicator based on content length
Optimize when progress updates are shown (every 10 characters)
Move searchBlockCount calculation inside conditional blocks
Skip unnecessary ask operations when toolProgressStatus is empty
2025-04-24 00:12:07 -04:00
Hannes Rudolph
c228e638b9
Update insert_content tool description for clarity and detail (#2892) 2025-04-23 17:43:36 -04:00
Hannes Rudolph
41db2cad43
Update search_and_replace tool description for clarity and detail (#2891) 2025-04-23 17:42:59 -04:00
Matt Rubens
a53f604e3a
Disable OpenRouter Gemini caching for now (#2890) 2025-04-23 16:46:52 -04:00
Chris Estreich
03925d25b0
Fix code cli flag in evals (#2889) 2025-04-23 13:26:59 -07:00
Chris Estreich
1543713c32
Don't immediately show an model ID error when changing API providers (#2888) 2025-04-23 13:24:22 -07:00