WIP: AGC 资源画布与替换改造 V3.0 #316

Draft
suzmii wants to merge 131 commits from feat/agc-canvas-resource-workbench-v3 into master
Showing only changes of commit 6a11032084 - Show all commits
@@ -4142,7 +4142,15 @@ fn is_game_creator_resource_editor_generation(generation_inputs: Option<&Value>)
generation_inputs
.and_then(|value| value.pointer("/source"))
.and_then(Value::as_str)
.is_some_and(|source| source.trim() == GAME_CREATOR_RESOURCE_EDITOR_SOURCE)
.is_some_and(|source| {
// 中文注释:AGC 客户端在发送前会把 source 改写成 `ai-game-creator-client`
// 两个 source 是同一个 consumer 的别名(见 `from_job` 的 queue consumer 判定),
// 这里必须同口径,否则客户端实际发出的请求永远走不到 AGC 分支。
matches!(
source.trim(),
GAME_CREATOR_RESOURCE_EDITOR_SOURCE | GAME_CREATOR_CLIENT_GENERATION_SOURCE
)
})
}
fn ensure_editor_image_edit_source_kind_allowed_for_request(