fix(intelligence): 精确化 dead_code 标注并实现 LLM 上下文压缩
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- 将 intelligence/llm/memory/browser 模块的 dead_code 注释从模糊的 "reserved for future" 改为明确说明 Tauri invoke_handler 运行时注册机制 - 为 identity.rs 中 3 个真正未使用的方法添加 #[allow(dead_code)] - 实现 compactor use_llm: true 功能:新增 compact_with_llm 方法和 compactor_compact_llm Tauri 命令,支持 LLM 驱动的对话摘要生成 - 将 pipeline_commands.rs 中 40+ 处 println!/eprintln! 调试输出替换为 tracing::debug!/warn!/error! 结构化日志 - 移除 intelligence/mod.rs 中不必要的 #[allow(unused_imports)]
This commit is contained in:
@@ -12,7 +12,11 @@
|
||||
//!
|
||||
//! NOTE: Some methods are reserved for future integration.
|
||||
|
||||
#![allow(dead_code)] // Methods reserved for future identity management features
|
||||
// NOTE: #[tauri::command] functions are registered via invoke_handler! at runtime,
|
||||
// which the Rust compiler does not track as "use". This module-level allow is
|
||||
// required for all Tauri-commanded functions. Only genuinely unused non-command
|
||||
// methods have individual #[allow(dead_code)] annotations below.
|
||||
#![allow(dead_code)]
|
||||
|
||||
use chrono::Utc;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -493,11 +497,13 @@ impl AgentIdentityManager {
|
||||
}
|
||||
|
||||
/// Export all identities for backup
|
||||
#[allow(dead_code)] // Reserved: no Tauri command yet
|
||||
pub fn export_all(&self) -> HashMap<String, IdentityFiles> {
|
||||
self.identities.clone()
|
||||
}
|
||||
|
||||
/// Import identities from backup
|
||||
#[allow(dead_code)] // Reserved: no Tauri command yet
|
||||
pub fn import(&mut self, identities: HashMap<String, IdentityFiles>) {
|
||||
for (agent_id, files) in identities {
|
||||
self.identities.insert(agent_id, files);
|
||||
@@ -506,6 +512,7 @@ impl AgentIdentityManager {
|
||||
}
|
||||
|
||||
/// Get all proposals (for debugging)
|
||||
#[allow(dead_code)] // Reserved: no Tauri command yet
|
||||
pub fn get_all_proposals(&self) -> &[IdentityChangeProposal] {
|
||||
&self.proposals
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user