feat(s2s-text): dedicated text-mode prompt + Markdown rendering
Architecture fix: voice and text mode now have completely separate prompts. Backend: - VoiceAssistantProfileSupport.buildTextSystemRole: dedicated text-mode system role that inherits all business rules (identity, KB-first, sensitive topics, sales guidance, personal info) but removes voice-specific constraints (short sentences, colloquial, single-line conclusion). - DEFAULT_TEXT_SPEAKING_STYLE: text-specific style demanding detailed, structured, Markdown-formatted answers with complete information. - VoiceGatewayService.handleStart: switch between voice/text system role and speaking style based on state.textMode. - VoiceGatewayService.buildStartSessionPayload: preserve Markdown in text mode (voice mode still strips asterisks/backticks via normalizeTextForSpeech to avoid TTS pronouncing format chars). Frontend: - Added react-markdown@9 + remark-gfm@4 dependencies. - ChatPanel renders assistant messages (non-voice) with ReactMarkdown: headings, lists (ul/ol), bold, italic, inline/block code, tables, blockquote, links, horizontal rules — all styled with Tailwind classes matching the dark theme. - User messages and voice-handoff messages remain plain text. Verification: mvn test VoiceGatewaySmokeTest 20/20 pass, vite build succeeds.
This commit is contained in:
1477
test2/client/package-lock.json
generated
1477
test2/client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user