MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_condense_multi_line

Function test_condense_multi_line

atomic-agent/src/transcript/tests.rs:133–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131
132#[test]
133fn test_condense_multi_line() {
134 let jsonl = b"
135{\"type\":\"user\",\"uuid\":\"1\",\"message\":{\"content\":\"Hello\"}}
136{\"type\":\"assistant\",\"uuid\":\"2\",\"message\":{\"content\":[{\"type\":\"text\",\"text\":\"Hi\"}]}}
137{\"type\":\"assistant\",\"uuid\":\"3\",\"message\":{\"content\":[{\"type\":\"tool_use\",\"name\":\"Edit\",\"input\":{\"file_path\":\"a.rs\"}}]}}
138";
139 let entries = condense_claude_transcript(jsonl);
140 assert_eq!(entries.len(), 3);
141 assert!(entries[0].is_user());
142 assert!(entries[1].is_assistant());
143 assert!(entries[2].is_tool());
144}
145
146#[test]
147fn test_condense_skips_malformed_lines() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected