diff --git a/crates/edit_prediction/src/sweep_ai.rs b/crates/edit_prediction/src/sweep_ai.rs index cab57565f8c2fc7514b4e0fadde562b72e2353e2..cb1f89c18778cf90b6099dd4cccb4119fc1ddfd8 100644 --- a/crates/edit_prediction/src/sweep_ai.rs +++ b/crates/edit_prediction/src/sweep_ai.rs @@ -95,7 +95,7 @@ impl SweepAi { write_event(event.as_ref(), &mut recent_changes).unwrap(); } - let mut file_chunks = recent_buffer_snapshots + let file_chunks = recent_buffer_snapshots .into_iter() .map(|snapshot| { let end_point = Point::new(30, 0).min(snapshot.max_point()); @@ -120,7 +120,7 @@ impl SweepAi { }) .collect::>(); - let retrieval_chunks = inputs + let mut retrieval_chunks: Vec = inputs .related_files .iter() .flat_map(|related_file| { @@ -155,17 +155,19 @@ impl SweepAi { writeln!( &mut diagnostic_content, - "{} at line {}: {}", - severity, + "{}:{}:{}: {}: {}", + full_path.display(), start_point.row + 1, + start_point.column + 1, + severity, entry.diagnostic.message )?; } if !diagnostic_content.is_empty() { - file_chunks.push(FileChunk { - file_path: format!("Diagnostics for {}", full_path.display()), - start_line: 0, + retrieval_chunks.push(FileChunk { + file_path: "diagnostics".to_string(), + start_line: 1, end_line: diagnostic_count, content: diagnostic_content, timestamp: None,