Transforms an array of StoredMessage instances into an array of
BaseMessage instances. It uses the mapV1MessageToStoredMessage
function to ensure all messages are in the StoredMessage format, then
creates new instances of the appropriate BaseMessage subclass based
on the type of each message. This function is used to prepare stored
messages for use in a chat context.
Transforms an array of
StoredMessageinstances into an array ofBaseMessageinstances. It uses themapV1MessageToStoredMessagefunction to ensure all messages are in theStoredMessageformat, then creates new instances of the appropriateBaseMessagesubclass based on the type of each message. This function is used to prepare stored messages for use in a chat context.