Introduce optional web search enrichment flow for chat and regenerate requests. New /websearch endpoint calls enrich_prompt via SearXNG and returns enriched_prompt + citation sources.
DB: add sources_json column to chat_messages via ensure_sources_column migration helper.
Backend: persist sources_json for assistant replies (streaming and non-streaming); extend ChatRequest/RegenerateRequest to accept enriched_message and sources; history endpoint returns sources.
Frontend: add toggle for web search, settings for SearXNG URL + engines, and optional enrichment calls in sendMessage/regenerate. Render citation sources as rounded chips labeled with base domain under assistant replies.
Dependencies: add beautifulsoup4, httpx[http2], numpy for enrichment pipeline.
Implemented a per‑message collapse state that hides long user messages (>30 lines) with a “Show entire message / Collapse” button.
• Added collapsedUserMsgs map and helper collapseKeyFor to generate stable keys.
• Initialized or updated the collapse map whenever chat sessions or the active session change, preserving user toggles.
• Provided toggleUserMsgCollapse to switch the collapsed state.
• Updated the JSX to render the truncated content with an ellipsis when collapsed and render the expand/collapse button.
• Adjusted CSS for the new expand button: changed color to var(--muted), added align-self: flex-start, removed stray left margin, and retained bold, pointer cursor, and left‑aligned text.
• Minor style tweaks for the button hover effect.
Implemented an editing state that visually highlights the user message bubble with an accent border and shadow.
• Updated the message render logic to handle an CSS class and overlay a textarea that perfectly aligns with the bubble using a hidden shadow element.
• Re‑worked the and styles to apply the accent border, box‑shadow, and transition effects.
• Adjusted the textarea styling (, ) so it inherits the bubble’s look, respects whitespace, and automatically resizes without extra padding or borders.
• Added a hidden to keep the bubble width/height consistent while editing.
• Included new button styling for expandable user messages.
• Minor cleanup of redundant padding, margin, and color definitions in the styles.
• Updated the JSX to conditionally render the overlay textarea only during editing, ensuring a smooth UX.
• Added appropriate ARIA attributes and cursor styles for clarity.