Memory: byte-budgeted index, memory_search (BM25), auto extraction on compaction/exit

This commit is contained in:
hermes committed 2026-11-30 12:46:16 +00:00
1 parent 59bf45f41d
commit 8705b128ea
8 files changed
+311 -39

No files matched your search

+5 -1
View File
@@ -22,6 +22,10 @@ pub fn plan(msgs: &[Message], keep: usize) -> Option<Plan> {
}
impl Plan {
pub fn transcript(&self) -> &str {
&self.transcript
}
pub fn request(&self, model: &str) -> Request {
Request {
model: model.into(),
@@ -53,7 +57,7 @@ fn is_prompt(m: &Message) -> bool {
.any(|b| matches!(b, ContentBlock::ToolResult { .. }))
}
fn transcript(msgs: &[Message]) -> String {
pub fn transcript(msgs: &[Message]) -> String {
let cut = |s: &str| -> String {
if s.len() > 800 {
format!("{}…", s.chars().take(800).collect::<String>())