Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

fix(turnrewind): claim queued notices for hard-guard-refused sessions

yingtianlan4362878a85ba
diff --git a/plugins/dsh-tauri-turnrewind/lib/index.js b/plugins/dsh-tauri-turnrewind/lib/index.js
index 4630f6f1..8ac9f999 100644
--- a/plugins/dsh-tauri-turnrewind/lib/index.js
+++ b/plugins/dsh-tauri-turnrewind/lib/index.js
@@ -533,7 +533,12 @@ function apply(ctx, config = {}) {
const decision = await next()
if (decision.kind === 'reject' || signal.aborted)
return decision
+ // Claiming must work even when workspaceForAgent refuses the cwd (home
+ // dir): that is exactly the session kind the unsupported heads-up is
+ // queued for. Fall back to the raw cwd as the workspace key.
+ const cwd = agent?.session?.header?.cwd
const workspaceDir = workspaceForAgent(agent)
+ ?? (typeof cwd === 'string' && cwd.length > 0 ? resolve(cwd) : undefined)
if (!workspaceDir)
return decision
const notices = claimRewindNotices(ledger, agent.session.id, workspaceKeyFor(workspaceDir))