Commit graph

617 commits

Author SHA1 Message Date
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
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
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
Wojciech Kordalski
d1876d6af7
Get rid of "partial" component in names referencing not necessarily partial messages (#4332) 2025-06-04 16:55:20 -04:00
John Richmond
2fda064ae9
Cloud: bugfixes: log refresh errors and allow logout from inactive-session (#4268)
* Cloud: log session refresh errors

* Cloud: bugfix: allow logouts during the inactive-session state
2025-06-02 15:32:36 -07:00
Matt Rubens
caf54dcc3d
Run prettier on src/ (#4221) 2025-06-01 22:56:47 -04:00
qingyuan1109
98711d45cf
add support for mcp server instructions (#3260)
* add support for mcp server instructions

* Update McpView.tsx

* feat(mcp): add instructions field to MCP localization files and update UI to display instructions

---------

Co-authored-by: huixin <yuanhx@cffex.com.cn>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-01 22:28:27 -04:00
Chris Estreich
9e3b0fd870
Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
Sam Hoang Van
9ba0cd5c7a
feat(read_file): enhance file reading capabilities with multi-file support and improved parameter handling (#2886)
* feat(read_file): enhance file reading capabilities with multi-file support and improved parameter handling

fix(read_file): change return to continue on approval rejection in readFileTool

Enhance readFileTool with improved error handling and validation

- Introduced a FileEntry interface for better type management.
- Added validation for start_line and end_line to ensure proper ranges.
- Implemented RooIgnore validation before processing files.
- Enhanced error handling with dedicated functions for file and global errors.
- Streamlined file reading logic to handle binary files, definitions-only mode, and line thresholds more effectively.
- Improved user feedback for empty files and read limits.

chore: update Jest snapshot for system prompt tool usage

Refactor read-file tool to support XML input format and multiple line ranges

- Updated the `getReadFileDescription` function to reflect new XML structure for file reading requests.
- Modified `readFileTool` to parse XML input, allowing multiple line ranges for each file.
- Removed old parsing logic that handled line ranges as separate parameters.
- Implemented validation for line ranges and ensured proper error handling for file access.
- Adjusted approval messaging to accommodate new line range format.
- Enhanced error handling to provide consistent feedback for file read errors.

update from KJ7LNW  comment

feat: add maxConcurrentFileReads setting to enhance read_file tool performance

feat: enhance readFileTool with XML parsing and file processing state tracking

feat: enhance readFileTool to include user feedback handling and processing state tracking

chore: clean up read_file tool documentation by removing extra newlines

feat: update read_file tool tests to handle user feedback and approval states

feat: add tests for feedback message formatting and XML special character handling in read_file tool

Implement code changes to enhance functionality and improve performance

feat: increase max concurrent file reads and adjust slider range in settings

feat: increase default max concurrent file reads from 5 to 15 across settings and context management

fix(read_file): enhance legacy path handling and remove duplicate parameters

feat(read_file): enhance file description handling and add support for multiple files in messages

done poc for new ux

idea 1

* fix the test

* fix: normalize locale file formatting to use tabs

- Applied prettier formatting to all locale JSON files
- Fixed mixed indentation (spaces/tabs) to use consistent tabs
- Aligns with project's prettier configuration

* fix(settings): improve checkbox handling and slider configuration in ConcurrentFileReadsExperiment

* fix(read_file): enhance description to include partial reads support

* fix(read_file): update description for partial reads and improve example clarity

* fix: suggestions

* fix: translations

* test: update system prompt snapshots for multi-file read tool

* fix: remove batch permission question from readFile tool translations

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-05-30 17:09:42 -04:00
zeo
0ef52c8cd7
Add DeepSeek R1 0528 to the Chutes provider (#4105)
New model for the Chutes provider, surpasses the old DeepSeek R1
and is free so it is also set to be the default model now.
2025-05-29 06:41:05 -04:00
John Richmond
d4c00e58ed
Simplify CloudService callbacks (#4097)
- Remove AuthService callbacks, add user-info event
- Store userInfo on AuthService and fetch it when sessions go active
- Simplify CloudService callbacks to just stateChanged
- Add cloudUserInfo to state and remove authenticatedUser message
2025-05-28 21:15:48 -07:00
Chris Estreich
7820b7517a
Roo Code Cloud (#4069)
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
2025-05-28 20:43:30 -07:00
Matt Rubens
3ee7786a1b
Update AWS regions to include Spain and Hyderabad (solves #3862) (#4042)
Update AWS regions to include Spain and Hyderabad
2025-05-28 21:41:20 -04:00
Canyon Robins
4804e3b3b9
[Condense] Move condense settings out of experimental and defualt enable (#4088)
* [Condense] Move condense settings out of experimental and defualt enable

* tests

* wip

* Update translations

* fixes

* more tests

* changeset

* wip

* update translations

* fix more translations
2025-05-28 17:05:39 -07:00
ChuKhaLi
171307c2dc
fix: ensure correct precedence for roleDefinition and customInstructions when generating system prompt (#3791)
* fix: ensure correct precedence for roleDefinition and customInstructions

* Refactors mode selection logic for custom modes

Refactors the mode selection logic to prioritize custom modes
2025-05-28 13:23:49 -04:00
slytechnical
73d162305a
Added a hardcoded list of computer use models for litellm as a fallba… (#4052)
Added a hardcoded list of computer use models for litellm as a fallback for older litellm versions
2025-05-27 14:58:20 -05:00
Chris Estreich
e66136f1aa
Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
Peter Dave Hello
6ebc95d2a8
Update xaiModels and xaiDefaultModelId in src/shared/api.ts (#3957)
* Add non-beta versions of `grok-3` models to the `xaiModels` object
* Change the default `xaiDefaultModelId` from `grok-3-beta` to `grok-3`
2025-05-25 09:10:46 -04:00
Chris Estreich
77a5b6c06d
Fix reasoning budget for Gemini 2.5 Flash on OpenRouter (#3945)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-24 19:46:42 -04:00
Matt Rubens
4abadd877b
Default to Sonnet 4 (#3928) 2025-05-24 13:06:25 -04:00
Shariq Riaz
ff50a47b5b
feat: enable prompt caching for gemini-2.5-flash-preview-05-20 (#3907)
* feat: enable prompt caching for gemini-2.5-flash-preview-05-20

* feat: Add cache pricing for gemini-2.5-flash-preview-05-20 models
2025-05-24 07:38:45 -04:00
Daniel
61e122dc34
Codebase indexing (Clean history) (#3137)
* feat: apply changes from local main

* fix: add missing types

* feat: deduplicate code blocks coming out of parser

* feat: implement a cache manager to improve cache handling

* refactor: move code index service initialization to extension and remove await from indexing process

* fix: return undefined instead of throwing if no workspace is detected

* feat: allow auto approve if it is active for read tools

* refactor: improve UI of the results and allow opening the ranges directly in the editor

* refactor: use dependency injection to improve performance

* feat: implement result filtering by directory path

* refactor: centralize path normalization logic

* refactor: remove unnecessary barrel file

* refactor: prevent restarting the service if no settings change

* fix: the indexing process should never be awaited

* refactor: cleanup unused method

* refactor: remove batch limits for ollama

* refactor(parser): simplify method signatures and improve chunking logic

- Remove redundant min/max chars parameters
- Add better handling for oversized lines
- Improve chunking logic with segment handling
- Clean up method signatures and parameter ordering

* fix(settings): make select inputs full width in CodeIndexSettings

* refactor: increase max list file limit

* feat(ui): improve codebase search result display formatting

* test: add tests for cache and config managers

* test: create unit tests for parser and scanner

* feat(parser): improve segment hash uniqueness

- Added startCharIndex to segment hash calculation in _chunkTextByLines
- Track character position when splitting oversized lines
- Ensures unique identification of segments from same line

* feat(file-watcher): add error logging and optional ignoreController injection

* fix: allow getting the state if the service is disabled

* fix: set the embedding models when cline provider is initialized

* feat: use zod to validate form

* feat(file-watcher): enhance file watcher for batched deletions and improved vector store interactions

Improve file watcher to handle file deletions in batches and optimize vector store operations.

* feat(CodeIndexSettings): move OpenAI key input to a conditional rendering block

* feat(CodeIndexSettings): update button visibility based on indexing status

* feat(file-watcher): refactor vscode mock and enhance file watcher tests

* fix(CodeIndexManager): do not await startIndexing on configuration changes

* feat(types): add codeIndexOpenAiKey and codeIndexQdrantApiKey to ProviderSettings and IpcMessage

* feat(FileWatcher): enhance file processing with batch operations and new status handling

* fix(webviewMessageHandler): handle errors during CodeIndexManager initialization

* refactor(CodeIndexManager): streamline service creation by consolidating into a single method

* feat(CodeIndex): implement minimum search score configuration and update search methods

* refactor(CodeIndexSettings): replace ApiConfiguration with ProviderSettings and update related methods

* refactor: move contants to centralized file

* refactor(constants): rename CODEBASE_INDEX_SEARCH_MIN_SCORE to SEARCH_MIN_SCORE

* feat(QdrantVectorStore): enhance search functionality with new query structure and indexing

* feat(FileWatcher): implement batch processing and retry logic for upserting points

* fix(CodeIndexSettings): rename setProviderSettingsField to setApiConfigurationField and move model label

* fix(ChatRow): remove limit from search query messages

* refactor(CodebaseSearchResult): remove unused props from component

* feat: implement batch processing for file events in FileWatcher

- Introduced a new mechanism to accumulate file events (create, change, delete) and process them in batches.
- Added debounce functionality to optimize processing frequency.
- Emitted events for batch processing start, progress updates, and completion with detailed summaries.
- Refactored existing processing logic to handle batch deletions and upserts efficiently.
- Enhanced error handling and logging for better traceability during batch operations.

* feat(CodeIndex): implement batch processing and update progress reporting

* fix: define a default url for qdrant

* feat(CodeIndexManager): add initialization check and update startIndexing logic

* feat(CodeIndexSettings): validate Qdrant URL and update settings commitment logic

* feat: refactor progress calculation and update progress bar rendering

* refactor: remove webview provider and related methods

* fix: simplify indexing status update by directly using update values

* feat: integrate .gitignore support into file processing and scanning logic

* fix: update clearCacheFile method to write an empty object instead of deleting the cache file

* Revert this

* Run prettier

* fix: add new dependencies for qdrant client and directory scanner

* feat: add codebase search functionality to localization files

* feat: add localization strings for codebase indexing settings

* feat: integrate CodeIndexSettings into ExperimentalSettings and update settings localization

* refactor: remove console logs from various components for cleaner output

* feat: enhance capabilities section and codebase search tool description

* feat: add code indexing localization for multiple languages

* fix: correct indentation for CodeIndexSettings component in ExperimentalSettings

* refactor: update unit tests to properly test current functionality

* feat: add mock implementation for p-limit and update Jest config

* feat: track file creation, change, and deletion events in accumulatedEvents

* refactor: simplify file watcher tests by removing waitForFileProcessingToFinish and using direct event accumulation

* refactor: mock ContextProxy's getValue method to return current config name in ClineProvider tests

* refactor: mock missing properties required by codebase indexing manager

---------

Co-authored-by: cte <cestreich@gmail.com>
2025-05-23 19:07:19 -06:00
Shariq Riaz
20c7453425
Remove claude-3.7-sonnet and claude-3.7-sonnet:thinking from vscodelm (#3895)
* Remove claude-3.7-sonnet and claude-3.7-sonnet:thinking from vscodelm provider in api.ts (not supported via API)

* Add static blacklist for unsupported VS Code Language Model IDs

---------

Co-authored-by: Ruakij <ruakij@ruekov.eu>
2025-05-23 17:28:42 -04:00
slytechnical
1791bb9053
Ability to refresh LiteLLM models list (take 2) (#3852)
* Litellm models can now be refreshed

* Fix no-case-declarations lint issue and put back missing autoCondenseContextPercent webviewMessageHandler case

* Add tests for litellm config changes

* replace hardcoded keys with constants
2025-05-23 16:19:40 -05:00
Chris Estreich
872902754a
Fix max tokens in the task header (#3893) 2025-05-23 02:32:21 -07:00
Chris Estreich
fa1e7b415c
Re-work support for reasoning models, including "hybrid" reasoning models (#3870) 2025-05-23 01:40:17 -07:00
SannidhyaSah
d149d65e14
Feature/condensing enhancements (#3826)
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: Your Name <you@example.com>
2025-05-22 17:26:46 -04:00
Matt Rubens
c52d6d52ab
Fix openrouter names for caching and computer use (#3868)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-22 17:07:56 -04:00
Matt Rubens
fb3f6d0378
Fix Claude 4 models in Vertex (#3849) 2025-05-22 14:43:31 -04:00
Shariq Riaz
8a8fadd407
Add Claude Sonnet 4 and Claude Opus 4 models with thinking variants (#3844)
Co-authored-by: cte <cestreich@gmail.com>
2025-05-22 10:44:56 -07:00
Chris Estreich
39cd50b989
Fix linter errors (#3821) 2025-05-21 23:16:43 -07:00
Canyon Robins
1fe65364ee
[Condense] Add a slider for the context condense threshold (#3790)
* [Condense] Add a slider for the context condense threshold

* slider UI

* condense if we reach the threshold

* fixes

* test typing fixes

* add more truncate tests

* changeset

* update translations

* fix missing type
2025-05-21 12:10:00 -07:00
Noritaka Kobayashi
4e71b78327
refactor: simplify loop syntax in combineApiRequests and XmlMatcher (#3776) 2025-05-21 09:33:18 -04:00
Daniel
27e47de3aa
Add Gemini Flash 2.5 05-20 variants for the Vertex provider (#3758)
* feat(api): add gemini-2.5-flash-preview-05-20 model configuration

* feat(tests): update apiModelId to gemini-2.5-flash-preview-05-20 in ProviderSettingsManager tests in case the old version is deprecated

* chore: add changeset

* feat(api): update vertexModels to add gemini-2.5-flash-preview-05-20 variants

* chore: update changeset
2025-05-20 21:13:21 -04:00
Shariq Riaz
5ccce3a39d
feat: add gemini-2.5-flash-preview-05-20 models (#3769) 2025-05-20 21:08:07 -04:00
Chris Estreich
f274a150c4
Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00
Canyon Robins
c3716f1107
[Condense] Add a button to condense the task context (#3623)
* [Condense] Add a button to condense the task context

* wip

* wip

* wip

* bring back delete size

* account for the system prompt in the context

* update tests to use systemPrompt

* add type

* translations

* nit

* update tests

* filter to the current task

* nit

* refactor

* nit

* non interactive option

* simplify chat summary UI

* changeset

* nit

* fix check-types

* throw
2025-05-20 13:47:02 -07:00
Matt Rubens
737bad6061
Use yaml as default custom modes format (#3749) 2025-05-20 16:44:29 -04:00
Chris Hasson
25cd57e157
feat(settings): Add allowedMaxRequests feature inspired by Cline (#3631)
* feat(settings): Introduce the "auto-approve request count" feature from Cline

This is the first minor UI feature I've added, so please let me know if I'm missing anything! (translations, organization, etc!)

Please see commits for details

introduce allowedMaxRequests to globalSettingsSchema
update ExtensionState and its context with allowedMaxRequests
implement UI for setting max requests in AutoApproveMenu component
prompt user when auto-approval limit is reached with i18n support
increment consecutiveAutoApprovedRequestsCount and reset upon user approval
add translations for auto-approved request limit reached prompt in multiple languages
add new UI for "auto_approval_max_req_reached" in ChatRowContent
display prompt with title, description, and button for user action

🔧 chore(gitignore): add .idea to .gitignore to exclude IDE-specific files
- remove .idea/workspace.xml to clean up repository

* 🔧 chore(gitignore): add IDE configuration files to ignore list

- add .idea directory to ignore JetBrains IDE configurations

* 🌐 i18n(chat): add translation keys for api request limit

- introduce translation keys for "title" and "unlimited" in multiple languages
- update description for api request limit in various languages

* 🌐 i18n(chat): migrate auto-approved request limit translations

- move translations from common.json to chat.json across locales
- update component to use Trans for dynamic text rendering

* Update the UI for setting max requests

* Hide the auto-approve limit warning once clicked

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-20 11:30:27 -04:00
Canyon Robins
a028f722bb add getApiMetrics.test.ts 2025-05-19 19:44:51 -07:00
Canyon Robins
2bdd7d11b3 bug fix 2025-05-19 19:09:01 -07:00
Canyon Robins
603d2eface [Condense Context] Track metrics around context condensing and show in UI 2025-05-19 17:36:17 -07:00
zeo
d70d0c1627
Add Qwen3 model series to the Chutes provider (#3710)
* Add Qwen3 model series to the Chutes provider

New models for the Chutes provider:

- Qwen/Qwen3-235B-A22B
- Qwen/Qwen3-32B
- Qwen/Qwen3-30B-A3B
- Qwen/Qwen3-14B
- Qwen/Qwen3-8B

* add changeset
2025-05-18 09:30:45 -07:00
Canyon Robins
7c1185ed33
[Condense] Condense messages with an LLM rather than truncating (#3582)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-14 16:44:01 -04:00
Hannes Rudolph
4aa448b7e8
Refactor: Update custom instructions for 'ask' mode (#3583)
This commit refines the custom instructions for the 'ask' mode. The changes aim to provide clearer guidance to the AI, emphasizing thoroughness in answering questions and caution against prematurely switching to code implementation.

Specifically, the instructions were updated as follows:

- Changed "Make sure to answer the user's questions" to "Always answer the user’s questions thoroughly"
- Changed "don't rush to switch to implementing code" to "do not switch to implementing code unless explicitly requested by the user"
- Changed "Include Mermaid diagrams if they help make your response clearer" to "Include Mermaid diagrams when they clarify your response"

These changes are reflected in both [`src/shared/modes.ts`](src/shared/modes.ts:80) and its corresponding snapshot file [`src/core/prompts/__tests__/__snapshots__/system.test.ts.snap`](src/core/prompts/__tests__/__snapshots__/system.test.ts.snap:5458).
2025-05-13 20:10:48 -04:00
Matt Rubens
751afaa6ac
Add a 'when to use' section to mode definitions (#3571)
* Add a 'when to use' section to mode definitions

* Remove defaults for now
2025-05-13 18:39:02 -04:00
Chris Estreich
20fab97b4d
Gemini implicit caching (#3515) 2025-05-12 14:16:27 -07:00
John Richmond
8cb5c4e9e3
Restore profile management work + fix #3434 (#3449)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-12 15:47:09 -04:00
Matt Rubens
730d037a12
Revert "Improve provider profile management in the external API (#3386)" (#3440) 2025-05-10 08:27:37 -04:00