Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs,crat

Steven Enamakel1d92d8314228
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs
index e2f165fc4f..ed3a1a30d0 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs
@@ -26,6 +26,7 @@ fn pack() -> TurnPack {
tokens: 14,
refs: vec!["id-1".into()],
engine: "reference".into(),
+ citations: Vec::new(),
}
}
diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs
index 6d1850a963..8802d09a64 100644
--- a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs
+++ b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs
@@ -80,6 +80,11 @@ async fn pre_turn_logs_the_user_turn_and_injects_what_memory_holds() {
.expect("a pack");
assert!(pack.markdown.contains("teal"), "{}", pack.markdown);
assert!(!pack.refs.is_empty());
+ let chips = crate::memory::tools::take_turn_citations("t1");
+ assert!(
+ chips.iter().any(|chip| chip.snippet.contains("teal")),
+ "the pack's citations reach the chat: {chips:?}"
+ );
assert!(pack.injection().starts_with(OPEN_TAG));
assert!(pack.injection().ends_with(CLOSE_TAG));
diff --git a/crates/openhuman-core/src/memory/types.rs b/crates/openhuman-core/src/memory/types.rs
index b065274e5b..e8a532783c 100644
--- a/crates/openhuman-core/src/memory/types.rs
+++ b/crates/openhuman-core/src/memory/types.rs
@@ -414,9 +414,6 @@ impl From<&Hit> for TurnCitation {
}
}
-/// Longest snippet a turn citation carries, in characters.
-pub const TURN_CITATION_SNIPPET_CHARS: usize = 280;
-
impl From<&Citation> for TurnCitation {
fn from(citation: &Citation) -> Self {
Self {