Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Jun 16, 2025

Summary

  • Added a new experimental setting disableDiffVisualization that allows users to disable diff visualization for ALL edit tools
  • When enabled, files will open directly in the editor instead of showing a side-by-side diff view for all edit tools:
    • write_to_file
    • apply_diff
    • insert_content
    • search_and_replace
  • This helps prevent Language Server Protocol (LSP) crashes that can occur with very large files, particularly affecting C# developers
  • Changes made by Roo are still visible in the chat window

Implementation Details

  • Added disableDiffVisualization as an experimental feature in the experiments schema
  • Modified DiffViewProvider to check the experiment setting and open files directly when disabled
  • Added UI toggle in Experimental Settings (not under provider settings)
  • Added translation strings for the new experimental feature
  • Updated all edit tools to respect this setting through the existing DiffViewProvider.open() method

Key Changes

  • Moved to Experimental: This is now properly categorized as an experimental feature
  • Affects ALL Edit Tools: Unlike the initial implementation, this now affects all file editing operations
  • Proper Architecture: Uses the existing experiment framework instead of global settings

Related Issues

This addresses the concern raised in #4576 (comment) about URI length limitations causing C# LSP crashes.

Closes #1696

Test plan

  • Verify the setting appears in the UI under Experimental Settings
  • Test that toggling the setting on/off works correctly
  • Confirm that when enabled, files open directly in editor without diff view for ALL edit tools
  • Ensure changes are still visible in the chat window
  • Verify no TypeScript compilation errors
  • Confirm linting passes

🤖 Generated with Claude Code


Important

Adds disableDiffVisualization setting to open files directly in editor, preventing LSP crashes with large files, with UI and test updates.

  • Behavior:
    • Adds disableDiffVisualization setting to disable diff view, opening files directly in editor.
    • Prevents LSP crashes with large files, especially for C#.
    • Changes still visible in chat window.
  • Implementation:
    • Adds disableDiffVisualization to settings schema in experiment.ts.
    • Modifies DiffViewProvider to check setting and open files directly if disabled.
    • Updates ClineProvider to pass setting to Task.
    • Adds UI toggle under Advanced > Diff Settings in settings.json.
    • Updates tests in experiments.test.ts and ExtensionStateContext.test.tsx.
  • Misc:
    • Adds translation strings for new setting in settings.json.

This description was created by Ellipsis for 530c5c4. You can customize this summary. It will automatically update as commits are pushed.

Added a new setting `disableDiffVisualization` that allows users to disable
the diff view when editing files. When enabled, files will open directly in
the editor instead of showing a side-by-side diff view. This helps prevent
Language Server Protocol (LSP) crashes that can occur with very large files,
particularly affecting C# developers.

The changes made by Roo are still visible in the chat window.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@hannesrudolph hannesrudolph requested review from cte, jr and mrubens as code owners June 16, 2025 19:11
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jun 16, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 16, 2025
- Moved disableDiffVisualization from global settings to experimental settings
- Updated all references to access it through experiments instead
- Fixed test cases to include the new experiment
- Updated translations to reflect experimental nature
- Setting now properly affects ALL edit tools (write_to_file, apply_diff, insert_content, search_and_replace)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@hannesrudolph hannesrudolph changed the title feat: add setting to disable diff visualization to prevent LSP crashes feat: add experimental setting to disable diff visualization for all edit tools Jun 16, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 17, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 17, 2025
@hannesrudolph
Copy link
Collaborator Author

This automated test is not working.

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 17, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

C# LSP Crashing when using Roo Code VSCode Extension due to URIFormatException

2 participants