mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 05:12:33 +00:00
fix(rust): remove unused import warnings across core domains (#2019)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
2ec4e954eb
commit
ac245a0a19
@@ -11,6 +11,7 @@
|
||||
|
||||
// Re-export so that the `#[path = "channel_tests.rs"]` test module can reach
|
||||
// `TelegramChannel` via `super::TelegramChannel`.
|
||||
#[allow(unused_imports)]
|
||||
pub use super::channel_types::TelegramChannel;
|
||||
#[cfg(test)]
|
||||
pub(super) use super::channel_types::TelegramTypingTask;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
//! Telegram channel — outbound message sending: text chunking, media uploads, reaction sending,
|
||||
//! and attachment dispatch.
|
||||
|
||||
use super::attachments::{
|
||||
is_http_url, parse_attachment_markers, parse_path_only_attachment, TelegramAttachment,
|
||||
TelegramAttachmentKind,
|
||||
};
|
||||
use super::attachments::{is_http_url, TelegramAttachment, TelegramAttachmentKind};
|
||||
use super::channel_types::TelegramChannel;
|
||||
use super::text::split_message_for_telegram;
|
||||
use crate::core::event_bus::{publish_global, DomainEvent};
|
||||
|
||||
@@ -21,7 +21,7 @@ use super::ProviderUserProfile;
|
||||
use crate::openhuman::learning::candidate::{
|
||||
self as learning_candidate, CueFamily, EvidenceRef, FacetClass, LearningCandidate,
|
||||
};
|
||||
use crate::openhuman::memory::store::profile::{self, FacetState, FacetType, UserState};
|
||||
use crate::openhuman::memory::store::profile::{self, FacetType};
|
||||
use rusqlite::params;
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
use std::fs::{self, OpenOptions};
|
||||
use std::io::{BufRead, BufReader, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::{Arc, Mutex, OnceLock};
|
||||
#[cfg(windows)]
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{Arc, OnceLock};
|
||||
|
||||
use chrono::Utc;
|
||||
use fs2::FileExt;
|
||||
|
||||
@@ -9,7 +9,7 @@ use rusqlite::Connection;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::openhuman::learning::candidate::FacetClass;
|
||||
use crate::openhuman::memory::store::profile::{self, FacetState, ProfileFacet, UserState};
|
||||
use crate::openhuman::memory::store::profile::{self, ProfileFacet, UserState};
|
||||
|
||||
/// Thin wrapper around the `user_profile` table.
|
||||
///
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
//! overflow pool holds up to `BUDGET_OVERFLOW` extra Provisional rows.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::core::event_bus;
|
||||
use crate::core::event_bus::DomainEvent;
|
||||
|
||||
@@ -12,9 +12,7 @@ use std::path::Path;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::openhuman::config::{
|
||||
EmbeddingRouteConfig, LocalAiConfig, MemoryConfig, StorageProviderConfig,
|
||||
};
|
||||
use crate::openhuman::config::{EmbeddingRouteConfig, MemoryConfig, StorageProviderConfig};
|
||||
use crate::openhuman::embeddings::{
|
||||
self, EmbeddingProvider, DEFAULT_CLOUD_EMBEDDING_DIMENSIONS, DEFAULT_CLOUD_EMBEDDING_MODEL,
|
||||
DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL,
|
||||
|
||||
@@ -44,7 +44,7 @@ use std::sync::Arc;
|
||||
use anyhow::Result;
|
||||
use async_trait::async_trait;
|
||||
|
||||
use crate::openhuman::config::{Config, LlmBackend, DEFAULT_CLOUD_LLM_MODEL};
|
||||
use crate::openhuman::config::{Config, DEFAULT_CLOUD_LLM_MODEL};
|
||||
|
||||
pub mod cloud;
|
||||
pub mod local;
|
||||
|
||||
@@ -12,7 +12,7 @@ pub mod types;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::openhuman::config::{Config, LlmBackend, DEFAULT_CLOUD_LLM_MODEL};
|
||||
use crate::openhuman::config::{Config, DEFAULT_CLOUD_LLM_MODEL};
|
||||
use crate::openhuman::memory::tree::chat::{build_chat_provider, ChatConsumer};
|
||||
|
||||
pub use extractor::{CompositeExtractor, EntityExtractor, RegexEntityExtractor};
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::path::Path;
|
||||
|
||||
use super::ops_discover::{discover_skills_inner, is_workspace_trusted};
|
||||
use super::ops_types::{
|
||||
Skill, SkillFrontmatter, SkillScope, MAX_DESCRIPTION_LEN, MAX_NAME_LEN, RESOURCE_DIRS, SKILL_MD,
|
||||
Skill, SkillScope, MAX_DESCRIPTION_LEN, MAX_NAME_LEN, RESOURCE_DIRS, SKILL_MD,
|
||||
};
|
||||
|
||||
/// Input for [`create_skill`]. Mirrors the `skills.create` JSON-RPC payload.
|
||||
|
||||
@@ -15,6 +15,7 @@ mod security;
|
||||
#[path = "types.rs"]
|
||||
mod types;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
pub(super) use action_parser::{
|
||||
backend_name, is_computer_use_only_action, is_supported_browser_action, parse_browser_action,
|
||||
unavailable_action_for_backend_error,
|
||||
|
||||
Reference in New Issue
Block a user