diff --git a/manifest.json b/manifest.json index 53648023..8d73729d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "copilot", "name": "Copilot", - "version": "2.7.10", + "version": "2.7.11", "minAppVersion": "0.15.0", "description": "An AI Copilot in Obsidian.", "author": "Logan Yang", diff --git a/package-lock.json b/package-lock.json index 0c51d790..6bffbfaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-copilot", - "version": "2.7.10", + "version": "2.7.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obsidian-copilot", - "version": "2.7.10", + "version": "2.7.11", "license": "AGPL-3.0", "dependencies": { "@huggingface/inference": "^2.6.4", diff --git a/package.json b/package.json index e972d1cb..d65a8cb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-copilot", - "version": "2.7.10", + "version": "2.7.11", "description": "ChatGPT integration for Obsidian", "main": "main.js", "scripts": { diff --git a/src/search/chunkedStorage.ts b/src/search/chunkedStorage.ts index f1e346f9..ee1e67b2 100644 --- a/src/search/chunkedStorage.ts +++ b/src/search/chunkedStorage.ts @@ -121,7 +121,9 @@ export class ChunkedStorage { return; } - const rawDocs = (rawData as any).docs?.docs; + // NOTE: Orama RawData docs can be either an array or an object + const docsData = (rawData as any).docs?.docs; + const rawDocs = Array.isArray(docsData) ? docsData : Object.values(docsData || {}); if (getSettings().debug) { console.log(`Starting save with ${rawDocs.length ?? 0} total documents`); diff --git a/versions.json b/versions.json index d645042d..617084ee 100644 --- a/versions.json +++ b/versions.json @@ -68,5 +68,6 @@ "2.7.7": "0.15.0", "2.7.8": "0.15.0", "2.7.9": "0.15.0", - "2.7.10": "0.15.0" + "2.7.10": "0.15.0", + "2.7.11": "0.15.0" }