From a00f4ba1fad8310b08b3a9614e83fd4ddef067b2 Mon Sep 17 00:00:00 2001 From: SNPAU Date: Mon, 10 Aug 2026 15:16:00 +1000 Subject: [PATCH 1/7] Add image prompt instructions to connections --- CHANGELOG.md | 1 + .../connections/ConnectionEditor.tsx | 24 +++++++++++++++++++ packages/client/src/hooks/use-connections.ts | 1 + .../client/src/lib/connection-transfer.ts | 4 ++++ .../client/src/localization/locales/en.json | 3 +++ packages/server/src/db/schema/connections.ts | 2 ++ packages/server/src/routes/gallery.routes.ts | 8 +++++-- packages/server/src/routes/generate.routes.ts | 14 +++++++++++ .../src/routes/generate/retry-agents-route.ts | 24 +++++++++++++++++++ .../src/services/agents/agent-executor.ts | 14 ++++++++++- .../conversation-selfie-command-runtime.ts | 6 ++++- .../illustrator-manual-prompt-generation.ts | 6 +++++ .../generation/illustrator-prompt-runtime.ts | 1 + .../services/storage/connections.storage.ts | 5 ++++ .../shared/src/schemas/connection.schema.ts | 1 + packages/shared/src/types/connection.ts | 2 ++ 16 files changed, 112 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 703c3572c1..3e193f8ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This file is the release-notes source of truth for Marinara Engine. Reuse these ### Added +- Added optional image prompting instructions to image connections, applying them inside existing selfie and Illustrator prompt-writing calls before provider review or generation. - Added batch selection to Character and Persona image galleries so selected images can be downloaded or deleted together after confirmation (#4832). - Added a persisted Auto, Low, Medium, or High output-quality choice to GPT Image generation connections (#4831). - Added optional character and persona reference sheets under Sprites, with upload, size-bounded AI creation, safe selection cleanup, and an explicit generation-reference toggle that falls back to existing likeness art; both Galleries include the same AI creation entrypoint (#4786). diff --git a/packages/client/src/components/connections/ConnectionEditor.tsx b/packages/client/src/components/connections/ConnectionEditor.tsx index 961cbb18d2..f19fc063c7 100644 --- a/packages/client/src/components/connections/ConnectionEditor.tsx +++ b/packages/client/src/components/connections/ConnectionEditor.tsx @@ -299,6 +299,7 @@ export function ConnectionEditor() { const [localComfyuiWorkflow, setLocalComfyuiWorkflow] = useState(""); const [localImageService, setLocalImageService] = useState(null); const [localImageEndpointId, setLocalImageEndpointId] = useState(""); + const [localImagePromptInstructions, setLocalImagePromptInstructions] = useState(""); const [localImageGenerationQuality, setLocalImageGenerationQuality] = useState("auto"); const [localVideoGenerationSource, setLocalVideoGenerationSource] = useState(""); const [localVideoService, setLocalVideoService] = useState(null); @@ -418,6 +419,7 @@ export function ConnectionEditor() { setLocalComfyuiWorkflow((c.comfyuiWorkflow as string) ?? ""); setLocalImageService(imageService); setLocalImageEndpointId((c.imageEndpointId as string) ?? ""); + setLocalImagePromptInstructions((c.imagePromptInstructions as string) ?? ""); setLocalImageGenerationQuality( c.imageGenerationQuality === "low" || c.imageGenerationQuality === "medium" || c.imageGenerationQuality === "high" ? c.imageGenerationQuality @@ -719,6 +721,7 @@ export function ConnectionEditor() { imageService: isImageProvider ? localImageGenerationSource || localImageService || null : null, imageEndpointId: isImageProvider && selectedImageService === "runpod_comfyui" ? localImageEndpointId || null : null, + imagePromptInstructions: isImageProvider ? localImagePromptInstructions.trim() || null : null, imageGenerationQuality: isImageProvider ? localImageGenerationQuality : "auto", videoGenerationSource: isVideoProvider ? selectedVideoProvider || null : null, videoService: isVideoProvider ? selectedVideoDefaultsService : null, @@ -818,6 +821,7 @@ export function ConnectionEditor() { localComfyuiWorkflow, localImageService, localImageEndpointId, + localImagePromptInstructions, localImageGenerationQuality, localMaxTokensOverride, localClaudeFastMode, @@ -923,6 +927,7 @@ export function ConnectionEditor() { videoService, imageEndpointId: isImageProvider && selectedImageService === "runpod_comfyui" ? localImageEndpointId || null : null, + imagePromptInstructions: isImageProvider ? localImagePromptInstructions.trim() || null : null, imageGenerationQuality: isImageProvider ? localImageGenerationQuality : "auto", comfyuiWorkflow: isImageProvider || (isVideoProvider && videoProvider === "comfyui") ? localComfyuiWorkflow || null : null, @@ -961,6 +966,7 @@ export function ConnectionEditor() { selectedVideoProvider, selectedImageService, localImageEndpointId, + localImagePromptInstructions, localImageGenerationQuality, localComfyuiWorkflow, localClaudeFastMode, @@ -2008,6 +2014,24 @@ export function ConnectionEditor() { )} + {localProvider === "image_generation" && ( + } + help={localizeUi("ui.connections.connectioneditor.imagePromptingInstructionsHelp")} + > +