@mastra/redis 1.4.4-alpha.0 → 1.4.5-alpha.0
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/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -964,6 +964,7 @@ var StoreMemoryRedis = class extends _mastra_core_storage.MemoryStorage {
|
|
|
964
964
|
const threadKey = getKey(_mastra_core_storage.TABLE_THREADS, { id: newThreadId });
|
|
965
965
|
multi.set(threadKey, JSON.stringify(processRecord(_mastra_core_storage.TABLE_THREADS, newThread).processedRecord));
|
|
966
966
|
const clonedMessages = [];
|
|
967
|
+
const messageIdMap = Object.create(null);
|
|
967
968
|
const targetResourceId = resourceId || sourceThread.resourceId;
|
|
968
969
|
const newThreadMessagesKey = getThreadMessagesKey(newThreadId);
|
|
969
970
|
for (let i = 0; i < sourceMessages.length; i++) {
|
|
@@ -988,11 +989,13 @@ var StoreMemoryRedis = class extends _mastra_core_storage.MemoryStorage {
|
|
|
988
989
|
value: newMessageId
|
|
989
990
|
});
|
|
990
991
|
clonedMessages.push(newMessage);
|
|
992
|
+
messageIdMap[sourceMsg.id] = newMessageId;
|
|
991
993
|
}
|
|
992
994
|
await multi.exec();
|
|
993
995
|
return {
|
|
994
996
|
thread: newThread,
|
|
995
|
-
clonedMessages
|
|
997
|
+
clonedMessages,
|
|
998
|
+
messageIdMap
|
|
996
999
|
};
|
|
997
1000
|
} catch (error) {
|
|
998
1001
|
if (error instanceof _mastra_core_error.MastraError) throw error;
|