visibleMessages
A static method that returns the transcript a browser may redraw, and nothing else. The service’s log holds the substituted system prompt and the tool calls and results alongside the dialogue, so relaying it would publish your prompt to anyone with a handle.
Only user and assistant messages with non-blank text are kept. Each is reduced to role,
content and, when the source message is dated, timestamp in epoch seconds, so a restored
transcript isn’t shown as sent now. The gateway’s log method uses this before it answers, and
lastActivity() reads the same log for the idle clock.
Parameters
messages
Messages as log() returns them in messages.
Returns
Array<Record<string, unknown>> — the visible turns, in order.