Repository navigation
Releases: Robbie1977/VFBchat
Release list
v2.2.23 - Resilient API Error Handling
This release adds retry logic and sanitised error messages when the LLM API fails.
Problem:
When the OpenAI API returned a transient error (e.g. Cloudflare 520), the raw HTML error page was dumped directly into the chat, producing a wall of unreadable markup for the user.
Changes:
- HTML error detection:
sanitizeApiError()detects HTML responses (Cloudflare, nginx, etc.) and extracts the<title>for a concise one-line message - Automatic retries: Transient errors (429, 500, 502, 503, 504, 520-522, 524) now retry up to 2 times with exponential back-off (3s, 6s)
- User status updates: During retries the chat shows "AI service temporarily unavailable — retrying (1/2)…" so users know what's happening
- Friendly catch-all errors: Timeout and connection-refused errors now show human-readable messages instead of raw
Error: <message> - Error text capping: Non-HTML errors longer than 400 chars are truncated to avoid flooding the UI
Result: Users now see a short, actionable message like "The AI service returned an error (api.openai.com | 520: Web server is returning an unknown error). This is usually a temporary issue — please try again in a moment." — and in most cases the retry succeeds transparently.
v2.2.22 - Fixed Thumbnail Link Rendering
This release fixes an issue where some thumbnail links weren't being converted to images in the chat interface.
Changes:
- Added fallback handling for plain-text VFB thumbnail URLs in the convertUrlsToLinks function
- Plain-text thumbnail URLs are now automatically converted to inline images with hover-to-expand functionality
- This provides a safety net when the LLM outputs thumbnail URLs as plain text instead of proper markdown image syntax
Result: All VFB thumbnail URLs are now properly rendered as images in the chat interface, whether generated as markdown or plain text.
v2.2.21 - Smoother Chat UX: Stable Message Rendering
This release fixes layout thrashing and improves performance during streaming responses.
Changes:
- Memoized message bubbles: Each message now has a stable unique ID, preventing unnecessary re-renders of existing messages when new ones arrive
- Fixed auto-scroll behavior: Scroll now triggers only on new messages or thinking state changes, not on the 500ms thinking-dot animation
- Stabilized markdown renderers: Component definitions are wrapped in useMemo for referential stability
- Eliminated layout jumpiness: Thumbnails and message content no longer shift or reload when streaming progresses
Result: When receiving a response with images/thumbnails, the chat stays smooth and stable. Previous messages anchor in place while only the current response updates.
v2.2.20 - Smarter Query URL Rendering
This release improves the rendering and UX of suggested follow-up question URLs.
Changes:
- Plain-text URL detection: URLs like
https://chat.virtualflybrain.org?query=...are automatically converted to clickable links - Smart link labels: when text precedes the URL (e.g.,
What is the medulla https://...), the question becomes the link text—no ugly encoded URLs shown to users - Fallback handling: if only the URL exists, the decoded query text is used as the link label
- Enhanced system prompt guidance with real-world examples, emphasis on URL-encoding, and advice on varying question types
Result: Whether the LLM generates plain-text URLs or markdown links, they're now rendered cleanly with readable question text as the clickable label.
v2.2.19 - LLM-Driven Suggested Questions
This release improves suggested follow-up questions by having the LLM natively include them as clickable query URLs in its markdown responses.
Changes:
- System prompt instructs gpt-5-nano to suggest follow-up questions as markdown links with
https://chat.virtualflybrain.org?query=URLs - Client-side
renderLinkfunction detects these special query URLs and handles clicks by submitting the question as a new chat message - Eliminates false positive detection of regular content as suggested questions (fragile pattern matching removed)
- LLM has full control over suggestion placement (inline, bullets, sentences) and can omit suggestions when not appropriate
- More reliable than client-side extraction since LLM explicitly marks suggestions with URLs
This approach is more robust than pattern-matching extraction and gives the LLM full flexibility in how to present suggestions.
v2.2.18: Interactive Suggested Questions
This release adds intelligent extraction and rendering of suggested follow-up questions from gpt-5-nano responses, enabling users to quickly explore related topics with a single click.
Changes
- Extracts follow-up question suggestions from gpt-5-nano responses using pattern recognition
- Renders suggested questions as shareable hyperlinks with query string URLs (https://chat.virtualflybrain.org?query=...)
- Auto-submits suggested questions when clicked, enabling seamless exploration flow
- Supports multiple intro phrase variations and list formats for robust extraction
- Filters suggestions to ensure quality and relevance (5-200 character range, max 5 suggestions)
- Questions removed from message content and shown as clickable links below response
- Hover effects highlight suggested links for better UX
- Links can be copied and shared directly with full query context
Release 2.2.17: Dataset Search Filtering Fix
This release fixes dataset search filtering to properly return only actual datasets instead of unrelated items like individual neurons or interfaces.
Changes:
- Fixed case sensitivity issue in VFB search filters (corrected "dataset" to "DataSet" to match VFB facet naming)
- Added client-side filtering as safety net to ensure only items with required facets are returned
- Updated search_terms tool description to include dataset filtering examples, guiding LLM to use proper filters
- Dataset searches now correctly exclude non-dataset items, returning only actual datasets like "FlyWire connectome neurons"
- Improved search accuracy for dataset queries, preventing confusion between datasets and individual data items
Release v2.2.16: Fix Critical Runtime Error
This release fixes a critical runtime error that was preventing the chat API from functioning, ensuring the application works properly after the pre-fetching refactoring.
Changes:
- Fixed 'conversationMessages is not defined' runtime error in chat API route
- Added proper initialization of conversationMessages array with system prompt, message history, and resolved user message
- Ensures proper message flow for LLM API calls with MCP tool integration
- Application now functions correctly without crashing on chat requests
Previous Release Notes (v2.2.15):
This release fixes critical issues with complex anatomical term information retrieval by removing problematic pre-fetching logic that caused timeouts for terms like mushroom body, and ensures the LLM properly fetches detailed information during conversations.
Release 2.2.13
This release adds a footer disclaimer for AI reliability warnings, enhances Google Analytics error handling, and includes additional citation fixes for improved user experience and data accuracy.
Changes:
- Added footer disclaimer at bottom of chat window warning about AI response reliability and data recording
- Enhanced Google Analytics tracking with better error logging and success confirmation
- Improved citation generation to prevent random DOI hallucination and ensure VFB data accuracy
- Added UI disclaimer about verifying information with primary sources and not sharing private data
- Updated README documentation to reflect UI disclaimer feature
- Enhanced system prompt restrictions for citation generation
- Improved user experience with clear privacy and reliability notices
Release 2.2.12
This release adds thumbnail URL validation to prevent display of broken images, fixes citation generation issues, and improves reliability of VFB data presentation.
Changes:
- Added async thumbnail URL validation using axios.head to check image existence before inclusion
- Modified summarizeTermInfo function to validate thumbnail URLs with 2-second timeout
- Updated system prompt to restrict citations to VFB data only - prevents LLM from generating random DOIs
- Enhanced publication extraction to include FBrf IDs from Synonyms field in addition to Publications field
- Prevents LLM from hallucinating invalid URLs like malformed template IDs (e.g., /VFB_001011rk/)
- Added error handling and logging for failed thumbnail validations
- Improved user experience by filtering out broken image links and irrelevant citations