Skip to content

hasAssistantText

hasAssistantText(messages): boolean

Defined in: packages/core/src/agent/stop-when.ts:32

True when assistant messages include non-empty user-facing text. Ignores tool/reasoning parts and whitespace-only strings.

ModelMessage[]

boolean