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

Function format_condensed

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

188/// This is the format passed to the reasoning generator and stored in
189/// `UnhashedTurnData.condensed_text`.
190pub fn format_condensed(entries: &[CondensedEntry], files: &[String]) -> String {
191 let mut out = String::new();
192
193 for (i, entry) in entries.iter().enumerate() {
194 if i > 0 {
195 out.push('\n');
196 }
197 out.push_str(&entry.to_string());
198 out.push('\n');
199 }
200
201 if !files.is_empty() {
202 out.push_str("\n[Files Modified]\n");
203 for file in files {
204 out.push_str("- ");
205 out.push_str(file);
206 out.push('\n');
207 }
208 }
209
210 out
211}
212
213/// Extract user prompts from condensed entries.
214pub 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