@mastra/elasticsearch 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { MessageList } from "@mastra/core/agent";
|
|
|
7
7
|
import crypto$1 from "crypto";
|
|
8
8
|
import { saveScorePayloadSchema } from "@mastra/core/evals";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.4.
|
|
10
|
+
var version = "1.4.2";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/vector/filter.ts
|
|
13
13
|
/**
|
|
@@ -1885,6 +1885,7 @@ var MemoryElasticSearch = class extends MemoryStorage {
|
|
|
1885
1885
|
updatedAt: now
|
|
1886
1886
|
};
|
|
1887
1887
|
const clonedMessages = [];
|
|
1888
|
+
const messageIdMap = Object.create(null);
|
|
1888
1889
|
const targetResourceId = resourceId || sourceThread.resourceId;
|
|
1889
1890
|
const entries = [];
|
|
1890
1891
|
for (let i = 0; i < sourceMessages.length; i++) {
|
|
@@ -1909,6 +1910,7 @@ var MemoryElasticSearch = class extends MemoryStorage {
|
|
|
1909
1910
|
value: { threadId: newThreadId }
|
|
1910
1911
|
});
|
|
1911
1912
|
clonedMessages.push(newMessage);
|
|
1913
|
+
messageIdMap[sourceMsg.id] = newMessageId;
|
|
1912
1914
|
}
|
|
1913
1915
|
await this.db.insert({
|
|
1914
1916
|
tableName: TABLE_THREADS,
|
|
@@ -1920,7 +1922,8 @@ var MemoryElasticSearch = class extends MemoryStorage {
|
|
|
1920
1922
|
});
|
|
1921
1923
|
return {
|
|
1922
1924
|
thread: newThread,
|
|
1923
|
-
clonedMessages
|
|
1925
|
+
clonedMessages,
|
|
1926
|
+
messageIdMap
|
|
1924
1927
|
};
|
|
1925
1928
|
} catch (error) {
|
|
1926
1929
|
if (error instanceof MastraError) throw error;
|