OptionalautoAuto-save interval in milliseconds (default: 3000)
Hiyve client instance (must implement AssignmentFileClient)
Current content as JSON
OptionalenabledWhether persistence is enabled
OptionalfileExisting file ID to update
OptionalfileFile storage location (default: '/Assignments')
Assignment metadata state
OptionalonCallback on save error
OptionalonCallback after successful save
OptionaloriginalOriginal author of the assignment, when known (i.e. when editing an existing assignment). The save logic preserves these fields on the persisted file rather than overwriting them with the current user's identity — without this, a student auto-saving during their session would flip the author to themselves and the teacher would lose ownership.
OptionaloriginalOptionaloriginalOptionalpracticedTotal practice minutes the writing user has logged for this
assignment. Used when persisting appData.userStatuses[userId]
so a viewer's status reflects what the host knows about their
own practice — useful when practice is tracked in an external
log (server-side PracticeLog) and the file's userActivities
map hasn't picked up the latest session yet (common at unmount,
when the session ends in the cleanup pass and save can't read
the post-state value before the file is written).
Assignment title
Current user ID
OptionaluserCurrent user display name
Options for the useAssignmentPersistence hook.
Remarks
Configures auto-save behavior for assignments, including the save interval, file location, and callbacks for save lifecycle events.