* 2.7.11
* Handle Orama raw docs at partition number change
This commit is contained in:
Logan Yang 2024-12-25 09:33:36 -08:00 committed by GitHub
parent 62057c39b3
commit 18402426a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 6 deletions

View file

@ -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",

4
package-lock.json generated
View file

@ -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",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-copilot",
"version": "2.7.10",
"version": "2.7.11",
"description": "ChatGPT integration for Obsidian",
"main": "main.js",
"scripts": {

View file

@ -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`);

View file

@ -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"
}