style: cargo fmt --all (post-Phase-2/4 cleanup)
Auto-format pass after the tool-call rendering work, footer chip, mention popup, subagent split, and parse-counter de-flake. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -973,10 +973,8 @@ pub fn new_shared_subagent_manager(workspace: PathBuf, max_agents: usize) -> Sha
|
||||
Arc::new(Mutex::new(manager))
|
||||
}
|
||||
|
||||
|
||||
// === Tool Implementations ===
|
||||
|
||||
|
||||
/// Tool to spawn a background sub-agent.
|
||||
pub struct AgentSpawnTool {
|
||||
manager: SharedSubAgentManager,
|
||||
@@ -3570,7 +3568,6 @@ Otherwise return concise sections: SUMMARY, EVIDENCE, CHANGES, RISKS.
|
||||
Complete the task and provide your final result.
|
||||
";
|
||||
|
||||
|
||||
// === Tests ===
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -154,9 +154,11 @@ fn test_parse_assign_request_requires_update_fields() {
|
||||
"agent_id": "agent_1234"
|
||||
});
|
||||
let err = parse_assign_request(&input).expect_err("missing update fields should fail");
|
||||
assert!(err.to_string().contains(
|
||||
"Provide at least one of objective, role/agent_role, message/input, or items"
|
||||
));
|
||||
assert!(
|
||||
err.to_string().contains(
|
||||
"Provide at least one of objective, role/agent_role, message/input, or items"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -2621,9 +2621,7 @@ fn render(f: &mut Frame, app: &mut App) {
|
||||
let slash_menu_entries = visible_slash_menu_entries(app, SLASH_MENU_LIMIT);
|
||||
let mention_menu_entries =
|
||||
crate::tui::file_mention::visible_mention_menu_entries(app, MENTION_MENU_LIMIT);
|
||||
if !mention_menu_entries.is_empty()
|
||||
&& app.mention_menu_selected >= mention_menu_entries.len()
|
||||
{
|
||||
if !mention_menu_entries.is_empty() && app.mention_menu_selected >= mention_menu_entries.len() {
|
||||
app.mention_menu_selected = mention_menu_entries.len().saturating_sub(1);
|
||||
}
|
||||
let context_usage = context_usage_snapshot(app);
|
||||
|
||||
@@ -1127,7 +1127,10 @@ fn apply_mention_menu_selection_splices_selected_entry() {
|
||||
// workspace setup. Apply it.
|
||||
app.mention_menu_selected = 0;
|
||||
let applied = apply_mention_menu_selection(&mut app, &entries);
|
||||
assert!(applied, "apply_mention_menu_selection should report success");
|
||||
assert!(
|
||||
applied,
|
||||
"apply_mention_menu_selection should report success"
|
||||
);
|
||||
assert!(
|
||||
app.input.starts_with("open @"),
|
||||
"input should still start with `open @`, got: {input}",
|
||||
|
||||
@@ -64,7 +64,10 @@ pub fn footer_agents_chip(running: usize) -> Vec<Span<'static>> {
|
||||
} else {
|
||||
format!("{running} agents")
|
||||
};
|
||||
vec![Span::styled(text, Style::default().fg(palette::DEEPSEEK_SKY))]
|
||||
vec![Span::styled(
|
||||
text,
|
||||
Style::default().fg(palette::DEEPSEEK_SKY),
|
||||
)]
|
||||
}
|
||||
|
||||
/// A status toast routed to the footer's left segment for a short time.
|
||||
|
||||
Reference in New Issue
Block a user