Skip to content

Version 0.2.0

Choose a tag to compare

@Tomobobo710 Tomobobo710 released this 17 Jun 11:02
· 137 commits to main since this release

This release brings support for more API endpoints, specifically focused on Google, so Google and Gemini chat models are generally supported and work in testing. For both the Google and Antrhopic endpoints, there is a reworked concept where only the backend makes the actual requests because they were both complaining about CORS. Anthropic endpoint (they use OpenAI format) should work theoretically, but is untested beyond basic initial communication. This release attempts to make SimpleChatJS compatible with the most prominent commercial models, with MCP support if the model allows function calling. To support Google's API, it required a whole new adapter system to adapt the backend from OpenAI compatible API, which meant making the initial OpenAI stuff need its own adapter as well, but opens the path for something like a Ollama API specific adapter or any future AI API.

Changelog

Adapter System Improvements

  • Unified Google Gemini and OpenAI adapters with consistent ResponseAdapter interface
  • Standardized debug data collection across all providers using sequence-based format
  • Added DEBUG_ADAPTERS environment flag for controlled verbose logging
  • Implemented proper unified response handling for both streaming providers

Debug Panel Infrastructure

  • Fixed debug data structure to match expected sequence format:
    • Request steps: Raw HTTP requests sent to AI APIs
    • Response steps: Complete HTTP responses with parsed content
    • Tool execution steps: Tool invocation metadata
    • Tool result steps: Success/error results with execution data
  • Standardized debug metadata collection (endpoint, timestamp, tool count)
  • Ensured debug panels use same content source as chat bubbles for consistency

Tool Event System Standardization

  • Fixed addToolEvent() call signatures across codebase:
    • Changed from 3-param format: addToolEvent(id, type, data)
    • To 2-param format: addToolEvent(id, { type, data })
  • Fixed "connected" event structure to include proper data object
  • Eliminated undefined event types and data in frontend logs
  • Standardized all tool events: tool_call_detected, tool_execution_start, tool_execution_complete, tool_execution_error

Content Processing

  • Unified content extraction for both debug panels and chat display
  • Simplified debug panel content fallback logic
  • Added debug logging for content capture verification
  • Ensured parsed response content matches what users see in chat

UI and UX Improvements

  • Fixed chat sidebar horizontal scrolling issues
  • Improved responsive design for different zoom levels
  • Made settings modal header and tabs sticky when scrolling
  • Increased default font sizes for better readability
  • Fixed chat title persistence between page refreshes
  • Modified tool result display to show raw content as seen by AI
  • All logging handled through loggers front and backend

Backend changes

  • Updated database.js to use better-sqlite3 instead of sqlite3
  • Added new PATCH endpoint /api/chat/:id/title to backend API
  • Created updateChatTitleInDatabase function for title persistence
  • Modified frontend updateChatTitle to save changes to database
  • Import 'open' to open the web browser automatically
  • Changed port to 50505

Additionally, I have attempted to fix "chat block" positioning, though I was unsuccessful, which leads to..

Known Issues

  • Chat blocks aren't currently rendered "in position" and end up at the bottom of simple chat (default chat mode)
  • Google embedding models not supported and will report a failed connection