style: format seluruh workspace dengan cargo fmt
Menyeragamkan format kode sesuai rustfmt (126 file). Sebelumnya lefthook pre-commit 'cargo fmt --check' akan gagal pada commit apa pun.
This commit is contained in:
@@ -98,10 +98,7 @@ pub async fn run_agent(
|
||||
// If no tool calls, we're done — return content
|
||||
if tool_calls.is_empty() {
|
||||
info!("Subagent completed after {iteration} iterations");
|
||||
report_progress(
|
||||
&tool_ctx,
|
||||
AgentProgress::completed("subagent", directive),
|
||||
);
|
||||
report_progress(&tool_ctx, AgentProgress::completed("subagent", directive));
|
||||
return Ok(content);
|
||||
}
|
||||
|
||||
@@ -121,15 +118,14 @@ pub async fn run_agent(
|
||||
),
|
||||
);
|
||||
|
||||
let result =
|
||||
if let Some(tool) = tools.iter().find(|t| t.name() == tool_name) {
|
||||
match tool.run(&tool_ctx, &args) {
|
||||
Ok(output) => output,
|
||||
Err(e) => format!("Error: {e}"),
|
||||
}
|
||||
} else {
|
||||
format!("Unknown tool: {tool_name}")
|
||||
};
|
||||
let result = if let Some(tool) = tools.iter().find(|t| t.name() == tool_name) {
|
||||
match tool.run(&tool_ctx, &args) {
|
||||
Ok(output) => output,
|
||||
Err(e) => format!("Error: {e}"),
|
||||
}
|
||||
} else {
|
||||
format!("Unknown tool: {tool_name}")
|
||||
};
|
||||
|
||||
messages.push(ChatMessage::tool(tc.id.clone(), result));
|
||||
}
|
||||
@@ -149,5 +145,7 @@ pub async fn run_agent(
|
||||
format!("iteration limit ({MAX_ITERATIONS})"),
|
||||
),
|
||||
);
|
||||
Ok(format!("Subagent reached iteration limit ({MAX_ITERATIONS})"))
|
||||
Ok(format!(
|
||||
"Subagent reached iteration limit ({MAX_ITERATIONS})"
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user