loading agents
This commit is contained in:
@@ -571,17 +571,14 @@ async fn run_interactive_retro(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if has_readme {
|
if has_readme {
|
||||||
// Extract the first heading or title from the README
|
// Extract the first heading or title from the README
|
||||||
let readme_snippet =
|
let readme_snippet = extract_readme_heading(content)
|
||||||
extract_readme_heading(content)
|
.unwrap_or_else(|| "PROJECT DOCUMENTATION LOADED".to_string());
|
||||||
.unwrap_or_else(|| "PROJECT DOCUMENTATION LOADED".to_string())
|
|
||||||
} else {
|
tui.output(&format!(
|
||||||
"PROJECT DOCUMENTATION LOADED".to_string()
|
"SYSTEM: PROJECT README LOADED - {}\n\n",
|
||||||
};
|
readme_snippet
|
||||||
tui.output(&format!(
|
));
|
||||||
"SYSTEM: PROJECT README LOADED - {}\n\n",
|
|
||||||
readme_snippet
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tui.output("SYSTEM: READY FOR INPUT\n\n");
|
tui.output("SYSTEM: READY FOR INPUT\n\n");
|
||||||
@@ -834,15 +831,11 @@ async fn run_interactive<W: UiWriter>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if has_readme {
|
if has_readme {
|
||||||
// Extract the first heading or title from the README
|
// Extract the first heading or title from the README
|
||||||
let readme_snippet =
|
let readme_snippet = extract_readme_heading(content)
|
||||||
extract_readme_heading(content)
|
.unwrap_or_else(|| "Project documentation loaded".to_string());
|
||||||
.unwrap_or_else(|| "Project documentation loaded".to_string())
|
|
||||||
} else {
|
|
||||||
"Project documentation loaded".to_string()
|
|
||||||
};
|
|
||||||
|
|
||||||
output.print(&format!("📚 detected: {}", readme_snippet));
|
output.print(&format!("📚 detected: {}", readme_snippet));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ impl TerminalState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Parse markdown and convert to styled lines
|
/// Parse markdown and convert to styled lines
|
||||||
fn parse_markdown_line(&self, line: &str) -> Line {
|
fn parse_markdown_line(&self, line: &str) -> Line<'_> {
|
||||||
// Skip parsing for special status lines to preserve their formatting
|
// Skip parsing for special status lines to preserve their formatting
|
||||||
if line.starts_with("[SUCCESS]") ||
|
if line.starts_with("[SUCCESS]") ||
|
||||||
line.starts_with("[FAILED]") ||
|
line.starts_with("[FAILED]") ||
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ mod tests {
|
|||||||
"test prompt".to_string(),
|
"test prompt".to_string(),
|
||||||
None,
|
None,
|
||||||
100,
|
100,
|
||||||
|
false, // quiet parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
let result = retry_with_backoff(
|
let result = retry_with_backoff(
|
||||||
@@ -55,6 +56,7 @@ mod tests {
|
|||||||
"test prompt".to_string(),
|
"test prompt".to_string(),
|
||||||
None,
|
None,
|
||||||
100,
|
100,
|
||||||
|
false, // quiet parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
let result: Result<&str, _> = retry_with_backoff(
|
let result: Result<&str, _> = retry_with_backoff(
|
||||||
@@ -87,6 +89,7 @@ mod tests {
|
|||||||
"test prompt".to_string(),
|
"test prompt".to_string(),
|
||||||
None,
|
None,
|
||||||
100,
|
100,
|
||||||
|
false, // quiet parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
let result: Result<&str, _> = retry_with_backoff(
|
let result: Result<&str, _> = retry_with_backoff(
|
||||||
@@ -118,6 +121,7 @@ mod tests {
|
|||||||
long_prompt,
|
long_prompt,
|
||||||
None,
|
None,
|
||||||
100,
|
100,
|
||||||
|
false, // quiet parameter
|
||||||
);
|
);
|
||||||
|
|
||||||
// The prompt should be truncated to 1000 chars
|
// The prompt should be truncated to 1000 chars
|
||||||
|
|||||||
Reference in New Issue
Block a user