Commit graph

2395 commits

Author SHA1 Message Date
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
Eric Wheeler
04854ea048 test: add tests for escaped marker handling in multi-search-replace
Add tests that validate:
- Original content with unescaped markers
- Search content with escaped markers to match unescaped markers in original content
- Proper validation of escaped search, separator, and replace markers in diff content
- Successful application of diffs with escaped markers in search content

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-21 20:55:51 -07:00
Eric Wheeler
2032c9e45f test: add validateMarkerSequencing test cases
Tests valid and invalid marker sequences:
- validates single and multiple complete sequences
- detects out-of-order markers (separator/replace before search)
- detects incorrect sequence termination
- validates state transitions between SEARCH/SEP/REPLACE markers

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-21 20:55:51 -07:00
Eric Wheeler
4b3f711746 fix: enforce newlines between diff section separators
Require newlines between diff section markers (SEARCH, ======, REPLACE)
to prevent content confusion when searching input contains separator
markers. Error message mentions required marker newlines.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-21 20:55:51 -07:00
Eric Wheeler
c7321b0107 fix: reject apply_diff when search matches replace content
Prevents attempting to apply diffs where search and replace content are identical,
which would result in no changes being made. Instead, provide a helpful error
message explaining why the operation was rejected.

Fixes: #1350

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-21 20:55:51 -07:00
Eric Wheeler
1b8bac66fd fix: pass multi-block flag to getDiffStrategy in system instructions
When previewing system instructions, getDiffStrategy was not receiving the
MULTI_SEARCH_AND_REPLACE flag, causing the instructions to show the wrong diff
strategy description. Now correctly passing the flag to ensure the proper diff
strategy description is shown in system instructions.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-21 20:55:51 -07:00
Eric Wheeler
81692a43c9 fix: escape section markers in apply_diff
Provide support for escaping section markers so that the model can
add or remove lines like:
	=======
by escaping them in the search or replace string:
	\=======

A state machine tracks apply_diff markers appear in correct sequence:
SEARCH -> SEPARATOR -> REPLACE. Prevents syntax corruption from interleaved or
malformed blocks by validating before processing matches.

If a model tries to interleave diff markers, then the state machine will
return a response to the model like this so it can correct. testing
shows that this works on Claude 3.5, 3.7 and gemini-2.0-flash-thinking:

```xml
    <error_details>
    ERROR: Special marker '=======' found in your diff content at line 7:

    When removing merge conflict markers like '=======' from files, you MUST escape them
    in your SEARCH section by prepending a backslash (\) at the beginning of the line:

    CORRECT FORMAT:

    <<<<<<< SEARCH
    content before
    \=======    <-- Note the backslash here in this example
    content after
    =======
    replacement content
    >>>>>>> REPLACE

    Without escaping, the system confuses your content with diff syntax markers.
    You may use multiple diff blocks in a single diff request, but ANY of ONLY the following separators that occur within SEARCH or REPLACE content must be must be escaped, as follows:
    \<<<<<<< SEARCH
    \=======
    \>>>>>>> REPLACE

    </error_details>
```

Fixes: #1557
Fixes: #1408

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-03-21 20:55:47 -07:00
Matt Rubens
def40180dc
Don't do partial reads on binary files (#1886) 2025-03-21 15:47:13 -04:00
Matt Rubens
f5628e573f
Support mentioning binary files (#1880) 2025-03-21 10:51:44 -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
cannuri
000df18503
Enhance translate mode guidelines + informal speech in de locales (#1858)
* feat(i18n): Enhance Translate mode guidelines

This commit improves the Translate custom mode in .roomodes by adding:

- Clear requirement to use informal speech (e.g., "du" instead of "Sie")
- Guidance on preserving domain-specific terminology in English
- New section on common translation pitfalls to avoid
- Enhanced instructions for handling placeholders in translated strings
- Guidelines for UI element translation (buttons vs. tooltips)
- Directions for handling incomplete source strings
- Rules to preserve original perspective (user→system vs system→user)
- A translator's checklist for quality assurance

These improvements ensure more consistent, accurate, and natural
translations across supported languages while preventing common
localization errors.

* use informal speech in de locales
2025-03-20 20:47:27 -04:00
Matt Rubens
f9d2b4db97
Make the question follow-up suggestions optional (#1857)
Make the question follow-up optional
2025-03-20 18:37:09 -04:00
Yukky
b033082523
Reflect Cross-region inference option in ap-xx region (#1842)
* Fix: Enable cross-region inference for 'ap-xx' region in AwsBedrockHandler.completePrompt

* Fix: Enable cross-region inference for 'ap-xx' region in AwsBedrockHandler.createMessage

* Create itchy-waves-move.md

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-20 16:03:51 -04:00
Matt Rubens
842e69ceb8
v3.10 (#1850) 2025-03-20 16:00:04 -04:00
Matt Rubens
4f6dd74c29
Sort file search results shortest to longest (#1849) 2025-03-20 14:21:27 -04:00
Matt Rubens
dca4563b9a
Fixes to file search (#1846) 2025-03-20 12:14:32 -04:00
Matt Rubens
c7562a6a37
Try to avoid placeholders in follow-up questions (#1839)
* Try to avoid placeholders in follow-up questions

* Fix this too
2025-03-20 11:33:38 -04:00