Commit graph

1662 commits

Author SHA1 Message Date
Greg Taylor
5fbf563216
Add an activation command for other extensions (#2073)
Since VS Code provides no actionEvents that trigger when a specific
extension activates, extensions can't activate only once Roo is
activated and ready.

This commit introduces a new roo-cline.activationCompleted command
and fires it at the very end of extension activation. Other
extensions that use Roo's exported APIs can now activate when they
see this event.

Co-authored-by: Greg Taylor <gregtaylor@netflix.com>
2025-03-28 23:48:03 -04:00
Chris Estreich
dbe0ede9a7
Handle null [x]ModelInfo types, recover from settings schema parse errors (#2064) 2025-03-28 09:59:58 -07:00
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
Matt Rubens
b46f6adb78
Extract code for read_file from Cline (#2059) 2025-03-28 11:47:47 -04:00
Diarmid Mackenzie
62a7bc7959
Refactor fetch instructions to new file (#2056)
* Refactor fetch_instructions handling into separate module

* Use correct case for module name
2025-03-28 09:50:42 -04:00
KJ7LNW
317e5446fb
Fix list_code_definition_names to support files (#2046)
* feat: enhance list_code_definition_names to support files

Fix 'cwd option must be a path to a directory' error.
Add support for analyzing individual source files.
Update tool description to clarify file and directory usage.

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

* test: updated system instruction snapshots

Update system instruction snapshots for list_code_definition_names tool.
The snapshots now reflect enhanced documentation that clarifies
the tool can analyze both individual files and directories.

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-28 09:39:29 -04:00
Chris Estreich
d4c7493674
Remove redundant zod schemas (#2051)
Add changeset
2025-03-27 21:59:51 -07:00
Chris Estreich
3d0fc3ccc5
Add config getters to RooCodeAPI (#2048) 2025-03-27 21:12:55 -07:00
Chris Estreich
7eb469f636
Re-enable ClineProvider tests (#2047) 2025-03-27 21:06:54 -07: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
KJ7LNW
3c75b81f0d
Fix: Restore file truncation backward compatibility and fix regressions (#2022)
* fix: restore file truncation backward compatibility and fix regressions

Fixes #1934

- Setting maxReadFileLine=-1 provides equivalent functionality for reading entire files
- Revert to system-controlled maxReadFileLine for file truncation, fixing regressions with:
  - Overridden system prompts lacking auto_truncate parameter information
  - Insufficient user control over truncation behavior
- Add 'Always read entire file' checkbox for easier access to full file reading
- Update translations across all locales with improved descriptions
- Update truncation notice to be more concise

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

* test: add comprehensive tests for read_file maxReadFileLine settings

- Tests behavior when maxReadFileLine is -1 (reads entire file)
- Tests behavior when maxReadFileLine >= file length (reads entire file)
- Tests behavior when maxReadFileLine is 0 (shows only definitions)
- Tests behavior when maxReadFileLine < file length (truncates content)
- Verifies exact line counts in responses
- Adds helper functions for response validation
- Includes DEBUG flag for controlled logging

---------

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-27 01:56:10 -04: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
Matt Rubens
4d744bb94a
New icon (#2020) 2025-03-27 00:09:07 -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
Chris Estreich
599d451bd1
Fix task completion events (#1981)
* Fix task completion events

* Create polite-singers-greet.md

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-25 20:29:06 -04: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
Matt Rubens
b8549f1f26
Auto-approval logic for fetch_instructions (#1976) 2025-03-25 14:30:32 -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
黄远成
237ee329ee
Support mcp image resource (#1962)
handle mcp image resource
2025-03-25 00:55:28 -04:00
Matt Rubens
4fa4943d5f
Revert "[clinerules] search clinerule in parent folders which make it easier to share within a github repo" (#1959)
Revert "[clinerules] search clinerule in parent folders which make it easier …"

This reverts commit 2953baef97.
2025-03-24 23:09:25 -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
Rian Santos
809e8cd6bc
#906 - Add watchPaths option to McpHub for file change detection (#1755)
* #906 Add watchPaths option to McpHub for file change detection

* #906 Refactor file watcher management in McpHub

add support multiple watchers per server.

modified the setupFileWatcher method to properly handle asynchronous operations and prevent unhandled promise rejections.

error handling now includes specific error messages that identify exactly where the error occurred.

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-24 15:33:30 -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
cannuri
92dd8e36da
Fix browser tool visibility in system prompt preview (#1840)
fix sys prompt browser visibility
2025-03-24 14:48:36 -04:00
ying
2953baef97
[clinerules] search clinerule in parent folders which make it easier to share within a github repo (#1832)
* [clinerules] search clinerule in parent folders which make it easier to share common clinerules for a git repo

* fix indent

* Fix test

---------

Co-authored-by: Ying Liu <lying@microsoft.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-24 14:18:30 -04:00
Wojciech Kordalski
fdcc679f9f
Add taskCreated event to API and subscribe to Cline events earlier (#1942)
* Cline events are subscribed earlier, added `taskCreated` event to API

* Probably fix the ClineProvider test
2025-03-24 11:05:33 -07:00
KJ7LNW
953a9c777a
refactor: align tree-sitter output with other tools (#1859)
Use compact line number format matching read_file/search_files to:
- Reduce token usage in AI responses
- Simplify output parsing

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-24 13:59:18 -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
KJ7LNW
187979af2b
feat: add test declarations support in typescript tree-sitter queries (#1899)
Add parsing support for:
- Jest describe/test/it blocks
- npm test exports

This enables proper identification of test definitions in TypeScript files:

```
// File: multi-search-replace.test.ts (192 definitions)
│| 2 - 1565 ||describe("MultiSearchReplaceDiffStrategy", () => {
│| 3 - 632 ||	describe("exact matching", () => {
│| 10 - 28 ||		it("should replace matching content", async () => {
||    ||----
│| 30 - 48 ||		it("should match content with different surrounding whitespace", async () => {
||    ||----
│| 50 - 68 ||		it("should match content with different indentation in search block", async () => {
||    ||----
│| 70 - 88 ||		it("should handle tab-based indentation", async () => {
||    ||----
```

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-24 13:32:18 -04:00
Matt Rubens
30f9d8f032
Better openrouter error handling (#1945) 2025-03-24 11:36:50 -04:00
aheizi
83ba22a44c
optimize context files (fix) (#1933)
optimize context files
2025-03-24 10:30:16 -04:00
Taiki Maekawa
2985172c61
feat: add bedrock application inference profile (#1938) 2025-03-24 10:17:47 -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
feifei
e8d6a552b3
i18n: Update numeric formatting suffixes to improve consistency (#1939)
Signed-off-by: feifei <liuyansheng1121@gmail.com>
2025-03-24 07:49:53 -04:00
Matt Rubens
5720b6b129
Tweaks to file read auto-truncate (#1934)
* Tweaks to file read auto-truncate

* Change to use a text input

* Changeset
2025-03-24 00:49:37 -04:00
Sam Hoang Van
a866a1c271
fix add line wrong index (#1927) 2025-03-23 14:31:15 -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
pugazhendhi-m
003388a5c4
Fix maxTokens to 8192 only for compatible Anthropic models (#1862)
Fix maxTokens to 8096 only for compatible Anthropic models

Co-authored-by: Pugazhendhi <pugazhendhi@unboundsecurity.ai>
2025-03-23 02:23:29 -04:00
Matt Rubens
3c3dd9d152
Merge pull request #1861 from KJ7LNW/roo-fix-apply-diff-collisions
Fix multiple `apply_diff` issues
2025-03-23 02:22:44 -04:00
Diarmid Mackenzie
2ab5aad183
Fixes for prompts suite unit tests on windows (#1879)
* Fixes for prompts suite unit tests on windows

* unixLike -> toPosix

Fix naming, and re-use code that already provides this function
2025-03-23 02:14:42 -04:00
Jason Owens
87b9b72b32
Corrected bug in openrouter.ts and pre-commit and pre-push husky scripts (#1853)
- Corrected error causing free models listed under openrouter to show pricing information
- Updated pre-push and pre-commit scripts to work in Windows environments when pushing to branch (windows requires npm/npx to include the ".cmd" extension to recognize and compile.
2025-03-23 02:12:53 -04:00
Matt Rubens
b41dd739f3
fix: prevent negative line index when maxReadFileLine is zero (#1915)
When maxReadFileLine setting was set to zero, the code would attempt to read lines with a negative end index
(maxReadFileLine - 1 = -1), causing the readLines function to reject the request.

This change:
- Checks if maxReadFileLine is greater than zero before calling readLines
- Returns an empty string when maxReadFileLine is zero
- Ensures content is only formatted with line numbers when it's not empty

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-23 02:09:48 -04:00
Matt Rubens
2597347e91
Use openrouter stream_options include_usage (#1905) 2025-03-23 01:52:43 -04:00