refactor: 代码质量清理 - 移除死代码和遗留别名
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
基于全面审计报告的 P0-P2 修复工作: P0 (已完成): - intelligence 模块: 精确注释 dead_code 标注原因(Tauri runtime 注册) - compactor.rs: 实现 LLM 摘要生成(compact_with_llm) - pipeline_commands.rs: 替换 println! 为 tracing 宏 P1 (已完成): - 移除 8 个 gateway_* 向后兼容别名(OpenClaw 遗留) - 前端 tauri-gateway.ts 改为调用 zclaw_* 命令 - 清理 generation.rs 6 个重复的实例方法(-217 行) - A2A dead_code 注释更新 P2 (已完成): - Predictor/Lead HAND.toml 设置 enabled=false - Wasm/Native SkillMode 添加未实现说明 - browser/mod.rs 移除未使用的 re-export(消除 4 个警告) 文档更新: - feature-checklist.md 从 v0.4.0 更新到 v0.6.0 - CLAUDE.md Hands 状态更新 验证: cargo check 零警告, 42 测试通过, 净减 371 行代码
This commit is contained in:
@@ -1260,56 +1260,6 @@ fn zclaw_ping(app: AppHandle) -> Result<bool, String> {
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Backward-compatible aliases (OpenClaw naming)
|
||||
// These delegate to ZCLAW commands for backward compatibility
|
||||
// ============================================================================
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_status(app: AppHandle) -> Result<LocalGatewayStatus, String> {
|
||||
zclaw_status(app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_start(app: AppHandle) -> Result<LocalGatewayStatus, String> {
|
||||
zclaw_start(app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_stop(app: AppHandle) -> Result<LocalGatewayStatus, String> {
|
||||
zclaw_stop(app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_restart(app: AppHandle) -> Result<LocalGatewayStatus, String> {
|
||||
zclaw_restart(app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_local_auth() -> Result<LocalGatewayAuth, String> {
|
||||
zclaw_local_auth()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_prepare_for_tauri(app: AppHandle) -> Result<LocalGatewayPrepareResult, String> {
|
||||
zclaw_prepare_for_tauri(app)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_approve_device_pairing(
|
||||
app: AppHandle,
|
||||
device_id: String,
|
||||
public_key_base64: String,
|
||||
url: Option<String>,
|
||||
) -> Result<LocalGatewayPairingApprovalResult, String> {
|
||||
zclaw_approve_device_pairing(app, device_id, public_key_base64, url)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn gateway_doctor(app: AppHandle) -> Result<String, String> {
|
||||
zclaw_doctor(app)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// Start development server when dev-server feature is enabled
|
||||
@@ -1421,15 +1371,6 @@ pub fn run() {
|
||||
zclaw_version,
|
||||
// Health check commands
|
||||
zclaw_ping,
|
||||
// Backward-compatible aliases (OpenClaw naming)
|
||||
gateway_status,
|
||||
gateway_start,
|
||||
gateway_stop,
|
||||
gateway_restart,
|
||||
gateway_local_auth,
|
||||
gateway_prepare_for_tauri,
|
||||
gateway_approve_device_pairing,
|
||||
gateway_doctor,
|
||||
// OpenViking CLI sidecar commands
|
||||
viking_commands::viking_status,
|
||||
viking_commands::viking_add,
|
||||
|
||||
Reference in New Issue
Block a user