feat: add shimmer text rendering (#2027)

This commit is contained in:
Ytzhak
2025-08-18 06:55:01 -04:00
committed by GitHub
parent cd3d91209a
commit 667ff90dd6
5 changed files with 201 additions and 6 deletions

View File

@@ -650,6 +650,25 @@ func (a *App) IsBusy() bool {
return false
}
func (a *App) HasAnimatingWork() bool {
for _, msg := range a.Messages {
switch casted := msg.Info.(type) {
case opencode.AssistantMessage:
if casted.Time.Completed == 0 {
return true
}
}
for _, p := range msg.Parts {
if tp, ok := p.(opencode.ToolPart); ok {
if tp.State.Status == opencode.ToolPartStateStatusPending {
return true
}
}
}
}
return false
}
func (a *App) SaveState() tea.Cmd {
return func() tea.Msg {
err := SaveState(a.StatePath, a.State)