Fix four review findings: busy release, poison recovery, core.md errors, chat loop
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -47,12 +47,20 @@ impl Baseline {
|
||||
let mut system = system.trim_end().to_string();
|
||||
|
||||
let core = cfg.paths.home.join("memory/core.md");
|
||||
if let Ok(text) = std::fs::read_to_string(&core) {
|
||||
let trimmed = text.trim();
|
||||
if !trimmed.is_empty() {
|
||||
system.push_str("\n\n");
|
||||
system.push_str(trimmed);
|
||||
match std::fs::read_to_string(&core) {
|
||||
Ok(text) => {
|
||||
let trimmed = text.trim();
|
||||
if !trimmed.is_empty() {
|
||||
system.push_str("\n\n");
|
||||
system.push_str(trimmed);
|
||||
}
|
||||
}
|
||||
// A missing file is fine; an unreadable one is reported so the owner is not given a
|
||||
// session without the memory they curated and no sign of it.
|
||||
Err(e) if e.kind() != std::io::ErrorKind::NotFound => {
|
||||
return Err(BaselineError::Read(core.clone(), e));
|
||||
}
|
||||
Err(_) => {}
|
||||
}
|
||||
|
||||
Ok(Baseline {
|
||||
|
||||
Reference in New Issue
Block a user