Skip to content

Commit d893ece

Browse files
Copilotyiwang
andcommitted
Apply rustfmt formatting
Co-authored-by: yiwang <142937+yiwang@users.noreply.github.com>
1 parent 0fde5f3 commit d893ece

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

crates/cli/src/cli/daemon.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ async fn run_daemon_services(config: &Config, agent_id: &str) -> Result<()> {
165165
);
166166
Some(tokio::spawn(async move {
167167
// Create tool factory that provides CLI tools to heartbeat
168-
let tool_factory: localgpt_core::heartbeat::ToolFactory =
168+
let tool_factory: localgpt_core::heartbeat::ToolFactory =
169169
Box::new(|config: &localgpt_core::config::Config| {
170170
crate::tools::create_cli_tools(config)
171171
});
172-
172+
173173
match HeartbeatRunner::new_with_gate_and_tools(
174174
&heartbeat_config,
175175
&heartbeat_agent_id,
@@ -451,14 +451,13 @@ async fn show_status() -> Result<()> {
451451

452452
async fn run_heartbeat_once(agent_id: &str) -> Result<()> {
453453
let config = Config::load()?;
454-
454+
455455
// Create tool factory to provide CLI tools
456-
let tool_factory: localgpt_core::heartbeat::ToolFactory =
457-
Box::new(|config: &localgpt_core::config::Config| {
458-
crate::tools::create_cli_tools(config)
459-
});
460-
461-
let runner = HeartbeatRunner::new_with_gate_and_tools(&config, agent_id, None, Some(tool_factory))?;
456+
let tool_factory: localgpt_core::heartbeat::ToolFactory =
457+
Box::new(|config: &localgpt_core::config::Config| crate::tools::create_cli_tools(config));
458+
459+
let runner =
460+
HeartbeatRunner::new_with_gate_and_tools(&config, agent_id, None, Some(tool_factory))?;
462461

463462
println!("Running heartbeat (agent: {})...", agent_id);
464463
let result = runner.run_once().await?;

crates/core/src/heartbeat/runner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,13 @@ impl HeartbeatRunner {
341341
};
342342

343343
let mut agent = Agent::new(agent_config, &self.config, self.memory.clone()).await?;
344-
344+
345345
// Extend agent with additional tools from factory if provided (e.g., CLI tools from daemon)
346346
if let Some(ref factory) = self.tool_factory {
347347
let extra_tools = factory(&self.config)?;
348348
agent.extend_tools(extra_tools);
349349
}
350-
350+
351351
agent.new_session().await?;
352352

353353
info!(name: "Heartbeat", "Running HEARTBEAT.md");

0 commit comments

Comments
 (0)