fix(todo-continuation-enforcer): show reminder only once per session with 2s countdown

- Reduce COUNTDOWN_SECONDS from 5 to 2 for faster reminder display
- Remove logic that clears remindedSessions on assistant response to prevent re-triggering
- Ensures todo continuation reminder displays exactly once per session

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-20 11:59:43 +09:00
parent fbaa2dc9d3
commit f5ce55e06f

View File

@@ -62,7 +62,7 @@ function detectInterrupt(error: unknown): boolean {
return false
}
const COUNTDOWN_SECONDS = 5
const COUNTDOWN_SECONDS = 2
const TOAST_DURATION_MS = 900 // Slightly less than 1s so toasts don't overlap
interface CountdownState {
@@ -279,11 +279,7 @@ export function createTodoContinuationEnforcer(ctx: PluginInput): TodoContinuati
}
}
// Clear reminded state when assistant responds (allows re-remind on next idle)
if (sessionID && info?.role === "assistant" && remindedSessions.has(sessionID)) {
remindedSessions.delete(sessionID)
log(`[${HOOK_NAME}] Cleared remindedSessions on assistant response`, { sessionID })
}
}
if (event.type === "session.deleted") {