rebuildHistoryIndex
rebuildHistoryIndex(
storePath):IndexRebuildSummary
Defined in: packages/core/src/history/historyFiles.ts:206
Rebuild index.db from the thread files alone, replacing whatever index was there. Each
conversation keeps its integer id and run id. Should two files claim the same integer id (an
index that was lost and started again before this ran), the later one is given a new id and its
file is updated to match, so the files stay the record. Two records of the same run id are one
conversation: the first is kept.
An index row whose record file is gone is not carried over, which is the rule that deleting one file loses only what it held. The rebuilt index is written beside the old one and renamed over it, so a failure part-way leaves the old index as it was. Throws on failure; the callers report it.
Parameters
Section titled “Parameters”storePath
Section titled “storePath”string