Dax Raad 1 개월 전
부모
커밋
d4e51e04b3

+ 4 - 3
packages/opencode/src/control-plane/workspace-server/server.ts

@@ -1,3 +1,4 @@
+import { createAdaptorServer } from "@hono/node-server"
 import { Hono } from "hono"
 import { Instance } from "../../project/instance"
 import { InstanceBootstrap } from "../../project/bootstrap"
@@ -55,10 +56,10 @@ export namespace WorkspaceServer {
   }
 
   export function Listen(opts: { hostname: string; port: number }) {
-    return Bun.serve({
-      hostname: opts.hostname,
-      port: opts.port,
+    const server = createAdaptorServer({
       fetch: App().fetch,
     })
+    server.listen(opts.port, opts.hostname)
+    return server
   }
 }

+ 1 - 1
packages/opencode/src/plugin/index.ts

@@ -37,7 +37,7 @@ export namespace Plugin {
       get serverUrl(): URL {
         throw new Error("Server URL is no longer supported in plugins")
       },
-      $: Bun.$,
+      $: () => {},
     }
 
     for (const plugin of INTERNAL_PLUGINS) {

+ 1 - 1
packages/opencode/src/server/routes/project.ts

@@ -28,7 +28,7 @@ export const ProjectRoutes = lazy(() =>
         },
       }),
       async (c) => {
-        const projects = await Project.list()
+        const projects = Project.list()
         return c.json(projects)
       },
     )