[PR #40] [MERGED] feat: Add Quick Connection & Persona Switchers to chat input #4410

Closed
opened 2026-10-22 04:07:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/40
Author: @LukaTheHero
Created: 4/1/2026
Status: ✅ Merged
Merged: 4/1/2026
Merged by: @SpicyMarinara

Base: main ← Head: feature/quick-switchers


📝 Commits (1)

  • 571d9f4 feat: add Quick Connection and Persona switchers to chat input

📊 Changes

5 files changed (+608 additions, -0 deletions)

View changed files

📝 packages/client/src/components/chat/ChatInput.tsx (+13 -0)
📝 packages/client/src/components/chat/ConversationInput.tsx (+11 -0)
➕ packages/client/src/components/chat/QuickConnectionSwitcher.tsx (+132 -0)
➕ packages/client/src/components/chat/QuickPersonaSwitcher.tsx (+178 -0)
➕ packages/client/src/components/chat/QuickSwitcherMobile.tsx (+274 -0)

📄 Description

Summary

Adds inline Quick Switcher components to the chat input area for both Roleplay and Conversation modes, allowing users to change the active connection or persona without opening Chat Settings.

New Files

  • QuickConnectionSwitcher.tsx — Link icon button that opens a dropdown to switch API connections. Includes a "Random" option. Shows ✓ next to the active connection.
  • QuickPersonaSwitcher.tsx — Circular avatar button that opens a dropdown to switch personas. Shows avatar, name, and comment for each persona. Includes a "None" option.
  • QuickSwitcherMobile.tsx — Mobile-only chevron button that opens a single tabbed menu combining both Connections and Personas. Menu aligns to the input box edges for a clean mobile UI.

Modified Files

  • ChatInput.tsx — Added switchers to the roleplay input bar. Desktop shows both inline; mobile shows the combined chevron.
  • ConversationInput.tsx — Added switchers to the conversation input bar. Same desktop/mobile behavior.

Desktop vs Mobile

  • Desktop (≥640px): Connection (🔗) and Persona (avatar) buttons shown inline next to the attach button
  • Mobile (<640px): Single chevron (▲) button that opens a tabbed dropdown with both Connections and Personas tabs. Menu width matches the input box width and aligns to its edges.

Technical Details

  • Uses existing useConnections(), usePersonas(), useUpdateChat(), and useChat() hooks
  • Proper React Query cache invalidation — no page reload needed
  • Menus use position: fixed with dynamic positioning above the trigger
  • Click outside to close
  • Fully typed with TypeScript
  • Responsive via Tailwind hidden sm:flex / sm:hidden breakpoints

🔄 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/40 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/1/2026 **Status:** ✅ Merged **Merged:** 4/1/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `feature/quick-switchers` --- ### 📝 Commits (1) - [`571d9f4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/571d9f45e62c563a657af3f0998d93585b9526a3) feat: add Quick Connection and Persona switchers to chat input ### 📊 Changes **5 files changed** (+608 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatInput.tsx` (+13 -0) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+11 -0) ➕ `packages/client/src/components/chat/QuickConnectionSwitcher.tsx` (+132 -0) ➕ `packages/client/src/components/chat/QuickPersonaSwitcher.tsx` (+178 -0) ➕ `packages/client/src/components/chat/QuickSwitcherMobile.tsx` (+274 -0) </details> ### 📄 Description ## Summary Adds inline Quick Switcher components to the chat input area for both Roleplay and Conversation modes, allowing users to change the active connection or persona without opening Chat Settings. ## New Files - **`QuickConnectionSwitcher.tsx`** — Link icon button that opens a dropdown to switch API connections. Includes a "Random" option. Shows ✓ next to the active connection. - **`QuickPersonaSwitcher.tsx`** — Circular avatar button that opens a dropdown to switch personas. Shows avatar, name, and comment for each persona. Includes a "None" option. - **`QuickSwitcherMobile.tsx`** — Mobile-only chevron button that opens a single tabbed menu combining both Connections and Personas. Menu aligns to the input box edges for a clean mobile UI. ## Modified Files - **`ChatInput.tsx`** — Added switchers to the roleplay input bar. Desktop shows both inline; mobile shows the combined chevron. - **`ConversationInput.tsx`** — Added switchers to the conversation input bar. Same desktop/mobile behavior. ## Desktop vs Mobile - **Desktop (≥640px):** Connection (🔗) and Persona (avatar) buttons shown inline next to the attach button - **Mobile (<640px):** Single chevron (▲) button that opens a tabbed dropdown with both Connections and Personas tabs. Menu width matches the input box width and aligns to its edges. ## Technical Details - Uses existing `useConnections()`, `usePersonas()`, `useUpdateChat()`, and `useChat()` hooks - Proper React Query cache invalidation — **no page reload needed** - Menus use `position: fixed` with dynamic positioning above the trigger - Click outside to close - Fully typed with TypeScript - Responsive via Tailwind `hidden sm:flex` / `sm:hidden` breakpoints --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07:21 +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#4410
No description provided.