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

Function format_condensed

atomic-agent/src/transcript/condense.rs:200–221  ·  view source on GitHub ↗

Format condensed entries as human-readable text. Output format: ```text [User] Fix the auth bug in login.rs [Assistant] I'll fix the token validation... [Tool] Edit: src/auth/login.rs [Tool] Bash: cargo test [Assistant] The fix is applied and tests pass. [Files Modified] - src/auth/login.rs ``` This is the format passed to the reasoning generator and stored in `UnhashedTurnData.condensed_text`.

(entries: &[CondensedEntry], files: &[String])

Source from the content-addressed store, hash-verified

198/// This is the format passed to the reasoning generator and stored in
199/// `UnhashedTurnData.condensed_text`.
200pub fn format_condensed(entries: &[CondensedEntry], files: &[String]) -> String {
201 let mut out = String::new();
202
203 for (i, entry) in entries.iter().enumerate() {
204 if i > 0 {
205 out.push('\n');
206 }
207 out.push_str(&entry.to_string());
208 out.push('\n');
209 }
210
211 if !files.is_empty() {
212 out.push_str("\n[Files Modified]\n");
213 for file in files {
214 out.push_str("- ");
215 out.push_str(file);
216 out.push('\n');
217 }
218 }
219
220 out
221}
222
223/// Extract user prompts from condensed entries.
224pub fn extract_prompts(entries: &[CondensedEntry]) -> Vec<String> {

Callers 6

get_condensed_textFunction · 0.85
newMethod · 0.85
explain_condensed_textFunction · 0.85

Calls 3

iterMethod · 0.45
pushMethod · 0.45
is_emptyMethod · 0.45