feat: full pattern matrix — M1 complete, M2 LLM chat, 30+ pattern files #10

Open
pyr0ball wants to merge 27 commits from feat/patterns-expansion into main
Showing only changes of commit 3c77969680 - Show all commits

View file

@ -57,7 +57,9 @@ pub async fn watch(log_paths: HashMap<String, String>, tx: mpsc::Sender<SystemEv
}
}
}
});
})
.await
.ok();
}
pub fn expand_tilde(path: &str) -> String {
@ -77,9 +79,10 @@ pub fn read_new_lines(path: &str, from_byte: u64) -> (Vec<String>, u64) {
if file.seek(std::io::SeekFrom::Start(from_byte)).is_err() {
return (vec![], from_byte);
}
let mut content = String::new();
let _ = file.read_to_string(&mut content);
let new_pos = from_byte + content.len() as u64;
let mut raw = Vec::new();
let bytes_read = file.read_to_end(&mut raw).unwrap_or(0);
let content = String::from_utf8_lossy(&raw).into_owned();
let new_pos = from_byte + bytes_read as u64;
let lines: Vec<String> = content
.lines()
.filter(|l| !l.is_empty())