diff options
| author | Tom <[email protected]> | 2025-08-11 08:31:15 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-10 21:31:15 -0400 |
| commit | 1c83ef75a2f0bdff400f5f70c7b4780126283f36 (patch) | |
| tree | 8fae7a509e328b0f2e653536f875fdca7c9f7861 | |
| parent | 95e410db88769f0cfdf64aeee9ec2ea3c42d11bc (diff) | |
| download | opencode-1c83ef75a2f0bdff400f5f70c7b4780126283f36.tar.gz opencode-1c83ef75a2f0bdff400f5f70c7b4780126283f36.zip | |
fix(plugin): prevent compiled binary hang by removing lazy dynamic import (#1794)
Co-authored-by: opencode <[email protected]>
| -rw-r--r-- | packages/opencode/src/plugin/index.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index bb6cc07bc..3ffa30191 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -4,8 +4,7 @@ import { Config } from "../config/config" import { Bus } from "../bus" import { Log } from "../util/log" import { createOpencodeClient } from "@opencode-ai/sdk" -// Lazy import to avoid circular dependency with session/tool registry -// import { Server } from "../server/server" +import { Server } from "../server/server" import { BunProc } from "../bun" export namespace Plugin { @@ -14,7 +13,7 @@ export namespace Plugin { const state = App.state("plugin", async (app) => { const client = createOpencodeClient({ baseUrl: "http://localhost:4096", - fetch: async (...args) => (await import("../server/server")).Server.app().fetch(...args), + fetch: async (...args) => Server.app().fetch(...args), }) const config = await Config.get() const hooks = [] |
