accumulateMessage
accumulateMessage(
acc,message):void
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/runStats.ts:74
Fold one LangChain message (or message chunk) into the accumulator. Fail-soft: any unexpected shape is swallowed so a run is never affected. Harvests, when present:
usage_metadata.input_tokens/.output_tokens(summed; markssawUsage),- tool names from an AIMessage’s requested
tool_calls[].nameAND from aToolMessage’s own.name(the executed tool), so both “requested” and “executed” tools are captured, and - (BATCH-21) a per-
ToolMessageresult record —name+isError(from.status) + cappedcontent— intoacc.toolResults, so tool-RESULT assertions can grade what a tool returned.
Parameters
Section titled “Parameters”message
Section titled “message”unknown
Returns
Section titled “Returns”void