0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

fix(@mastra/memory, @mastra/core): ensure all new messages are saved atleast 1ms apart (#3654)

Fixes https://github.com/mastra-ai/mastra/issues/3603,
https://github.com/mastra-ai/mastra/issues/3448,
https://discord.com/channels/1309558646228779139/1360536672865091716/1360726058760011857,
and
https://discord.com/channels/1309558646228779139/1358426023384842368/1358426023384842368

Some places in the code were setting createdAt dates atleast 1ms apart,
while other places weren't. This PR adds +index ms when creating dates
in loops. I also added a function that will fix any tool calls that were
previously saved in the wrong order, and added some tests!
This commit is contained in:
Tyler Barnes 2025-04-15 15:32:29 -07:00 • committed by GitHub
commit 6f92295a4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 468 additions and 9 deletions