推进资源工具与本地优先兼容链收口

This commit is contained in:
lix-2026
2026-05-19 12:03:43 +08:00
parent 94be1c927b
commit 6fcdf78603
13 changed files with 1192 additions and 30 deletions
@@ -439,6 +439,7 @@ fn convex_command_args_for_plan(plan: &RuntimeCommandExecutionPlan) -> Value {
"tree.resource.archive"
| "tree.resource.restore"
| "tree.resource.rename"
| "tree.resource.move"
| "tree.resource.purge"
) {
args = convex_resource_lifecycle_args_for_plan(plan, &args);
@@ -537,6 +538,17 @@ fn convex_resource_lifecycle_args_for_plan(
"file_name": args.get("newName").and_then(Value::as_str).unwrap_or_default(),
},
}),
"move" => json!({
"userId": user_id,
"id": id,
"patch": {
"document_id": args
.get("targetDocumentId")
.or_else(|| args.get("target_document_id"))
.and_then(Value::as_str)
.unwrap_or_default(),
},
}),
"purge" => json!({
"userId": user_id,
"id": id,