MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / buildRecord

Function buildRecord

src/sidebarApps/searchInFiles/indexWorker.js:215–230  ·  view source on GitHub ↗
(file, content)

Source from the content-addressed store, hash-verified

213}
214
215function buildRecord(file, content) {
216 if (content.length > MAX_INDEXED_CHARS) {
217 return buildSkippedRecord(file, "large");
218 }
219
220 return {
221 ...getFileMetadata(file),
222 url: file.url,
223 path: file.path,
224 name: file.name,
225 indexedAt: Date.now(),
226 indexVersion: INDEX_VERSION,
227 skipped: false,
228 searchText: content.toLocaleLowerCase(),
229 };
230}
231
232function buildSkippedRecord(file, reason) {
233 return {

Callers 1

syncFunction · 0.85

Calls 2

buildSkippedRecordFunction · 0.85
getFileMetadataFunction · 0.85

Tested by

no test coverage detected