Skip to content

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

test(threads): add debug output for imported transcript roots

Steven Enamakel2f306f52a22b
diff --git a/crates/openhuman-core/src/threads/transcript_host_tests.rs b/crates/openhuman-core/src/threads/transcript_host_tests.rs
index 1ed3b76edd..d49962dd7c 100644
--- a/crates/openhuman-core/src/threads/transcript_host_tests.rs
+++ b/crates/openhuman-core/src/threads/transcript_host_tests.rs
@@ -321,6 +321,23 @@ fn calls_recorded_after_their_results_project_as_settled() {
.transcripts;
crate::storage::import::sessions::import_transcript_groups(provider.as_ref(), dir.path())
.unwrap();
+ let listed = locator.thread_transcripts(thread, None).expect("imported roots");
+ eprintln!("roots: {}", listed.roots.len());
+ for root in &listed.roots {
+ let display = root.transcript.read_display().unwrap().unwrap();
+ for record in &display.records {
+ if let tinyagents_session::transcript::DisplayRecord::Message(message) = record {
+ eprintln!(
+ "record role={} request={:?} iteration={:?} calls={:?} content={:?}",
+ message.message.role,
+ message.request_id,
+ message.iteration,
+ message.turn_usage.as_ref().map(|usage| &usage.tool_calls),
+ message.message.content
+ );
+ }
+ }
+ }
let items = project_thread_in(locator.as_ref(), thread, None, None)
.expect("transcript")
.items;