GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: use Bun.sleep instead of Promise setTimeout (#6620) · jkoelker/opencode@d8753cd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • github
    • index.ts
  • packages/opencode/src/cli/cmd
    • auth.ts
    • github.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎github/index.ts‎

Copy file name to clipboardExpand all lines: github/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async function assertOpencodeConnected() {
281281
connected = true
282282
break
283283
} catch (e) {}
284-
await new Promise((resolve) => setTimeout(resolve, 300))
284+
await Bun.sleep(300)
285285
} while (retry++ < 30)
286286

287287
if (!connected) {
Collapse file

‎packages/opencode/src/cli/cmd/auth.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/cli/cmd/auth.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function handlePluginAuth(plugin: { auth: PluginAuth }, provider: string):
3636
const method = plugin.auth.methods[index]
3737

3838
// Handle prompts for all auth types
39-
await new Promise((resolve) => setTimeout(resolve, 10))
39+
await Bun.sleep(10)
4040
const inputs: Record<string, string> = {}
4141
if (method.prompts) {
4242
for (const prompt of method.prompts) {
Collapse file

‎packages/opencode/src/cli/cmd/github.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/cli/cmd/github.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export const GithubInstallCommand = cmd({
348348
}
349349

350350
retries++
351-
await new Promise((resolve) => setTimeout(resolve, 1000))
351+
await Bun.sleep(1000)
352352
} while (true)
353353

354354
s.stop("Installed GitHub app")

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.