From 82eca73d65beb9b7f011bc95939efcaded7c8591 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Mon, 14 Jul 2025 16:12:49 -0400 Subject: [PATCH] feat(tui): use lipgloss on escape sequences --- internal/tui/components/chat/messages/renderer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/tui/components/chat/messages/renderer.go b/internal/tui/components/chat/messages/renderer.go index ecd095798633e62e004a165c82b5d1816797c175..e10181621628913e6fab99edfc8a9d33312b1a94 100644 --- a/internal/tui/components/chat/messages/renderer.go +++ b/internal/tui/components/chat/messages/renderer.go @@ -792,7 +792,7 @@ func escapeLine(t *styles.Theme, text string) string { n int w int ) - faint := ansi.NewStyle().Faint().ForegroundColor(t.FgMuted) + faint := t.S().Muted.Faint(true) for len(text) > 0 { seq, w, n, state = ansi.DecodeSequence(text, state, nil) if w > 0 { @@ -801,7 +801,7 @@ func escapeLine(t *styles.Theme, text string) string { quote := strconv.Quote(seq) quote = strings.TrimPrefix(quote, "\"") quote = strings.TrimSuffix(quote, "\"") - sb.WriteString(faint.Styled(quote)) + sb.WriteString(faint.Render(quote)) } text = text[n:] }