forked from RooCodeInc/Roo-Code
-
Notifications
You must be signed in to change notification settings - Fork 10
Fast forward to 3.10.3 upstream #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: RooCodeInc#1557
Fixes: RooCodeInc#1408
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>
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: RooCodeInc#1350 Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
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>
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>
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>
docs: update contributors list [skip ci] Co-authored-by: mrubens <mrubens@users.noreply.github.com>
…eInc#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>
…pts (RooCodeInc#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.
* Fixes for prompts suite unit tests on windows * unixLike -> toPosix Fix naming, and re-use code that already provides this function
…lisions Fix multiple `apply_diff` issues
…c#1862) Fix maxTokens to 8096 only for compatible Anthropic models Co-authored-by: Pugazhendhi <pugazhendhi@unboundsecurity.ai>
* 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>
* Tweaks to file read auto-truncate * Change to use a text input * Changeset
…tream-3-10-3 Release v3.10.3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Implementation
Screenshots
How to Test
Get in Touch