Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
test(profile): word the two-project habit differently per project
AkitaOnRailsf8a670abf34b
diff --git a/crates/ai-memory-cli/tests/suite/profile_e2e.rs b/crates/ai-memory-cli/tests/suite/profile_e2e.rsindex f28c9410..105a0fb8 100644--- a/crates/ai-memory-cli/tests/suite/profile_e2e.rs+++ b/crates/ai-memory-cli/tests/suite/profile_e2e.rs@@ -77,7 +77,16 @@ mod slow {.await;say(&client, &base, "alpha", 1, "I prefer tabs over spaces.").await;- say(&client, &base, "beta", 2, "I prefer tabs over spaces.").await;+ // Worded differently: the same sentence in two projects at once+ // reads as one fanned-out brief and counts once (#1148).+ say(+ &client,+ &base,+ "beta",+ 2,+ "I really prefer tabs over spaces here too.",+ )+ .await;let rebuilt = run_cli(&["profile", "rebuild"],data_dir.path(),diff --git a/crates/ai-memory-hooks/src/router.rs b/crates/ai-memory-hooks/src/router.rsindex 913aed3b..5d5076f9 100644--- a/crates/ai-memory-hooks/src/router.rs+++ b/crates/ai-memory-hooks/src/router.rs@@ -18766,7 +18766,15 @@ mod tests {async fn a_habit_from_two_projects_reaches_a_new_projects_first_session() {let tmp = TempDir::new().unwrap();let state = make_state(&tmp).await;- for (index, project) in ["alpha", "beta"].into_iter().enumerate() {+ // Worded differently per project: the same sentence in two projects+ // at once reads as one fanned-out brief and counts once (#1148).+ for (index, (project, habit)) in [+ ("alpha", "I prefer tabs over spaces."),+ ("beta", "I really prefer tabs over spaces here too."),+ ]+ .into_iter()+ .enumerate()+ {let proj = state.writer.get_or_create_project(state.workspace_id, project, None)@@ -18798,7 +18806,7 @@ mod tests {extension: None,source_event: None,title: "prompt".into(),- body: "I prefer tabs over spaces.".into(),+ body: habit.into(),importance: 5,},&ai_memory_core::Sanitizer::builtin(),