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

Function readMemoryFileContent

packages/core/src/tools/memoryTool.ts:147–155  ·  view source on GitHub ↗

* Reads the current content of the memory file

()

Source from the content-addressed store, hash-verified

145 * Reads the current content of the memory file
146 */
147async function readMemoryFileContent(): Promise<string> {
148 try {
149 return await fs.readFile(getGlobalMemoryFilePath(), 'utf-8');
150 } catch (err) {
151 const error = err as Error & { code?: string };
152 if (!(error instanceof Error) || error.code !== 'ENOENT') throw err;
153 return '';
154 }
155}
156
157/**
158 * Computes the new content that would result from adding a memory entry

Callers 2

shouldConfirmExecuteMethod · 0.85
getModifyContextMethod · 0.85

Calls 2

getGlobalMemoryFilePathFunction · 0.85
readFileMethod · 0.80

Tested by

no test coverage detected