restore_version
Restore a document to a previously listed version, overwriting current content with that version's state. Use to revert unwanted changes; note that later modifications are permanently lost.
Instructions
将文档直接回退到 list_versions 给出的某个版本(回到该版本锚点:文档被覆盖为该版本内容,回退前不会快照当前状态,因此版本记录不会增加)。⚠️ 警告:该版本之后的全部修改将丢失,且回退本身不可通过新快照撤销(但既有版本链仍保留,可再回退到其它版本)。回退后旧标注的 loc 索引可能失效,应重新 read_structure 遍历后再继续编辑。返回 {restored_index, path, version_path, versions}。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 文档绝对路径 | |
| index | Yes | 要恢复的版本序号(list_versions 返回的 index) | |
| session_id | No | (建议)标注会话 ID(wait_for_annotations 返回)。窗口重载精确绑定该会话 |