fix(event): prefer real session.idle over recent synthetic dedup (#2667)
The dedup logic dropped real session.idle events when a synthetic idle had fired within the dedup window, losing data that downstream hooks needed. Now real idle events always reach dispatchToHooks while synthetic duplicates are still dropped when a real event came first. 🤖 Generated with OhMyOpenCode assistance https://github.com/code-yeongyu/oh-my-opencode
This commit is contained in:
@@ -323,7 +323,6 @@ export function createEventHandler(args: {
|
||||
const emittedAt = recentSyntheticIdles.get(sessionID);
|
||||
if (emittedAt && Date.now() - emittedAt < DEDUP_WINDOW_MS) {
|
||||
recentSyntheticIdles.delete(sessionID);
|
||||
return;
|
||||
}
|
||||
recentRealIdles.set(sessionID, Date.now());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user