MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / findPiPackageRoot

Function findPiPackageRoot

desktop/runtime-host/theme-service.ts:41–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41function findPiPackageRoot() {
42 let directory = path.dirname(fileURLToPath(import.meta.url))
43
44 while (true) {
45 const candidate = path.join(directory, piPackagePath)
46 if (fs.existsSync(path.join(candidate, 'package.json'))) {
47 return candidate
48 }
49 const parent = path.dirname(directory)
50 if (parent === directory) {
51 throw new Error('Could not locate @earendil-works/pi-coding-agent package root.')
52 }
53 directory = parent
54 }
55}
56
57async function getThemeHelpers() {
58 if (!themeHelpersPromise) {

Callers 1

getThemeHelpersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected