ae014ac881
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).
34 lines
938 B
TypeScript
34 lines
938 B
TypeScript
import { beforeEach, expect, test, vi } from 'vitest';
|
|
|
|
const { createCreationAgentClientMock, executeActionMock } = vi.hoisted(() => ({
|
|
createCreationAgentClientMock: vi.fn(),
|
|
executeActionMock: vi.fn(),
|
|
}));
|
|
|
|
vi.mock('../creation-agent', () => ({
|
|
createCreationAgentClient: createCreationAgentClientMock,
|
|
}));
|
|
|
|
beforeEach(() => {
|
|
vi.resetModules();
|
|
executeActionMock.mockReset();
|
|
createCreationAgentClientMock.mockReset();
|
|
createCreationAgentClientMock.mockReturnValue({
|
|
createSession: vi.fn(),
|
|
getSession: vi.fn(),
|
|
sendMessage: vi.fn(),
|
|
streamMessage: vi.fn(),
|
|
executeAction: executeActionMock,
|
|
});
|
|
});
|
|
|
|
test('puzzle compile action keeps the draft generation request alive for 30 minutes', async () => {
|
|
await import('./puzzleAgentClient');
|
|
|
|
expect(createCreationAgentClientMock).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
executeActionTimeoutMs: 30 * 60 * 1000,
|
|
}),
|
|
);
|
|
});
|