[PR #7993] [MERGED] feat(video): Generated Videos and the Video Run Interval for Conversation characters and the Roleplay Illustrator #8046

Closed
opened 2026-10-24 04:09:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7993
Author: @JamesMowery
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/illustrator-video-run-interval


📝 Commits (10+)

  • 1d59618 feat(video): Generated Videos for Conversation characters and the Illustrator
  • 5bfdb3e feat(video): a Videos entry in the Conversation command lists
  • cd604e6 fix(video): a character's [video] reads the recent conversation
  • af3a7c9 fix(video): automatic clips that name the persona show in their gallery
  • 65ba5c5 fix(video): review fixes for Generated Videos
  • 8c73227 fix(video): keep showing pictures and tearing down after one step fails
  • f6c834e fix(video): automatic clips name a message only when they landed on it
  • 540a4aa fix(video): no filler clip when Illustrator doesn't say how it moves
  • 5a3ad1a feat(video): the Roleplay Clip Director, for clips with no picture of their own
  • abe77cb fix(video): every Roleplay and Conversation clip follows Video Prompting Instructions

📊 Changes

46 files changed (+4025 additions, -250 deletions)

View changed files

📝 docs/agents/built-in-agents.md (+1 -1)
📝 docs/conversation/selfies.md (+7 -0)
📝 docs/media/illustrator-agent.md (+33 -4)
📝 docs/media/scene-video.md (+2 -0)
📝 e2e/illustrator-manual-cadence.e2e.ts (+1 -1)
📝 packages/client/src/components/agents/AgentEditor.tsx (+42 -1)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+157 -21)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+20 -12)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+35 -0)
📝 packages/client/src/hooks/use-generate.ts (+64 -2)
📝 packages/client/src/lib/agent-cadence.ts (+1 -1)
📝 packages/client/src/lib/settings-registry.ts (+10 -0)
📝 packages/client/src/localization/locales/en.json (+25 -0)
📝 packages/server/src/routes/chats.routes.ts (+4 -0)
📝 packages/server/src/routes/gallery.routes.ts (+8 -1)
📝 packages/server/src/routes/generate.routes.ts (+449 -76)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+273 -95)
📝 packages/server/src/services/agents/agent-executor.ts (+16 -0)
📝 packages/server/src/services/conversation/character-commands.ts (+61 -1)
📝 packages/server/src/services/generation/agent-cadence.ts (+127 -1)

...and 26 more files

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Note

#7860 and #7863 together, as asked. Both were closed for the 2.5.1 release with a request to bring them back after it, with the review fixes. This is the #7863 branch (which already contained #7860) merged with the current staging (4d2932c05), plus the fixes listed under Review fixes below.

Linked issue

Closes #7992
Part of #7545 (item 6 of 8). Replaces #7860 (#7859) and #7863 (#7862). @SpicyMarinara

Why this change

  • Videos only happened when you asked for one. In Conversation a character could send a selfie on its own but never a video message.
  • In Roleplay, Illustrator drew pictures on its own but could never make a short clip, even for a moment where motion is the point (a fight, a chase, something breaking), and there was no way to have clips instead of pictures.
  • Clips made on their own need limits: each is a video request that can take minutes and cost money or GPU time. With Clips only, Illustrator was paced only by the image interval, and in a group chat only the first character's [video] was made and the rest were dropped silently.

What changed

Nothing that worked before stops working: Generated Videos starts off, Illustrator makes starts on Pictures, and the interval Illustrator already had is now labeled Image Run Interval and behaves as before.

