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:
@@ -70,19 +70,19 @@ export function getUnsupportedLocalGatewayStatus(): LocalGatewayStatus {
|
||||
}
|
||||
|
||||
export async function getLocalGatewayStatus(): Promise<LocalGatewayStatus> {
|
||||
return callLocalGateway('gateway_status');
|
||||
return callLocalGateway('zclaw_status');
|
||||
}
|
||||
|
||||
export async function startLocalGateway(): Promise<LocalGatewayStatus> {
|
||||
return callLocalGateway('gateway_start');
|
||||
return callLocalGateway('zclaw_start');
|
||||
}
|
||||
|
||||
export async function stopLocalGateway(): Promise<LocalGatewayStatus> {
|
||||
return callLocalGateway('gateway_stop');
|
||||
return callLocalGateway('zclaw_stop');
|
||||
}
|
||||
|
||||
export async function restartLocalGateway(): Promise<LocalGatewayStatus> {
|
||||
return callLocalGateway('gateway_restart');
|
||||
return callLocalGateway('zclaw_restart');
|
||||
}
|
||||
|
||||
export async function getLocalGatewayAuth(): Promise<LocalGatewayAuth> {
|
||||
@@ -93,7 +93,7 @@ export async function getLocalGatewayAuth(): Promise<LocalGatewayAuth> {
|
||||
};
|
||||
}
|
||||
|
||||
return invoke<LocalGatewayAuth>('gateway_local_auth');
|
||||
return invoke<LocalGatewayAuth>('zclaw_local_auth');
|
||||
}
|
||||
|
||||
export async function prepareLocalGatewayForTauri(): Promise<LocalGatewayPrepareResult> {
|
||||
@@ -105,7 +105,7 @@ export async function prepareLocalGatewayForTauri(): Promise<LocalGatewayPrepare
|
||||
};
|
||||
}
|
||||
|
||||
return invoke<LocalGatewayPrepareResult>('gateway_prepare_for_tauri');
|
||||
return invoke<LocalGatewayPrepareResult>('zclaw_prepare_for_tauri');
|
||||
}
|
||||
|
||||
export async function approveLocalGatewayDevicePairing(deviceId: string, publicKeyBase64: string, url?: string): Promise<LocalGatewayPairingApprovalResult> {
|
||||
@@ -117,7 +117,7 @@ export async function approveLocalGatewayDevicePairing(deviceId: string, publicK
|
||||
};
|
||||
}
|
||||
|
||||
return invoke<LocalGatewayPairingApprovalResult>('gateway_approve_device_pairing', {
|
||||
return invoke<LocalGatewayPairingApprovalResult>('zclaw_approve_device_pairing', {
|
||||
deviceId,
|
||||
publicKeyBase64,
|
||||
url,
|
||||
@@ -159,10 +159,10 @@ export interface VersionResponse {
|
||||
}
|
||||
|
||||
/**
|
||||
* List OpenFang processes
|
||||
* @returns List of running OpenFang processes with their status
|
||||
* List ZCLAW processes
|
||||
* @returns List of running ZCLAW processes with their status
|
||||
*/
|
||||
export async function getOpenFangProcessList(): Promise<ProcessListResponse> {
|
||||
export async function getZclawProcessList(): Promise<ProcessListResponse> {
|
||||
if (!isTauriRuntime()) {
|
||||
return {
|
||||
processes: [],
|
||||
@@ -171,16 +171,16 @@ export async function getOpenFangProcessList(): Promise<ProcessListResponse> {
|
||||
};
|
||||
}
|
||||
|
||||
return invoke<ProcessListResponse>('openfang_process_list');
|
||||
return invoke<ProcessListResponse>('zclaw_process_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get OpenFang process logs
|
||||
* Get ZCLAW process logs
|
||||
* @param pid - Optional process ID to get logs for. If not specified, gets main process logs.
|
||||
* @param lines - Number of log lines to retrieve (default: 100)
|
||||
* @returns Process logs
|
||||
*/
|
||||
export async function getOpenFangProcessLogs(
|
||||
export async function getZclawProcessLogs(
|
||||
pid?: number,
|
||||
lines?: number
|
||||
): Promise<ProcessLogsResponse> {
|
||||
@@ -193,17 +193,17 @@ export async function getOpenFangProcessLogs(
|
||||
};
|
||||
}
|
||||
|
||||
return invoke<ProcessLogsResponse>('openfang_process_logs', {
|
||||
return invoke<ProcessLogsResponse>('zclaw_process_logs', {
|
||||
pid,
|
||||
lines,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get OpenFang version information
|
||||
* Get ZCLAW version information
|
||||
* @returns Version information including version string, commit hash, and build date
|
||||
*/
|
||||
export async function getOpenFangVersion(): Promise<VersionResponse> {
|
||||
export async function getZclawVersion(): Promise<VersionResponse> {
|
||||
if (!isTauriRuntime()) {
|
||||
return {
|
||||
version: 'unknown',
|
||||
@@ -214,5 +214,5 @@ export async function getOpenFangVersion(): Promise<VersionResponse> {
|
||||
};
|
||||
}
|
||||
|
||||
return invoke<VersionResponse>('openfang_version');
|
||||
return invoke<VersionResponse>('zclaw_version');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user