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

Function getAnusMdFilePathsInternal

packages/core/src/utils/memoryDiscovery.ts:87–115  ·  view source on GitHub ↗
(
  currentWorkingDirectory: string,
  includeDirectoriesToReadAnus: readonly string[],
  userHomePath: string,
  debugMode: boolean,
  fileService: FileDiscoveryService,
  extensionContextFilePaths: string[] = [],
  fileFilteringOptions: FileFilteringOptions,
  maxDirs: number,
)

Source from the content-addressed store, hash-verified

85}
86
87async function getAnusMdFilePathsInternal(
88 currentWorkingDirectory: string,
89 includeDirectoriesToReadAnus: readonly string[],
90 userHomePath: string,
91 debugMode: boolean,
92 fileService: FileDiscoveryService,
93 extensionContextFilePaths: string[] = [],
94 fileFilteringOptions: FileFilteringOptions,
95 maxDirs: number,
96): Promise<string[]> {
97 const dirs = new Set<string>([
98 ...includeDirectoriesToReadAnus,
99 currentWorkingDirectory,
100 ]);
101 const paths = [];
102 for (const dir of dirs) {
103 const pathsByDir = await getAnusMdFilePathsInternalForEachDir(
104 dir,
105 userHomePath,
106 debugMode,
107 fileService,
108 extensionContextFilePaths,
109 fileFilteringOptions,
110 maxDirs,
111 );
112 paths.push(...pathsByDir);
113 }
114 return Array.from(new Set<string>(paths));
115}
116
117async function getAnusMdFilePathsInternalForEachDir(
118 dir: string,

Callers 1

Tested by

no test coverage detected