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:
parent
4f19c02e50
commit
249726599b
1 changed files with 1 additions and 1 deletions
|
|
@ -986,7 +986,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(8 * 1024 * 1024) {
|
Some(log) => match log.read_tail(64 * 1024 * 1024) {
|
||||||
Ok(entries) if !entries.is_empty() => entries,
|
Ok(entries) if !entries.is_empty() => entries,
|
||||||
_ => return false,
|
_ => return false,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue