MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / resolvePath

Function resolvePath

src/utils/image-paths.ts:30–34  ·  view source on GitHub ↗
(token: string, cwd: string)

Source from the content-addressed store, hash-verified

28}
29
30function resolvePath(token: string, cwd: string): string {
31 let p = unescape(token).trim();
32 if (p.startsWith('~/') || p === '~') p = path.join(os.homedir(), p.slice(1));
33 return path.isAbsolute(p) ? p : path.resolve(cwd, p);
34}
35
36/** Distinct, existing image file paths referenced in `text` (resolved absolute). */
37export function findImagePaths(text: string, cwd: string): string[] {

Callers 2

findImagePathsFunction · 0.85
splitPathsAndTextFunction · 0.85

Calls 2

unescapeFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected