Documentation
¶
Overview ¶
Package persistence tracks edit counter state for persistence nudge timing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PersistenceNudgeNeeded ¶
PersistenceNudgeNeeded determines whether a persistence nudge should fire based on prompt count and the number of prompts since the last nudge.
Parameters:
- count: total prompt count for the session
- sinceNudge: number of prompts since the last nudge or context update
Returns:
- bool: true if a nudge should be emitted
func WritePersistenceState ¶
WritePersistenceState writes the persistence state to the given file.
Parameters:
- path: absolute path to the state file
- s: state to persist
Types ¶
type State ¶
State holds the counter state for persistence nudging.
func ReadPersistenceState ¶
ReadPersistenceState reads a persistence state file and returns the parsed state. Returns ok=false if the file does not exist or cannot be read.
Parameters:
- path: absolute path to the state file
Returns:
- PersistenceState: parsed counter state
- bool: true if the file was read successfully
Click to show internal directories.
Click to hide internal directories.