Skip to main content

Module tooling

Module tooling 

Source

Structs§

UnwrappedToolResult
Mirrors unwrapToolUseResult(rawResult). Walks the tool_result envelope: if the value is an object, surfaces the inner content / result / text field and the is_error / error flag.

Functions§

build_tool_result_fields
Mirrors buildToolResultFields(isError, rawContent, base?, rawResult?). The high-level entry that turns an arbitrary tool_result block into the structured ToolCallUpdateFields upstream’s TUI consumes.
create_tool_call
Mirrors createToolCall(toolUseId, name, input, parentToolUseId). Builds the rich ToolCall envelope upstream emits when the assistant first invokes a tool.
is_tool_result_block_type
unwrap_tool_use_result