MCPcopy Create free account
hub / github.com/anus-dev/ANUS / tildeifyPath

Function tildeifyPath

packages/core/src/utils/paths.ts:29–35  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

27 * @returns The tildeified path.
28 */
29export function tildeifyPath(path: string): string {
30 const homeDir = os.homedir();
31 if (path.startsWith(homeDir)) {
32 return path.replace(homeDir, '~');
33 }
34 return path;
35}
36
37/**
38 * Shortens a path string if it exceeds maxLen, prioritizing the start and end segments.

Callers 4

getDescriptionMethod · 0.85
shouldConfirmExecuteMethod · 0.85
Footer.test.tsxFile · 0.85
FooterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected