1
This commit is contained in:
@@ -3405,7 +3405,7 @@ fn execute_sync_result_profile_action(
|
||||
input: &CustomWorldAgentActionExecuteInput,
|
||||
payload: &JsonMap<String, JsonValue>,
|
||||
) -> Result<CustomWorldAgentOperationSnapshot, String> {
|
||||
ensure_refining_stage(session.stage, "sync_result_profile")?;
|
||||
ensure_result_profile_sync_stage(session.stage, "sync_result_profile")?;
|
||||
let mut profile = payload
|
||||
.get("profile")
|
||||
.and_then(JsonValue::as_object)
|
||||
@@ -4606,6 +4606,22 @@ fn ensure_refining_stage(stage: RpgAgentStage, action: &str) -> Result<(), Strin
|
||||
}
|
||||
}
|
||||
|
||||
fn ensure_result_profile_sync_stage(stage: RpgAgentStage, action: &str) -> Result<(), String> {
|
||||
if matches!(
|
||||
stage,
|
||||
RpgAgentStage::ObjectRefining
|
||||
| RpgAgentStage::VisualRefining
|
||||
| RpgAgentStage::LongTailReview
|
||||
| RpgAgentStage::ReadyToPublish
|
||||
) {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(format!(
|
||||
"{action} is only available during object_refining, visual_refining, long_tail_review or ready_to_publish"
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn ensure_long_tail_stage(stage: RpgAgentStage, action: &str) -> Result<(), String> {
|
||||
if matches!(
|
||||
stage,
|
||||
|
||||
Reference in New Issue
Block a user