pub struct JournalState {Show 13 fields
pub messages: Vec<ChatMessage>,
pub unpersisted: Vec<ChatMessage>,
pub checkpoint_messages: Option<usize>,
pub undo_stack: Vec<Vec<ChatMessage>>,
pub steer_queue: Vec<String>,
pub follow_up_queue: Vec<String>,
pub plan: Vec<PlanEntry>,
pub renames: Vec<(String, String)>,
pub upgrades: Vec<(u32, u32, String)>,
pub model_changes: Vec<ModelChangeRecord>,
pub usage: Vec<UsageRecord>,
pub records: usize,
pub skipped: usize,
}Expand description
The state a journal describes once folded up.
Fields§
§messages: Vec<ChatMessage>The live conversation, after every recorded rewind/unrewind.
unpersisted: Vec<ChatMessage>Messages recorded AFTER the last JournalOp::Checkpoint — the
turn (or part of a turn) that a crash would have lost, because the
end-of-turn transcript rewrite never ran. Empty in the ordinary
case, where the last thing that happened was a clean persist.
checkpoint_messages: Option<usize>Messages the last JournalOp::Checkpoint said the transcript
holds — None when the journal has no checkpoint yet.
undo_stack: Vec<Vec<ChatMessage>>Tails removed by rewinds that have not been undone, newest last — the proof that a rewind loses nothing.
steer_queue: Vec<String>Still-pending mid-turn steering inputs, oldest first.
follow_up_queue: Vec<String>Still-pending at-idle follow-up inputs, oldest first.
plan: Vec<PlanEntry>The current plan (empty when the session never recorded one).
renames: Vec<(String, String)>Every rename this session’s handle has been through, in order.
upgrades: Vec<(u32, u32, String)>Every in-place format upgrade recorded for this session.
model_changes: Vec<ModelChangeRecord>BP-13: every mid-session model change recorded, in order.
usage: Vec<UsageRecord>BP-13: every per-turn usage record written, in order.
records: usizeWell-formed records read.
skipped: usizeLines skipped as unreadable — a torn trailing record after a crash, or a foreign line someone concatenated in.
Implementations§
Trait Implementations§
Source§impl Clone for JournalState
impl Clone for JournalState
Source§fn clone(&self) -> JournalState
fn clone(&self) -> JournalState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more