Commit graph

487 commits

Author SHA1 Message Date
Sam Hoang Van
e7e5511b65
feat: prioritize "Add to Context" and add line number tracking (#2063)
- Move "Add to Context" to the top of submenu and code actions for improved accessibility
- Add line number tracking (startLine/endLine) to EditorContext and code actions
- Update templates in support-prompt.ts to include line numbers in file references
- Ensure backward compatibility with existing code

This change improves the UX by making the frequently used "Add to Context" action more accessible and enhances context awareness by tracking and displaying line numbers for selected code.
2025-03-28 12:01:16 -04:00
Chris Estreich
0fd399de78
Automatically generate roo-code.d.ts (including type generation via zod-to-ts) (#2024) 2025-03-27 09:38:56 -07:00
aheizi
c7ac0c5db5
Support project level mcp (#1841)
* support project-level mcp config

* switch the toasts to English

fix test

(cherry picked from commit 26941dcaae)

* add i18n for project mcp

(cherry picked from commit 792a8225c1)

* optimize McpHub.ts

* fix merge main into head

* fix project mcp

* partial update mcp config

* fix toggleToolAlwaysAllow

* Modify mcp to support project and global of the same name

* fix ut

* remove unused mcp log

* i18n for mcp

* Revert README changes

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-27 00:23:39 -04:00
Sam Hoang Van
c62e8f2ee2
feat @-mention window path style & file with space (#1924)
* feat @-mention window path style & file with space

* Update src/core/mentions/index.ts

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

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-27 00:10:06 -04:00
Chris Estreich
a414c7d028
Wrangle our settings-related types and add support for settings import / export (#1997)
* Strongly type our settings use composition where possible

* Update src/core/contextProxy.ts

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

* Update src/core/contextProxy.ts

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

* Add comment, tweak function name

* Add changeset

* Clean up toolGroup types

* Comments tweak

* Remove unused type

* More type safety

* Improve import / export, add translations

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-03-26 16:29:01 -07:00
jwc11
55bbe88e39
feat: add pinning and sorting for API configurations dropdown (#2001)
* feat: add pinning functionality for API configurations

Added the ability to pin/unpin API configurations, enabling prioritized appearance in dropdown menus.
- modified state management to support storing pinned configurations persistently.
- Updated UI components to display and toggle pin states
- Adjusted backend handling for syncing pinned configuration states across sessions.

* refactor: add support for loading API configurations by ID

- Introduced a new method `loadConfigById` in `ConfigManager` to load API configurations using their unique ID.
- Refactored the dropdown and pin logic to work with ID
- Added tests to verify the new functionality for loading configurations by ID.

* fix: preserve existing API config ID on updates

- Ensure that the existing ID is retained when updating an API config.
- Prevents unintentional ID changes during configuration updates.

* Fix theme issues

---------

Co-authored-by: james <james@systemslogiq.com>
Co-authored-by: cte <cestreich@gmail.com>
2025-03-26 11:29:24 -07:00
Eugène P.
f071a43b26
Updated value of max tokens for gemini-2.5-pro-03-25 to correct one (#1985)
Updated value of max tokens for gemini 2.5 to correct one
2025-03-25 20:25:07 -04:00
Diarmid Mackenzie
f773bc3024
Remove "Enable Custom Mode Creation Through Prompts" toggle (#1980)
* Remove custom mode creation option

* Remove redundant code branch
2025-03-25 15:31:29 -04:00
Samuel
8613daf515
Added Gemini 2.5 Pro model to Google Gemini Provider (#1974)
* Added Gemini 2.5 Pro

* Update src/shared/api.ts

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-25 13:23:27 -04:00
Diarmid Mackenzie
ec423a715c
Fetch instructions (#1869)
* Code for new fetch_instructions tool

* Call parameter for fetch_instructions task, not text

* Additional places that fetch_instructions needs to be added.

* Pass necessary objects into create MCP server code

* Update snapshots to reflect changes to prompts

* Fixes from testing

* Move guidance on creating project modes to fetchable instructions

* i18n for new prompt

Translations suggested by Roo.

* Missing translation

* Another missing i18n update

* Missing Catalan translation

* Re-use content parameter on ClineSayTool

* Remove space from zh-TW translation

This is consistent with other translations

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

* PR review - suggested changes to prompts

* Slightly more conservative in terms of text pruning from default prompt

* Move additional detail about mode creation into fetch_instructions instructions

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-03-25 13:08:17 -04:00
Peter Dave Hello
45299a9aea
Fix the supportsPromptCache value for OpenAI models (#1923)
Reference:
- https://platform.openai.com/docs/models
2025-03-25 13:07:10 -04:00
axb
0bc4f30c23
add new task command (#1648)
* add new task command

* Internationalize

* Revert README changes

* More i18n

* Fix tests

* Fix i18n

* Missing translations

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-25 11:08:11 -04:00
Matt Rubens
1810efe496
Additional checkbox for auto-approving reads and writes outside of the workspace (#1965) 2025-03-25 01:35:33 -04:00
Jiayuan Chen
6d8e7bbfbd
Internationalization support for custom storage path functionality (#1957)
Co-authored-by: Your Name <your.email@example.com>
2025-03-24 21:48:26 -04:00
Jiayuan Chen
1c9daf5a48
Support customize storage path (#1941)
Co-authored-by: Your Name <your.email@example.com>
2025-03-24 15:22:55 -04:00
Steven T. Cramer
8ad4fff0d2
Removed hardcoded filenames to GlobalFileNames constants. (#1904)
* Replace hardcoded custom modes filename with GlobalFileNames constant

* Remove 'cline' prefix from mcpSettings filename

* Use GlobalFileNames.customModes in modes.ts

* replace two more `cline_mcp_settings` with `mcp_settings` in tests.

* feat: add settings file migration for new file naming convention

- Implement migrateSettings function to rename legacy settings files to new format
- Migrate cline_custom_modes.json to new custom modes filename
- Migrate cline_mcp_settings.json to new MCP settings filename
- Add TODO to remove migration code in September 2025 (6 months after implementation)
- Make activate function async to support migration on startup

* Add associated changeset

* removed unused import

* refactor: move migrateSettings to dedicated utility file

- Extract migrateSettings function from extension.ts to src/utils/migrateSettings.ts
- Update extension.ts to import and use the extracted function
- Update tests to use the real implementation
- Improve dependency injection by passing outputChannel as parameter
- Enhance maintainability by isolating temporary migration code (to be removed Sept 2025)

* Update src/extension.ts

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-24 13:32:44 -04:00
teddyOOXX
cc2420ea1a
fix qwq model in openai provider (#1940)
* feat: Add the openAiR1FormatEnabled field to enable this switch in OpenAI compatible mode to support the current QWQ and future additional classes of R1 models.

* feat: Add the openAiR1FormatEnabled field to enable this switch in OpenAI compatible mode to support the current QWQ and future additional classes of R1 models.

* fix: add miss i18n

* fix: add miss i18n

* fix: remove the redundant call

---------

Co-authored-by: xiong <yueminxiong.xym@alibaba-inc.com>
2025-03-24 10:14:44 -04:00
Matt Rubens
e810a886d2
Welcome page OAuth (#1913)
* Add Requesty OAuth flow

* New 1-click onboarding flow

* Requesty: Use correct default model info

* When called from the onboard flow, created the default profile

Glama OAuth handler changed for consistency.

* Add router images

* Shuffle the routers

* Translate

* Appease knip

---------

Co-authored-by: Daniel Trugman <dtrugman@gmail.com>
2025-03-23 10:08:16 -04:00
Matt Rubens
02081dedf9
Revert "feat(mentions): improve path handling for Windows and escaped spaces" (#1875) 2025-03-21 09:59:16 -04:00
Matt Rubens
95ba760daf
Non-thinking sonnet has 8192 max tokens (#1860) 2025-03-21 00:24:57 -04:00
Sam Hoang Van
70a476e722
feat read file range (#1440)
* feat read file range

feat: add file truncation with code structure preview

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

Key changes:

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

add line number

pr comment

Return definition ranges from tree-sitter

make treesitter always add line

add line number to rg search

enhance tree siter output & fix test

update snapshot

fix test

* Add translations, tweak range

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-20 00:55:47 -04:00
Matt Rubens
f181da1454
Move context-mention file/folder search to the server (#1824) 2025-03-20 00:45:27 -04:00
Wojciech Kordalski
499b8e4665
Fake AI provider (#1769)
* Fake AI

* Do not show Fake AI in Roo-Code settings

* Rename providers/fake-provider.ts to providers/fake-ai.ts
2025-03-19 19:07:59 -07:00
Matt Rubens
65740b311f
Put the full language name in the system prompt (#1813) 2025-03-19 13:33:31 -04:00
Chris Estreich
a15691dc1d
Add a way to stop TTS (#1787) 2025-03-18 17:05:05 -07:00
Matt Rubens
2267cad93d
Revert "Merge pull request #1618 from aheizi/support_project_mcp" (#1784)
This reverts commit df80e9620d, reversing
changes made to dc302f72c2.
2025-03-18 16:10:12 -04:00
aheizi
7ef4841914
feat: batch clear history (#1596)
* batch clear history

* catch Task not found error

* fix deleteMultipleTasksWithIds

* add i18n for batch clear history

* add i18n for history

* debug

* remove unused logs

* fix trans

* fix trans

* Cleanup

---------

Co-authored-by: aheizi <aheiz@outlook.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-18 09:33:25 -04:00
Sam Hoang Van
a56741f51e
fix for task history (#1765) 2025-03-18 08:54:39 -04:00
Chris Estreich
878b3820d2
Settings tweaks: add terminal & language sections, fix whell scroll in editor tab (#1763) 2025-03-18 00:11:57 -07:00
KJ7LNW
6301e90454
Fix shell integration race condition (and other minor fixup/cleanup) (#1660)
* fix: clarify PowerShell command completion workaround

The command completion detection approach in PowerShell requires an output
string to allow duplicate commands to execute in some versions of code.
Update the string to explicitly indicate it is a Roo PowerShell workaround,
making it clear in terminal output that this is intentional behavior rather
than a side effect.

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

* cleanup: improve terminal logging and error handling

No functional changes - purely improves error handling and logging clarity.

Terminal.ts:
- Handle undefined process state in setActiveStream without throwing
- Add terminal IDs to all log messages for better traceability
- Improve error message clarity in shell integration timeout

TerminalRegistry.ts:
- Reorganize shell execution event handlers for better flow
- Log shell execution events before processing for reliable debugging
- Add detailed context to terminal not found scenarios
- Include command and execution state in error messages

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

* feat: make terminal shell integration timeout configurable

Users with long shell startup times were encountering "Shell Integration Unavailable" errors due to the hard-coded 4s timeout. The timeout is now configurable through Advanced Settings (1-60s).

Thanks @filthy for troubleshooting and @kiwina for suggesting making the timeout configurable.

Fixes #1654

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

* critical fix: race condition that prevents command completion

Terminal running state is now managed in TerminalRegistry instead of Terminal to prevent race between stream close and shell completion.

While this race may not trigger on current VSCode versions, newer releases with additional terminal fixes may expose the issue. This proactively prevents "Shell execution end event received, but process is not running" errors.

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

* fix: improve command execution path reporting

Enhance clarity of command execution context and error reporting:

- Check to see if the directory changed because of the command
- Clarify execution path message
- Add explicit message when command exits with non-zero code

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

* system instructions: clarify terminal directory operations

Clear guidance for the AI system on:
- Working directory constraints
- Path handling requirements
- Tool vs terminal directory behavior

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

* test: update snapshots for system prompt working directory instructions

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: Chris Estreich <cestreich@gmail.com>
2025-03-17 23:57:20 -07:00
Felix NyxJae
a4853f2faa
fix Human Relay not working up on welcome screen (#1759)
* fix: Add special handling to human-relay providers, optimize configuration check logic

* fix: Remove the debug log in the checkExistKey function
2025-03-18 01:51:14 -04:00
Seth Miller
f16a49de87
Add text-to-speech functionality (#1412)
* Add text-to-speech functionality

* Add speed config option to text-to-speech

* Fix test case for tts speed slider

* Fix test case for tts speed slider (really)

* Disabled error message logging in tts.ts

* ignore markdown and mermaid diagrams in TTS

* add ttsEnabled and ttsSpeed to GlobalStateKey

* fix failing webview test for save button

* Translations

* Fix tests

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-18 01:47:16 -04:00
Chris Estreich
eb74f02094
Choose specific provider when using OpenRouter (#1753)
* Choose specific provider when using OpenRouter

* Add translations
2025-03-17 15:40:27 -07:00
Chris Estreich
4f15b5d9b7
Merge pull request #1616 from qdaxb/remove_at_when_add_context
remove '@' when add selection to context
2025-03-17 11:40:42 -07:00
cte
f108dfaeb8 Evals 2025-03-17 10:09:19 -07:00
Matt Rubens
df80e9620d
Merge pull request #1618 from aheizi/support_project_mcp
feat: support project-level mcp config
2025-03-17 12:32:11 -04:00
Matt Rubens
7bfdcbe64e
Merge pull request #1705 from RooVetGit/cte/context-proxy-fixes
Fix API configuration profile switching
2025-03-17 11:52:08 -04:00
aheizi
bda929b4f6 Merge branch 'main' into support_project_mcp
# Conflicts:
#	webview-ui/src/i18n/locales/ar/mcp.json
#	webview-ui/src/i18n/locales/cs/mcp.json
#	webview-ui/src/i18n/locales/hu/mcp.json
#	webview-ui/src/i18n/locales/pt/mcp.json
#	webview-ui/src/i18n/locales/ru/mcp.json
2025-03-17 12:07:03 +08:00
Matt Rubens
79e1d11b2e Add a language picker 2025-03-16 16:49:07 -04:00
Matt Rubens
534f6fa505 Localize tool group names 2025-03-16 14:55:38 -04:00
cte
1abf8c1dcc Fix API configuration profile switching 2025-03-16 11:24:58 -07:00
Matt Rubens
f0ac4ab8bf Localize experimental checkboxes 2025-03-16 14:03:01 -04:00
aheizi
70600d7077 Merge remote-tracking branch 'origin/main' into support_project_mcp 2025-03-15 18:40:22 +08:00
Matt Rubens
9bbbaf2288 Add a new setting to control the number of workspace files included in the system prompt 2025-03-14 12:06:56 -04:00
aheizi
5d8a456374 Merge branch 'main' into support_project_mcp 2025-03-14 20:48:47 +08:00
Matt Rubens
4ada518e58
Merge branch 'main' into jbbrown/bedrock_cost_intelligent_prompt_routing 2025-03-13 17:17:44 -04:00
aheizi
4106ca4a19 support project-level mcp config 2025-03-13 21:07:24 +08:00
axb
5916a4d0a6 remove '@' when add selection to context 2025-03-13 17:43:41 +08:00
Chris Estreich
7845f96788
Merge pull request #1612 from RooVetGit/cte/task-events
Add Cline events and roofactor subtasks slightly
2025-03-12 22:56:13 -07:00
cte
4b23644683 Add Cline events and roofactor subtasks slightly 2025-03-12 22:52:37 -07:00