chore(desktop): Tauri 命令 @reserved 全量标注 — 88个无前端调用命令已标注
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

- 新增 66 个 @reserved 标注 (已有 22 个)
- 覆盖: agent/butler/classroom/hand/mcp/pipeline/skill/trigger/viking/zclaw 等模块
- MCP 命令增加 @connected 注释说明前端接入路径
- @reserved 总数: 89 (含 identity_init)
This commit is contained in:
iven
2026-04-15 02:05:58 +08:00
parent ee1c9ef3ea
commit 5121a3c599
24 changed files with 69 additions and 3 deletions

View File

@@ -150,6 +150,7 @@ fn get_data_dir_string() -> Option<String> {
// === Tauri Commands ===
/// Check if memory storage is available
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_status() -> Result<VikingStatus, String> {
@@ -178,6 +179,7 @@ pub async fn viking_status() -> Result<VikingStatus, String> {
}
/// Add a memory entry
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_add(uri: String, content: String) -> Result<VikingAddResult, String> {
@@ -201,6 +203,7 @@ pub async fn viking_add(uri: String, content: String) -> Result<VikingAddResult,
}
/// Add a memory with metadata
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_add_with_metadata(
@@ -232,6 +235,7 @@ pub async fn viking_add_with_metadata(
}
/// Find memories by semantic search
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_find(
@@ -278,6 +282,7 @@ pub async fn viking_find(
}
/// Grep memories by pattern (uses FTS5)
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_grep(
@@ -332,6 +337,7 @@ pub async fn viking_grep(
}
/// List memories at a path
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_ls(path: String) -> Result<Vec<VikingResource>, String> {
@@ -360,6 +366,7 @@ pub async fn viking_ls(path: String) -> Result<Vec<VikingResource>, String> {
}
/// Read memory content
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_read(uri: String, level: Option<String>) -> Result<String, String> {
@@ -404,6 +411,7 @@ pub async fn viking_read(uri: String, level: Option<String>) -> Result<String, S
}
/// Remove a memory
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_remove(uri: String) -> Result<(), String> {
@@ -418,6 +426,7 @@ pub async fn viking_remove(uri: String) -> Result<(), String> {
}
/// Get memory tree
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_tree(path: String, depth: Option<usize>) -> Result<serde_json::Value, String> {
@@ -469,6 +478,7 @@ pub async fn viking_tree(path: String, depth: Option<usize>) -> Result<serde_jso
}
/// Inject memories into prompt (for agent loop integration)
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_inject_prompt(
@@ -611,6 +621,7 @@ pub async fn viking_configure_summary_driver(
}
/// Store a memory and optionally generate L0/L1 summaries in the background
// @reserved: VikingStorage persistence
// @connected
#[tauri::command]
pub async fn viking_store_with_summaries(