@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.
@@ -3,7 +3,7 @@ name: mastra-redis
3
3
  description: Documentation for @mastra/redis. Use when working with @mastra/redis APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/redis"
6
- version: "1.4.4-alpha.0"
6
+ version: "1.4.5-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.4-alpha.0",
2
+ "version": "1.4.5-alpha.0",
3
3
  "package": "@mastra/redis",
4
4
  "exports": {},
5
5
  "modules": {}
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;