ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 LeeHigma0201

resume-nudge

偵測因重新啟動或當機而在一輪中途被截斷的工作階段,並草擬標準接續提示;/resume-here 會送出它。

LeeHigma0201@LeeHigma0201

LeeHigma0201/claude-code-mods/tree/main/mods/resume-nudge

已翻譯

關於這個 mod

工作階段因重新啟動或當機而中斷一輪,之後重新開啟時,這個外掛會在提示框草擬標準接續提示:「The Mac restarted and this session was interrupted. Pick up exactly where you left off…」。按 Enter 送出,或忽略它。

若最後一則訊息屬於下列其中一種情況,就會把工作階段視為中斷:尚未回傳的工具呼叫、Claude 尚未回答的工具結果、Claude 尚未回答的提示。若該輪以回答結束,或你按下 Esc([Request interrupted by user]),就不算中斷。

  • /resume-here 只會在工作階段中斷時送出接續提示。手機上可能看不到草擬文字,可在手機使用它。
  • /resume-here check 會回報判定結果,絕不送出。

它不會自行送出。工作階段內使用 /resume 後不會觸發 session.start;這種情況請使用 /resume-here。

Hooks:session.start、command.run。呼叫:$.session.messages、$.prompt.fill、$.prompt.submit(只來自 /resume-here,且會在指令回答後由計時器觸發)、$.ui.toast、$.command.register。

測試:claude plugin test .(4 tests)。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add LeeHigma0201/claude-code-mods
claude plugin install resume-nudge
原文 / README

resume-nudge

When a session reopens after a restart or crash cut a turn off, this drafts the standard pick-up prompt in the prompt box: "The Mac restarted and this session was interrupted. Pick up exactly where you left off…". Press Enter to send it, or ignore it.

It treats the session as cut off when the last message is one of:

  • a tool call that never returned,
  • a tool result Claude never answered,
  • a prompt Claude never answered.

It is not cut off when the turn ended with an answer, or when you pressed Esc ([Request interrupted by user]).

  • /resume-here sends the pick-up prompt, only when the session is cut off. Use it from the phone, where the drafted text may not show.
  • /resume-here check reports the verdict and never sends.

It never sends on its own. session.start does not fire after an in-session /resume; use /resume-here there.

Hooks: session.start, command.run. Calls: $.session.messages, $.prompt.fill, $.prompt.submit (only from /resume-here, on a timer once the command has answered), $.ui.toast, $.command.register.

Test: claude plugin test . (4 tests).

更多類似作品