RestoreResult
This content is not available in your language yet.
type RestoreResult = | { checkpointId: string; fromMessages: number; preRestoreCheckpointId?: string; status: "restored"; toMessages: number;} | { reason: "turn_running" | "not_found" | "session_mismatch" | "store_not_wired"; status: "rejected";};restore() 结果联合(restored / rejected)
{ checkpointId: string; fromMessages: number; preRestoreCheckpointId?: string; status: "restored"; toMessages: number;}checkpointId
Section titled “checkpointId”checkpointId: string;fromMessages
Section titled “fromMessages”fromMessages: number;恢复前历史消息数
preRestoreCheckpointId?
Section titled “preRestoreCheckpointId?”optional preRestoreCheckpointId?: string;恢复前自动落的 pre_restore 快照 id(options.checkpoint !== false 时在场)
status
Section titled “status”status: "restored";toMessages
Section titled “toMessages”toMessages: number;恢复后历史消息数(= 快照 messageCount)
{ reason: "turn_running" | "not_found" | "session_mismatch" | "store_not_wired"; status: "rejected";}reason
Section titled “reason”reason: "turn_running" | "not_found" | "session_mismatch" | "store_not_wired";turn_running = 运行中 / not_found = 本会话下无此快照 / session_mismatch = 快照 属于别的会话(跨会话恢复 = 越界;请用 fork)/ store_not_wired = 快照存储未接线
status
Section titled “status”status: "rejected";Was this page helpful?
Thanks for your feedback.