style(tools, llm): 统一导入顺序与代码格式
This commit is contained in:
+2
-7
@@ -130,9 +130,7 @@ impl PlanParser for JsonPlanParser {
|
||||
.collect::<Result<Vec<_>, AgentError>>()?;
|
||||
|
||||
if steps.is_empty() {
|
||||
return Err(AgentError::PlanParse(
|
||||
"Plan 至少需要一个步骤".into(),
|
||||
));
|
||||
return Err(AgentError::PlanParse("Plan 至少需要一个步骤".into()));
|
||||
}
|
||||
|
||||
Ok(Plan {
|
||||
@@ -203,10 +201,7 @@ mod tests {
|
||||
let plan = Plan {
|
||||
id: "p1".into(),
|
||||
goal: "test goal".into(),
|
||||
steps: vec![
|
||||
Step::new(0, "first"),
|
||||
Step::new(1, "second"),
|
||||
],
|
||||
steps: vec![Step::new(0, "first"), Step::new(1, "second")],
|
||||
};
|
||||
assert_eq!(plan.steps.len(), 2);
|
||||
assert_eq!(plan.steps[0].index, 0);
|
||||
|
||||
Reference in New Issue
Block a user