mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
Merge pull request #22 from adamdottv/adam/retries
fix(anthropic): better 429/529 handling
This commit is contained in:
commit
fde04bbf85
10 changed files with 312 additions and 157 deletions
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue