Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
rekram1-node merged 1 commit intoanomalyco:devanomalyco/opencode:devfrom
edlsh:refactor/use-bun-sleepedlsh/opencode:refactor/use-bun-sleepCopy head branch name to clipboard
Jan 2, 2026
Merged

refactor: use Bun.sleep instead of Promise setTimeout#6620
rekram1-node merged 1 commit intoanomalyco:devanomalyco/opencode:devfrom
edlsh:refactor/use-bun-sleepedlsh/opencode:refactor/use-bun-sleepCopy head branch name to clipboard

Conversation

@edlsh
Copy link
Contributor

@edlsh edlsh commented Jan 2, 2026

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
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

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.