const memoryThread = mastraClient.getMemoryThread(
threadId,
AI_CODING_ASSISTANT_AGENT_ID,
);
const { data, error } = await tryCatch(memoryThread.get());
if (error) {
logger.error(error, "Failed to get memory thread");
notFound();
}
// Get the messages from the chat thread
const { data: messages, error: getMessagesError } = await tryCatch(
memoryThread.getMessages(),
);
const memoryThread = mastraClient.getMemoryThread(
threadId,
AI_CODING_ASSISTANT_AGENT_ID,
);
const { data, error } = await tryCatch(memoryThread.get());
if (error) {
logger.error(error, "Failed to get memory thread");
notFound();
}
// Get the messages from the chat thread
const { data: messages, error: getMessagesError } = await tryCatch(
memoryThread.getMessages(),
);