修复 AGC 栏目画布上传素材落「待归类」(Issue 359)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m17s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 3m59s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m8s
Project CI / Backend tests (pull_request) Successful in 6m24s
Project CI / Frontend tests (pull_request) Successful in 3m24s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m34s
Project CI / Native shell tests (pull_request) Successful in 6m49s
Project CI / Repository checks (pull_request) Successful in 5m38s

- AGC Rust `upload_local_asset` 新增可选 `targetCategory`,登记改走 `register_local_asset_entry_with_category`(非法值失败关闭,不回退 kind 派生);`upload_local_asset_at` 委托新的 `upload_local_asset_at_with_category`,既有调用点与单测不动
- 前端 `uploadProjectAssetFilesAndReadSnapshot` 透传 `targetCategory`;栏目画布底部工具栏上传带上工具栏自己的栏目,与生成入口的 `targetCategory` 同一口径
- 新增 Rust 单测 `upload_registers_into_the_explicit_entry_category`(显式栏目 → character / 不传 → unclassified / 非法 version 失败关闭且不新增登记)与 appSurface 用例(在「角色与对象」上传图片,载荷必须带 `targetCategory: 'character'`)
- 同步 PRD §3.10、`docs/technical/【AGC】栏目画布底部工具栏入口矩阵-2026-09-13.md` §4 载荷表、V3 验收用例 S11a、decision-log 与 pitfalls
This commit is contained in:
2026-10-03 16:59:22 +08:00
parent 633355952b
commit 372b7d3a00
10 changed files with 182 additions and 9 deletions
@@ -42,7 +42,7 @@
| 生成 UI 设计图 | 同上 | `kind: 'ui-design'`,默认 `16:9 · 1K`;前置同上 |
| 生成背景音乐 | `start_local_project_asset_generation` | `kind: 'background-music'`、`idempotencyKey`;任务 id 即该次生成的 operation id |
| 生成音效 | `start_local_project_asset_generation` | `kind: 'sound-effect'`、其余同上 |
| 上传 | `upload_local_asset` | `{ projectPath, fileName, mediaType, bytes }` |
| 上传 | `upload_local_asset` | `{ projectPath, fileName, mediaType, bytes, targetCategory }`;`targetCategory` = 当前栏目(Issue 359) |
`start_local_project_asset_generation` 的完整参数是 `{ projectPath, projectId, taskId, kind, prompt, aspectRatio, imageSize, assetName, outputPath, idempotencyKey }`(Rust `src-tauri/src/asset_generation_tasks.rs`);图片类入口沿用 `{ projectPath, projectId, taskId, kind, prompt, aspectRatio, imageSize, assetName, outputPath }` 逐字不变,音频入口只带 `{ projectPath, projectId, taskId, kind, prompt, assetName, idempotencyKey }`(`idempotencyKey` = 该次生成的幂等键,任务 id 即 operation id;原生命令内部仍复用既有音频无源生成链路,不新增平台路由与请求体口径),**提交即返回**一条任务记录(`taskId / status / phaseDetail / assetId / error` 等);生成在 `tauri::async_runtime::spawn` 出来的后台任务里跑,账本落在项目内 `.agent/runtime/asset-generation-tasks/tasks.json`,进度由 `list_local_project_asset_generations` 读回。截图面板不再「等生成结束」,所以**点「生成」即同步关闭面板**(不等 IPC),面板内不出现阶段文案;只有「点击瞬间就失败」才带草稿重开(关闭 ≠ 取消)。
File diff suppressed because one or more lines are too long