mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
Merge pull request #2106 from TriliumNext/fix/llm-becca-sync
fix(llm): Fix Note Embeddings not being synced correctly and causing sync loops
This commit is contained in:
@@ -35,8 +35,8 @@ async function processEntityChanges(entityChanges: EntityChange[]) {
|
||||
loadResults.addOption(attributeEntity.name);
|
||||
} else if (ec.entityName === "attachments") {
|
||||
processAttachment(loadResults, ec);
|
||||
} else if (ec.entityName === "blobs" || ec.entityName === "etapi_tokens") {
|
||||
// NOOP
|
||||
} else if (ec.entityName === "blobs" || ec.entityName === "etapi_tokens" || ec.entityName === "note_embeddings") {
|
||||
// NOOP - these entities are handled at the backend level and don't require frontend processing
|
||||
} else {
|
||||
throw new Error(`Unknown entityName '${ec.entityName}'`);
|
||||
}
|
||||
|
||||
@@ -44,9 +44,17 @@ interface OptionRow {}
|
||||
|
||||
interface NoteReorderingRow {}
|
||||
|
||||
interface ContentNoteIdToComponentIdRow {
|
||||
interface NoteEmbeddingRow {
|
||||
embedId: string;
|
||||
noteId: string;
|
||||
componentId: string;
|
||||
providerId: string;
|
||||
modelId: string;
|
||||
dimension: number;
|
||||
version: number;
|
||||
dateCreated: string;
|
||||
utcDateCreated: string;
|
||||
dateModified: string;
|
||||
utcDateModified: string;
|
||||
}
|
||||
|
||||
type EntityRowMappings = {
|
||||
@@ -56,6 +64,7 @@ type EntityRowMappings = {
|
||||
options: OptionRow;
|
||||
revisions: RevisionRow;
|
||||
note_reordering: NoteReorderingRow;
|
||||
note_embeddings: NoteEmbeddingRow;
|
||||
};
|
||||
|
||||
export type EntityRowNames = keyof EntityRowMappings;
|
||||
|
||||
Reference in New Issue
Block a user