Fix chatbot output formatting and casing#2
Fix chatbot output formatting and casing#2google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
- Modify `OracleInterface.tsx` to remove enforced uppercase styling on table headers and h3 elements. - Update `route.ts` with improved `fixAllCaps` logic to handle tables and implement true sentence case while preserving domain terms. - Update `route.ts` with improved `fixTableFormatting` to better detect and repair malformed markdown tables from the LLM. - Ensure chatbot output renders cleanly as sentence-case text or properly formatted tables.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
…ge clarity HIGH priority: - #6 symbolicWeather: soft-fail instead of re-throwing AuthorityViolationError - #7 TTS: add 10s AbortController timeout to ElevenLabs fetch (504 on timeout) - #9 injectProtocols: wrap in try/catch, continue without corpus on failure MEDIUM priority: - #2 LLM auth: normalize 401/403 to user-friendly message - #3 LLM timeout: add one retry in generateReplyWithRetry - #4 Empty LLM response: distinguish content_filter from true empty - #5 AuthorityViolation outer catch: hide internal module names LOW priority: - #1 Missing LLM key 503: clearer operator message - #8 useOracleChat: map 413 to user-friendly 'message too long' text - #10 Remove void-cast needsConcreteRetry/needsProtocolRepair calls
…m-only schema Original: the chat pipeline's eight hardcoded silence-route fallbacks narrated infrastructure status (provider 500, finalize crash, soft timeout, missing relational scaffold, etc.) using the doctrinal FIELD/MAP/VOICE three-channel grammar. That schema is reserved for symbolic readings; using it for telemetry trains both the user and any model that ingests transcripts to read mechanical failure as archetypal content. - New module vessel/src/app/api/raven-chat/recoveryMessages.ts collects all eight operational fallback strings in one diff-able place. - A doctrine-boundary doc comment at the top spells out: this is system-only language, the chosen schema is "SYSTEM: <subsystem> REASON: <why> ACTION: <next step>", and FIELD/MAP/VOICE labels must NOT be borrowed here. - Three static constants (STREAM_REPLY_RESPONSE_MISSING, RELATIONAL_FALLBACK_SNAPSHOT_MISSING, PROVIDER_STREAM_NULL_BODY) and four builders (relational mapping unavailable, provider stream open failed, stream finalize failed, handler soft timeout) cover all interpolations. - All eight call sites in route.ts and streamReply.ts rewired to the module. systemNotice payloads, applyTelemetrySignalVoid calls, and the RECOVERY_NOTICE_LABELS badge in page.tsx are unchanged. - npm run typecheck passes (full tsc --noEmit). - Spot-check via tsx confirms all 8 messages render with SYSTEM/REASON/ACTION and contain no FIELD:/MAP:/VOICE: leaks. - Restarted dev workflow compiles and serves HTTP 200. - Raven-chat unit tests: 2 failures (promptLines #1, enrichmentPhase #2) are preexisting on the baseline commit and unrelated; promptLines.test.ts is explicitly out of scope per the task brief. Deviation: production "next build" did not complete in the agent timebox (Webpack stalled in "Creating an optimized production build" under shared CPU; same behaviour on baseline). Typecheck is the strongest static guarantee available and it passes. Replit-Task-Id: fa02d591-6763-4a20-908a-cb18c503cbb9
…nal void (invariant #2) When buildStructuredSymbolicMomentReply returns signalVoid:true or throws, the route was discarding the integrity-checked LLM reply in favour of a cold 'The geometry is present...' backstage-adjacent string. Capture llmReplyFallback before the assembly block. Use it instead of SIGNAL_VOID_REPLY on both the signalVoid path and the catch path. The fallback has already cleared integrity checks and stripBackstagePlannerLanguage so it is the correct frontstage carry-through. The composer (composeSymbolicMomentNarrative) was never absent from the runtime — it is called by buildStructuredSymbolicMomentReply. The gap was solely in the failure paths discarding the usable LLM output.
This change addresses user feedback regarding the chatbot's output formatting. The user reported issues with "ALL CAPS" text and broken Markdown tables.
Changes:
uppercaseCSS classes fromtheadandh3components inOracleInterface.tsx. This prevents the UI from forcing capitalization on text that should be sentence case.fixAllCapsinroute.ts. The new implementation uses a more robust regex to detect screaming caps (including lines with pipes|for tables), converts them to sentence case, and intelligently preserves a list of domain-specific words (Planets, Signs, Acronyms).fixTableFormattinginroute.tsto better detect table header rows (even if they don't start with a pipe) and inject missing separator lines. This ensures that tables generated by the LLM are rendered as proper Markdown tables instead of broken text.These changes ensure that the chatbot output is consistent, readable, and respectful of the user's preference for sentence case.
PR created automatically by Jules for task 5233356091902702091 started by @DHCross