0xGondarxyz/claude-code-mods/tree/main/quote-buttons
关于这个 mod
quote-buttons 是一个 Claude Code 插件,会为聊天界面添加四项功能。1. 引用按钮:每条用户消息和助手文本块悬停时都会显示 [ ↩ quote ];点击后会把消息以引用形式放入提示框(每行前加 > ,最多 6 行/400 个字符,截断处显示 …),位置在草稿上方。2. 编辑按钮:你自己的消息也会显示 [ ✎ edit ],把原文放回输入框;如果输入框已有文字,会显示 Clear the box first 且不做任何变更(真正的回退仍然是 Esc Esc)。3. 撤回发送:回合运行时提交的提示会保留 5 秒,频带显示 Sending in 5s: <text> 和 [ undo ];撤回会丢弃提示,并把文字放回草稿下方的输入框;空闲时发送的提示不受影响。4. 交接按钮:每条消息都会显示 [ ⇢ with context ] 和 [ ⇢ fresh ],各自在会话的项目根目录打开新的 Konsole 标签页──带上下文的执行 `claude --resume <session id> --fork-session "Take this over and do it now:
<message>",全新的执行 claude "<message>";标签页通过 argv 由 konsole --new-tab --workdir <root> -e claude ...启动,因此引号和换行都是安全的。如果缺少 Konsole、启动失败,或没有会话 ID,提示会给出原因,并把完整命令复制到剪贴板。提示栏上方的频带是共享的,因此这个插件会包住其他 mod 在那里绘制的内容。限制:交接需要 Konsole 使用单进程窗口(默认)才能使用--new-tab,否则会打开新窗口;按钮需要全屏终端布局(鼠标点击),因为主屏幕会把内容打印到滚动缓冲区,没有指针;5 秒的保留会消耗 hook 的 10 秒预算。使用 claude plugin validate .和claude plugin test .` 开发。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add 0xGondarxyz/claude-code-mods claude plugin install quote-buttons
原文 / README
quote-buttons
A Claude Code mod. It adds four things.
- Quote button. Every user message and every assistant text block shows
[ ↩ quote ]on hover (top right of the message). A click puts the message in the prompt box as a quote (>per line, at most 6 lines and 400 characters,…when cut) above your draft. - Edit button. Your own messages also show
[ ✎ edit ]. It puts the original text in the box. If the box has text, it showsClear the box firstand changes nothing. Real rewind stays Esc Esc. - Undo send. A prompt you submit while a turn runs is held for 5 seconds. The band above the prompt shows
Sending in 5s: <text>and[ undo ]. Undo drops the prompt and puts the text back in the box (below any draft). Prompts sent while idle are untouched. - Hand-off buttons. Every message also shows
[ ⇢ with context ]and[ ⇢ fresh ]in the same hover box. Each opens a new Konsole tab in the session's project root.⇢ with contextrunsclaude --resume <session id> --fork-session "Take this over and do it now:\n\n<message>", a fork of the whole conversation.⇢ freshrunsclaude "<message>", a new session.- The tab is opened with
konsole --new-tab --workdir <root> -e claude ..., by argv (no shell, so quotes and newlines are safe). Toast:Opened a new tab (with context)or(fresh). - If Konsole is missing, the launch fails or there is no session id yet, the toast gives the reason and the full command goes to the clipboard to paste into any terminal.
The band above the prompt is shared: the mod wraps what other mods draw there.
Limits
- The hand-off buttons need Konsole, and
--new-tabneeds "Run all Konsole windows in a single process" (the default); otherwise Konsole opens a new window. - Buttons need the fullscreen terminal layout (mouse clicks). On the main screen (
CLAUDE_CODE_NO_FLICKER=0, tmux by default) the transcript is printed into scrollback and there is no pointer, so the message buttons cannot be clicked. The undo band button is a normal Button (click, or Tab focus and Enter where the band holds the keys); not tested on the main screen. - The 5 second hold costs 5 s of the hook's 10 s budget.
Develop
claude plugin validate .
claude plugin test .