Conversation

  • Generated Videos (Chat Settings, Agents, Illustrator Settings, Video messages; off by default, saved in settings profiles): characters can send a video message on their own with a hidden [video] command when it fits. The same switch appears as Videos in the Commands list of the new-chat setup and Chat Settings.
  • A bare [video] is written from the recent conversation, as /video is, so a clip you asked for shows what you asked for.
  • A [video: …] description of any length is read, brackets of its own included ([Shot 1] …); one over 2,000 characters is shortened by the Prompt Model, or cut at 2,000 if that fails. A tag that never closes makes no clip and is hidden to the end of its line.
  • A clip that names you describes you (your persona, or a character you play as who is not one of the chat's characters), and a clip that names your persona is listed in your persona's gallery.

Roleplay (Chat Settings, Agents, Illustrator)

  • Illustrator makes: Pictures (the default), Pictures and clips (Illustrator may turn the picture it just made into a short clip when motion is the point; it is skipped when Illustrator doesn't say how the scene moves), or Clips only (a clip instead of every picture; the picture is the clip's starting frame and goes to the Gallery, and is shown instead if the clip fails). Custom agents that create images follow the same setting.
  • First frame is shown in Roleplay too: a new Illustrator picture, the avatar or sprite, the picture with the avatar as fallback, or no picture. With Clips only and the avatar or no picture, no picture is drawn at all. With no First frame chosen, a clip never draws a picture just for itself.
  • Send Avatar References becomes a dropdown with a Videos choice: a Prompt only clip then starts from the avatar, and First frame reads Prompt only (avatar from Send Avatar References). Use agent default resets both halves.
  • A clip with no picture of its own is written by a new Roleplay Clip Director prompt (Settings, Generations, Video Generation Prompt Overrides), describing everyone it names, your persona included.
  • Re-running Illustrator on a reply (its Illustrate button) follows Illustrator makes and First frame too. Before, a re-run only ever drew a picture.
  • Without a working video connection, Illustrator makes pictures, even with Clips only, and is not offered clips.

Limits (only for clips the AI makes on its own, never ones you ask for)

  • Video Run Interval: how many user and assistant messages must pass after an automatic clip before the next.
    • Conversation: in Chat Settings, Video messages, shown once Generated Videos is on.
    • Roleplay: on the Illustrator card, shown once Illustrator makes includes clips. With Clips only it paces Illustrator itself and the Image Run Interval is hidden.
    • Default on the Illustrator card's Open Setup screen (5 when unset); 0 stops automatic clips. Saved in settings profiles.
    • Never limits /video, the Gallery's Video and Animate, or a message's Illustrate button.
    • A clip is only offered to the AI when one may be made now, so a character isn't told to send a clip that would then be refused.
    • Counted over the whole chat, even when a short context window hides the last clip, and from when a clip starts rather than when it finishes minutes later. Replies that arrive while a clip renders can't start another, two replies finishing together can't both start one, and a clip that fails gives the interval back.
    • Swiping a reply that got a clip counts as a new reply, so the new swipe can get its own clip.
  • Videos per reply (Settings, Generations, Video Generation; 1 to 10, default 3; findable in Settings search): how many clips one reply gets, one per Conversation character. It exists for group chats and for asking for several videos at once; lowering it saves video requests. Clips past it are skipped and logged, and a failed clip gives its place back.
  • The storyteller's [illustrate] clips (Clips only, or Pictures and clips) go through the same interval check and count toward Videos per reply; one held back shows its picture instead.

Every clip

  • Follows the video connection's Video Prompting Instructions: format, fields, line breaks, and a JSON shape they ask for. When the instructions speak to appearance, it is built into the prompt.
  • A saved clip always counts as made: if adding it to the reply fails, it stays in the Gallery with a "saved to the Gallery's Videos tab" toast, and no error or stand-in picture.
  • A reply whose only remaining work is a clip lets the next message start (video_started / video_skipped), as a pending picture does.
  • Pressing Stop reaches the clips: the queue wait, the Clip Director call, the first frame and the video request. A stopped clip shows no error.

Code: the clip pieces shared by a fresh reply and a re-run (who a clip shows, its prompt, the clip offer to Illustrator) live in services/video/roleplay-illustrator-clips.ts; the <optional_video> offer text is shared by the Illustrator agent and the Illustrate planner; the interval claim is claimAutomaticVideoRun in services/generation/agent-cadence.ts.

Docs: docs/agents/built-in-agents.md, docs/conversation/selfies.md, docs/media/illustrator-agent.md and docs/media/scene-video.md.

Review fixes (from #7860 and #7863)

  • Land with #7863: one PR now.
  • Avatar first frame with short names (bc855b069): the first name is resolved on its own with reference images, so "Lena" finds "Dr. Lena Kowalski"; roleplay-clip-first-frame covers a multi-word card name.
  • Stop reaching the clips (bc855b069): the agent signal goes to createRoleplayClipTools, animateGalleryImage, generateRoleplayClip (new signal) and startConversationVideoCommand / generateConversationVideo; the re-run passes its own signal. It is checked up to the provider request and passed to it.
  • [illustrate] clips skipping the interval (bc855b069, 97a714760): both paths go through claimRoleplayClip (the interval claim with the same allowed check as automatic clips, plus the Videos per reply cap); a refused one draws its picture. roleplay-clip-first-frame is updated.
  • The UI test the new input trips (bc855b069): the Image Run Interval input has its own aria-label, and e2e/illustrator-manual-cadence.e2e.ts uses getByRole("spinbutton", { name: "Image Run Interval" }). Not run locally (see Validation).
  • agent-cadence.ts catch: returns null when allowed was passed, so a refused clip can't slip through on a write error.
  • Docs pointer: illustrator-agent.md names the Illustrator card's Open Setup screen.

Dottore review fixes (2026-10-22)

  • A clip animated from a picture is filed under the picture's cast (and the persona), not the whole chat, on a fresh reply and an Illustrate re-run.
  • Conversation [video] is offered only when the chat has a usable video connection (hasChatVideoConnection), as [selfie] needs an image connection.
  • A Conversation clip that fails gives back its Videos per reply slot and its character's one clip.
  • An Illustrate re-run reads the chat settings it already parsed safely, so malformed metadata can't end the run.
  • Only a JSON shape the video connection's instructions ask for (they name JSON or show an object) becomes a clip's prompt; a stray object such as an error payload doesn't.
  • built-in-agents.md names Illustrator makes for Roleplay clips; one shared isConversationCommandToggleOn holds the Videos opt-in rule.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • 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

Automated runs on 2026-10-21, Node 24.21.0:

  • On cb908755a (staging 4d2932c05 merged in, no conflicts):
    • pnpm check: passes. Its one lint warning, in HomeProfessorMariChat.tsx, is not from this PR.
    • pnpm localization:check: passes.
    • Full pnpm regression: 960/960 pass.
  • On d6be94a30 (local CodeRabbit fixes): pnpm check passes; agent-generated-videos, illustrator-video-run-interval, roleplay-clip-first-frame, convo-video-command, capability-gm-verbs and prompt pass.
  • Regressions added by this PR, through the real routes with fake text, image and ComfyUI services:
    • agent-generated-videos: Conversation [video] on and off, the bare [video], bracketed and unclosed tags, Pictures and clips and Clips only, a failed clip showing its picture, a saved-but-unattached clip counting as made, persona tagging, a character played as the user, appearance built in when the instructions ask for it, Videos per reply and long descriptions.
    • roleplay-clip-first-frame: the First frame choices, a short name finding its card's avatar, Send Avatar References for videos, the Clip Director and instruction-shaped answers, no working video connection, re-running Illustrator, and [illustrate] clips inside and after the interval.
    • illustrator-video-run-interval: both intervals, a short context window, agent default and chat override, 0, swipes, and the interval claim (racing replies, clips sharing one message, a failed write).
    • The new checks fail without their fixes.
  • Local CodeRabbit (CLI) on the whole branch against staging 4d2932c05: 11 findings.
    • Fixed in d6be94a30: a stopped Roleplay clip reported as a 502 "failed to plan" and a video_error (two findings); a re-run whose clip failed ending with "Agent retry completed"; debug mode not logging the text sent to be shortened; the Video Run Interval paragraph in illustrator-agent.md split into a list.
    • Declined: 16px text on phones for the new number input and selects, and making the globals.css touch-screen rule 16px (three findings). That rule already sets inputs and selects to 1rem under @media (pointer: coarse); it falls short only with a smaller app font size, which affects every input in the app, not this PR. Declined: tryParseJsonRecord throwing in resolveRoleplayVideoDirection, because repairJsonText only returns text JSON.parse already accepted. Declined: splitting two docs paragraphs that are already short sentences.
    • A second review of d6be94a30: 0 findings.
  • Not run: e2e/illustrator-manual-cadence.e2e.ts and the rest of pnpm regression:ui / pnpm smoke:ui. Playwright's Chromium download from cdn.playwright.dev times out on this machine, so the spec the review asked to run is left to CI or a manual run.

Manual verification notes

  • Manually run pnpm exec playwright test e2e/illustrator-manual-cadence.e2e.ts and confirm it passes.
  • Manually verify in a Conversation chat: turn on Generated Videos (or Videos in Commands), ask a character for a video, and check the clip lands on their reply; with it off, no clip arrives and /video still works.
  • Manually verify a clip that names your persona lists in your persona's gallery, and with Attach Card Appearance on Videos, its prompt carries your appearance.
  • Manually verify Conversation with Video Run Interval 3: a clip, then no clip on the next reply, then clips again after three messages; with 0, no automatic clips while /video and the Gallery's Video button still work.
  • Manually verify a group Conversation with Videos per reply on 3: asking everyone for a video gives up to three clips, one per character; on 1, only one.
  • Manually verify Roleplay Pictures and clips: an action moment gives a picture, then a clip on the same reply; pictures keep the Image Run Interval while clips keep the Video Run Interval.
  • Manually verify Clips only with First frame New Illustrator picture (clip in the reply, picture in the Gallery only), then Avatar with a character addressed by a short name, and Prompt only (no picture drawn).
  • Manually verify Clips only with Video Run Interval 0: a storyteller [illustrate] gives its picture, not a clip, while a message's Illustrate button still makes a clip.
  • Manually verify pressing Stop while a Roleplay clip is waiting or being written cancels it with no error toast.
  • Manually verify Clips only with no working video connection gives pictures and no error.
  • Manually verify swiping a reply that got a clip gives the new swipe its own clip and keeps the old one.
  • Manually verify a connection whose Video Prompting Instructions ask for a multi-field or JSON format keeps that format in the prompt sent.
  • Manually verify the new settings at phone width and in light and dark mode.

Docs and release impact

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

English docs updated: docs/agents/built-in-agents.md, docs/conversation/selfies.md, docs/media/illustrator-agent.md, docs/media/scene-video.md. Translations: #7994. The Marinara-Agents README follow-up: Pasta-Devs/Marinara-Agents#1492.

UI evidence (if applicable)

From #7860 and #7863 (taken 2026-10-19; the settings are unchanged since).

Roleplay mode illustrator agent additions

Screenshot from 2026-10-19 17-21-01 Screenshot from 2026-10-19 17-21-38

"Pictures and Clips" illustrator setting demo

Screenshot from 2026-10-19 19-02-57

(Note: I did not have an I2V workflow activated here in ComfyUI, thus the visual difference between the image and video.)

"Clips Only" illustrator settings demo

Screenshot from 2026-10-19 18-46-46

Videos command toggle

Screenshot from 2026-10-19 19-08-27

Convo mode: requesting a clip with Videos toggle enabled

Screenshot from 2026-10-19 19-11-26

Convo mode: requesting a clip with Videos toggle disabled (reverts to image)

Screenshot from 2026-10-19 19-15-14

Videos per reply setting in Settings

Screenshot from 2026-10-19 21-10-58 Screenshot from 2026-10-19 21-11-10

Video Run Interval and renamed Image Run Interval

Screenshot from 2026-10-19 21-11-52 Screenshot from 2026-10-19 21-12-17

Videos per reply setting at default (3)

Screenshot from 2026-10-19 21-29-56

Videos per reply setting set to 2

Screenshot from 2026-10-19 21-34-40

🤖 Generated with Claude Code


🔄 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/7993 **Author:** [@JamesMowery](https://github.com/JamesMowery) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/illustrator-video-run-interval` --- ### 📝 Commits (10+) - [`1d59618`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1d59618fbd04937a43f16771db9828db7b536e63) feat(video): Generated Videos for Conversation characters and the Illustrator - [`5bfdb3e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5bfdb3e85abe9f7ce2ffdf86112c904984cba701) feat(video): a Videos entry in the Conversation command lists - [`cd604e6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd604e683f5b14feac41301133e735d11d73a1d2) fix(video): a character's [video] reads the recent conversation - [`af3a7c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/af3a7c98f3b0f7d186e7ee6caab47e9bf3acfeed) fix(video): automatic clips that name the persona show in their gallery - [`65ba5c5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/65ba5c5c91df9c888e5356f0ec5a2325fd9dd40a) fix(video): review fixes for Generated Videos - [`8c73227`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8c73227614cc94df052770c8a432a03c87bb1e8a) fix(video): keep showing pictures and tearing down after one step fails - [`f6c834e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f6c834e244dfc0a631eac35dbf6c00aab31f4e26) fix(video): automatic clips name a message only when they landed on it - [`540a4aa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/540a4aacd9598727fa8445a50b7a8c37f4262d76) fix(video): no filler clip when Illustrator doesn't say how it moves - [`5a3ad1a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5a3ad1a82e3cb7a969aec61a5b95b5234bfe9c1f) feat(video): the Roleplay Clip Director, for clips with no picture of their own - [`abe77cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/abe77cb4e9e98cede344222f45630916b89021bb) fix(video): every Roleplay and Conversation clip follows Video Prompting Instructions ### 📊 Changes **46 files changed** (+4025 additions, -250 deletions) <details> <summary>View changed files</summary> 📝 `docs/agents/built-in-agents.md` (+1 -1) 📝 `docs/conversation/selfies.md` (+7 -0) 📝 `docs/media/illustrator-agent.md` (+33 -4) 📝 `docs/media/scene-video.md` (+2 -0) 📝 `e2e/illustrator-manual-cadence.e2e.ts` (+1 -1) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+42 -1) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+157 -21) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+20 -12) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+35 -0) 📝 `packages/client/src/hooks/use-generate.ts` (+64 -2) 📝 `packages/client/src/lib/agent-cadence.ts` (+1 -1) 📝 `packages/client/src/lib/settings-registry.ts` (+10 -0) 📝 `packages/client/src/localization/locales/en.json` (+25 -0) 📝 `packages/server/src/routes/chats.routes.ts` (+4 -0) 📝 `packages/server/src/routes/gallery.routes.ts` (+8 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+449 -76) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+273 -95) 📝 `packages/server/src/services/agents/agent-executor.ts` (+16 -0) 📝 `packages/server/src/services/conversation/character-commands.ts` (+61 -1) 📝 `packages/server/src/services/generation/agent-cadence.ts` (+127 -1) _...and 26 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`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> > [!NOTE] > **#7860 and #7863 together, as asked.** Both were closed for the 2.5.1 release with a request to bring them back after it, with the review fixes. This is the #7863 branch (which already contained #7860) merged with the current `staging` (`4d2932c05`), plus the fixes listed under **Review fixes** below. ## Linked issue Closes #7992 Part of #7545 (item 6 of 8). Replaces #7860 (#7859) and #7863 (#7862). @SpicyMarinara ## Why this change - Videos only happened when you asked for one. In Conversation a character could send a selfie on its own but never a video message. - In Roleplay, Illustrator drew pictures on its own but could never make a short clip, even for a moment where motion is the point (a fight, a chase, something breaking), and there was no way to have clips instead of pictures. - Clips made on their own need limits: each is a video request that can take minutes and cost money or GPU time. With **Clips only**, Illustrator was paced only by the image interval, and in a group chat only the first character's `[video]` was made and the rest were dropped silently. ## What changed Nothing that worked before stops working: **Generated Videos** starts off, **Illustrator makes** starts on **Pictures**, and the interval Illustrator already had is now labeled **Image Run Interval** and behaves as before. **Conversation** - **Generated Videos** (Chat Settings, Agents, Illustrator Settings, Video messages; off by default, saved in settings profiles): characters can send a video message on their own with a hidden `[video]` command when it fits. The same switch appears as **Videos** in the Commands list of the new-chat setup and Chat Settings. - A bare `[video]` is written from the recent conversation, as `/video` is, so a clip you asked for shows what you asked for. - A `[video: …]` description of any length is read, brackets of its own included (`[Shot 1] …`); one over 2,000 characters is shortened by the Prompt Model, or cut at 2,000 if that fails. A tag that never closes makes no clip and is hidden to the end of its line. - A clip that names you describes you (your persona, or a character you play as who is not one of the chat's characters), and a clip that names your persona is listed in your persona's gallery. **Roleplay** (Chat Settings, Agents, Illustrator) - **Illustrator makes**: **Pictures** (the default), **Pictures and clips** (Illustrator may turn the picture it just made into a short clip when motion is the point; it is skipped when Illustrator doesn't say how the scene moves), or **Clips only** (a clip instead of every picture; the picture is the clip's starting frame and goes to the Gallery, and is shown instead if the clip fails). Custom agents that create images follow the same setting. - **First frame** is shown in Roleplay too: a new Illustrator picture, the avatar or sprite, the picture with the avatar as fallback, or no picture. With **Clips only** and the avatar or no picture, no picture is drawn at all. With no First frame chosen, a clip never draws a picture just for itself. - **Send Avatar References** becomes a dropdown with a Videos choice: a **Prompt only** clip then starts from the avatar, and First frame reads **Prompt only (avatar from Send Avatar References)**. **Use agent default** resets both halves. - A clip with no picture of its own is written by a new **Roleplay Clip Director** prompt (Settings, Generations, Video Generation Prompt Overrides), describing everyone it names, your persona included. - **Re-running Illustrator on a reply** (its **Illustrate** button) follows **Illustrator makes** and **First frame** too. Before, a re-run only ever drew a picture. - Without a working video connection, Illustrator makes pictures, even with **Clips only**, and is not offered clips. **Limits** (only for clips the AI makes on its own, never ones you ask for) - **Video Run Interval**: how many user and assistant messages must pass after an automatic clip before the next. - Conversation: in Chat Settings, Video messages, shown once **Generated Videos** is on. - Roleplay: on the Illustrator card, shown once **Illustrator makes** includes clips. With **Clips only** it paces Illustrator itself and the Image Run Interval is hidden. - Default on the Illustrator card's **Open Setup** screen (5 when unset); **0** stops automatic clips. Saved in settings profiles. - Never limits `/video`, the Gallery's **Video** and **Animate**, or a message's **Illustrate** button. - A clip is only offered to the AI when one may be made now, so a character isn't told to send a clip that would then be refused. - Counted over the whole chat, even when a short context window hides the last clip, and from when a clip starts rather than when it finishes minutes later. Replies that arrive while a clip renders can't start another, two replies finishing together can't both start one, and a clip that fails gives the interval back. - Swiping a reply that got a clip counts as a new reply, so the new swipe can get its own clip. - **Videos per reply** (Settings, Generations, Video Generation; 1 to 10, default 3; findable in Settings search): how many clips one reply gets, one per Conversation character. It exists for group chats and for asking for several videos at once; lowering it saves video requests. Clips past it are skipped and logged, and a failed clip gives its place back. - The storyteller's `[illustrate]` clips (Clips only, or Pictures and clips) go through the same interval check and count toward **Videos per reply**; one held back shows its picture instead. **Every clip** - Follows the video connection's **Video Prompting Instructions**: format, fields, line breaks, and a JSON shape they ask for. When the instructions speak to appearance, it is built into the prompt. - A saved clip always counts as made: if adding it to the reply fails, it stays in the Gallery with a "saved to the Gallery's Videos tab" toast, and no error or stand-in picture. - A reply whose only remaining work is a clip lets the next message start (`video_started` / `video_skipped`), as a pending picture does. - Pressing **Stop** reaches the clips: the queue wait, the Clip Director call, the first frame and the video request. A stopped clip shows no error. **Code**: the clip pieces shared by a fresh reply and a re-run (who a clip shows, its prompt, the clip offer to Illustrator) live in `services/video/roleplay-illustrator-clips.ts`; the `<optional_video>` offer text is shared by the Illustrator agent and the Illustrate planner; the interval claim is `claimAutomaticVideoRun` in `services/generation/agent-cadence.ts`. **Docs**: `docs/agents/built-in-agents.md`, `docs/conversation/selfies.md`, `docs/media/illustrator-agent.md` and `docs/media/scene-video.md`. ### Review fixes (from #7860 and #7863) - **Land with #7863**: one PR now. - **Avatar first frame with short names** (`bc855b069`): the first name is resolved on its own with reference images, so "Lena" finds "Dr. Lena Kowalski"; `roleplay-clip-first-frame` covers a multi-word card name. - **Stop reaching the clips** (`bc855b069`): the agent signal goes to `createRoleplayClipTools`, `animateGalleryImage`, `generateRoleplayClip` (new `signal`) and `startConversationVideoCommand` / `generateConversationVideo`; the re-run passes its own `signal`. It is checked up to the provider request and passed to it. - **`[illustrate]` clips skipping the interval** (`bc855b069`, `97a714760`): both paths go through `claimRoleplayClip` (the interval claim with the same `allowed` check as automatic clips, plus the Videos per reply cap); a refused one draws its picture. `roleplay-clip-first-frame` is updated. - **The UI test the new input trips** (`bc855b069`): the Image Run Interval input has its own `aria-label`, and `e2e/illustrator-manual-cadence.e2e.ts` uses `getByRole("spinbutton", { name: "Image Run Interval" })`. Not run locally (see Validation). - **`agent-cadence.ts` catch**: returns null when `allowed` was passed, so a refused clip can't slip through on a write error. - **Docs pointer**: `illustrator-agent.md` names the Illustrator card's **Open Setup** screen. ### Dottore review fixes (2026-10-22) - A clip animated from a picture is filed under the picture's cast (and the persona), not the whole chat, on a fresh reply and an Illustrate re-run. - Conversation `[video]` is offered only when the chat has a usable video connection (`hasChatVideoConnection`), as `[selfie]` needs an image connection. - A Conversation clip that fails gives back its Videos per reply slot and its character's one clip. - An Illustrate re-run reads the chat settings it already parsed safely, so malformed metadata can't end the run. - Only a JSON shape the video connection's instructions ask for (they name JSON or show an object) becomes a clip's prompt; a stray object such as an error payload doesn't. - `built-in-agents.md` names **Illustrator makes** for Roleplay clips; one shared `isConversationCommandToggleOn` holds the Videos opt-in rule. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [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` Automated runs on 2026-10-21, Node 24.21.0: - On `cb908755a` (`staging` `4d2932c05` merged in, no conflicts): - `pnpm check`: passes. Its one lint warning, in `HomeProfessorMariChat.tsx`, is not from this PR. - `pnpm localization:check`: passes. - Full `pnpm regression`: 960/960 pass. - On `d6be94a30` (local CodeRabbit fixes): `pnpm check` passes; `agent-generated-videos`, `illustrator-video-run-interval`, `roleplay-clip-first-frame`, `convo-video-command`, `capability-gm-verbs` and `prompt` pass. - Regressions added by this PR, through the real routes with fake text, image and ComfyUI services: - `agent-generated-videos`: Conversation `[video]` on and off, the bare `[video]`, bracketed and unclosed tags, Pictures and clips and Clips only, a failed clip showing its picture, a saved-but-unattached clip counting as made, persona tagging, a character played as the user, appearance built in when the instructions ask for it, Videos per reply and long descriptions. - `roleplay-clip-first-frame`: the First frame choices, a short name finding its card's avatar, Send Avatar References for videos, the Clip Director and instruction-shaped answers, no working video connection, re-running Illustrator, and `[illustrate]` clips inside and after the interval. - `illustrator-video-run-interval`: both intervals, a short context window, agent default and chat override, 0, swipes, and the interval claim (racing replies, clips sharing one message, a failed write). - The new checks fail without their fixes. - Local CodeRabbit (CLI) on the whole branch against `staging` `4d2932c05`: 11 findings. - Fixed in `d6be94a30`: a stopped Roleplay clip reported as a 502 "failed to plan" and a `video_error` (two findings); a re-run whose clip failed ending with "Agent retry completed"; debug mode not logging the text sent to be shortened; the Video Run Interval paragraph in `illustrator-agent.md` split into a list. - Declined: 16px text on phones for the new number input and selects, and making the `globals.css` touch-screen rule `16px` (three findings). That rule already sets inputs and selects to `1rem` under `@media (pointer: coarse)`; it falls short only with a smaller app font size, which affects every input in the app, not this PR. Declined: `tryParseJsonRecord` throwing in `resolveRoleplayVideoDirection`, because `repairJsonText` only returns text `JSON.parse` already accepted. Declined: splitting two docs paragraphs that are already short sentences. - A second review of `d6be94a30`: 0 findings. - Not run: `e2e/illustrator-manual-cadence.e2e.ts` and the rest of `pnpm regression:ui` / `pnpm smoke:ui`. Playwright's Chromium download from `cdn.playwright.dev` times out on this machine, so the spec the review asked to run is left to CI or a manual run. ### Manual verification notes - Manually run `pnpm exec playwright test e2e/illustrator-manual-cadence.e2e.ts` and confirm it passes. - Manually verify in a Conversation chat: turn on **Generated Videos** (or **Videos** in Commands), ask a character for a video, and check the clip lands on their reply; with it off, no clip arrives and `/video` still works. - Manually verify a clip that names your persona lists in your persona's gallery, and with Attach Card Appearance on Videos, its prompt carries your appearance. - Manually verify Conversation with Video Run Interval **3**: a clip, then no clip on the next reply, then clips again after three messages; with **0**, no automatic clips while `/video` and the Gallery's **Video** button still work. - Manually verify a group Conversation with **Videos per reply** on 3: asking everyone for a video gives up to three clips, one per character; on 1, only one. - Manually verify Roleplay **Pictures and clips**: an action moment gives a picture, then a clip on the same reply; pictures keep the Image Run Interval while clips keep the Video Run Interval. - Manually verify **Clips only** with First frame **New Illustrator picture** (clip in the reply, picture in the Gallery only), then **Avatar** with a character addressed by a short name, and **Prompt only** (no picture drawn). - Manually verify Clips only with Video Run Interval **0**: a storyteller `[illustrate]` gives its picture, not a clip, while a message's **Illustrate** button still makes a clip. - Manually verify pressing **Stop** while a Roleplay clip is waiting or being written cancels it with no error toast. - Manually verify Clips only with no working video connection gives pictures and no error. - Manually verify swiping a reply that got a clip gives the new swipe its own clip and keeps the old one. - Manually verify a connection whose Video Prompting Instructions ask for a multi-field or JSON format keeps that format in the prompt sent. - Manually verify the new settings at phone width and in light and dark mode. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) English docs updated: `docs/agents/built-in-agents.md`, `docs/conversation/selfies.md`, `docs/media/illustrator-agent.md`, `docs/media/scene-video.md`. Translations: #7994. The Marinara-Agents README follow-up: Pasta-Devs/Marinara-Agents#1492. ## UI evidence (if applicable) From #7860 and #7863 (taken 2026-10-19; the settings are unchanged since). ### Roleplay mode illustrator agent additions <img width="1058" height="850" alt="Screenshot from 2026-10-19 17-21-01" src="https://github.com/user-attachments/assets/2acea0a1-8ec3-43a8-abac-28a02acdb745" /> <img width="1058" height="850" alt="Screenshot from 2026-10-19 17-21-38" src="https://github.com/user-attachments/assets/7ae9abec-bcdf-4987-adff-25112398e1e9" /> ### "Pictures and Clips" illustrator setting demo <img width="1171" height="1299" alt="Screenshot from 2026-10-19 19-02-57" src="https://github.com/user-attachments/assets/1fcc646b-2f93-4b4d-91b5-82df7060296b" /> (Note: I did not have an I2V workflow activated here in ComfyUI, thus the visual difference between the image and video.) ### "Clips Only" illustrator settings demo <img width="1171" height="1299" alt="Screenshot from 2026-10-19 18-46-46" src="https://github.com/user-attachments/assets/12834bef-0e3d-48af-923f-519f963e6011" /> ### Videos command toggle <img width="1171" height="1299" alt="Screenshot from 2026-10-19 19-08-27" src="https://github.com/user-attachments/assets/8e8b9b7c-a548-40a4-8db6-6cfaab4544fd" /> ### Convo mode: requesting a clip with Videos toggle enabled <img width="1171" height="1299" alt="Screenshot from 2026-10-19 19-11-26" src="https://github.com/user-attachments/assets/e7e01c80-0d13-4852-b472-a51809cae63b" /> ### Convo mode: requesting a clip with Videos toggle **disabled** (reverts to image) <img width="1171" height="1299" alt="Screenshot from 2026-10-19 19-15-14" src="https://github.com/user-attachments/assets/c0e21996-f545-4581-a285-67219cd63280" /> ### Videos per reply setting in Settings <img width="1185" height="1303" alt="Screenshot from 2026-10-19 21-10-58" src="https://github.com/user-attachments/assets/c286bb1c-fee4-4b10-bf4c-07c50fb13bd8" /> <img width="1185" height="1303" alt="Screenshot from 2026-10-19 21-11-10" src="https://github.com/user-attachments/assets/c30beafa-763b-432c-8a20-fbee7641f5f9" /> ### Video Run Interval and renamed Image Run Interval <img width="1185" height="1303" alt="Screenshot from 2026-10-19 21-11-52" src="https://github.com/user-attachments/assets/8eabde14-8ba1-4068-8d63-4978fbe00276" /> <img width="1185" height="1303" alt="Screenshot from 2026-10-19 21-12-17" src="https://github.com/user-attachments/assets/0a70d48b-f84e-4838-b718-a0d7b5de774d" /> ### Videos per reply setting at default (3) <img width="1185" height="1303" alt="Screenshot from 2026-10-19 21-29-56" src="https://github.com/user-attachments/assets/4c6d7f27-abb8-49a7-9777-c5943e95d4c7" /> ### Videos per reply setting set to 2 <img width="1185" height="1303" alt="Screenshot from 2026-10-19 21-34-40" src="https://github.com/user-attachments/assets/42c950a9-aae7-4b8b-8f32-e8032cb91ec6" /> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:09:55 +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#8046
No description provided.