increase log read_tail from 2MB to 8MB

Large tool results (memory renders, bash output) consume most of
the 2MB budget — only 37 entries loaded from a 527-line log.
8MB captures ~300 entries, giving compact() enough conversation
to work with.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-02 23:02:43 -04:00
parent 736307b4c2
commit 3f3db9ce26

View file

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