Skip to content

Commit 58ec4e4

Browse files
author
Yogthos
committed
Run cargo fmt
1 parent 71b3844 commit 58ec4e4

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

src/agent/builder.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,9 @@ pub async fn build_agent_inner<M: CompletionModel + 'static>(
180180
.map(|tx| Box::new(tools::QuestionTool::new(tx)) as Box<dyn rig::tool::ToolDyn>);
181181

182182
let plan_tools = plan_tx.map(|tx| {
183-
let enter = Box::new(tools::PlanEnterTool::new(tx.clone()))
184-
as Box<dyn rig::tool::ToolDyn>;
185-
let exit = Box::new(tools::PlanExitTool::new(tx))
186-
as Box<dyn rig::tool::ToolDyn>;
183+
let enter =
184+
Box::new(tools::PlanEnterTool::new(tx.clone())) as Box<dyn rig::tool::ToolDyn>;
185+
let exit = Box::new(tools::PlanExitTool::new(tx)) as Box<dyn rig::tool::ToolDyn>;
187186
vec![enter, exit]
188187
});
189188

src/agent/tools/plan.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ impl Tool for PlanEnterTool {
7373
.map_err(|_| ToolError::Msg("plan system unavailable".to_string()))?;
7474

7575
match reply_rx.await {
76-
Ok(PlanSwitchResponse::Accepted) => {
77-
Ok("plan mode activated".to_string())
78-
}
76+
Ok(PlanSwitchResponse::Accepted) => Ok("plan mode activated".to_string()),
7977
Ok(PlanSwitchResponse::Rejected) => {
8078
Err(ToolError::Msg("user declined plan mode".to_string()))
8179
}
82-
Err(_) => Err(ToolError::Msg("plan channel closed unexpectedly".to_string())),
80+
Err(_) => Err(ToolError::Msg(
81+
"plan channel closed unexpectedly".to_string(),
82+
)),
8383
}
8484
}
8585
}
@@ -131,13 +131,13 @@ impl Tool for PlanExitTool {
131131
.map_err(|_| ToolError::Msg("plan system unavailable".to_string()))?;
132132

133133
match reply_rx.await {
134-
Ok(PlanSwitchResponse::Accepted) => {
135-
Ok("switched to implementation mode".to_string())
136-
}
134+
Ok(PlanSwitchResponse::Accepted) => Ok("switched to implementation mode".to_string()),
137135
Ok(PlanSwitchResponse::Rejected) => {
138136
Err(ToolError::Msg("user declined mode switch".to_string()))
139137
}
140-
Err(_) => Err(ToolError::Msg("plan channel closed unexpectedly".to_string())),
138+
Err(_) => Err(ToolError::Msg(
139+
"plan channel closed unexpectedly".to_string(),
140+
)),
141141
}
142142
}
143143
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ async fn main() -> anyhow::Result<()> {
311311
permission,
312312
ask_tx,
313313
question_tx.clone(),
314-
plan_tx.clone(),
314+
plan_tx.clone(),
315315
sandbox.clone(),
316316
#[cfg(feature = "mcp")]
317317
mcp_manager.as_ref(),

0 commit comments

Comments
 (0)