Commit graph

3726 commits

Author SHA1 Message Date
Thomas Jeung
e9bcee5e2a
feat: Add support for Azure AI Inference Service with DeepSeek-V3 model (#2241)
* feat: Add support for Azure AI Inference Service with DeepSeek-V3 model

* refactor: extract Azure AI inference path to constant to avoid duplication

* fix(tests): update RequestyHandler tests to properly handle Azure inference and streaming

* fix(api): remove duplicate constant and update requesty tests

* refactor: remove unused isAzure property from OpenAiHandler

* refactor(openai): remove unused isAzure and extract Azure check
2025-04-03 00:29:56 -04:00
Chris Estreich
49a61ca30f
Support bash 3.x in our evals setup script (#2248) 2025-04-02 20:53:36 -07:00
github-actions[bot]
71bdd72ca8
Update contributors list (#2203)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>
2025-04-02 23:27:44 -04:00
Matt Rubens
3d53386f1e
Remove the experimental unified diff (#2246) 2025-04-02 23:13:46 -04:00
Chris Estreich
e050043e58
Typos + promisify exec calls (#2243) 2025-04-02 17:12:03 -07:00
Chris Estreich
d15f813514
Evals (#2238)
* Evals

* Remove redundant line

* Fix tsc error

* Disable debug mode

* Add option to kill run
2025-04-02 16:49:41 -07:00
Matt Rubens
24a46698f3
Fix tree sitter to output 1-based line numbers (#2236) 2025-04-02 17:29:52 -04:00
Chris Estreich
42f7465666
Add a mode switched event, better mode switch e2e test (#2237) 2025-04-02 14:25:11 -07:00
Peter Dave Hello
c4af8cadbd
Improve zh-TW Traditional Chinese locale (#2233) 2025-04-02 16:48:28 -04:00
Chris Estreich
a73fce9027
Allow processes to access the Roo Code API via a unix socket (#2232) 2025-04-02 12:42:00 -07:00
Smartsheet-JB-Brown
0409509002
fixes: 2229 - completePrompt doesn't work for bedrock. (#2230)
* fixes: 2229 - completePrompt doesn't work for bedrock.

* fix failing test
2025-04-02 15:35:14 -04:00
Smartsheet-JB-Brown
1b25190947
fixes: 2224 - Update AWS region drop down to be current. (#2225) 2025-04-02 11:59:51 -04:00
Matt Rubens
1de227e24e
Make the SelectDropdown use modal=false (#2215) 2025-04-02 11:37:03 -04:00
Kyle Hoskins
dc02bb2683
Enable model select when api fails (#2217)
* Enable model switching on API failure

Bug: Cannot change model selection after API error due to UI state #1657
UI Bug: OpenRouter ran out of credits prevents user from switching models #1206

* Remove irrelevant code
2025-04-02 11:36:51 -04:00
Peter Dave Hello
0759de218a
Update dependencies via npm audit fix (#2192)
npm warns me that there are 2 vulnerabilities (1 moderate, 1 high), so I
use `npm audit fix`, and the high severity one was fixed:
- tar-fs 3.0.0-3.0.6 https://github.com/advisories/GHSA-pq67-2wwv-3xjx

There is only one moderate vulnerability now:
- esbuild <=0.24.2 https://github.com/advisories/GHSA-67mh-4wv8-2f99
2025-04-01 22:15:14 -04:00
axmo
2cd4753e89
Limit DropdownMenu height to 80% of viewport (#2181)
make DropdownMenu scrollable with 80vh height limit

The DropdownMenu component now automatically becomes scrollable when its content
exceeds 80% of the viewport height. This enhances usability by:

- Limiting maximum height to 80vh using Tailwind's max-h-[80vh]
- Enabling vertical scrolling with overflow-y-auto
- Preserving dropdown positioning and accessibility
2025-04-01 18:48:22 -05:00
Kyle Hoskins
e189b265ca
Update History Selection Mode button spacing (#2196) 2025-04-01 18:43:48 -05:00
Hannes Rudolph
9255dc5df9
fix(diff): Handle line number stripping for deletions in apply_diff (#2193)
The multi-search-replace diff strategy previously did not correctly strip line numbers (`number | `) from the SEARCH block when the REPLACE block was empty. This occurred because the condition for stripping required both blocks to consistently have line numbers.

This prevented successful deletion operations when the SEARCH block content was copied from `read_file` output (which includes line numbers) and the REPLACE block was empty.

This commit updates the line number stripping condition in `applyDiff` to also trigger if the SEARCH block has line numbers and the REPLACE block is empty or contains only whitespace, resolving the bug.

Additionally, a new test case has been added to `multi-search-replace.test.ts` to specifically verify this deletion scenario. All tests now pass with this updated logic.
2025-04-01 15:33:27 -05:00
github-actions[bot]
7409c48835
Update contributors list (#2137)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>
2025-03-31 23:36:26 -05:00
KJ7LNW
d7ad9470e2
Tree-sitter Enhancements: TSX, TypeScript, JSON, and Markdown Support (#2169)
* feat: add Tree-sitter TSX query support

Added support for parsing TSX files with Tree-sitter:
- Created TSX query patterns for React components and functions
- Fixed field name issues by using direct node matching
- Added comprehensive documentation about TSX component structure
- Created a debug tool to inspect the actual tree structure
- Added test coverage for TSX parsing
- Embedded test fixture directly in the test file

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

* refactor: combine TypeScript and TSX queries

Reduce duplication by:
- Import TypeScript queries from typescript.ts
- Keep only TSX-specific component and JSX queries
- Update documentation to reflect combined approach

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

* test: update integration for parse definitions

- Adjusted logParseResult to call the actual parse definitions function using WASM from initializeWorkingParser.
- Patched TreeSitter initialization to resolve the WASM path correctly and bypass redundant init() calls.

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

* test: should successfully call parseSourceCodeDefinitionsForFile

Mock loadRequiredLanguageParsers to use real parser instance from initializeTreeSitter,
ensuring proper interaction between parseSourceCodeDefinitionsForFile and its dependencies.

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

* test: improve test structure for parseSourceCodeDefinitions

- Combine component parsing tests into a single test case
- Update test assertions to match actual parser output
- Fix interface and component definition tests to use VSCodeCheckbox as sample

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

* feat: improve React component detection in tree-sitter

- Add tests for complex TSX structures (nested components, HOCs)
- Enhance TSX queries to better detect React components
- Document current limitations in test file

* feat: improve React component detection in TSX files

Make TSX/React component detection more generic and robust by:
- Implementing structural pattern matching instead of specific React wrapper functions
- Adding configurable line threshold for React component inclusion (MIN_COMPONENT_LINES)
- Adding robust HTML element filtering with regex patterns
- Improving React component name handling for nested components
- Ensuring proper context handling for multi-line React components

Also update mock captures in tree-sitter tests to span at least 4 lines
to meet the MIN_COMPONENT_LINES threshold.

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

* refactor: use testParseSourceCodeDefinitions in logParseResult

- Moved testParseSourceCodeDefinitions function to top level
- Updated logParseResult to use testParseSourceCodeDefinitions
- Removed duplicate function from describe block
- Added console.log for debugging output

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

* refactor: improve React component detection output format

- Remove individual line output for components that don't meet MIN_COMPONENT_LINES threshold
- Update tests to match the new behavior where lines < MIN_COMPONENT_LINES are skipped
- Maintain range output (e.g., 1--4) for component definitions
- Preserve context for larger definitions as ranges only

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

* feat: add switch/case statement support to tree-sitter TypeScript parser

- Added node patterns in typescript.ts query to capture switch statements, case clauses, and default clauses
- Modified index.ts to avoid duplicate line ranges in the output
- Added test for switch/case statements with complex case blocks
- Fixed line range tracking to prevent duplicate output

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

* feat: add support for enum declarations in tree-sitter TypeScript parser

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

* feat: add support for namespace declarations in tree-sitter TypeScript parser

Added query pattern for namespace declarations (internal_module nodes) in the TypeScript parser.
This allows the parser to identify and extract namespace declarations from TypeScript code.

- Added test case to verify namespace parsing functionality
- Added query pattern to capture namespace declarations in typescript.ts

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

* feat: add decorator pattern support to tree-sitter TypeScript parser

- Added support for parsing complex decorators with arguments
- Added test case for Component decorator pattern
- Enhanced TypeScript queries to capture decorator definitions

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

* feat: add generic type declaration support to tree-sitter TypeScript parser

- Added support for parsing generic types with constraints
- Added test case for Dictionary<K extends string | number, V> pattern
- Enhanced TypeScript queries to capture generic type definitions

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

* test: add conditional type support to tree-sitter TypeScript parser

- Added test case for conditional type patterns like ReturnType<T>
- Verified that conditional types with infer keyword are already supported
- Enhanced inspectTreeStructure with detailed node inspection for debugging

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

* test: add template literal type support to tree-sitter TypeScript parser

- Added test case for template literal type patterns like EventName<T>
- Verified that template literal types are already partially supported
- Confirmed support for complex template literal patterns in conditional types

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

* feat: implement tree-sitter compatible markdown processor

Adds a special case implementation for markdown files that:
- Parses markdown headers and section line ranges
- Returns captures in a format compatible with tree-sitter
- Integrates with the existing parseFile function
- Includes comprehensive tests for the implementation

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

* fix: markdown parser not detecting sections with horizontal rules

The markdownParser was incorrectly interpreting horizontal rules (---) as setext headers when they appeared after non-header text. This caused some sections to be missed in the output.

This fix:
- Makes setext header detection more strict by requiring at least 3 = or - characters
- Adds validation for the text line before a potential setext header
- Ensures horizontal rules are not confused with setext headers

Added a test case to verify the fix works correctly with horizontal rules.

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

* refactor: move helper functions to dedicated file

Move test helper functions from parseSourceCodeDefinitions.test.ts to a new helpers.ts file.
Rename test file to parseSourceCodeDefinitions.tsx.test.ts to indicate it's for TSX tests.
This improves code organization by separating test helpers from test cases.

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

* feat: enable JSON structure display in list_code_definitions

This change allows list_code_definitions to show JSON structures by:
- Moving JSON query patterns into the JavaScript query file
- Using the JavaScript parser for JSON files
- Removing the separate JSON parser implementation
- Adding comprehensive tests for JSON parsing

Example output for a JSON file:
# test.json
0--90 | {
1--9 |   "server": {
4--8 |     "ssl": {
10--45 |   "database": {
11--24 |     "primary": {
14--18 |       "credentials": {
19--23 |       "pool": {
25--44 |     "replicas": [
26--43 |       {
30--42 |         "status": {
33--41 |           "metrics": {
36--40 |             "connections": {
46--73 |   "features": {
47--72 |     "auth": {
48--71 |       "providers": {
49--53 |         "local": {
54--70 |         "oauth": {
56--69 |           "providers": [
57--68 |             {

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

* fix: Add compile step to CI workflow to ensure WASM files are available

The TreeSitter tests were failing in CI because the WASM files weren't being copied to the dist directory before running the tests. This adds an explicit compile step to ensure the WASM files are properly built and copied.

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

* fix: improve tree-sitter test type safety and debug logging

- Replace 'any' types with proper Parser types in helpers.ts
- Add centralized DEBUG flag and debugLog function in helpers.ts
- Update all console.log statements to use debugLog across all test files
- This change appeases @ellipsis-dev by improving type safety and
  providing a clean way to control debug logging

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-03-31 23:34:06 -05:00
Steven T. Cramer
b9f4695d12
Fix Tests to run properly on Windows (#1963)
* fix: remove -p flag from test script to prevent git operation errors

The -p flag in npm-run-all was causing tests to run in parallel, which led to 'Cannot log after tests are done' errors with git operations. These errors don't appear when running test:extension alone.

The issue occurs because git-based tests create temporary directories and run async operations that can interfere with each other when executed in parallel. Running tests sequentially resolves this cleanly.

While it might increase total test time slightly, it ensures more reliable and consistent test results.

* refactor(terminal): improve mock streams and fix test issues

- Create shell-specific mock streams (bash, cmd, pwsh) with proper line ending handling
- Fix open handles in tests by properly managing timeouts
- Standardize stderr redirection across all shell implementations using stdio option
- Improve test reliability and output cleanliness

* fix(tests): add skipVerification option to PowerShell tests to debug Linux issues

* fix(tests): use explicit variable name in PowerShell test to fix Linux compatibility

* Refactor terminal tests to use purpose-based approach instead of command mapping

* Remove reference to non-existent test file

* fix: use printf instead of echo -e for more consistent behavior across platforms

* fix: use single quotes for PowerShell commands to preserve variables on Linux

* Update code-qa workflow to run tests on both Windows and Ubuntu

* fix: use platform-specific PowerShell command execution for Linux and Windows

* Fix toggleToolAlwaysAllow to handle path normalization for cross-platform compatibility

* Fix McpHub tests to handle normalized paths on Windows

* Suppress console.error messages in McpHub tests

* fix: make Bedrock ARN regex patterns Windows-compatible

Fixed an issue where AWS Bedrock tests were timing out on Windows but passing on Linux. The root cause was path separator handling in regex patterns used for model ID extraction from ARNs.

1. Updated model ID extraction regex to handle both forward slashes (Linux) and backslashes (Windows)
2. Modified ARN matching regex to be platform-independent
3. Ensured consistent region prefix handling for all supported regions

This change maintains functionality while ensuring cross-platform compatibility.

* fix: make WorkspaceTracker test cross-platform compatible

Fixed an issue where the WorkspaceTracker test 'should initialize with workspace files' was failing on Windows but passing on Linux. The problem was in the mock implementation of toRelativePath that only handled forward slashes.

- Updated the toRelativePath mock to use path.relative which properly handles platform-specific path separators
- Ensured all paths are converted to forward slashes for consistency in test assertions
- The fix maintains cross-platform compatibility while preserving the test's intent

* fix: make WorkspaceTracker tests cross-platform compatible

Fixed cross-platform compatibility issues in the WorkspaceTracker tests that were causing failures on Windows but passing on Linux:

1. Updated the toRelativePath mock implementation to:
   - Use path.relative which properly handles platform-specific path separators
   - Convert paths to forward slashes for consistency in test assertions

2. Enhanced the 'should not update file paths' test to be platform-agnostic by:
   - Using more flexible assertions that don't depend on specific path formats
   - Checking file path length and content rather than exact string matches
   - Properly typed the test assertions to fix TypeScript errors

These changes preserve the test intent while ensuring they run successfully across different operating systems.

* fix: make McpHub tests cross-platform compatible

Fixed cross-platform compatibility issues in the McpHub tests that were causing failures on Windows but passing on Linux:

1. Made the toggleToolAlwaysAllow tests more platform-agnostic by:
   - No longer relying on specific path formats which differ between Windows and Linux
   - Using the last write call instead of searching for a specific path string
   - Adding more robust assertions that verify structure instead of exact path matches
   - Properly handling array existence checks

2. These tests would fail on Windows because paths are formatted with backslashes instead of
   forward slashes, causing path equality checks to fail.

The changes maintain test intent while ensuring cross-platform compatibility.

* handle escaping of slash and quote

* fix: ensure consistent line endings in git fallback strategy

Fixed an issue where tests would fail on GitHub Windows runners but pass on local Windows machines due to line ending differences. The fix ensures consistent line ending handling by:

1. Normalizing CRLF to LF when reading files in the git fallback strategy
2. Disabling Git's automatic line ending conversion
3. Maintaining consistent line ending usage throughout text operations

* feat: run tests sequentially on Windows, parallel otherwise
2025-03-31 23:17:56 -05:00
Wojciech Kordalski
5d993845b7
We should post state to webview at the end of RooCodeAPI.clearCurrentTask() (#1874)
We should post state to webview at the end of RooCodeAPI.clearCurrentTask
2025-03-31 22:53:55 -05:00
Matt Rubens
aea9540cc0
Update app icon (#2166) 2025-03-31 22:24:48 -05:00
R00-B0T
c4d1d3483f
Changeset version bump (#2163)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: R00-B0T <github-actions@github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-31 16:11:17 -05:00
Matt Rubens
b0b4240c8b
Revert "feat @-mention window path style & file with space (#1924)" (#2162)
* Revert "feat @-mention window path style & file with space (#1924)"

This reverts commit c62e8f2ee2.

* Add changeset
2025-03-31 15:56:47 -05:00
R00-B0T
9823628a53
Changeset version bump (#2154)
* changeset version bump

* 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-03-31 14:01:26 -04:00
Matt Rubens
fe3e9325a5
Include inference-profile in Bedrock arnRegex (#2156) 2025-03-31 13:52:57 -04:00
Matt Rubens
136cf99885
Add requesty to connect-src (#2155) 2025-03-31 13:51:21 -04:00
Chris Estreich
a6ed5ce0ea
Update the webview when changing settings via the API (#2143)
* Update the webview when changing settings via the API

* Update src/exports/api.ts

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

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-03-31 13:40:27 -04:00
Diarmid Mackenzie
73fe581868
Split webviewMessageHandler out of ClineProvider.ts (#2149) 2025-03-31 09:47:28 -04:00
R00-B0T
5bae398c44
Changeset version bump (#2141)
* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: R00-B0T <github-actions@github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-31 02:15:47 -04:00
Chris Estreich
3322e08cb7
Relax provider profiles schema and log parse error to PostHog (#2139)
* Relax provider profiles schema and log parse error to PostHog

* Create wise-moose-shop.md

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-30 23:07:34 -07:00
R00-B0T
f25812d722
Changeset version bump (#1992)
* changeset version bump

* 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-03-31 00:30:45 -04:00
Matt Rubens
e1ca1b93a6
v3.11.0 (#2136) 2025-03-31 00:19:56 -04:00
github-actions[bot]
3e77929e0d
Update contributors list (#2090)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>
2025-03-31 00:04:49 -04:00
Chris Estreich
23d1bbfd1a
Preserve existing provider profiles when importing (#2052) 2025-03-30 23:38:26 -04:00
Sam Hoang Van
48148e38d9
feat: Add shift-click to append suggestions to text area (#2081)
* feat: Add shift-click to append suggestions to text area

When a user shift-clicks a suggestion, the text is now appended to the current text area content instead of being sent immediately. This allows users to:
- Build complex prompts by combining multiple suggestions
- Edit suggestions before sending them
- Reuse parts of previous suggestions

The implementation passes the mouse event through the component chain and checks for the shift key before deciding whether to append or send the message.

* Tweak icon and internationalize

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-30 23:35:02 -04:00
Duong M. CUONG
af6753608f
Remove hard-coded o3-mini model when streaming is enabled, allowing custom o3-mini-<reasoning> model (#2134)
Remove hard-coded o3-mini model when streaming is enabled
2025-03-30 23:12:18 -04:00
Matt Rubens
9a13041186
Remove the single diff strategy and make multi-diff the default (#2133) 2025-03-30 23:07:31 -04:00
Matt Rubens
520326648b
Revert "Remove the ask promise error" (#2126)
Revert "Remove the ask promise error (#2123)"

This reverts commit b788aa1ec4.
2025-03-30 16:45:29 -04:00
Matt Rubens
b788aa1ec4
Remove the ask promise error (#2123) 2025-03-30 15:04:28 -04:00
Matt Rubens
60e122f2ca
Tweaks to support prompt line number format (#2121) 2025-03-30 14:28:34 -04:00
feifei
d3df954797
Fix switching profiles to ensure only the selected profile is switche… (#2119)
Fix switching profiles to ensure only the selected profile is switched for all modes, and optimize certain i18n keys.

Signed-off-by: feifei <liuyansheng1121@gmail.com>
2025-03-30 14:15:27 -04:00
Matt Rubens
b74e1e89da
Fix Gemini command escaping (#2120) 2025-03-30 14:07:00 -04:00
Matt Rubens
2c5f956162
Parse the retry out of the gemini 429 response (#2118) 2025-03-30 13:39:59 -04:00
Matt Rubens
a7d31aa9ba
Revert "Remove the ask promise error" (#2117)
Revert "Remove the ask promise error (#2107)"

This reverts commit 712ca71ee0.
2025-03-30 13:33:04 -04:00
Matt Rubens
592494fb29
Link to provider docs from the API options (#2112) 2025-03-30 13:12:18 -04:00
Matt Rubens
37ecf9648b
Link to the settings page from the auto approve toolbar (#2111) 2025-03-30 12:22:53 -04:00
Matt Rubens
712ca71ee0
Remove the ask promise error (#2107)
* Remove the ask promise error

* Send start_time along with checkpoints and use it to position in the messages
2025-03-30 12:04:34 -04:00
feifei
cf487fbfae
i18n Add translations for task pinning and unpinning (#2109)
Signed-off-by: feifei <liuyansheng1121@gmail.com>
2025-03-30 11:42:48 -04:00