refactor: replaced abortableSleep with scheduler.wait and fetchWithRetry
- Removed local `abortableSleep` in favour of Node's built-in `scheduler.wait` from `node:timers/promises`. - Consolidated per-provider retry/fetch loops into a shared `fetchWithRetry` utility in `packages/utils`. - Moved `extractHttpStatusFromError`, `isRetryableError`, and related helpers out of `packages/ai` into `packages/utils`. - Deleted `extractRetryDelay` in favour of `extractRetryHint` with unified header and body parsing.
This commit is contained in:
@@ -227,7 +227,7 @@ Watch flow:
|
||||
- `gh` interactive editor fallback is suppressed for `pr_create` by forcing either `--body-file` or `--body ""`.
|
||||
- `gh-renderer` provides compact headers for all ops and a custom live watch view for `run_watch`.
|
||||
- Background work / cancellation
|
||||
- `run_watch` loops until success/failure and uses `abortableSleep()` between polls.
|
||||
- `run_watch` loops until success/failure and uses `scheduler.wait()` between polls.
|
||||
- `GithubTool.execute()` is wrapped in `untilAborted()`; `git.github.run()` forwards the abort signal into `Bun.spawn()`.
|
||||
|
||||
## Limits & Caps
|
||||
|
||||
Reference in New Issue
Block a user