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

Function resolveRoot

packages/opencode/src/plugin/tui/runtime.ts:235–243  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

233}
234
235function resolveRoot(root: string) {
236 if (root.startsWith("file://")) {
237 const file = fileURLToPath(root)
238 if (root.endsWith("/")) return file
239 return path.dirname(file)
240 }
241 if (path.isAbsolute(root)) return root
242 return path.resolve(process.cwd(), root)
243}
244
245function createThemeInstaller(
246 meta: ConfigPlugin.Origin,

Callers 1

resolveExternalPluginsFunction · 0.85

Calls 1

cwdMethod · 0.65

Tested by

no test coverage detected