* #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>
* [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>
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>
* 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>
* 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>
* 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>
- 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.
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>
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>
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>
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>
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: #1557Fixes: #1408
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* 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