opencode icon indicating copy to clipboard operation
opencode copied to clipboard

refactor: use Bun.sleep instead of Promise setTimeout

Open edlsh opened this issue 2 weeks ago • 0 comments

Summary

Replace new Promise((resolve) => setTimeout(resolve, ms)) with Bun.sleep(ms).

Changes

  • packages/opencode/src/cli/cmd/auth.ts - 10ms delay before prompts
  • packages/opencode/src/cli/cmd/github.ts - 1s delay in GitHub app installation retry loop
  • github/index.ts - 300ms delay in server connection retry loop

More idiomatic for a Bun codebase. All 3 files are already Bun-only.

edlsh avatar Jan 02 '26 04:01 edlsh