mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
stop all spinners on progress stop
This commit is contained in:
parent
4d677ee389
commit
976068369b
2 changed files with 24 additions and 34 deletions
|
@ -31,6 +31,12 @@ func NewProgress(w io.Writer) *Progress {
|
|||
}
|
||||
|
||||
func (p *Progress) Stop() bool {
|
||||
for _, state := range p.states {
|
||||
if spinner, ok := state.(*Spinner); ok {
|
||||
spinner.Stop()
|
||||
}
|
||||
}
|
||||
|
||||
if p.ticker != nil {
|
||||
p.ticker.Stop()
|
||||
p.ticker = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue