fix: 3 项问题

1. 审批DB更新精确匹配 — code_hash 从 removed entry 提取
2. delete memo 提取 id — prompt 中数字 → id 参数
3. 清理未使用的 current_user_id 全局变量
This commit is contained in:
2026-06-02 15:44:28 +08:00
parent fe83687495
commit 6708fe33a0
3 changed files with 12 additions and 16 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ async fn handle_memos(args_json: &str) -> SkillResult {
"list"
};
let content = params.get("prompt").and_then(|v| v.as_str()).unwrap_or("");
params = serde_json::json!({"action": action, "content": content});
let memo_id: i32 = content.chars().filter(|c| c.is_ascii_digit()).collect::<String>().parse().unwrap_or(0);
params = serde_json::json!({"action": action, "content": content, "id": memo_id});
}
let action = params.get("action").and_then(|v| v.as_str()).unwrap_or("list");
let path = ".data/memos.json";