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

Function format_condensed

atomic-agent/src/transcript/condense.rs:106–127  ·  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

104/// This is the format passed to the reasoning generator and stored in
105/// `UnhashedTurnData.condensed_text`.
106pub fn format_condensed(entries: &[CondensedEntry], files: &[String]) -> String {
107 let mut out = String::new();
108
109 for (i, entry) in entries.iter().enumerate() {
110 if i > 0 {
111 out.push('\n');
112 }
113 out.push_str(&entry.to_string());
114 out.push('\n');
115 }
116
117 if !files.is_empty() {
118 out.push_str("\n[Files Modified]\n");
119 for file in files {
120 out.push_str("- ");
121 out.push_str(file);
122 out.push('\n');
123 }
124 }
125
126 out
127}
128
129/// Extract user prompts from condensed entries.
130pub fn extract_prompts(entries: &[CondensedEntry]) -> Vec<String> {

Callers 5

get_condensed_textFunction · 0.85
newMethod · 0.85

Calls 3

iterMethod · 0.45
pushMethod · 0.45
is_emptyMethod · 0.45