Skip to content

VectorStore

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/semantic/vector-store.ts

Methods

MethodSignatureReturns
loadload()void
savesave()void
upsertupsert(chunks: CodeChunk[])void
removeremove(chunkIds: string[])void
removeByFileremoveByFile(files: string[])void
getAllgetAll()CodeChunk[]
getByFilegetByFile(file: string)CodeChunk[]
vectorSearchvectorSearch(queryEmbedding: number[], topK: number)Array<{ chunk: CodeChunk; score: number }>
getMerklegetMerkle()Map<string, string>
setMerklesetMerkle(merkle: Map<string, string>)void

Where it refuses work

  • VectorStore stops the work with an early return when queryEmbedding.length === 0.

When something fails

  • VectorStore handles failure in 3 places: it logs it and continues in 1, turns it into a return value in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.

Was this page helpful?

Download as PDF