Files
artcraft/frontend/libs
Tanish Manku 67d1e73208 promptbox: route webapp Generate through OmniGenApi (fix 404)
PromptBox3D's handleWebEnqueue was POSTing to /v1/image_studio/prompt
via PromptsApi.enqueueImageGeneration, but that endpoint does not exist
on the Rust backend — image_studio_routes.rs only registers
/scene_snapshot and /update_job_status under /v1/image_studio (the
remaining routes live under legacy_routes/). The webapp's /create-image
and other generation flows already use OmniGenApi.generateImage hitting
/v1/omni_gen/image/generate; this commit aligns the 3D editor with that
modern path.

- Snapshot upload still goes through PromptsApi.uploadSceneSnapshot
  (that endpoint is the one image_studio route still in use).
- The returned snapshot media token is prepended to image_media_tokens
  ahead of the user's reference images, matching how the Tauri path
  treats the scene snapshot as the primary input.
- aspect_ratio uses commonAspectRatio for models that support the new
  shape, falling back to getCurrentAspectRatio() otherwise.
- On success: toast "Image added to queue" plus the same
  __storeTaskEnqueueMeta telemetry the Tauri path fires.
- Failure path routes through the existing handleError modal.
- Drops a dead 2-second setTimeout that delayed the success toast.

Tauri path unchanged — IsDesktopApp() still gates handleTauriEnqueue,
which goes through Tauri IPC and bypasses storyteller-web entirely.
2026-05-13 13:53:03 -07:00
..