8000 `apply_diff` syntax in `.roo/system-prompt-*` files incorrectly triggers Git conflict markers in vscode · Issue #3042 · RooVetGit/Roo-Code · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

apply_diff syntax in .roo/system-prompt-* files incorrectly triggers Git conflict markers in vscode #3042

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

Open
SophusMaxiumus opened this issue Apr 29, 2025 · 3 comments
Labels
bug Something isn't working needs information Needs more information to be actionable

Comments

@SophusMaxiumus
Copy link

App Version

v3.14.3

API Provider

OpenRouter

Model Used

Claude 3.7 Sonnet

Actual vs. Expected Behavior

The .roo/system-prompt-* files used by Roo tooling contain structured diff blocks with syntax that mimics Git merge conflict markers:

<<<<<<< SEARCH
:start_line:1
-------
<original content>
=======
<replacement content>
>>>>>>> REPLACE

This syntax is essential for the apply_diff tool to function correctly. However, Git and Git-aware editors like VSCode and GitLens treat these lines as actual merge conflicts, even though they are not, leading to:

  • Incorrect syntax highlighting
  • Warning banners or decorations in the UI
  • Misleading conflict navigation behavior
  • Commit blockers in some setups

Detailed Steps to Reproduce

  1. Create a .roo/system-prompt-* file containing a valid apply_diff block.
  2. Open the file in VSCode.
  3. Observe merge conflict UI, decorations, or Git warnings.

Relevant API Request Output

Additional Context

Environment:

  • OS: macOS 15.3.2
  • Editor: VSCode 1.99.3
  • Git: 2.39.5 (Apple Git-154)
Copy link
dosubot bot commented Apr 29, 2025

Hello @SophusMaxiumus! I'm Dosu, a bot here to help you solve bugs, answer questions, and assist you in becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today?

To prevent Git-aware editors like VSCode and GitLens from incorrectly treating apply_diff syntax in .roo/system-prompt-* files as Git merge conflict markers, you should escape the merge conflict markers by prepending a backslash (\) at the beginning of the line containing the marker. This will ensure that the editor does not interpret them as actual merge conflict markers.

Example of correct format:

# <<<<<<< SEARCH
content before
\=======
content after
replacement content
>>>>>>> REPLACE

This approach should help mitigate the issues you're experiencing with syntax highlighting, warning banners, and conflict navigation behavior in VSCode [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@Leikaab
Copy link
Leikaab commented Apr 29, 2025

Regarding the bots answer this solution confuses claude and other providers when using the tool

@hannesrudolph
Copy link
Collaborator

can you please provide more clear details to repro. exact details please. not a description of details.

@hannesrudolph hannesrudolph moved this from New to Issue [Needs Info] in Roo Code Roadmap May 1, 2025
@hannesrudolph hannesrudolph added the needs information Needs more information to be actionable label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs information Needs more information to be actionable
Projects
Status: Issue [Needs Info]
Development

No branches or pull requests

3 participants
0