Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugins/openclaw/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export async function runZkr(

child.stdout.on("data", (chunk: Buffer) => capture(output.stdout, chunk));
child.stderr.on("data", (chunk: Buffer) => capture(output.stderr, chunk));
child.stdin.on("error", () => {
// Ignore EPIPE errors which occur when the child process closes its stdin before we finish writing
});
const ignoreStreamError = () => {};
child.stdout.on("error", ignoreStreamError);
child.stderr.on("error", ignoreStreamError);
child.on("error", () => {
fail(false);
});
Expand Down
13 changes: 13 additions & 0 deletions src/self_improve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@ mod tests {
assert!(augmented.contains("isolate IO in tests"));
}

#[test]
fn augment_with_no_lessons_returns_base() {
let tmp = tempfile::tempdir().unwrap();
let db = MemoryDb::open(tmp.path().join("memory.db")).unwrap();
let (tenant_id, person_id) = test_ids();
let improve = SelfImprove::new(db, tenant_id, person_id);

let augmented = improve
.augment("testing", "You are a helpful agent.")
.unwrap();
assert_eq!(augmented, "You are a helpful agent.");
}

#[test]
fn deduplicates_lessons_across_queries() {
let tmp = tempfile::tempdir().unwrap();
Expand Down
Loading