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

Function makeCtx

packages/opencode/test/tool/external-directory.test.ts:30–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 process.platform === "win32" ? Filesystem.normalizePathPattern(p) : p.replaceAll("\\", "/")
29
30function makeCtx() {
31 const requests: Array<Omit<PermissionV1.Request, "id" | "sessionID" | "tool">> = []
32 const ctx: Tool.Context = {
33 ...baseCtx,
34 ask: (req) =>
35 Effect.sync(() => {
36 requests.push(req)
37 }),
38 }
39 return { requests, ctx }
40}
41
42describe("tool.assertExternalDirectory", () => {
43 it.live("no-ops for empty target", () =>

Callers 1

Calls 2

syncMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected