Skip to main content
Per-thread message history sub-API. Provides message listing and collection for a single thread.

Methods

append()

Append a message to the local SDK-side thread history cache. Only relevant for adapters with persistThreadHistory: true.

Parameters

string
required
required

Returns

Promise<void>

collect()

Async generator that yields all messages in chronological order, handling pagination automatically.

Parameters

string
required
{ limit: number }

Returns

Message

list()

Fetch a single page of messages from a thread. Delegates to the adapter’s fetchMessages; adapters that persist history in the SDK-side store (persistThreadHistory) fall back to that cache when the platform returns nothing.

Parameters

string
required

Returns

FetchResult