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:
@@ -15,6 +15,7 @@ use serde_json::{Value, json};
|
||||
use crate::{
|
||||
api_response::json_success_body,
|
||||
character_visual_assets::try_apply_background_alpha_to_png,
|
||||
config::DEFAULT_VECTOR_ENGINE_IMAGE_REQUEST_TIMEOUT_MS,
|
||||
http_error::AppError,
|
||||
openai_image_generation::{
|
||||
DownloadedOpenAiImage, OpenAiImageSettings, build_openai_image_http_client,
|
||||
@@ -27,7 +28,6 @@ use crate::{
|
||||
const BABY_OBJECT_MATCH_PROVIDER: &str = "vector-engine-gpt-image-2";
|
||||
const BABY_OBJECT_MATCH_IMAGE_SIZE: &str = "1024x1024";
|
||||
const BABY_OBJECT_MATCH_BACKGROUND_IMAGE_SIZE: &str = "1536x1024";
|
||||
const BABY_OBJECT_MATCH_VECTOR_ENGINE_REQUEST_TIMEOUT_MS: u64 = 480_000;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@@ -207,7 +207,7 @@ fn build_baby_object_match_negative_prompt() -> &'static str {
|
||||
fn with_baby_object_match_image_timeout(mut settings: OpenAiImageSettings) -> OpenAiImageSettings {
|
||||
settings.request_timeout_ms = settings
|
||||
.request_timeout_ms
|
||||
.max(BABY_OBJECT_MATCH_VECTOR_ENGINE_REQUEST_TIMEOUT_MS);
|
||||
.max(DEFAULT_VECTOR_ENGINE_IMAGE_REQUEST_TIMEOUT_MS);
|
||||
settings
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
settings.request_timeout_ms,
|
||||
BABY_OBJECT_MATCH_VECTOR_ENGINE_REQUEST_TIMEOUT_MS
|
||||
DEFAULT_VECTOR_ENGINE_IMAGE_REQUEST_TIMEOUT_MS
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user