@mastra/redis 1.4.5-alpha.0 → 1.4.6-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
|
@@ -596,15 +596,14 @@ var StoreMemoryRedis = class extends _mastra_core_storage.MemoryStorage {
|
|
|
596
596
|
perPage: perPageForResponse,
|
|
597
597
|
hasMore: false
|
|
598
598
|
};
|
|
599
|
+
const perThreadIds = await Promise.all(threadIds.map((tid) => this.client.zRange(getThreadMessagesKey(tid), 0, -1)));
|
|
599
600
|
const allMessageIdsWithThreads = [];
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
const msgIds = await this.client.zRange(threadMessagesKey, 0, -1);
|
|
603
|
-
for (const mid of msgIds) allMessageIdsWithThreads.push({
|
|
601
|
+
threadIds.forEach((tid, i) => {
|
|
602
|
+
for (const mid of perThreadIds[i]) allMessageIdsWithThreads.push({
|
|
604
603
|
threadId: tid,
|
|
605
604
|
messageId: mid
|
|
606
605
|
});
|
|
607
|
-
}
|
|
606
|
+
});
|
|
608
607
|
if (allMessageIdsWithThreads.length === 0) return {
|
|
609
608
|
messages: [],
|
|
610
609
|
total: 0,
|