MCPcopy Create free account
hub / github.com/anomalyco/opencode / pathFor

Function pathFor

packages/opencode/test/server/httpapi-session.test.ts:63–65  ·  view source on GitHub ↗
(path: string, params: Record<string, string>)

Source from the content-addressed store, hash-verified

61const it = testEffect(Layer.mergeAll(appLayer, httpApiLayer))
62
63function pathFor(path: string, params: Record<string, string>) {
64 return Object.entries(params).reduce((result, [key, value]) => result.replace(`:${key}`, value), path)
65}
66
67function createSession(input?: Session.CreateInput) {
68 return Session.use.create(input)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected