[PR #4842] [MERGED] Add image prompt instructions to connections #6515

Closed
opened 2026-10-23 04:11:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4842
Author: @snpNEXT
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/10/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/capability-image-prompt-hints


📝 Commits (9)

  • a00f4ba Add image prompt instructions to connections
  • ec8a8e3 Clarify
  • be35ad1 Address code review
  • daf3a12 Address code review comments
  • b8170a5 Fix per-agent image prompt instructions
  • 69343ed Raise limit, I can't fit my 6k characters instructions in
  • 177a6e6 Address image prompt review follow-ups
  • 0c658a3 Merge branch 'staging' into feat/capability-image-prompt-hints
  • 74260f5 Merge branch 'staging' into feat/capability-image-prompt-hints

📊 Changes

23 files changed (+280 additions, -38 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+27 -0)
📝 packages/client/src/hooks/use-connections.ts (+1 -0)
📝 packages/client/src/lib/connection-transfer.ts (+10 -1)
📝 packages/client/src/localization/locales/en.json (+3 -0)
📝 packages/server/src/db/schema/connections.ts (+2 -0)
📝 packages/server/src/routes/gallery.routes.ts (+7 -2)
📝 packages/server/src/routes/game.routes.ts (+5 -4)
📝 packages/server/src/routes/generate.routes.ts (+35 -3)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+77 -5)
📝 packages/server/src/services/agents/agent-executor.ts (+32 -7)
📝 packages/server/src/services/agents/agent-pipeline.ts (+32 -10)
📝 packages/server/src/services/game/game-asset-generation.ts (+3 -2)
📝 packages/server/src/services/generation/conversation-selfie-command-runtime.ts (+6 -1)
📝 packages/server/src/services/generation/illustrator-manual-prompt-generation.ts (+6 -0)
📝 packages/server/src/services/generation/illustrator-prompt-runtime.ts (+1 -0)
➕ packages/server/src/services/generation/image-prompt-instructions.ts (+8 -0)
📝 packages/server/src/services/sidecar/scene-analyzer.ts (+3 -2)
📝 packages/server/src/services/storage/connections.storage.ts (+5 -0)
📝 packages/shared/src/constants/defaults.ts (+9 -0)

...and 3 more files

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.

Linked issue

Closes N/A (No target issue in mind, will look and edit this if I find one)

Why this change

  • Allow image-generation connections to define provider-specific prompt instructions.
  • Apply those instructions through existing prompt-writing paths without sending the instruction block directly to image providers.

This allows any finnicky local model to basically work at all, as the default image prompt controls aren't local friendly, and provide limited control per connection. Personally, I found this feature to be a MUST HAVE, I've been using it on my local fork for months and months before finally deciding I really should be contributing back.

What changed

  • Added imagePromptInstructions to connection types, schemas, persistence, transfer, and the connection editor.
  • Added localized connection-editor copy.
  • Applied the instructions to selfie and Illustrator prompt generation.
  • Preserved the setting through gallery and agent retry generation paths.
  • Added a changelog entry.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue (Yeah I couldn't get the docker container to work even prior to my changes so I was unable to check this, not sure what I did wrong!!! sorry!)
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm check passed locally.
  • Selfie and roleplay image-generation flows were manually exercised.
  • Isolated runtime data was used to verify connections and encrypted API keys were preserved.
  • Asides from the minimal new addition to options (works on desktop and mobile), no UI changes were made.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

image

Summary by CodeRabbit

  • New Features

    • Added optional image-prompting instructions for image connections.
    • Users can configure, edit, save, duplicate, import, and export these instructions.
    • Instructions now support selfie, Illustrator, custom image-generation, and game asset workflows.
    • Added guidance text and an example placeholder.
  • Bug Fixes

    • Trimmed and limited instructions to 20,000 characters.
    • Restricted instructions to image-producing agents.
    • Preserved configured image connections and instructions during retries.
  • Documentation

    • Added an Unreleased changelog entry for image-prompting instructions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4842 **Author:** [@snpNEXT](https://github.com/snpNEXT) **Created:** 8/10/2026 **Status:** ✅ Merged **Merged:** 8/10/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/capability-image-prompt-hints` --- ### 📝 Commits (9) - [`a00f4ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a00f4ba1fad8310b08b3a9614e83fd4ddef067b2) Add image prompt instructions to connections - [`ec8a8e3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ec8a8e3e98d36b82d7629a277790b08f0b098dfb) Clarify - [`be35ad1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/be35ad112bac0f64ed75ade604607916c6ff4065) Address code review - [`daf3a12`](https://github.com/Pasta-Devs/Marinara-Engine/commit/daf3a12d1eb4850219bd701270e39b1d662b11ce) Address code review comments - [`b8170a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b8170a59a743f779507c0c70dd381feba5229906) Fix per-agent image prompt instructions - [`69343ed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/69343ed51eb5c5dfc4c3bbda4f0bce98ca62902a) Raise limit, I can't fit my 6k characters instructions in - [`177a6e6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/177a6e6f06b4d6d4111d585ba128f12c2e68e3a5) Address image prompt review follow-ups - [`0c658a3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0c658a3067d5fdae6c94a00b65272baa9ba70b90) Merge branch 'staging' into feat/capability-image-prompt-hints - [`74260f5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/74260f5c90605e498fe433c911a7672a1bce77cf) Merge branch 'staging' into feat/capability-image-prompt-hints ### 📊 Changes **23 files changed** (+280 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+27 -0) 📝 `packages/client/src/hooks/use-connections.ts` (+1 -0) 📝 `packages/client/src/lib/connection-transfer.ts` (+10 -1) 📝 `packages/client/src/localization/locales/en.json` (+3 -0) 📝 `packages/server/src/db/schema/connections.ts` (+2 -0) 📝 `packages/server/src/routes/gallery.routes.ts` (+7 -2) 📝 `packages/server/src/routes/game.routes.ts` (+5 -4) 📝 `packages/server/src/routes/generate.routes.ts` (+35 -3) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+77 -5) 📝 `packages/server/src/services/agents/agent-executor.ts` (+32 -7) 📝 `packages/server/src/services/agents/agent-pipeline.ts` (+32 -10) 📝 `packages/server/src/services/game/game-asset-generation.ts` (+3 -2) 📝 `packages/server/src/services/generation/conversation-selfie-command-runtime.ts` (+6 -1) 📝 `packages/server/src/services/generation/illustrator-manual-prompt-generation.ts` (+6 -0) 📝 `packages/server/src/services/generation/illustrator-prompt-runtime.ts` (+1 -0) ➕ `packages/server/src/services/generation/image-prompt-instructions.ts` (+8 -0) 📝 `packages/server/src/services/sidecar/scene-analyzer.ts` (+3 -2) 📝 `packages/server/src/services/storage/connections.storage.ts` (+5 -0) 📝 `packages/shared/src/constants/defaults.ts` (+9 -0) _...and 3 more files_ </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Open a feature request before submitting, then replace this with `Closes #...`. --> Closes N/A (No target issue in mind, will look and edit this if I find one) ## Why this change - Allow image-generation connections to define provider-specific prompt instructions. - Apply those instructions through existing prompt-writing paths without sending the instruction block directly to image providers. This allows any finnicky local model to basically work at all, as the default image prompt controls aren't local friendly, and provide limited control per connection. Personally, I found this feature to be a MUST HAVE, I've been using it on my local fork for months and months before finally deciding I really should be contributing back. ## What changed - Added `imagePromptInstructions` to connection types, schemas, persistence, transfer, and the connection editor. - Added localized connection-editor copy. - Applied the instructions to selfie and Illustrator prompt generation. - Preserved the setting through gallery and agent retry generation paths. - Added a changelog entry. ## Validation - [X] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue (Yeah I couldn't get the docker container to work even prior to my changes so I was unable to check this, not sure what I did wrong!!! sorry!) - [X] Ran the app, clicked through the changes manually - [X] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [X] Above manual verification completed (describe below) - [X] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm check` passed locally. - Selfie and roleplay image-generation flows were manually exercised. - Isolated runtime data was used to verify connections and encrypted API keys were preserved. - Asides from the minimal new addition to options (works on desktop and mobile), no UI changes were made. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <img width="734" height="343" alt="image" src="https://github.com/user-attachments/assets/d27e1b3b-0626-436d-a208-1ac10bb3a0de" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added optional image-prompting instructions for image connections. - Users can configure, edit, save, duplicate, import, and export these instructions. - Instructions now support selfie, Illustrator, custom image-generation, and game asset workflows. - Added guidance text and an example placeholder. - **Bug Fixes** - Trimmed and limited instructions to 20,000 characters. - Restricted instructions to image-producing agents. - Preserved configured image connections and instructions during retries. - **Documentation** - Added an Unreleased changelog entry for image-prompting instructions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:11:08 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6515
No description provided.