refactor: streamline agent turn handling and background review process
This commit is contained in:
@@ -468,18 +468,13 @@ fn extract_doc_comments(lines: &[&str]) -> HashMap<usize, String> {
|
||||
|
||||
/// Find the next line that looks like a declaration (not doc, not attr).
|
||||
fn find_next_declaration_line(lines: &[&str], start: usize) -> Option<usize> {
|
||||
for i in start..lines.len() {
|
||||
let trimmed = lines[i].trim();
|
||||
if trimmed.is_empty()
|
||||
|| trimmed.starts_with("///")
|
||||
|| trimmed.starts_with("//!")
|
||||
|| trimmed.starts_with('#')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return Some(i);
|
||||
}
|
||||
None
|
||||
lines[start..].iter().position(|line| {
|
||||
let trimmed = line.trim();
|
||||
!trimmed.is_empty()
|
||||
&& !trimmed.starts_with("///")
|
||||
&& !trimmed.starts_with("//!")
|
||||
&& !trimmed.starts_with('#')
|
||||
}).map(|pos| start + pos)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user