Increase VectorEngine timeouts and add image UI

Add VectorEngine image generation config and raise request timeouts (env + scripts) from 180000 to 1000000ms. Introduce a reusable CreativeImageInputPanel component with tests and wire up mobile keyboard-focus helpers; update generation views and related tests (CustomWorldGenerationView, BarkBattle editor, Match3D, Puzzle flows). Improve API error handling / VectorEngine request guidance (packages/shared http.ts and docs), and apply multiple backend/frontend fixes for puzzle/match3d/prompt handling. Also include extensive docs and decision-log updates describing UI/UX decisions and verification steps.
This commit is contained in:
2026-05-15 02:40:59 +08:00
parent 4642855fd0
commit 74fd9a33ac
87 changed files with 5508 additions and 1261 deletions

View File

@@ -51,6 +51,7 @@ export type PuzzleAgentActionRequest =
workDescription?: string;
pictureDescription?: string;
referenceImageSrc?: string | null;
referenceImageSrcs?: string[];
imageModel?: string | null;
aiRedraw?: boolean;
}
@@ -61,6 +62,7 @@ export type PuzzleAgentActionRequest =
workDescription?: string;
pictureDescription?: string;
referenceImageSrc?: string | null;
referenceImageSrcs?: string[];
imageModel?: string | null;
aiRedraw?: boolean;
candidateCount?: number;
@@ -70,6 +72,7 @@ export type PuzzleAgentActionRequest =
levelId?: string | null;
promptText?: string | null;
referenceImageSrc?: string | null;
referenceImageSrcs?: string[];
imageModel?: string | null;
aiRedraw?: boolean;
candidateCount?: number;

View File

@@ -50,6 +50,7 @@ export interface CreatePuzzleAgentSessionRequest {
workDescription?: string;
pictureDescription?: string;
referenceImageSrc?: string | null;
referenceImageSrcs?: string[];
imageModel?: string | null;
aiRedraw?: boolean;
}

View File

@@ -155,11 +155,11 @@ function readApiErrorDetailMessage(details: unknown) {
return '';
}
// 后端通用 message 常用于错误分类;details.message / details.reason
// 才是给用户定位问题的业务原因,配置缺失类错误通常只带 reason
// 后端通用 message 常用于错误分类;reason 更适合直接展示给用户,
// 例如 VectorEngine 网络分类会把底层 reqwest message 留给日志
return (
readTrimmedMessage(details.message) ||
readTrimmedMessage(details.reason)
readTrimmedMessage(details.reason) ||
readTrimmedMessage(details.message)
);
}