修复274剩余CI门禁
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / Repository checks (pull_request) Failing after 9s
Project CI / Frontend tests (pull_request) Successful in 3m16s
Project CI / Native shell tests (pull_request) Failing after 15m5s

补齐新增MCP命令的native-only配置白名单

格式化自定义图集切片数量校验代码
This commit is contained in:
2026-09-08 15:16:45 +08:00
parent 2334d9b907
commit 788089b33a
2 changed files with 4 additions and 1 deletions
@@ -113,6 +113,8 @@ const allowedUncalledTauriCommands = [
'open_game_creator_launcher_window', 'open_game_creator_launcher_window',
'open_game_creator_workspace_window', 'open_game_creator_workspace_window',
'stop_local_game_preview_if_matches', 'stop_local_game_preview_if_matches',
'start_game_creator_external_mcp',
'stop_game_creator_external_mcp',
]; ];
const sourceExtensions = new Set([ const sourceExtensions = new Set([
'.json', '.json',
@@ -2522,7 +2522,8 @@ async fn slice_editor_icon_spritesheet_all_with_memory_admission(
Err(_) => return Err(editor_icon_spritesheet_processing_timeout_error()), Err(_) => return Err(editor_icon_spritesheet_processing_timeout_error()),
}; };
if let Some(expected) = slice_count { if let Some(expected) = slice_count {
if expected == 0 || expected > EDITOR_ICON_SPRITESHEET_MAX_SLICES || plan.len() != expected { if expected == 0 || expected > EDITOR_ICON_SPRITESHEET_MAX_SLICES || plan.len() != expected
{
return Err(AppError::from_status(StatusCode::UNPROCESSABLE_ENTITY).with_details(json!({ return Err(AppError::from_status(StatusCode::UNPROCESSABLE_ENTITY).with_details(json!({
"provider": "editor-icon-spritesheet-slicing", "provider": "editor-icon-spritesheet-slicing",
"message": format!("请求切片数量为 {expected},实际识别到 {} 个。请调整 sliceCount 或素材排布。", plan.len()), "message": format!("请求切片数量为 {expected},实际识别到 {} 个。请调整 sliceCount 或素材排布。", plan.len()),