Skip to content

Commit f5ce55e

Browse files
committed
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)
1 parent fbaa2dc commit f5ce55e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/hooks/todo-continuation-enforcer.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function detectInterrupt(error: unknown): boolean {
6262
return false
6363
}
6464

65-
const COUNTDOWN_SECONDS = 5
65+
const COUNTDOWN_SECONDS = 2
6666
const TOAST_DURATION_MS = 900 // Slightly less than 1s so toasts don't overlap
6767

6868
interface CountdownState {
@@ -279,11 +279,7 @@ export function createTodoContinuationEnforcer(ctx: PluginInput): TodoContinuati
279279
}
280280
}
281281

282-
// Clear reminded state when assistant responds (allows re-remind on next idle)
283-
if (sessionID && info?.role === "assistant" && remindedSessions.has(sessionID)) {
284-
remindedSessions.delete(sessionID)
285-
log(`[${HOOK_NAME}] Cleared remindedSessions on assistant response`, { sessionID })
286-
}
282+
287283
}
288284

289285
if (event.type === "session.deleted") {

0 commit comments

Comments
 (0)