Switch to VectorEngine gpt-image-2 and edits

Replace uses of the legacy `gpt-image-2-all` model with `gpt-image-2` and standardize image workflows: no-reference generation uses POST /v1/images/generations, any-reference flows use POST /v1/images/edits with multipart `image` parts. Update SKILLs, generation scripts, decision logs, and docs to reflect the contract change and edits-vs-generations guidance. Apply corresponding changes across backend (api-server match3d/puzzle modules, openai image adapter, mappers, telemetry, spacetime client/module), frontend components and services (Match3D, Puzzle, CreativeImageInputPanel, runtime shells), and add new spritesheet/parser files and tests. Also add media/logo.png. These changes align repository code and documentation with the VectorEngine image API contract and update generation/upload handling (green-screen -> alpha processing, spritesheet handling, and related tests).
This commit is contained in:
2026-05-22 03:06:41 +08:00
parent 321e1ea33a
commit ae014ac881
90 changed files with 7078 additions and 3389 deletions

View File

@@ -270,7 +270,7 @@ describe('match3dGeneratedModelCache', () => {
);
});
test('运行态预加载同时解析背景和容器 UI 资产', async () => {
test('运行态预加载同时解析背景和spritesheet资产', async () => {
setStoredAccessToken('test-access-token', { emit: false });
vi.spyOn(globalThis, 'fetch').mockResolvedValue(
new Response(
@@ -309,6 +309,14 @@ describe('match3dGeneratedModelCache', () => {
imageSrc: null,
imageObjectKey:
'generated-match3d-assets/session/profile/background/task/background.png',
uiSpritesheetPrompt: '果园 UI',
uiSpritesheetImageSrc: null,
uiSpritesheetImageObjectKey:
'generated-match3d-assets/session/profile/ui-spritesheet/task/ui.png',
itemSpritesheetPrompt: '果园物品',
itemSpritesheetImageSrc: null,
itemSpritesheetImageObjectKey:
'generated-match3d-assets/session/profile/item-spritesheet/task/items.png',
containerPrompt: '果园浅盘',
containerImageSrc: null,
containerImageObjectKey:
@@ -321,13 +329,15 @@ describe('match3dGeneratedModelCache', () => {
expect(getMatch3DGeneratedRuntimeUiAssetSources(assets)).toEqual([
'generated-match3d-assets/session/profile/background/task/background.png',
'generated-match3d-assets/session/profile/ui-spritesheet/task/ui.png',
'generated-match3d-assets/session/profile/item-spritesheet/task/items.png',
'generated-match3d-assets/session/profile/ui-container/task/container.png',
]);
await preloadMatch3DGeneratedRuntimeAssets(assets, null, {
expireSeconds: 300,
});
expect(globalThis.fetch).toHaveBeenCalledTimes(3);
expect(globalThis.fetch).toHaveBeenCalledTimes(5);
expect(
vi
.mocked(globalThis.fetch)
@@ -336,6 +346,8 @@ describe('match3dGeneratedModelCache', () => {
expect.arrayContaining([
expect.stringContaining('/items/item-1/views/view-01.png'),
expect.stringContaining('/background/task/background.png'),
expect.stringContaining('/ui-spritesheet/task/ui.png'),
expect.stringContaining('/item-spritesheet/task/items.png'),
expect.stringContaining('/ui-container/task/container.png'),
]),
);