新增外部生成任务结果查询

新增仅返回任务结果的 SpacetimeDB procedure

编辑器 Agent 回填改用结果查询接口

补齐客户端绑定与接口文档
This commit is contained in:
2026-07-15 13:36:00 +08:00
parent 9a6bf8d86d
commit d55f4ba71c
11 changed files with 231 additions and 7 deletions
@@ -1,3 +1,6 @@
use crate::editor_agent::resp_to_asset;
use crate::http_error::AppError;
use crate::state::AppState;
use module_editor_agent::agent::tools::context::EditorToolContext;
use module_editor_agent::agent::tools::edit_image::{
EditImageTool, EditImageToolArgs, EditorImageEditResult,
@@ -17,9 +20,6 @@ use module_editor_agent::agent::tools::generate_sound_effect::{
};
use module_editor_agent::agent::tools::generate_ui_design::GenerateUiDesignTool;
use module_editor_agent::agent::tools::generate_video::{GenerateVideoTool, GenerateVideoToolArgs};
use crate::editor_agent::resp_to_asset;
use crate::http_error::AppError;
use crate::state::AppState;
use module_editor_agent::framework::tool::Tool;
use serde_json::Value;
use shared_contracts::assets::{EditorAudioGenerateResponse, EditorVideoGenerateResponse};
@@ -50,7 +50,7 @@ pub async fn reconcile_editor_agent_tool_calls(
for (message_index, job_id) in candidates {
let job = match state
.spacetime_client()
.get_external_generation_job(ExternalGenerationJobGetRecordInput {
.get_external_generation_job_result(ExternalGenerationJobGetRecordInput {
job_id,
owner_user_id: conversation.owner_user_id.clone(),
})