mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-25 18:49:38 +00:00
044c6d8a88
### New shared lib: `@storyteller/omni-gen` - The `omni-gen-hooks.ts` file was copy-pasted between `artcraft-webapp` and `artcraft-website` and had drifted (website copy was missing outage toasts, carried a stale hardcoded display-name map, and had weaker icon resolution). - Extracted the newer (webapp) version into a new lib `frontend/libs/omni-gen` (generated via `nx g @nx/react:library`): singleton session cache, `useOmniGenImageModels()` / `useOmniGenVideoModels()`, outage message constants. - App-local toasts are injected via `setOmniGenErrorNotifier()`, called once in each app's `main.tsx`, since the hooks are singleton-cache based and each app has its own toast component. ### Consolidated model metadata into `@storyteller/model-list` - `getModelDescription()` / `getModelInfo()` (tagline + info-blurb fallbacks) moved to `ModelDescriptions.ts`; API values still always win. - `getModelDisplayName()` gained an optional `fullName` param (API name wins); the app-local wrapper is gone. - Both apps' local `getModelCreatorIconPath()` replaced with the existing, stronger `getCreatorIconPathForModelId()` (checks `ALL_MODELS_LIST` first, then prefix match). The loader's duplicate `CREATOR_BY_PREFIX` map now reuses the same shared `MODEL_ID_PREFIX_CREATORS` table. ### Dead code removed - `modelReconciliation.ts`: deprecated `reconcile*()` helpers (never called) and the empty, retired `BACKEND_TO_TAURI_*` alias maps. `buildModelsFromListing()` dropped its alias-map indirection accordingly (backend ids == tauriIds since the 2026-07 id migration). `modelCreatorFromBackend()` moved inline into the loader, its only consumer. - Six unused static `*_PAGE_MODEL_LIST` constants in `model-selectors-for-pages.tsx` (superseded by the `use*PageModelList` hooks in #1710). The two `IMAGE_TO_3D_*` constants stay: 3D models are not served by the omni backend. - Untracked the accidentally committed `apps/artcraft/tsconfig.tsbuildinfo` and gitignored `*.tsbuildinfo`. ### Website-visible improvements (from adopting the newer hooks) - Model outage toasts now appear on the website (previously webapp-only). - Current display names from the canonical map (previously-unmapped ids like `gpt_image_2` and Midjourney models rendered as raw ids). - Model taglines/descriptions now render in the website model picker. - Midjourney and SwitchX creator icons now resolve.