fix(plugin): prevent compiled binary hang by removing lazy dynamic import (#1794)
Co-authored-by: opencode <noreply@opencode.ai>
This commit is contained in:
parent
95e410db88
commit
1c83ef75a2
1 changed files with 2 additions and 3 deletions
|
|
@ -4,8 +4,7 @@ import { Config } from "../config/config"
|
||||||
import { Bus } from "../bus"
|
import { Bus } from "../bus"
|
||||||
import { Log } from "../util/log"
|
import { Log } from "../util/log"
|
||||||
import { createOpencodeClient } from "@opencode-ai/sdk"
|
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"
|
import { BunProc } from "../bun"
|
||||||
|
|
||||||
export namespace Plugin {
|
export namespace Plugin {
|
||||||
|
|
@ -14,7 +13,7 @@ export namespace Plugin {
|
||||||
const state = App.state("plugin", async (app) => {
|
const state = App.state("plugin", async (app) => {
|
||||||
const client = createOpencodeClient({
|
const client = createOpencodeClient({
|
||||||
baseUrl: "http://localhost:4096",
|
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 config = await Config.get()
|
||||||
const hooks = []
|
const hooks = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue