Files
oh-my-opencode/src/hooks/todo-continuation-enforcer/compaction-guard.ts
T

11 lines
301 B
TypeScript
Raw Normal View History

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
}