[PR #9104] feat(tui): add minimal diff display mode #12983

Open
opened 2026-02-16 18:17:52 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9104

State: open
Merged: No


Add tui.diff_display config option to collapse Edit/Write tool diffs
by default, showing only file name and line statistics.

  • Add diff_display config (full | minimal) to Config.TUI
  • Add parseDiffStats() and formatDiffStats() utility functions
  • Enhance Edit tool with collapse/expand functionality
  • Enhance Write tool with collapse/expand functionality
  • Add comprehensive unit tests (12 tests, all passing)

In minimal mode:

  • Edit: shows "+N, -M lines (press Enter to expand)"
  • Write: shows "N lines (press Enter to expand)"
  • Click to toggle between collapsed and expanded views
  • Full diff remains in metadata for AI context

Fixes #9089

What does this PR do?

How did you verify your code works?

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9104 **State:** open **Merged:** No --- Add tui.diff_display config option to collapse Edit/Write tool diffs by default, showing only file name and line statistics. - Add diff_display config (full | minimal) to Config.TUI - Add parseDiffStats() and formatDiffStats() utility functions - Enhance Edit tool with collapse/expand functionality - Enhance Write tool with collapse/expand functionality - Add comprehensive unit tests (12 tests, all passing) In minimal mode: - Edit: shows "+N, -M lines (press Enter to expand)" - Write: shows "N lines (press Enter to expand)" - Click to toggle between collapsed and expanded views - Full diff remains in metadata for AI context Fixes #9089 ### What does this PR do? ### How did you verify your code works?
yindo added the pull-request label 2026-02-16 18:17:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12983