MCPcopy
hub / github.com/UdaraJay/Pile / add

Method add

src/main/utils/pileIndex.js:115–125  ·  view source on GitHub ↗
(relativeFilePath)

Source from the content-addressed store, hash-verified

113 }
114
115 add(relativeFilePath) {
116 const filePath = path.join(this.pilePath, relativeFilePath);
117 const fileContent = fs.readFileSync(filePath, 'utf8');
118 const { data, content } = matter(fileContent);
119 this.index.set(relativeFilePath, data);
120 // add to search and vector index
121 pileSearchIndex.initialize(this.pilePath, this.index);
122 pileEmbeddings.addDocument(relativeFilePath, data);
123 this.save();
124 return this.index;
125 }
126
127 getThreadAsText(filePath) {
128 try {

Callers

nothing calls this directly

Calls 4

saveMethod · 0.95
setMethod · 0.80
addDocumentMethod · 0.80
initializeMethod · 0.45

Tested by

no test coverage detected