MCPcopy Create free account
hub / github.com/SethGammon/Citadel / readText

Function readText

core/memory/blocks.js:42–46  ·  view source on GitHub ↗
(projectRoot, relativePath, maxChars = 24000)

Source from the content-addressed store, hash-verified

40}
41
42function readText(projectRoot, relativePath, maxChars = 24000) {
43 const filePath = path.join(projectRoot, relativePath);
44 if (!fs.existsSync(filePath)) return '';
45 return fs.readFileSync(filePath, 'utf8').slice(0, maxChars);
46}
47
48function listFiles(root, predicate = () => true, limit = 50) {
49 if (!fs.existsSync(root)) return [];

Callers 1

buildBlocksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected