(relativeFilePath)
| 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 { |
nothing calls this directly
no test coverage detected