(
change: &atomic_core::change::Change,
transcript_path: Option<&std::path::Path>,
agent_name: &str,
files_touched: &[String],
)
| 4861 | /// then the session transcript file condensed on the fly. |
| 4862 | #[allow(clippy::too_many_arguments)] |
| 4863 | fn explain_condensed_text( |
| 4864 | change: &atomic_core::change::Change, |
| 4865 | transcript_path: Option<&std::path::Path>, |
| 4866 | agent_name: &str, |
| 4867 | files_touched: &[String], |
| 4868 | ) -> String { |
| 4869 | use atomic_agent::transcript; |
| 4870 | if let Some(unhashed) = transcript::extract_unhashed(change) { |
| 4871 | if !unhashed.condensed_text.is_empty() { |
| 4872 | return unhashed.condensed_text; |
| 4873 | } |
| 4874 | if !unhashed.condensed_transcript.is_empty() { |
| 4875 | let files: Vec<String> = unhashed |
| 4876 | .tools_used |
| 4877 | .iter() |
| 4878 | .flat_map(|tool| tool.files_affected.clone()) |
| 4879 | .collect(); |
| 4880 | return transcript::format_condensed(&unhashed.condensed_transcript, &files); |
| 4881 | } |
| 4882 | } |
| 4883 | if let Some(path) = transcript_path { |
| 4884 | if let Ok(raw) = std::fs::read(path) { |
| 4885 | let format = if agent_name.contains("gemini") { |
| 4886 | "json" |
| 4887 | } else { |
| 4888 | "jsonl" |
| 4889 | }; |
| 4890 | let entries = transcript::condense_transcript(&raw, format); |
| 4891 | if entries.is_empty() { |
| 4892 | return String::new(); |
| 4893 | } |
| 4894 | let files: Vec<String> = if !change.file_ops().is_empty() { |
| 4895 | change |
| 4896 | .file_ops() |
| 4897 | .iter() |
| 4898 | .map(|file_op| file_op.path().to_string()) |
| 4899 | .collect() |
| 4900 | } else { |
| 4901 | files_touched.to_vec() |
| 4902 | }; |
| 4903 | return transcript::format_condensed(&entries, &files); |
| 4904 | } |
| 4905 | } |
| 4906 | String::new() |
| 4907 | } |
| 4908 | |
| 4909 | /// The local explain body's domain, in ONE blocking pass: the turn list |
| 4910 | /// on the session's view, then per turn the transcript extraction, the |
no test coverage detected