Skip to content

Function: chatContentParts()

chatContentParts(content): object[] | undefined

Normalize structured chat content to an array. Providers usually emit a parts array, but some compatibility layers collapse a one-part array to the object itself. Returns undefined for strings, nulls, and other scalar values so callers can distinguish structured content from plain text.

unknown

object[] | undefined