AI Chat Plugin Polishing

Dave J and I spoke today and one of the final items remaining before launch is polishing Dave’s AI chat Plugin. Going to speak to Matt H and see if he’s up for shifting his attention off of search and to working on this instead. PRD below:

1. Overview

The goal is to deliver a polished, reliable, and intuitive AI text chat experience that is competitive with other leading AI chat UIs. This is a core part of the BrainDrive launch readiness. The chat interface must feel smooth, be bug-free, and demonstrate potential for extensibility.

2. Objectives

  • Ensure that first-time users can immediately start chatting with a model without encountering quirks or confusion.

  • Achieve a fluid and responsive UI that meets user expectations for modern AI chat systems.

  • Implement expected control features (stop, continue, regenerate).

  • Support smooth reading during generation and improve context-handling functionality.

  • Lay the groundwork for easy future enhancements like Chat with Documents, link scraping, and file attachment.

  • Ensure model selection and switching works reliably, with clear indication of which model is active.

  • Provide a way to start a new conversation without reloading (e.g., “New Chat” button).

3. Scope & Requirements

3.1 Functional Requirements

Smooth Streaming Output

  • Display responses token-by-token or in small batches so the user can read while the AI is generating.

  • Ability to scroll during generation so BrainDrive Owners can scroll while text is generating.

User Controls

  • Stop: Cancel ongoing generation.

  • Continue: Resume generation if the response was cut off due to token limits.

  • Regenerate: Re-run the last prompt for an alternative answer.

Context Enhancements

  • Recognize or similar tags and collapse them into an accordion by default (click to expand).

  • Improve markdown rendering to handle:

    • Code blocks with syntax highlighting.

    • Block quotes.

    • Lists and bold/italic formatting.

Search Integration (Future-ready)

  • Preserve compatibility with planned chat search functionality.

Attachment & Scraping Hooks (Optional for Launch)

  • Ability to add files as context (integration with Chat with Documents when ready). (Beck Project Owner for this feature)

  • Ability to paste a URL and have system fetch & parse page content into context (for future implementation).

Session Management

  • “New Chat” option that clears conversation context without reloading the full app.

Model Switching UX

  • Clearly display the current model name in the chat UI.

  • Ensure switching models mid-session works without errors or leftover cached responses.

Loading & Error States

  • Show a visual indicator during generation (spinner/progress dots).

  • Display a friendly, actionable error message if generation fails.

Accessibility & Keyboard Shortcuts

  • Enter to send, Shift+Enter for newline, Esc to stop generation.

  • Maintain focus on the input box after actions.

3.2 Non-Functional Requirements

  • Must work reliably across major browsers (Chrome, Firefox) and OSes (Windows, Ubuntu, Mac).

  • Lightweight and responsive on reasonable hardware.

  • Maintainable structure with documented hook points for future feature additions (attachments, scraping, prompt library integration).

4. Deliverables

  • Updated AI chat plugin with above functional improvements.

  • Clean, maintainable code that’s easy for other developers to extend.

  • Internal test cases covering:

    • Generation streaming.

    • Stop/Continue/Regenerate behavior.

    • Accordion handling for tags.

    • Markdown rendering correctness.

    • Model switching and new chat workflow.

  • Easy-to-follow documentation for developers who wish to modify or extend the plugin.

5. Out of Scope for This Iteration

  • Full Chat with Documents implementation (bonus if ready).

  • Full link scraping integration (planned for later).

  • Mobile UI optimizations (on roadmap but not launch-blocking).

6. Dependencies

  • Backend model streaming support.

  • Existing plugin framework for chat.

  • Beck’s work on Chat with Documents for attachment integration (if included).

7. Acceptance Criteria

  • :white_check_mark: User can type a message and see a smooth, streaming AI response.

  • :white_check_mark: User can stop, continue, and regenerate responses.

  • :white_check_mark: content appears collapsed with the ability to expand.

  • :white_check_mark: Markdown formatting displays correctly for common patterns.

  • :white_check_mark: No UI bounce or lost focus during/after generation.

  • :white_check_mark: Works across Chrome, Firefox, Mac, and Windows.

  • :white_check_mark: Switching models mid-session works without errors and updates the UI.

  • :white_check_mark: “New Chat” creates a fresh session without requiring reload.

  • :white_check_mark: Loading and error states are clear and informative.

Matt’s down to shift focus to this and will report back to us in our call next Thursday which will be recorded and posted here.

Thanks!
Dave W.

Hi All,

Here is the recording from today’s Chat Plugin Polishing update call followed by an AI powered summary of what was discussed.

Questions, comments, concerns and ideas welcome as always, just hit the reply button.

Thanks
Dave W.

Recording:

AI Powered Summary:

