mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3879] [MERGED] feat: allow re-running a single custom agent from Chat Settings #6140
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3879
Author: @kh0p
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/rerun-custom-agent📝 Commits (2)
9072211feat: allow re-running a single custom agent from Chat Settings37773a4Merge branch 'staging' into feat/rerun-custom-agent📊 Changes
1 file changed (+22 additions, -0 deletions)
View changed files
📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+22 -0)📄 Description
Linked issue
Closes #3878
Why this change
Custom agents attached to a chat had no way to be manually re-run on the last message. The retry-agents backend (
POST /retry-agents,retry-agents-route.ts) and the client hookuseGenerate().retryAgents(chatId, agentTypes, options)are both already fully generic —resolveActiveRetryAgentTypespermits retrying any agent type present inchatMeta.activeAgentIds, built-in or custom. But every existing UI call site hardcoded a specific agent type (["illustrator"]for the Illustrate button,["lorebook-keeper"]for the Lorebook Keeper's "Backfill Unprocessed" button) or restricted to built-in tracker agents viaisBuiltInTrackerAgentType(the per-tracker refresh buttons in the Roleplay HUD panels). Custom agents had no equivalent.What changed
handleRerunCustomAgent(agentId)inChatSettingsDrawer.tsx, calling the existingretryAgents(chat.id, [agentId]).agentProcessingis true, same convention as the Lorebook Keeper backfill button right above it in the same file.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Applied the equivalent change to a local install running an earlier commit on this branch, rebuilt the client, restarted the server, and opened a real chat with 3 active custom agents (an image-prompt agent and two prose/continuity agents). Confirmed the Custom Agents card in Chat Settings renders one re-run button per agent with the correct name in its title/tooltip, and clicking one fires
POST /retry-agentswith just that agent's type and returns 200, without affecting the other agents or the main assistant message. Disabled/spinner state was verified against the pre-existingagentProcessingflag used identically by the neighboring Lorebook Keeper button in the same file. Becausepnpm/Docker aren't set up in this working copy, I did not additionally runpnpm checkor a container build against this exact diff — the change is a self-contained 22-line addition reusing only symbols (RefreshCw,cn,agentProcessing,retryAgents,useCallback) already imported and used identically elsewhere in the same file, so no new type or lint surface is introduced.Docs and release impact
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.