diff --git a/signal-gateway/src/claude/worker.rs b/signal-gateway/src/claude/worker.rs index 1dec00f..7f56a26 100644 --- a/signal-gateway/src/claude/worker.rs +++ b/signal-gateway/src/claude/worker.rs @@ -191,11 +191,10 @@ impl ClaudeWorker { let executor = self.tool_executor.upgrade(); let tools = executor.as_ref().map(|te| te.tools()).unwrap_or_default(); - if let Some(last) = self.messages.last() { - if let Some(ContentBlock::Text { text, .. }) = last.content.first() { + if let Some(last) = self.messages.last() + && let Some(ContentBlock::Text { text, .. }) = last.content.first() { info!("Claude request: {}", text); } - } for iteration in 0..max_iterations { // Check for stop before making API call diff --git a/signal-gateway/src/gateway/command_router.rs b/signal-gateway/src/gateway/command_router.rs index e1d93ea..32b7421 100644 --- a/signal-gateway/src/gateway/command_router.rs +++ b/signal-gateway/src/gateway/command_router.rs @@ -19,15 +19,11 @@ pub enum Handling { /// /// The router contains an ordered list of (prefix, handling) pairs. When routing, /// it finds the first prefix that matches the start of the message. +#[derive(Default)] pub struct CommandRouter { routes: Vec<(String, Handling)>, } -impl Default for CommandRouter { - fn default() -> Self { - Self { routes: Vec::new() } - } -} impl CommandRouter { /// Create a builder for constructing a CommandRouter.