Skip to content

Commit b5a564d

Browse files
authored
Merge pull request #2315 from jiahuipaung/fix/agent-spinner-colors
fix: use agent accent color for working spinners in sidebar
2 parents 37de489 + c16af16 commit b5a564d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pkg/tui/components/sidebar/sidebar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ func (m *model) renderAgentEntry(content *strings.Builder, agent runtime.AgentDe
11591159
var prefix string
11601160
if isCurrent {
11611161
if m.workingAgent == agent.Name {
1162-
prefix = agentStyle.Render(m.spinner.View()) + " "
1162+
prefix = agentStyle.Render(m.spinner.RawFrame()) + " "
11631163
} else {
11641164
prefix = agentStyle.Render("▶") + " "
11651165
}

pkg/tui/components/spinner/spinner.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type Spinner interface {
2323
layout.Model
2424
Reset() Spinner
2525
Stop()
26+
// RawFrame returns the current spinner character without any styling applied.
27+
RawFrame() string
2628
}
2729
type spinner struct {
2830
animSub *animation.Subscription // manages animation tick subscription
@@ -136,6 +138,11 @@ func (s *spinner) Stop() {
136138
s.animSub.Stop()
137139
}
138140

141+
// RawFrame returns the current spinner character without any styling applied.
142+
func (s *spinner) RawFrame() string {
143+
return spinnerFrames[s.frame%len(spinnerFrames)]
144+
}
145+
139146
// spinnerFrames holds the animation frames for the current terminal.
140147
var spinnerFrames = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}
141148

0 commit comments

Comments
 (0)