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

Function configEntryNameFromPath

packages/opencode/src/config/entry-name.ts:15–19  ·  view source on GitHub ↗
(relativePath: string, prefixes: string[])

Source from the content-addressed store, hash-verified

13}
14
15export function configEntryNameFromPath(relativePath: string, prefixes: string[]) {
16 const candidate = stripPrefix(relativePath, prefixes) ?? path.basename(relativePath)
17 const ext = path.extname(candidate)
18 return ext.length ? candidate.slice(0, -ext.length) : candidate
19}

Callers 4

entry-name.test.tsFile · 0.90
loadFunction · 0.90
loadFunction · 0.90
loadModeFunction · 0.90

Calls 1

stripPrefixFunction · 0.85

Tested by

no test coverage detected