Commit graph

4663 commits

Author SHA1 Message Date
Chris Estreich
2bf4347cc3
Document how to add evals (#4470) 2025-06-09 14:26:19 -07:00
Chris Estreich
73ed9f2b26
Docker cleanup script (#4469) 2025-06-09 14:25:13 -07:00
Chris Estreich
174da08b23
Publish CI failures to Slack (#4477) 2025-06-09 14:21:14 -07:00
Matt Rubens
1d63fb6773
Run prettier on src (#4478) 2025-06-09 17:10:33 -04:00
Chris Estreich
5bc6690244
Allow manual dispatch for publish-nightly (#4476) 2025-06-09 12:09:45 -07:00
Brendan O'Leary
bfe014fd89
Clarify that the default not the max is 15 files (#4474)
* Clarify that the default not the max is 15 files

* Update webview-ui/src/i18n/locales/en/settings.json

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Update all languages for CONCURRENT_FILE_READS setting

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-09 14:23:03 -04:00
Matt Rubens
8d2eeda4ad
Revert "fix: use safeWriteJson for all JSON file writes" (#4471)
Revert "fix: use safeWriteJson for all JSON file writes (#3772)"

This reverts commit 1be30fc8c2.
2025-06-09 13:53:17 -04:00
Sam Hoang Van
19108f7136
Fix Copy button logic (#4458)
* refactor: streamline text copying by removing history highlight spans

* refactor: improve regex for stripping history highlight spans to handle all content types

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-09 10:40:31 -04:00
Sacha Sayan
360b0e7336
UI Tweak: Fade buttons on history preview (homescreen) if no interaction in progress. (#3523)
Fade buttons on history preview unless mouseover.
2025-06-08 07:27:42 -07:00
Taylor Wilsdon
3f54efca2d
feat: Add Refresh MCP Servers capability, fix state changes in MCP server management UI view (#4267)
* docs: update contributors list [skip ci]

* add refresh all mcp button & supporting logic

* fully working, clean up debug

* begin cleanup

* console debug logging cleanup

* more logging

* Revert "Update contributors list"

* cleanup

* add missing translations

* global and project level i18n strings

* refactor: move translations

* fix: improve MCP settings buttons layout for responsive design

- Add flexWrap to button container to allow wrapping on smaller screens
- Change buttons from fixed flex:1 to flex: 1 1 auto with minWidth
- Ensures buttons maintain minimum readable width of 120px
- Prevents button text from being truncated on narrow viewports

* fix: Add missing vscode mock method and execa mock for McpHub tests

- Added createTextEditorDecorationType to vscode mock in McpHub.test.ts
- Created execa mock to handle ESM module import issues
- Fixes test failure that was exposed by PR #4267's module loading changes

* fix: watch changes on project mcp settings file

---------

Co-authored-by: taylorwilsdon <taylorwilsdon@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-08 07:25:29 -07:00
KJ7LNW
1be30fc8c2
fix: use safeWriteJson for all JSON file writes (#3772)
* feat: Add safeWriteJson utility for atomic file operations

Implements a robust JSON file writing utility that:
- Prevents concurrent writes to the same file using in-memory locks
- Ensures atomic operations with temporary file and backup strategies
- Handles error cases with proper rollback mechanisms
- Cleans up temporary files even when operations fail
- Provides comprehensive test coverage for success and failure scenarios

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

* fix: use safeWriteJson for all JSON file writes

This change refactors all direct JSON file writes to use the safeWriteJson
utility, which implements atomic file writes to prevent data corruption
during write operations.

- Modified safeWriteJson to accept optional replacer and space arguments
- Updated tests to verify correct behavior with the new implementation

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

* feat: Implement inter-process file locking for safeWriteJson

Replaces the previous in-memory lock in `safeWriteJson` with
`proper-lockfile` to provide robust, cross-process advisory file
locking. This enhances safety when multiple processes might attempt
concurrent writes to the same JSON file.

Key changes:
- Added `proper-lockfile` and `@types/proper-lockfile` dependencies.
- `safeWriteJson` now uses `proper-lockfile.lock()` with configured
  retries, staleness checks (31s), and lock update intervals (10s).
- An `onCompromised` handler is included to manage scenarios where
  the lock state is unexpectedly altered.
- Logging and comments within `safeWriteJson` have been refined for
  clarity, ensuring error logs include backtraces.
- The test suite `safeWriteJson.test.ts` has been significantly
  updated to:
    - Use real timers (`jest.useRealTimers()`).
    - Employ a more comprehensive mock for `fs/promises`.
    - Correctly manage file pre-existence for various scenarios.
    - Simulate lock contention by mocking `proper-lockfile.lock()`
      using `jest.doMock` and a dynamic require for the SUT.
    - Verify lock release by checking for the absence of the `.lock`
      file.

All tests are passing with these changes.

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

* feat: implement streaming JSON write in safeWriteJson

Refactor safeWriteJson to use stream-json for memory-efficient JSON serialization:
- Replace in-memory string creation with streaming pipeline
- Add Disassembler and Stringer from stream-json library
- Extract streaming logic to a dedicated helper function
- Add proper-lockfile and stream-json dependencies

This implementation reduces memory usage when writing large JSON objects.

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

* fix: improve safeWriteJson locking mechanism

- Use file path itself for locking instead of separate lock file
- Improve error handling and clarity of code
- Enhance cleanup of temporary files

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

* test: fix safeWriteJson test failures

- Ensure test file exists before locking
- Add proper mocking for fs.createWriteStream
- Fix test assertions to match expected behavior
- Improve test comments to follow project guidelines

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

* test: update tests to work with safeWriteJson

Updated tests to work with safeWriteJson instead of direct fs.writeFile calls:

- Updated importExport.test.ts to expect safeWriteJson calls instead of fs.writeFile
- Fixed McpHub.test.ts by properly mocking fs/promises module:
  - Moved jest.mock() to the top of the file before any imports
  - Added mock implementations for all fs functions used by safeWriteJson
  - Updated the test setup to work with the mocked fs module

All tests now pass successfully.

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

* refactor: replace JSON.stringify with safeWriteJson for file operations

Replace all non-test instances of JSON.stringify used for writing to JSON files with safeWriteJson to ensure safer file operations with proper locking, error handling, and atomic writes.

- Updated src/services/mcp/McpHub.ts
- Updated src/services/code-index/cache-manager.ts
- Updated src/api/providers/fetchers/modelEndpointCache.ts
- Updated src/api/providers/fetchers/modelCache.ts
- Updated tests to match the new implementation

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

* docs: add rules for using safeWriteJson

Add concise rules for using safeWriteJson instead of JSON.stringify with file operations to ensure atomic writes and prevent data corruption.

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>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
2025-06-08 07:17:20 -07:00
Hannes Rudolph
67d238afd0
feat: add experimental flag to disable command execution in attempt_c… (#4352)
* feat: add experimental flag to disable command execution in attempt_completion tool

* fix: remove deprecation phase comments from attemptCompletionTool

* feat: add translations for disable completion command experiment

* fix: revert unintended package.json change

* Rename attempt-completion.experiment.test.ts to attempt-completion.test.ts

* fix: address PR feedback - restore autoCondenseContext in tests and remove type assertion

---------

Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
2025-06-08 07:14:57 -07:00
Matt Rubens
540d4fb94f
Add a share button when logged into cloud (#4448)
* Add a share button when logged into cloud

* Only show share button if enabled

* PR feedback
2025-06-08 07:08:41 -07:00
user202729
73e4418c12
Remove usage of npx (#4003) 2025-06-07 17:22:45 -07:00
kcwhite
12b8d59562
Bug fix for trailing slash error when using LiteLLM provider (#4275)
* Added changeset for my code changes

* Use URL constructor for joining baseUrl and path in litellm.ts

* Restoring Roo dotfiles

* Moved Roo dotfiles to root directory

* Revert this

* Add tests for litellm URL constructor fix

---------

Co-authored-by: Kevin White <kcwhite@ancestry.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-07 17:21:11 -07:00
Chris Estreich
52673b3721
Harden evals with retry logic + centralize logs on Docker host (#4440)
* Harden evals with retry logic + centralize logs on Docker host

* Don't delete controller container on exit

* Add randomness

* More tweaks

* More tweaks
2025-06-07 08:58:09 -07:00
Chris Estreich
6a232a99c6
Prevent hanging processes from preventing container cleanup (#4428) 2025-06-06 17:07:31 -07:00
Hannes Rudolph
b6bfeefc46
Remove mcp.json configuration and add it to .gitignore (#4422) 2025-06-06 12:33:35 -04:00
Chris Estreich
39d7f559d2
Update evals README.md (#4420)
* Update README.md

* Update README.md
2025-06-06 09:04:11 -07:00
Chris Estreich
f61b4e46a8
Fix git clone in evals setup script (#4418) 2025-06-06 08:47:43 -07:00
Hannes Rudolph
2a92312b85
Add MCP configuration file (#4363) 2025-06-06 11:04:01 -04:00
github-actions[bot]
84c6f44e56
Changeset version bump (#4403)
* 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-06-05 23:36:29 -07:00
Chris Estreich
22392e014e
Fix "The thinking budget (52428) is invalid" Gemini 2.5 Pro Preview e… (#4401) 2025-06-05 22:55:56 -07:00
Chris Estreich
24851b96db
Improve the evals "run status" section (#4400) 2025-06-05 22:00:15 -07:00
Matt Rubens
62a09a233c
Update CHANGELOG.md 2025-06-05 21:59:34 -04:00
Chris Estreich
39d6535f7c
Fix rust evals (run cargo with bash) + logging tweaks (#4392) 2025-06-05 16:40:34 -07:00
github-actions[bot]
93818716e4
Changeset version bump (#4390)
* 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-06-05 17:56:40 -04:00
Matt Rubens
442042bae9
v3.19.4 (#4389) 2025-06-05 17:53:39 -04:00
Daniel
3b45d86df7
Add gemini pro 06 05 (#4386)
* feat: add gemini-2.5-pro-preview-06-05 to Gemini and Vertex providers and UI, identical to 05-06

* feat: add thinking variant for gemini-2.5-pro-preview-06-05

* feat: add gemini-2.5-pro-preview-06-05 support to OpenRouter

* fix: update gemini-2.5-pro-preview model references in OpenRouter

* fix: tests

* feat: enhance reasoning handling in Gemini and Vertex handlers

* feat: add google/gemini-2.5-pro-preview to required reasoning budget models

* fix: refactor thinkingConfig assignment for consistency in Gemini and Vertex handlers

* Fix Gemini reasoning

* Fix tsc error

* Fix tsc error

* Hack to exclude thinking tokens by default

* feat: add global region to VERTEX_REGIONS

---------

Co-authored-by: Shariq Riaz <ishariqriaz@gmail.com>
Co-authored-by: cte <cestreich@gmail.com>
2025-06-05 17:49:12 -04:00
Chris Estreich
cb5b9c3718
Improve Docker setup for evals (#4327) 2025-06-05 12:16:36 -07:00
Matt Rubens
8f930ff6f8
Update CODEOWNERS (#4387) 2025-06-05 15:10:24 -04:00
Matt Rubens
39f69f27ef
Create SECURITY.md 2025-06-05 10:22:15 -04:00
kiwina
3f3825a219
fix: Address memory leaks in ChatView component (ChatView_1113, ChatView_1236) (#4248)
* chore: Staging ChatView.tsx after reset to main

* fix: Address memory leaks in ChatView (ChatView_1113, ChatView_1236)
2025-06-04 17:34:34 -04:00
KJ7LNW
8cc89149b4
fix: resolve Mermaid CSP errors with enhanced bundling strategy (#3681)
Implements a more robust bundling strategy for Mermaid diagrams to prevent
dynamic chunk loading at runtime, which was causing CSP violations.

Key changes:
- Added manualChunks function in vite.config.ts to consolidate all Mermaid
  code and dependencies into a single bundle
- Added mermaid and dagre to optimizeDeps.include for pre-bundling
- Customized chunkFileNames to ensure predictable output
- Removed incorrect static imports in MermaidBlock.tsx

This resolves the CSP errors where Mermaid was attempting to dynamically
load chunks like chunk-RZ5BOZE2.js and channel.js from the webview origin.

Fixes: #3680

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
2025-06-04 17:29:22 -04:00
Hannes Rudolph
4befe5ba24
Enforce codebase_search as primary tool for code understanding tasks (#4340)
* feat(prompts): enforce codebase_search as primary code understanding tool

- Add conditional codebase_search enforcement in tool use guidelines
- Modify objective section to prioritize codebase_search when available
- Update rules section with critical codebase_search-first rule
- Pass CodeIndexManager to prompt sections for availability checks
- Ensure graceful degradation when codebase_search is unavailable

* chore(docs): remove codebase search enforcement documentation

* fix: update snapshot and reorder capabilities section

- Update system.test.ts snapshot to reflect architect mode without codebase_search enforcement
- Reorder capabilities section to place search_files description after codebase_search
- Ensures logical flow: codebase_search (semantic) → search_files (regex) → other tools

* refactor: improve tool-use-guidelines numbering logic

- Replace subsequentNumbers object with array-based approach
- Use automatic incrementing with itemNumber++ for sequential numbering
- Build guidelines as an array and join at the end
- Fix potential numbering issues with conditional logic
- Update tests and snapshots to match new format

As suggested by daniel-lxs in PR #4340
2025-06-04 17:03:20 -04:00
github-actions[bot]
ae118c6c78
Update contributors list (#4224)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>
2025-06-04 17:01:10 -04:00
SannidhyaSah
a80795b78d
feat: Add OpenAI Compatible embedder for codebase indexing (#4066)
* feat: Add OpenAI Compatible embedder for codebase indexing

- Implement OpenAiCompatibleEmbedder with batching and retry logic
- Add configuration support for base URL and API key
- Update UI with provider selection and input fields
- Add comprehensive test coverage
- Support for all OpenAI-compatible endpoints (LiteLLM, LMStudio, Ollama, etc.)
- Add internationalization for 17 languages

* fix: Update CodeIndexSettings tests for OpenAI Compatible provider

- Fix field count expectations (4 fields including Qdrant)
- Use specific test IDs for button selection
- Fix input handling with clear() before type()
- Use toHaveBeenLastCalledWith for better assertions
- Fix status text matching with regex pattern

* fix: resolve UI test failures and ESLint errors

- Remove unused waitFor import to fix ESLint error
- Fix test expectations to match actual component behavior for input fields
- Simplify provider selection test by removing complex mock interactions
- All CodeIndexSettings tests now pass (20/20)

* feat: add custom model infrastructure for OpenAI-compatible embedder

- Add manual model ID and embedding dimension configuration
- Enable custom model input via text field in settings UI
- Add modelDimension parameter to OpenAiCompatibleEmbedder
- Update configuration management to persist dimension setting
- Prioritize manual dimension over hardcoded model profiles
- Add comprehensive test coverage for new functionality

This allows users to specify any custom embedding model and its
dimension for OpenAI-compatible providers, removing dependency
on hardcoded model profiles.

* Add missing translations for OpenAI-compatible model dimension settings in all locales

* refactor: remove unused modelDimension parameter from OpenAiCompatibleEmbedder

- Remove modelDimension property and constructor parameter from OpenAiCompatibleEmbedder class
- Update ServiceFactory to not pass dimension to embedder constructor
- Update tests to match new constructor signature
- The dimension is still used for QdrantVectorStore configuration

* chore: bot suggestion

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

* chore: bot suggestion

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

* refactor: rename OpenAiCompatibleEmbedder to OpenAICompatibleEmbedder for consistency

* feat: add model dimension validation for OpenAI-compatible settings

* refactor: improve default model ID retrieval logic for embedding providers

* feat: add default model ID retrieval for openai-compatible provider

* refactor: update default model ID retrieval to use shared utility function

* fix: Remove unnecessary type assertion in OpenAICompatibleEmbedder

* feat: add model dimension input for openai-compatible provider

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-04 17:00:52 -04:00
kiwina
f561208146
fix(WorkspaceTracker): Dispose FileSystemWatcher and other disposables to prevent resource leaks (#4237)
fix: auto patch for WorkspaceTracker_45
2025-06-04 16:57:54 -04:00
renovate[bot]
fe26c05dc9
fix(deps): update dependency lucide-react to ^0.513.0 (#4345)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 16:56:35 -04:00
renovate[bot]
f5d263e171
chore(deps): update dependency knip to v5.60.0 (#4344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 16:56:01 -04:00
Wojciech Kordalski
d1876d6af7
Get rid of "partial" component in names referencing not necessarily partial messages (#4332) 2025-06-04 16:55:20 -04:00
kiwina
6f21103545
fix: Prevent FileSystemWatcher leak in RooIgnoreController (#4233)
* fix: auto patch for RooIgnoreController_41

* fix: improve error handling during task disposal and cleanup
2025-06-04 16:54:24 -04:00
xyOz
c02e01ed69
ClineProvider Instance cleanup (#4266)
disposable cleanup
2025-06-04 16:54:00 -04:00
Sam Hoang Van
467c52fb46
refactor(mcp): use getDefaultEnvironment for stdio client transport (#4259)
- Replace manual PATH and HOME env var handling with getDefaultEnvironment()
- Improves consistency and reliability of MCP client environment setup
- Leverages SDK's built-in environment configuration
2025-06-04 16:53:25 -04:00
kiwina
815a0fb846
fix(RooTips): Clear setTimeout in useEffect cleanup to prevent state updates on unmounted components (#4235)
fix: auto patch for RooTips_37
2025-06-04 16:49:55 -04:00
kiwina
15b37134c1
fix(clipboard): Clear setTimeout in useCopyToClipboard to resolve memory leak (#4228)
fix: auto patch for clipboard_44
2025-06-04 16:45:51 -04:00
Dicha Zelianivan Arkana
72493ad40d
chore: improve feature request template (#4338) 2025-06-04 15:11:34 -04:00
renovate[bot]
dd295d9349
chore(deps): update dependency eslint-plugin-turbo to v2.5.4 (#4324)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 09:34:53 -07:00
renovate[bot]
6933ef1adb
chore(deps): update dependency @types/node to v22.15.29 (#4318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 09:34:19 -07:00
renovate[bot]
04ef897a2f
chore(deps): update dependency @types/node to v20.17.57 (#4310)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 09:34:00 -07:00