toClientMessages
function toClientMessages(messages): AgentMessage[];Defined in: agents/src/input.ts:213
Copies of the messages without the fields a provider owns: reasoningDetails,
reasoningItems and each call’s thoughtSignature. Use it before history reaches a
browser. Reasoning text and tool rounds stay: DeepSeek needs the reasoning of a tool-call
turn sent back. The run applies the same rule to history a caller passes in, because a
browser could forge those fields.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
messages |
readonly AgentMessage[] |