Skip to main content
Convert an array of TranscriptEntry (a.k.a. UserHistoryEntry) values into the normalized PromptEntry shape expected by LLM SDKs (e.g. the AI SDK’s CoreMessage). Only entries with non-empty text are included. Entry order is preserved (chronological, oldest first — the natural order returned by history.user.list()).

Parameters

TranscriptEntry[]
required

Returns

PromptEntry