Chat Plugin Enhancements by Matt

  • Document Upload:
    • Implemented groundwork based on the specs.
    • UI includes a plus button to upload documents.
    • Backend built using Python + Pandas.
    • Supports: PDF, TXT, CSV, JSON.
    • Known issue: Word formatting with excessive new lines.
  • Chat UI Features:
    • Markdown rendering toggle requested (raw vs. formatted).
    • Regenerate, stop, and continue buttons added.
    • Markdown renders by default; toggle will improve flexibility.
    • Chat history and thinking model display refinements needed.
  • Interface Adjustments:
    • Working on minimizing UI clutter.
    • Proposal to consolidate options (add doc, web search) under a “more” menu.
    • New chat button to be relocated to the bottom-left.
    • Conversation history to move below the chat window.
    • Remove the streaming toggle — always stream by default.

:brain: Distinction: Lightweight Plugin vs. Beck’s RAG System

  • Matt’s plugin: Native to BrainDrive, lightweight, FastAPI-based.
  • Beck’s system: Full RAG, heavier, runs as an external plugin.
  • Analogy: Matt’s version = ChatGPT-style chat with documents; Beck’s = Claude/ChatGPT Projects workspace.

:test_tube: Backend & Parsing

  • Document parsing runs on the backend, leveraging Python tools.
  • Avoiding frontend parsing due to limited support.

:clipboard: Chat Interface Polish Review

  • PRD reviewed line by line.
  • Confirmed most UI behaviors now work as expected:
    • Smooth streaming and response scrolling.
    • Ability to start new chat without app reload.
    • Editable user messages.
  • Still needed:
    • Moving excessive top-bar items to “more” menu.
    • Auto-focus on input when starting new chat.
    • Refactor chat layout to reduce visual overload.

:jigsaw: Future Enhancements

  • Short-Term Priorities:
    1. Minimize and clean up UI.
    2. Polish chat with document display.
    3. Implement pasted URL scraping/chat.
    4. Return to web search implementation.
  • Medium-Term:
    • Explore CAG (Context-Augmented Generation) vs. RAG.
    • Mobile UI adaptation.
    • Better error handling for failed connections.
  • Backend Tasks (not Matt’s responsibility):
    • Improve context handling (e.g., truncating based on model limits).
    • Possibly add system context awareness for model selection.

:hammer_and_wrench: Technical Feedback & UX Philosophy

  • Goal: UI should feel familiar to users of ChatGPT/Claude.
  • Difference: BrainDrive uses pages instead of sidebars for task-specific experiences.
  • Design principles:
    • Hide complexity for novice users (e.g., Katie persona).
    • Offer advanced control through plugins or dev mode.

:white_check_mark: Keyboard Accessibility

  • Escape key stops generation.
  • Enter sends messages.
  • Shift+Enter inserts new lines (confirmed functionality).

:soon: Next Steps

  • Clean up UI and document display.
  • Implement scraped-link-to-context capability.
  • Defer lower-priority enhancements until core UI is stable.
  • Plan to push code to production next week (if progress allows).
  • Matt to share a demo update before next meeting.

Hi All,

Below is the recording and AI powered summary of our BrainDrive AI Chat Plugin discussion with Matt the lead dev on the project.

Questions, comments, concerns, and ideas welcome as always. Just hit the reply button.

Thanks!
Dave W.

Recording:

AI Powered Call Summary:

:key: Key Updates Shown

  • Chat UI changes:

    • Models moved up top, history below.
    • “More” button for uploading docs, web search, and personas.
    • Personas available via dropdown.
    • Styled code blocks + copy-to-clipboard.
    • Toggle for raw vs formatted markdown.
    • Conversation history includes rename, delete, and copy link (though sharing is still localhost-only for now).
    • Timestamp added to history.
  • New functionality:

    • Drag to resize chat/history area (though a bit buggy).
    • Collapsed thinking process view.
    • Fixed clean display toggle.

:lady_beetle: Issues Identified

  • Chat history bug: New chats aren’t auto-added to history when starting a conversation.
  • History sizing: Takes up too much screen space — need accordion or collapsible option.
  • Responsiveness: Current chat plugin can grow larger than screen size, requiring scrolling. Needs to match ChatGPT/Claude’s fixed viewport style.
  • Docs/web search: Currently just drops content into the context window; needs smarter handling.

:white_check_mark: Decisions Made

  1. Chat history:

    • Make it an accordion with a dropdown toggle.
    • Auto-collapse history when first message is sent.
    • Keep only “History + expand arrow” visible when collapsed.
  2. Model & Persona selection:

    • Must be together — side-by-side.
    • Personas stay visible in the chat pane (not hidden).
    • Works well for both desktop & mobile.
    • Default open, but bar itself can be collapsed (accordion-style).
  3. New Chat button:

    • Use standard icon (paper with pencil).
    • Place to the right of model selection (not left).
  4. Framework for UI decisions:

    • Default = ChatGPT & Claude UI patterns.
    • Differentiate only where BrainDrive’s unique value (model choice, personas, project-style context) requires it.
    • Avoid unnecessary divergence to keep things familiar.
  5. Target Timeline:

    • Polish UI (fix bugs, accordion, model/persona handling).
    • Push to GitHub → internal testing.
    • Public beta planned for Sept 7.

