mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
Merge pull request #22 from adamdottv/adam/retries
fix(anthropic): better 429/529 handling
This commit is contained in:
10
cmd/root.go
10
cmd/root.go
@@ -107,6 +107,16 @@ func setupSubscriptions(app *app.App) (chan tea.Msg, func()) {
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
{
|
||||
sub := app.Status.Subscribe(ctx)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
for ev := range sub {
|
||||
ch <- ev
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
return ch, func() {
|
||||
cancel()
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user