feat: switchable chat UI providers with markdown support#10
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #9
Research comprehensive alternatives for the model-in-browser chat interface: - Evaluated 8+ React.js chat UI libraries with GitHub stats - Researched Telegram-like designs (TelegramUI, telegram-react) - Documented markdown support options (react-markdown, streaming) - Created detailed library comparison with feature matrices - Provided implementation examples and migration guides Key recommendations: - assistant-ui: Best for AI chat applications (7.9k stars) - reachat: Modern LLM UI with Tailwind (Good Code) - react-markdown: For adding markdown to current chatscope setup Closes #9 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 31413dc.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Ok, let's support them all, make it configurable (switchable in the UI by drop down list at any moment). And also support markdown for all of them. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-08T02:21:46.440Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Implements support for multiple chat UI libraries with a dropdown selector allowing users to switch between them at runtime: - Chatscope (existing, now with markdown) - Assistant UI (AI-focused with streaming support) - Reachat (LLM chat with Tailwind styling) - React Chat Elements (simple, lightweight) Key changes: - Add ChatProviderContext for managing provider selection - Add MarkdownRenderer component with syntax highlighting - Create provider abstraction with common ChatMessage interface - Add dropdown selector in header to switch providers - Update all providers to support markdown rendering - Add CSS styles for all provider themes Dependencies added: - react-markdown, remark-gfm (markdown rendering) - react-syntax-highlighter (code highlighting) - @assistant-ui/react, @assistant-ui/react-markdown - reachat - react-chat-elements Addresses user request to support all researched chat UI libraries with switchable configuration and markdown support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
react-chat-elements has a strict peer dependency on react-dom@18.2.0 but the project uses react-dom@18.3.1. Using legacy-peer-deps allows npm to install despite this minor version mismatch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 AI Work Session CompletedThe implementation of switchable chat UI providers with markdown support is now complete. Summary of Changes4 Chat UI Providers Implemented:
Features:
CI Status
Files Changed
TestingThe implementation can be tested on the deployed preview once merged to main. Users will be able to select their preferred chat UI from the dropdown in the header. This comment marks the end of the AI work session. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
This PR implements switchable chat UI providers as requested in the PR comments. Users can now switch between different chat UI libraries at runtime via a dropdown selector in the header.
Implemented Features
4 Chat UI Providers supported:
Markdown Support for all providers using react-markdown with:
Runtime Switching - Select chat provider from dropdown without page reload
Architecture
Files Added/Modified
New Components:
web/src/components/ChatContainer.tsx- Provider switcherweb/src/components/ChatProviderSelector.tsx- Dropdown UIweb/src/components/MarkdownRenderer.tsx- Shared markdown componentweb/src/components/chat-providers/- Individual provider implementationsweb/src/context/ChatProviderContext.tsx- Provider state managementweb/src/types/chat.ts- Shared type definitionsModified:
web/src/App.tsx- Integrated provider systemweb/src/index.css- Added styles for all providersweb/package.json- Added new dependenciesDependencies Added
Research Documentation
Previous commit added comprehensive research documentation:
docs/case-studies/issue-9/README.md- Main research documentdocs/case-studies/issue-9/library-comparison.md- Detailed comparisondocs/case-studies/issue-9/implementation-examples.md- Code examplesTest plan
Screenshots
Screenshots will be available after CI builds and deploys to GitHub Pages.
Fixes #9
🤖 Generated with Claude Code