MCPcopy Index your code
hub / github.com/anomalyco/opencode / requestServer

Function requestServer

packages/opencode/test/server/httpapi-workspace.test.ts:42–46  ·  view source on GitHub ↗
(path: string, directory: string, init: RequestInit = {})

Source from the content-addressed store, hash-verified

40}
41
42function requestServer(path: string, directory: string, init: RequestInit = {}) {
43 const headers = new Headers(init.headers)
44 headers.set("x-opencode-directory", directory)
45 return Effect.promise(() => Promise.resolve(Server.Default().app.request(path, { ...init, headers })))
46}
47
48function localAdapter(directory: string): WorkspaceAdapter {
49 return {

Callers 1

Calls 2

setMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected