mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #263] [MERGED] feat: guide generations with chat input + visible indicator #4533
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#4533
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/263
Author: @LukaTheHero
Created: 4/27/2026
Status: ✅ Merged
Merged: 4/27/2026
Merged by: @LukaTheHero
Base:
main← Head:feat/guide-generations-with-indicator📝 Commits (5)
16e136bfeat: add current input to chat store6154e9afeat: implement option to guide generations with chat input58da0d7fix: fix input unmount race conditions89ae1f0docs: update FRONTEND.md with new store values65577defeat: visible primary-color indicator when guide-generations is armed📊 Changes
14 files changed (+126 additions, -42 deletions)
View changed files
📝
docs/FRONTEND.md(+2 -1)📝
packages/client/src/components/chat/ChatArea.tsx(+9 -2)📝
packages/client/src/components/chat/ChatInput.tsx(+29 -17)📝
packages/client/src/components/chat/ChatMessage.tsx(+13 -2)📝
packages/client/src/components/chat/ChatRoleplaySurface.tsx(+1 -0)📝
packages/client/src/components/chat/ConversationInput.tsx(+24 -17)📝
packages/client/src/components/chat/ConversationMessage.tsx(+13 -2)📝
packages/client/src/components/chat/ConversationView.tsx(+1 -1)📝
packages/client/src/components/panels/SettingsPanel.tsx(+8 -0)📝
packages/client/src/hooks/use-generate.ts(+1 -0)📝
packages/client/src/stores/chat.store.ts(+7 -0)📝
packages/client/src/stores/ui.store.ts(+6 -0)📝
packages/server/src/routes/generate.routes.ts(+11 -0)📝
packages/shared/src/schemas/chat.schema.ts(+1 -0)📄 Description
Why this change
Builds on @mm14141's work in #216. The original PR introduces a great quality-of-life feature — let unsent chat input nudge a regeneration or character-trigger one-shot, without polluting the chat history. Tested it in the test dir and the underlying flow works exactly as advertised.
The only thing missing was a visible signal that the guided state is armed. The original PR ships the indicator via tooltip text (
"Regenerate (guided)"/"Trigger character response (guided)"), which means a user has to hover the button to discover that their typed-but-unsent input is about to be folded into the prompt as a system instruction. For a feature that silently changes generation behavior, that's too easy to miss.This PR keeps mm14141's four commits intact and adds a single commit on top that turns the affected buttons pink when guided is armed.
What changed (on top of #216)
When
guideGenerationsis on AND the chat input has non-empty text, three buttons now render with a primary-color (var(--primary)) tint:ChatMessage.tsx— both desktop and grouped layouts)ConversationMessage.tsx— full and compact layouts)ChatInput.tsx— group RP only)Styling applied to each:
So the icon is pink, the button has a faint pink fill, and a thin pink ring outlines it. Theme-aware via
var(--primary)which is defined for both[data-theme=\"dark\"](#ffb3d9) and[data-theme=\"light\"](#e0709a).When
guideGenerationsis off OR the input is empty, the buttons render in their normal muted styling — zero visual change vs. mm14141's PR. The instant the user starts typing with the toggle on, those buttons light up. Clear the input → they go back to muted.Implementation notes
isGuided = guideGenerations && hasInputflag plus aregenerateGuidedClassstring, and pass it through the existingclassNameextension prop onActionBtn/MsgAction. No new component plumbing required.cn()usestailwind-mergeso the conflict between the basetext-foreground/40and the guidedtext-[var(--primary)]resolves cleanly — no need for!important.ChatInput.tsxTrigger Character button is a custom inline button (notActionBtn), so I added the guided branch directly to itscn(...)ladder, prioritising guided over the existing open/closed states so the pink tint always wins when armed.key={activeChatId}on the input components, the unmount cleanup capture fix, thecurrentInputzustand field) are preserved untouched — those are real bugs his PR catches and they should land alongside the feature.Validation
pnpm checkpasses (TypeScript + ESLint + build, all three workspaces)generationGuidesystem message injection,Take the following into special consideration for your next message: ...) still works as expected — the indicator changes are purely visual.Credit
Original feature work is @mm14141's in #216 — those four commits are preserved on this branch with their authorship intact. This PR only adds a visible indicator on top.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.