mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-06 08:18:58 +00:00
Fix pre-existing clippy lints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
289451e78a
commit
bbd71dfbc0
4 changed files with 37 additions and 41 deletions
|
|
@ -733,42 +733,43 @@ pub async fn run_command(
|
|||
HumanDuration(Duration::from_millis(run_duration_ms))
|
||||
);
|
||||
|
||||
let acc = accumulator.lock().unwrap();
|
||||
let total_tokens = acc.total_input_tokens + acc.total_output_tokens;
|
||||
if total_tokens > 0 {
|
||||
if acc.has_pricing {
|
||||
eprintln!(
|
||||
"{}",
|
||||
styles.dim.apply_to(format!(
|
||||
"Cost: {} ({} tokens)",
|
||||
format_cost(acc.total_cost),
|
||||
format_tokens_human(total_tokens)
|
||||
))
|
||||
);
|
||||
} else {
|
||||
eprintln!("{}", styles.dim.apply_to(format!("Tokens: {}", format_tokens_human(total_tokens))));
|
||||
}
|
||||
if acc.total_cache_read_tokens > 0 {
|
||||
eprintln!(
|
||||
"{}",
|
||||
styles.dim.apply_to(format!(
|
||||
"Cache: {} read, {} write",
|
||||
format_tokens_human(acc.total_cache_read_tokens),
|
||||
format_tokens_human(acc.total_cache_write_tokens),
|
||||
)),
|
||||
);
|
||||
}
|
||||
if acc.total_reasoning_tokens > 0 {
|
||||
eprintln!(
|
||||
"{}",
|
||||
styles.dim.apply_to(format!(
|
||||
"Reasoning: {} tokens",
|
||||
format_tokens_human(acc.total_reasoning_tokens),
|
||||
)),
|
||||
);
|
||||
{
|
||||
let acc = accumulator.lock().unwrap();
|
||||
let total_tokens = acc.total_input_tokens + acc.total_output_tokens;
|
||||
if total_tokens > 0 {
|
||||
if acc.has_pricing {
|
||||
eprintln!(
|
||||
"{}",
|
||||
styles.dim.apply_to(format!(
|
||||
"Cost: {} ({} tokens)",
|
||||
format_cost(acc.total_cost),
|
||||
format_tokens_human(total_tokens)
|
||||
))
|
||||
);
|
||||
} else {
|
||||
eprintln!("{}", styles.dim.apply_to(format!("Tokens: {}", format_tokens_human(total_tokens))));
|
||||
}
|
||||
if acc.total_cache_read_tokens > 0 {
|
||||
eprintln!(
|
||||
"{}",
|
||||
styles.dim.apply_to(format!(
|
||||
"Cache: {} read, {} write",
|
||||
format_tokens_human(acc.total_cache_read_tokens),
|
||||
format_tokens_human(acc.total_cache_write_tokens),
|
||||
)),
|
||||
);
|
||||
}
|
||||
if acc.total_reasoning_tokens > 0 {
|
||||
eprintln!(
|
||||
"{}",
|
||||
styles.dim.apply_to(format!(
|
||||
"Reasoning: {} tokens",
|
||||
format_tokens_human(acc.total_reasoning_tokens),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
drop(acc);
|
||||
|
||||
if let Some(failure) = outcome.failure_reason() {
|
||||
eprintln!("{}", styles.red.apply_to(format!("Failure: {failure}")),);
|
||||
|
|
|
|||
|
|
@ -1514,7 +1514,7 @@ impl WorkflowRunEngine {
|
|||
(None, Some(target.clone()))
|
||||
} else {
|
||||
let edge = select_edge(&node.id, &outcome, &context, graph);
|
||||
if let Some(ref e) = edge {
|
||||
if let Some(e) = &edge {
|
||||
self.services.emitter.emit(&WorkflowRunEvent::EdgeSelected {
|
||||
from_node: node.id.clone(),
|
||||
to_node: e.to.clone(),
|
||||
|
|
|
|||
|
|
@ -735,9 +735,7 @@ fn find_join_node(results: &[BranchResult], graph: &Graph) -> Option<String> {
|
|||
}
|
||||
|
||||
// Find the intersection — nodes reachable from ALL branches
|
||||
let Some(first) = target_sets.first() else {
|
||||
return None;
|
||||
};
|
||||
let first = target_sets.first()?;
|
||||
let common: std::collections::HashSet<&String> = first
|
||||
.iter()
|
||||
.filter(|id| target_sets.iter().all(|set| set.contains(*id)))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ use std::path::Path;
|
|||
use std::sync::Arc;
|
||||
|
||||
use arc_llm::provider::Provider;
|
||||
use arc_util::terminal::Styles;
|
||||
use arc_workflows::checkpoint::Checkpoint;
|
||||
use arc_workflows::cli::backend::AgentApiBackend;
|
||||
use arc_workflows::context::Context;
|
||||
|
|
@ -7169,8 +7168,6 @@ fn parse_tool_hooks_from_dot_syntax() {
|
|||
// E2E test with real LLM
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static TEST_STYLES: std::sync::LazyLock<Styles> = std::sync::LazyLock::new(|| Styles::new(false));
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "requires ANTHROPIC_API_KEY"]
|
||||
async fn arc_e2e_with_real_llm() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue