refactor: use Bun.sleep instead of Promise setTimeout by edlsh · Pull Request #6620 · anomalyco/opencode · GitHub
Skip to content

refactor: use Bun.sleep instead of Promise setTimeout - #6620

Merged
rekram1-node merged 1 commit into
anomalyco:devfrom
edlsh:refactor/use-bun-sleep
Jan 2, 2026
Merged

rekram1-node merged 1 commit into
anomalyco:devfrom
edlsh:refactor/use-bun-sleep

Conversation

@edlsh

@edlsh edlsh commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

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.

@rekram1-node
rekram1-node merged commit d8753cd into anomalyco:dev Jan 2, 2026
2 checks passed
triklozoid pushed a commit to triklozoid/opencode that referenced this pull request Feb 2, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants