fix(tauri): @reserved annotations for 16 unconnected commands

Complete Tauri command audit: 177 total (160 @connected + 16 @reserved + 1 unregistered identity_init)
Corrected zclaw_doctor from @connected to @reserved
This commit is contained in:
iven
2026-04-05 01:06:58 +08:00
parent 82842c4258
commit fb0b8d2af3
12 changed files with 16 additions and 16 deletions

View File

@@ -113,8 +113,8 @@ pub async fn classroom_chat(
Ok(agent_responses) Ok(agent_responses)
} }
/// @reserved — no frontend UI yet
/// Retrieve chat history for a classroom /// Retrieve chat history for a classroom
// @reserved: no frontend consumer yet
#[tauri::command] #[tauri::command]
pub async fn classroom_chat_history( pub async fn classroom_chat_history(
chat_store: State<'_, ChatStore>, chat_store: State<'_, ChatStore>,

View File

@@ -239,8 +239,8 @@ pub async fn classroom_generate(
}) })
} }
/// @reserved — no frontend UI yet
/// Get current generation progress for a topic /// Get current generation progress for a topic
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn classroom_generation_progress( pub async fn classroom_generation_progress(
tasks: State<'_, GenerationTasks>, tasks: State<'_, GenerationTasks>,
@@ -281,8 +281,8 @@ pub async fn classroom_get(
.ok_or_else(|| format!("Classroom '{}' not found", classroom_id)) .ok_or_else(|| format!("Classroom '{}' not found", classroom_id))
} }
/// @reserved — no frontend UI yet
/// List all generated classrooms (id + title only) /// List all generated classrooms (id + title only)
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn classroom_list( pub async fn classroom_list(
store: State<'_, ClassroomStore>, store: State<'_, ClassroomStore>,

View File

@@ -113,8 +113,8 @@ pub fn zclaw_approve_device_pairing(
approve_local_device_pairing(&app, &device_id, &public_key_base64, url.as_deref()) approve_local_device_pairing(&app, &device_id, &public_key_base64, url.as_deref())
} }
/// @reserved — no frontend UI yet
/// Run ZCLAW doctor to diagnose issues /// Run ZCLAW doctor to diagnose issues
// @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_doctor(app: AppHandle) -> Result<String, String> { pub fn zclaw_doctor(app: AppHandle) -> Result<String, String> {
let result = run_zclaw(&app, &["doctor", "--json"])?; let result = run_zclaw(&app, &["doctor", "--json"])?;

View File

@@ -266,8 +266,8 @@ pub fn zclaw_health_check(
}) })
} }
/// @reserved — no frontend UI yet
/// Quick ping to check if ZCLAW is alive (lightweight check) /// Quick ping to check if ZCLAW is alive (lightweight check)
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub fn zclaw_ping(app: AppHandle) -> Result<bool, String> { pub fn zclaw_ping(app: AppHandle) -> Result<bool, String> {
let port_check = check_port_accessibility("127.0.0.1", ZCLAW_DEFAULT_PORT, 1000); let port_check = check_port_accessibility("127.0.0.1", ZCLAW_DEFAULT_PORT, 1000);

View File

@@ -231,8 +231,8 @@ pub async fn agent_update(
.ok_or_else(|| format!("Agent not found after update: {}", agent_id)) .ok_or_else(|| format!("Agent not found after update: {}", agent_id))
} }
/// @reserved — no frontend UI yet
/// Export an agent configuration as JSON /// Export an agent configuration as JSON
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn agent_export( pub async fn agent_export(
state: State<'_, KernelState>, state: State<'_, KernelState>,
@@ -254,8 +254,8 @@ pub async fn agent_export(
.map_err(|e| format!("Failed to serialize agent config: {}", e)) .map_err(|e| format!("Failed to serialize agent config: {}", e))
} }
/// @reserved — no frontend UI yet
/// Import an agent from JSON configuration /// Import an agent from JSON configuration
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn agent_import( pub async fn agent_import(
state: State<'_, KernelState>, state: State<'_, KernelState>,

View File

@@ -421,8 +421,8 @@ pub async fn hand_run_list(
})) }))
} }
/// @reserved — no frontend UI yet
/// Cancel a running hand execution /// Cancel a running hand execution
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn hand_run_cancel( pub async fn hand_run_cancel(
state: State<'_, KernelState>, state: State<'_, KernelState>,

View File

@@ -228,8 +228,8 @@ pub async fn kernel_status(
} }
} }
/// @reserved — no frontend UI yet
/// Shutdown the kernel /// Shutdown the kernel
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn kernel_shutdown( pub async fn kernel_shutdown(
state: State<'_, KernelState>, state: State<'_, KernelState>,

View File

@@ -202,11 +202,11 @@ impl From<zclaw_skills::orchestration::OrchestrationResult> for OrchestrationRes
// Tauri Commands // Tauri Commands
// ============================================================================ // ============================================================================
/// @reserved — no frontend UI yet
/// Execute a skill orchestration /// Execute a skill orchestration
/// ///
/// Either auto-composes a graph from skill_ids, or uses a pre-defined graph. /// Either auto-composes a graph from skill_ids, or uses a pre-defined graph.
/// Executes with true parallel execution within each dependency level. /// Executes with true parallel execution within each dependency level.
// @reserved: no frontend consumer yet
#[tauri::command] #[tauri::command]
pub async fn orchestration_execute( pub async fn orchestration_execute(
state: State<'_, KernelState>, state: State<'_, KernelState>,
@@ -249,8 +249,8 @@ pub async fn orchestration_execute(
Ok(OrchestrationResponse::from(result)) Ok(OrchestrationResponse::from(result))
} }
/// @reserved — no frontend UI yet
/// Validate an orchestration graph without executing it /// Validate an orchestration graph without executing it
// @reserved: no frontend consumer yet
#[tauri::command] #[tauri::command]
pub async fn orchestration_validate( pub async fn orchestration_validate(
state: State<'_, KernelState>, state: State<'_, KernelState>,

View File

@@ -325,7 +325,7 @@ impl LlmClient {
// === Tauri Commands === // === Tauri Commands ===
// @reserved: 暂无前端集成 /// @reserved — no frontend UI yet
#[tauri::command] #[tauri::command]
pub async fn llm_complete( pub async fn llm_complete(
provider: String, provider: String,

View File

@@ -482,7 +482,7 @@ pub struct FindResult {
// === Tauri Commands === // === Tauri Commands ===
// @reserved: 暂无前端集成 /// @reserved — no frontend UI yet
#[tauri::command] #[tauri::command]
pub fn estimate_content_tokens(content: String) -> u32 { pub fn estimate_content_tokens(content: String) -> u32 {
estimate_tokens(&content) estimate_tokens(&content)

View File

@@ -362,9 +362,9 @@ pub async fn memory_db_path(
Ok(db_path.to_string_lossy().to_string()) Ok(db_path.to_string_lossy().to_string())
} }
/// @reserved — no frontend UI yet
/// Configure embedding for PersistentMemoryStore (chat memory search) /// Configure embedding for PersistentMemoryStore (chat memory search)
/// This is called alongside viking_configure_embedding to enable vector search in chat flow /// This is called alongside viking_configure_embedding to enable vector search in chat flow
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn memory_configure_embedding( pub async fn memory_configure_embedding(
provider: String, provider: String,
@@ -398,8 +398,8 @@ pub async fn memory_configure_embedding(
Ok(true) Ok(true)
} }
/// @reserved — no frontend UI yet
/// Check if embedding is configured for PersistentMemoryStore /// Check if embedding is configured for PersistentMemoryStore
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub fn memory_is_embedding_configured() -> bool { pub fn memory_is_embedding_configured() -> bool {
is_embedding_configured() is_embedding_configured()

View File

@@ -39,12 +39,12 @@ pub struct PipelineTemplateInfo {
pub inputs: Vec<PipelineInputInfo>, pub inputs: Vec<PipelineInputInfo>,
} }
/// @reserved — no frontend UI yet
/// List available pipeline templates from the `_templates/` directory. /// List available pipeline templates from the `_templates/` directory.
/// ///
/// Templates are pipeline YAML files that users can browse and instantiate. /// Templates are pipeline YAML files that users can browse and instantiate.
/// They live in `pipelines/_templates/` and are not directly runnable /// They live in `pipelines/_templates/` and are not directly runnable
/// (they serve as blueprints). /// (they serve as blueprints).
// @reserved: 暂无前端集成
#[tauri::command] #[tauri::command]
pub async fn pipeline_templates( pub async fn pipeline_templates(
state: State<'_, Arc<PipelineState>>, state: State<'_, Arc<PipelineState>>,