:pushpin: Next Steps

  • Matt to:

    • Fix auto-history bug.
    • Add accordion for history.
    • Place model + persona selectors side by side.
    • Add “new chat” icon to the right of model.
    • Make top bar collapsible but default open.
    • Continue polish and push code to GitHub with forum update.
  • Dave to:

    • Review/test after polish is pushed.
  • Team: Prepare for public beta release on Sept 7.

The BrainDriveChat plugin polish updates have been pushed!

  • Web search integration via SearXNG
  • Document processing
  • Markdown rendering
  • User control features
  • Enhanced code blocks with collapse/expand functionality
  • Cleaner standardized chat interface
  • Bug fixes
  • & more!

Thanks Matt! I’ve merged this with the running Chat Plugin Polishing post we have to keep things easily reviewable for anyone who wants to see the progress of this project.

@DJJones FYI we can discuss in our call later today and I’ll post the recording here for everyone as well.

Questions, comments, issues, and ideas welcome as always. Just hit the reply button.

Thanks!
Dave W.

I added a commit for the rest of the requirements missing.

I was able to install all parts and this is what I found to be missing thus far:
Chat History: Accordion can be dropped off the page (I thought we discussed collapsed up and down?)
Persona’s not exposed in the chat window and still hidden by a menu
Web Search and Document upload need to be hidden (still exposed, since work not finished and for current state of prodections)
Top bar not able to be collapsed
Continued functionality, creates a new chat box instead of using the current one.

I have noticed chats are causing a new history with each response, I am not sure of the cause of this but I have already put it on my plate for this week.

thanks Dave. @mhowlett can you have a look and let us know on this as soon as you have a chance please?

thanks,
Dave W.

Since I clean up the requirements and the backend worked in testing I went ahead and merged the PR into the Core. (This is just some of the backend changes needed, not the frontend)

I merged the second part of this work, in the plugin itself as well.

Additional information:
I also did a fix and merge yesterday in the core that appears to clean up how chat history was being created. The issue was when streaming the user id was not being parsed correctly.

New version of this is available

Changes in 1.0.17
Now uses the API for all models to allow access to other LLM providers (Currently tested with Ollama and Openrouter).
Layout changed: Model, Persona and Chat History are all moved to the header
Input box is now dynamic, only shows a single line initially but will expand to 4 lines then a scrollbar as needed based on text.

Future changes:
I want to clean up the dropdowns, this can clearly look a lot more polished. I also think we need to move away from the single dropdown on the header to allow for searching based on typed input because just adding Openrouter alone created a long list. This can happen to Persona and Chat History as well in the future.

1 Like

This plugin has been pushed to 1.0.19 with today’s update, a few changes to look for that are in testing.

  1. Improved scrolling when response is being printed

  2. Improved the overall chat layout experience

  3. Thinking Process running dots as the response is being displayed

  4. Chat History will now populate the model and personal from the previous conversation.

1 Like

@DJJones the two main thinking models that are small enough to run on ollama are qwen and deepseek and thinking UX is working properly on both so I think we are good on this for now and we will address other models as they come.

Thanks,
Dave W.

Updated to 1.0.21 with a few changes

  1. Chat scrolling improved
  2. Chat History Order fixed
  3. Thinking tag changed to “Thinking”
  4. Improved user experience between each prompt/response
1 Like

Good morning @DJJones. Here’s what I’m thinking for the intro message when people first login to BrainDrive. Let me know what you think at your convenience.

Thanks,
Dave W.

Welcome to your BrainDrive!

If you see AI models in the models dropdown above you are ready to start chatting.

If not, the next step is to set up your AI models.

Learn how to do that and more here: BrainDrive Owner’s Manual.

Also be sure to join the BrainDrive Community for support, to connect with other BrainDrive Owners, and to help drive the future of user-owned AI.

Your AI. Your Rules.

Sounds good, I am wondering if down below where we have the AI warning label, why not add those two links there as well. This way no matter where you are in BrainDrive owners will have instant access to the manual and community links?

sounds good to me let’s do it

Hi All,

In today’s Dev call livestream Dave J. showed off the BrainDrive AI chat plugins new content augmented generation (CAG) feature. This allows you to upload a document and your BrainDrive will parse the document and allow you to chat with the contents of that document, 100% locally on your own computer, without even needing an internet connection.

In addition you can decide wether or not you want to commit the contents of the document to the chat history or not. If you want the full document in the chat history you can choose to have it. If on the otherhand you only need a portion of the document included in the context of your chat, then you can use the “one shot” functionality instead.

This functionality is especially useful in a local AI system like BrainDrive where the context window of smaller models can become an issue.

Recording below. If you give it a try let us know what you think!

Thanks
Dave W.