Skip to main content

undo-redo

Use the undo_redo tool to rewind or reapply buffered file changes or inspect diffs without UI navigation. Use when you need to adjust or verify changes in the current session history.

来源信息

仓库
Dwsy/agent
最近来源活动
2026年2月6日 06:27
检测到的 SKILL.md 语言
英语
星标
22
分支
3

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
undo-redo
description
Use the undo_redo tool to rewind or reapply buffered file changes or inspect diffs without UI navigation. Use when you need to adjust or verify changes in the current session history.
# Undo/Redo (LLM Tool) ## When to use - You need to roll back or reapply buffered filesystem changes without asking the user to navigate the session tree. - You need a diff for a specific file across conversation leaves. - You need a list of all buffered diffs. ## Tool actions `undo_redo` supports the following actions: - `undo`: move to the previous leaf and restore files. - `redo`: move to the next leaf and restore files. - `list_diffs`: list all buffered diffs across leaves. - `diff`: show a diff for a specific file. - `path` is required. - `leafId` is optional (defaults to the current leaf). ### Examples ```json {"action":"undo"} ``` ```json {"action":"redo"} ``` ```json {"action":"list_diffs"} ``` ```json {"action":"diff","path":"src/index.ts"} ``` ```json {"action":"diff","leafId":"abcd1234","path":"README.md"} ``` ## Important behavior difference vs commands The tool does not trigger UI navigation and does not rebuild the current turn context. This keeps the current KV cache intact and avoids editor/tree updates. The new leaf and restored files will be applied for the next user prompt when pi rebuilds context. If the user wants immediate UI navigation and context replay, instruct them to use `/undo` or `/redo` instead.
在 GitHub 查看