088844474a
Refine continuation agent resolution to prefer session-state agent fallback while keeping compaction-specific protection. Replace sticky boolean compaction flag with a short-lived timestamp guard so unresolved agents are blocked only during the immediate post-compaction window, avoiding long-lived suppression and preserving existing continuation behavior.
11 lines
301 B
TypeScript
11 lines
301 B
TypeScript
import { COMPACTION_GUARD_MS } from "./constants"
|
|
import type { SessionState } from "./types"
|
|
|
|
export function isCompactionGuardActive(state: SessionState, now: number): boolean {
|
|
if (!state.recentCompactionAt) {
|
|
return false
|
|
}
|
|
|
|
return now - state.recentCompactionAt < COMPACTION_GUARD_MS
|
|
}
|