跳转到内容

UIToolCallPart

嵌在 assistant 消息里的工具调用卡(全生命周期原位更新:proposed → … → 终态)

readonly optional args?: unknown;

tool.proposed 携带的调用参数(渲染方按工具名解读)


readonly optional durationMs?: number;

readonly optional errorMessage?: string;

readonly optional errorType?: string;

tool.failed 的错误分类(协议五枚举,原样透传)


readonly id: string;

协议 toolCallId


readonly name: string;

readonly optional result?: unknown;

tool.completed 的结构化渲染数据(ToolResult.data 透传位)


readonly optional resultText?: string;

tool.completed 的模型可见文本投影(ToolResult content)


readonly status: ToolCallPartStatus;

readonly type: "toolCall";