Skip to content

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

fix(agent): handle missing context breakdown gracefully

Steven Enamakel96255898adfa
diff --git a/app/src/pages/dev/ToolCallGallery.tsx b/app/src/pages/dev/ToolCallGallery.tsx
index 448f98eaa1..440f6310bd 100644
--- a/app/src/pages/dev/ToolCallGallery.tsx
+++ b/app/src/pages/dev/ToolCallGallery.tsx
@@ -63,6 +63,18 @@ const SEARCH_RESULT = [
' https://tokio.rs/tokio/tutorial',
].join('\n');
+/** Fixtures for WS-G's rich-content elements (sources/citations, memory, schedule, conversation map). */
+const MEMORY_SEARCH_HITS: SearchHit[] = [
+ { id: 'hit-1', before: 'The deploy runs ', match: 'nightly', after: ' at 2am UTC.', position: 12 },
+ { id: 'hit-2', before: 'Config lives in ', match: 'deploy/', after: 'config.yaml.', position: 68 },
+];
+
+const MEMORY_TIMELINE_EVENTS: TimelineEvent[] = [
+ { id: 'evt-1', when: 'past', time: '09:02', title: 'What is the deploy schedule?' },
+ { id: 'evt-2', when: 'past', time: '09:05', title: 'Where does the config live?' },
+ { id: 'evt-3', when: 'now', time: '09:11', title: 'Can you add a Friday run?' },
+];
+
const SAMPLES = [
{
toolName: 'web_search_tool',
diff --git a/crates/openhuman-core/src/agent/context_breakdown.rs b/crates/openhuman-core/src/agent/context_breakdown.rs
index dc0e4164b6..1d81bb1e85 100644
--- a/crates/openhuman-core/src/agent/context_breakdown.rs
+++ b/crates/openhuman-core/src/agent/context_breakdown.rs
@@ -210,7 +210,7 @@ pub async fn context_breakdown(
total_est_tokens,
context_window,
};
- Ok(RpcOutcome::ok(response))
+ Ok(RpcOutcome::new(response, Vec::new()))
}
#[cfg(test)]