read_tail 64MB — just read the whole log

Images in the jsonl eat most of the byte budget. 64MB covers
any realistic conversation log; compact() trims to fit.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-02 23:13:28 -04:00
parent 4f19c02e50
commit 249726599b

View file

@ -986,7 +986,7 @@ impl Agent {
/// Returns true if the log had content to restore.
pub fn restore_from_log(&mut self) -> bool {
let entries = match &self.conversation_log {
Some(log) => match log.read_tail(8 * 1024 * 1024) {
Some(log) => match log.read_tail(64 * 1024 * 1024) {
Ok(entries) if !entries.is_empty() => entries,
_ => return false,
},