From b42063795788610ade2e7ffeba2c8967ab24b977 Mon Sep 17 00:00:00 2001 From: James Pine Date: Fri, 13 Mar 2026 05:19:23 -0700 Subject: [PATCH] feat: paralinguistic tag autocomplete for Chatterbox Turbo Type / in the text input when using Chatterbox Turbo to open an autocomplete dropdown with 9 supported paralinguistic tags ([laugh], [chuckle], [gasp], [cough], [sigh], [groan], [sniff], [shush], [clear throat]). - contentEditable div replaces textarea for Turbo engine only - Tags render as inline styled badges - Pasting text with [tag] patterns auto-converts to badges - Badges serialize back to plain [tag] text for the API - Dropdown portalled to body, opens above caret to avoid overflow --- .../Generation/FloatingGenerateBox.tsx | 76 ++-- .../components/Generation/GenerationForm.tsx | 26 +- .../Generation/ParalinguisticInput.tsx | 410 ++++++++++++++++++ 3 files changed, 480 insertions(+), 32 deletions(-) create mode 100644 app/src/components/Generation/ParalinguisticInput.tsx diff --git a/app/src/components/Generation/FloatingGenerateBox.tsx b/app/src/components/Generation/FloatingGenerateBox.tsx index a9814432..a9b830dc 100644 --- a/app/src/components/Generation/FloatingGenerateBox.tsx +++ b/app/src/components/Generation/FloatingGenerateBox.tsx @@ -20,6 +20,7 @@ import { useAddStoryItem, useStory } from '@/lib/hooks/useStories'; import { cn } from '@/lib/utils/cn'; import { useStoryStore } from '@/stores/storyStore'; import { useUIStore } from '@/stores/uiStore'; +import { ParalinguisticInput } from './ParalinguisticInput'; interface FloatingGenerateBoxProps { isPlayerOpen?: boolean; @@ -219,34 +220,57 @@ export function FloatingGenerateBox({ transition={{ duration: 0.15, ease: 'easeOut' }} style={{ overflow: 'hidden' }} > -