resolveScopedSegmentPath
resolveScopedSegmentPath(
path,identityProfile):object
Defined in: packages/core/src/utils/llmUtils.ts:115
CFG-70 — where one scoped entry’s segment path lands, and whether anything is there.
It reports the resolved path on both outcomes, because the caller that has to warn about a missing file needs to name where it looked — a user who mistyped a path learns nothing from being told their own string back.
Deliberately not readPromptFile, which is the function every root segment goes
through. readPromptFile falls back to the installed package directory when the project file is
absent, and for a scoped path that fallback is wrong in both of its outcomes: a bundled default
of the same name would attach content the user never asked for to a module it has nothing to do
with, and the ordinary case — no such file in the package either — throws an ENOENT naming a
path inside node_modules, which tells a user with a typo in their config nothing they can act
on. A scoped path has no bundled default by construction: it names a file the user wrote.
The one thing it shares with readPromptFile is getGslothConfigReadPath, so an identity
profile retargets a scoped path exactly as it retargets a root one.
Parameters
Section titled “Parameters”string
identityProfile
Section titled “identityProfile”string | undefined
Returns
Section titled “Returns”object
exists
Section titled “exists”exists:
boolean
resolved
Section titled “resolved”resolved:
string