20260513 mindmap优化01

This commit is contained in:
lix-2026
2026-05-13 22:43:16 +08:00
parent 17c003976b
commit b4a452a8b7
89 changed files with 11557 additions and 707 deletions
@@ -1,7 +1,9 @@
use crate::app::AppState;
use crate::context::RequestContext;
use crate::error::WebError;
use crate::routes::command_support::execute_runtime_command_via_convex;
use crate::routes::command_support::{
execute_runtime_command_via_convex, execute_runtime_command_via_convex_with_artifacts,
};
use crate::routes::local_folder_source::{
save_local_markdown_page, update_local_markdown_title, update_local_page_options,
};
@@ -574,17 +576,21 @@ pub async fn save(
dry_run: false,
validate_only: false,
};
let mut result = execute_runtime_command_via_convex(
let execution = execute_runtime_command_via_convex_with_artifacts(
state.config(),
&context,
effective_workspace_id.as_deref(),
command,
)
.await?;
let mut result = execution.result;
if let Value::Object(map) = &mut result {
map.insert("executedCommand".into(), json!("page.body.save"));
map.insert("canonicalCommand".into(), json!("page.body.save"));
map.insert("compatRoute".into(), json!("/api/documents/save"));
if let Some(artifact_error) = execution.artifact_error {
map.insert("artifactError".into(), json!(artifact_error));
}
}
Ok(ok_response(&context, result))
}