MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / readMemoryDirectory

Function readMemoryDirectory

packages/baseai/src/deploy/index.ts:380–396  ·  view source on GitHub ↗
({
	spinner,
	memoryDir
}: {
	spinner: Spinner;
	memoryDir: string;
})

Source from the content-addressed store, hash-verified

378}
379
380export async function readMemoryDirectory({
381 spinner,
382 memoryDir
383}: {
384 spinner: Spinner;
385 memoryDir: string;
386}): Promise<string[] | null> {
387 spinner.start('Reading memory directory');
388 try {
389 const memory = await fs.readdir(memoryDir);
390 spinner.stop();
391 return memory;
392 } catch (error) {
393 handleDirectoryReadError({ spinner, dir: memoryDir, error });
394 return null;
395 }
396}
397
398async function deployMemories({
399 spinner,

Callers 2

deployFunction · 0.85
deploySingleMemoryFunction · 0.85

Calls 2

handleDirectoryReadErrorFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected