diff options
| author | Ytzhak <[email protected]> | 2025-08-18 06:55:01 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-18 05:55:01 -0500 |
| commit | 667ff90dd6be20bf19d5424a80d57559d38352f5 (patch) | |
| tree | 1be3df414954011ff3caa859702679acbe619a7e /packages/tui/internal/components/chat/editor.go | |
| parent | cd3d91209ab843a5a84eec8aae371510ab9e3178 (diff) | |
| download | opencode-667ff90dd6be20bf19d5424a80d57559d38352f5.tar.gz opencode-667ff90dd6be20bf19d5424a80d57559d38352f5.zip | |
feat: add shimmer text rendering (#2027)
Diffstat (limited to 'packages/tui/internal/components/chat/editor.go')
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go index 38a579057..72daf2886 100644 --- a/packages/tui/internal/components/chat/editor.go +++ b/packages/tui/internal/components/chat/editor.go @@ -339,6 +339,7 @@ func (m *editorComponent) Content() string { t := theme.CurrentTheme() base := styles.NewStyle().Foreground(t.Text()).Background(t.Background()).Render muted := styles.NewStyle().Foreground(t.TextMuted()).Background(t.Background()).Render + promptStyle := styles.NewStyle().Foreground(t.Primary()). Padding(0, 0, 0, 1). Bold(true) @@ -381,9 +382,11 @@ func (m *editorComponent) Content() string { status = "waiting for permission" } if m.interruptKeyInDebounce && m.app.CurrentPermission.ID == "" { - hint = muted( - status, - ) + m.spinner.View() + muted( + bright := t.Accent() + if status == "waiting for permission" { + bright = t.Warning() + } + hint = util.Shimmer(status, t.Background(), t.TextMuted(), bright) + m.spinner.View() + muted( " ", ) + base( keyText+" again", @@ -391,7 +394,11 @@ func (m *editorComponent) Content() string { " interrupt", ) } else { - hint = muted(status) + m.spinner.View() + bright := t.Accent() + if status == "waiting for permission" { + bright = t.Warning() + } + hint = util.Shimmer(status, t.Background(), t.TextMuted(), bright) + m.spinner.View() if m.app.CurrentPermission.ID == "" { hint += muted(" ") + base(keyText) + muted(" interrupt") } |
