/** * UIMessage 解析辅助。 * * 关键点(中文) * - 这些能力属于 runtime 执行结果处理,不属于 prompts 组装 * - 用于提取最终 assistant 文本与工具调用摘要 */ import { type UIMessage } from "ai"; import type { SessionUserMessagePart } from "../../types/sdk/AgentSessionPrompt.js"; import type { JsonObject } from "../../types/common/Json.js"; type ToolCallSummary = { tool: string; input: JsonObject; output: string; }; /** * 从 parts 数组中提取纯文本。 */ export declare function extract_text_from_parts(parts: SessionUserMessagePart[] | null | undefined): string; /** * 从 UIMessage 中提取纯文本。 */ export declare function extract_text_from_ui_message(message: UIMessage | null | undefined): string; /** * 从 UIMessage 中提取 tool 调用记录。 */ export declare function extract_tool_calls_from_ui_message(message: UIMessage | null | undefined): ToolCallSummary[]; export {}; //# sourceMappingURL=UIMessageTransformer.d.ts.map