Skip to content
1 min read · 91 words

Function: argText()

ts
function argText(args: unknown): string;

Defined in: src/batteries/context/thrift/relevance.ts:117

Render a tool call's arguments into a short text fragment for inclusion in a turn's relevance text (see groupHistoryIntoTurns) — best-effort JSON.stringify, truncated, empty on failure (e.g. circular structures) or absent args.

Parameters

ParameterTypeDescription
argsunknownThe tool call's arguments, in whatever shape the caller's tool-call record carries.

Returns

string

A short (<=200 char) text fragment, or an empty string if args is nullish or unserializable.