[PR #7203] feat(tui): highlight hex codes with actual color badges #12297

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

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

State: closed
Merged: No


Summary

This PR implements hex color code highlighting in the TUI assistant messages. Detected hex codes (e.g. #ff0000) are displayed as colored badges below the text response.

Fixes

Fixes #2586

Implementation Details

  • Crated 'HexColorPreview' component in 'src/cli/cmd/tui/component/hex-color-preview.tsx'.
  • Integrated component into 'src/cli/cmd/tui/routes/session/index.tsx'.
  • Uses 'bold: true' style to match system badges.

Verification

  • verified package 'opencode' passes typecheck.
  • Manual verification of TUI rendering.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7203 **State:** closed **Merged:** No --- ## Summary This PR implements hex color code highlighting in the TUI assistant messages. Detected hex codes (e.g. #ff0000) are displayed as colored badges below the text response. ## Fixes Fixes #2586 ## Implementation Details - Crated 'HexColorPreview' component in 'src/cli/cmd/tui/component/hex-color-preview.tsx'. - Integrated component into 'src/cli/cmd/tui/routes/session/index.tsx'. - Uses 'bold: true' style to match system badges. ## Verification - verified package 'opencode' passes typecheck. - Manual verification of TUI rendering.
yindo added the pull-request label 2026-02-16 18:17:13 -05:00
yindo closed this issue 2026-02-16 18:17:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12297