chore(lint): remove unused imports, variables, and redundant mut bindings
Eliminate low-risk clippy warnings as part of the strict lint backlog (#409): - Remove unused `uuid::Uuid` imports from slack and telegram channels - Remove unnecessary `mut` and redundant rebindings in agent loop - Prefix unused `channel_id` variable in discord channel - Remove unused test imports (`ChatResponse`, `ToolCall`, `TempDir`, `Path`)
This commit is contained in:
parent
ba287a2ea5
commit
4413790859
7 changed files with 3 additions and 10 deletions
|
|
@ -489,10 +489,8 @@ pub(crate) async fn run_tool_call_loop(
|
|||
};
|
||||
|
||||
let response_text = response;
|
||||
let mut assistant_history_content = response_text.clone();
|
||||
let assistant_history_content = response_text.clone();
|
||||
let (parsed_text, tool_calls) = parse_tool_calls(&response_text);
|
||||
let mut parsed_text = parsed_text;
|
||||
let mut tool_calls = tool_calls;
|
||||
|
||||
if tool_calls.is_empty() {
|
||||
// No tool calls — this is the final response
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ impl Channel for DiscordChannel {
|
|||
}
|
||||
|
||||
let message_id = d.get("id").and_then(|i| i.as_str()).unwrap_or("");
|
||||
let channel_id = d.get("channel_id").and_then(|c| c.as_str()).unwrap_or("").to_string();
|
||||
let _channel_id = d.get("channel_id").and_then(|c| c.as_str()).unwrap_or("").to_string();
|
||||
|
||||
let channel_msg = ChannelMessage {
|
||||
id: if message_id.is_empty() {
|
||||
|
|
|
|||
|
|
@ -1065,7 +1065,7 @@ mod tests {
|
|||
use super::*;
|
||||
use crate::memory::{Memory, MemoryCategory, SqliteMemory};
|
||||
use crate::observability::NoopObserver;
|
||||
use crate::providers::{ChatMessage, ChatResponse, Provider, ToolCall};
|
||||
use crate::providers::{ChatMessage, Provider};
|
||||
use crate::tools::{Tool, ToolResult};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use super::traits::{Channel, ChannelMessage};
|
||||
use async_trait::async_trait;
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Slack channel — polls conversations.history via Web API
|
||||
pub struct SlackChannel {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ use async_trait::async_trait;
|
|||
use reqwest::multipart::{Form, Part};
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Telegram's maximum message length for text messages
|
||||
const TELEGRAM_MAX_MESSAGE_LENGTH: usize = 4096;
|
||||
|
|
|
|||
|
|
@ -1810,7 +1810,6 @@ fn sync_directory(_path: &Path) -> Result<()> {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use std::path::PathBuf;
|
||||
use tempfile::TempDir;
|
||||
|
||||
// ── Defaults ─────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ use super::traits::{Tool, ToolResult};
|
|||
use crate::security::{AutonomyLevel, SecurityPolicy};
|
||||
use async_trait::async_trait;
|
||||
use serde_json::json;
|
||||
#[cfg(test)]
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Git operations tool for structured repository management.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue