?
chat.getThread
Fetches one thread with its full message history.
chat.getThread(threadId) → Promise<Thread>
Fetches a thread by id and returns a Thread, its messages array included. Use it to hydrate a conversation the user reopens: render each Message by role, and expand the tool calls and results it carries.
Parameters
threadId
string
RequiredThe thread to fetch.
Hydrate a conversation
const thread = await chat.getThread(threadId); thread.messages.forEach((m) => renderMessage(m));