Skip to content

Merge #2: Add --color flag to preserve ANSI escape sequences (with debounce fix)#6

Merged
onesuper merged 2 commits into
mainfrom
merge-ansi-color
Apr 10, 2026
Merged

Merge #2: Add --color flag to preserve ANSI escape sequences (with debounce fix)#6
onesuper merged 2 commits into
mainfrom
merge-ansi-color

Conversation

@onesuper

Copy link
Copy Markdown
Owner

Summary

Merge PR #2 (phiat/feat/ansi-color-passthrough) with conflict resolution.

Changes

  • Add --color flag to snapshot and wait commands
  • Preserve ANSI escape sequences in output when enabled
  • Fix: Retain --debounce functionality that was accidentally removed in original PR

Conflict Resolution

The original PR removed the debounce_ms parameter. This merge restores it,
allowing both --color and --debounce to work together:

tui-use wait --text "pattern" --debounce 300 --color

Testing

  • All 140 tests pass
  • --debounce still works (backwards compatible)
  • --color works with both snapshot and wait

Credit

Original implementation by @phiat in #2.

phiat and others added 2 commits April 8, 2026 16:25
…wait output

tui-use strips all color and style information from terminal output, which is
documented as a known limitation. This adds an opt-in --color flag to the
snapshot and wait commands that re-encodes xterm buffer cell attributes back
into ANSI SGR escape sequences.

Supports the full range of terminal styling: 8/16/256-color palette,
24-bit RGB, bold, dim, italic, underline, blink, inverse, and strikethrough.
Default behavior is unchanged — plain text unless --color is specified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --color flag to preserve ANSI escape sequences in snapshot/wait output.

Conflicts resolved:
- Retained debounce_ms parameter in WaitRequest (was removed in phiat branch)
- Combined both features: debounce and color are now both supported
- Updated wait() signature to accept both debounceMs and color options

Co-Authored-By: phiat
@onesuper

Copy link
Copy Markdown
Owner Author

@phiat I've resolved the merge conflicts from #2 in this PR. Could you take a look when you have time?

@onesuper onesuper merged commit 33263fe into main Apr 10, 2026
1 of 7 checks passed
@onesuper onesuper deleted the merge-ansi-color branch April 10, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants