4.2 消息模型(Message)
4.2.1 MessageV2 命名空间详解
MessageV2 命名空间详解export const User = Base.extend({
role: z.literal("user"),
time: z.object({ created: z.number() }),
summary: z.object({ // 变更摘要(可选)
title: z.string().optional(),
body: z.string().optional(),
diffs: Snapshot.FileDiff.array(),
}).optional(),
agent: z.string(), // 使用的 Agent 名称
model: z.object({ // 使用的模型
providerID: z.string(),
modelID: z.string(),
}),
system: z.string().optional(), // 额外的系统指令
tools: z.record(z.string(), z.boolean()).optional(), // 工具开关(已废弃)
variant: z.string().optional(), // 变体标识
})4.2.2 多模态 Part 类型系统
Part 类型
用途
关键字段
4.2.3 消息版本迁移策略
Last updated
