Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
cover the no-cap input-image path and fix two comments pointing at the moved constant
[._.]/ Adam Eivye6631d22bcd7
diff --git a/client/src/pages/ImageGen.jsx b/client/src/pages/ImageGen.jsxindex a2ee3d796c..9429698b12 100644--- a/client/src/pages/ImageGen.jsx+++ b/client/src/pages/ImageGen.jsx@@ -59,7 +59,7 @@ import {// + a 0..1 strength weight. Slots are positional so the blob-URL revoke pairs// with the slot the user cleared. Local consumes all 4 (FLUX.2 only); a cloud// CLI takes however many its image tool accepts alongside the init image (see-// MAX_INPUT_IMAGES), so the form offers only that many slots there.+// referenceSlotsFor), so the form offers only that many slots there.const REFERENCE_SLOT_COUNT = 4;const EMPTY_REF_SLOT = { file: null, previewUrl: null, strength: 1.0 };diff --git a/server/services/imageGen/inputImages.test.js b/server/services/imageGen/inputImages.test.jsindex 71f0d64cdd..fdd3d780e2 100644--- a/server/services/imageGen/inputImages.test.js+++ b/server/services/imageGen/inputImages.test.js@@ -63,6 +63,22 @@ describe('resolveInputImages', () => {expect(out.paths).toEqual([abs('init.png'), abs('a.png'), abs('b.png')]);});+ it('keeps every image for a backend whose tool declares no cap', async () => {+ // codex/grok carry `maxInputImages: null`. The route's own+ // MAX_REFERENCE_IMAGES is what bounds them, so this resolver must not+ // invent a ceiling — a null cap that fell through to 0 would silently+ // strip every reference from a codex render.+ await stage('init.png', 'a.png', 'b.png', 'c.png', 'd.png');+ expect(maxInputImages(IMAGE_GEN_MODE.CODEX)).toBeNull();+ const out = resolveInputImages({+ mode: IMAGE_GEN_MODE.CODEX,+ initImagePath: 'init.png',+ referenceImagePaths: ['a.png', 'b.png', 'c.png', 'd.png'],+ });+ expect(out.paths).toEqual([abs('init.png'), abs('a.png'), abs('b.png'), abs('c.png'), abs('d.png')]);+ expect(out.referencePaths).toHaveLength(4);+ });+it('drops a path that escapes the approved roots instead of forwarding it', () => {const out = resolveInputImages({mode: IMAGE_GEN_MODE.CODEX,diff --git a/server/services/imageGen/modes.js b/server/services/imageGen/modes.jsindex 54f9e541a0..4923330308 100644--- a/server/services/imageGen/modes.js+++ b/server/services/imageGen/modes.js@@ -84,7 +84,8 @@ export const QUEUEABLE_IMAGE_MODES = Object.freeze([IMAGE_GEN_MODE.LOCAL, ...CLO// backend now can: local (mflux/diffusers `--image-path` + FLUX.2 references),// codex (`image_gen.referenced_image_paths`), grok (`image_edit.image`) and agy// (`generate_image.ImagePaths`) all accept an init image and/or reference-// images — see MAX_INPUT_IMAGES above for the probed per-backend limits. Agy+// images — see `maxInputImages` on CLOUD_PROVIDER_SPECS (cloudProviderConfig.js)+// for the probed per-backend limits. Agy// was listed here until its tool schema was probed directly and turned out to// document ImagePaths as "images to use in generation… edit, combine, or use as// references".