MCPcopy
hub / github.com/anomalyco/opencode / forms

Function forms

packages/opencode/test/tool/shell.test.ts:128–134  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

126 process.platform === "win32" ? Filesystem.normalizePathPattern(p) : p.replaceAll("\\", "/")
127
128const forms = (dir: string) => {
129 if (process.platform !== "win32") return [dir]
130 const full = Filesystem.normalizePath(dir)
131 const slash = full.replaceAll("\\", "/")
132 const root = slash.replace(/^[A-Za-z]:/, "")
133 return Array.from(new Set([full, slash, root, root.toLowerCase()]))
134}
135
136const withShell = <A, E, R>(item: { label: string; shell: string }, self: Effect.Effect<A, E, R>) =>
137 Effect.acquireUseRelease(

Callers 1

shell.test.tsFile · 0.85

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected