github DayuanJiang/next-ai-draw-io v0.4.0

latest releases: v0.4.12, v0.4.12-beta.5, v0.4.12-beta.4...
one month ago

🎉 What's New in v0.4.0

🔑 Major Features

Bring Your Own API Key (BYOK)

  • Use your own API keys from 7 providers: OpenAI, Anthropic, Google, Azure, OpenRouter, DeepSeek, SiliconFlow
  • Keys stored client-side only, never sent to server
  • Bypass server usage limits with your own keys
  • Configure via Settings dialog in chat panel

PDF & Text File Upload

  • Upload and process PDF documents and text files
  • Client-side PDF text extraction using unpdf library
  • Support for multiple file types (.txt, .md, .json, .csv, .py, .js, .ts, etc.)
  • Configurable character limit via NEXT_PUBLIC_MAX_EXTRACTED_CHARS (default: 150k)

AI Reasoning/Thinking Display

  • View AI's reasoning process for supported models
  • Supports: OpenAI (o1/o3/gpt-5), Google (Gemini 2.5/3), Bedrock (Claude/Nova), Ollama (qwen3-like models)
  • Plain text rendering for thinking blocks
  • Auto-enabled for compatible models

🐛 Bug Fixes

  • Fixed diagram regeneration loop after successful display
  • Improved LLM diagram context awareness and image preview
  • Fixed Azure OpenAI AZURE_RESOURCE_NAME configuration
  • Corrected NEXT_PUBLIC_DRAWIO_BASE_URL in offline deployment docs
  • Fixed React hydration mismatch for DrawIO theme loading
  • Added orphaned mxPoint validation and cleanup
  • Fixed message parts order in chat display
  • Improved XML validation before diagram display

✨ Improvements

Usage & Configuration

  • Light/dark mode toggle with browser preference detection
  • Configurable usage limits via env vars (DAILY_REQUEST_LIMIT, DAILY_TOKEN_LIMIT, TPM_LIMIT)
  • Daily token limit with actual usage tracking from API metadata
  • Configurable max duration via MAX_DURATION environment variable
  • Self-hosted draw.io support via NEXT_PUBLIC_DRAWIO_BASE_URL

UI/UX

  • Auto-save and restore session state (messages, XML snapshots, session ID)
  • Detailed error messages instead of generic "Internal server error"
  • Client-side caching for example diagrams
  • Close protection toggle in Settings
  • Settings button always visible in header

Developer Experience

  • 3.9% code reduction through DRY refactoring (PR #211)
  • Zero functional changes, improved maintainability
  • Improved XML search/replace matching strategies (6 strategies)
  • Tool call JSON repair for malformed responses
  • Bedrock API compatibility improvements

📚 Documentation

  • Offline deployment guide with Docker Compose examples
  • GitHub issue templates for bug reports and feature requests
  • Updated chain-of-thought.txt with full research paper content
  • Aligned Chinese and Japanese README with main README
  • Improved README structure with badges, TOC, and live demo button

🌐 New Providers & Models

  • Added SiliconFlow as supported AI provider
  • Added minimax model support with XML wrapping fix
  • Conditional prompt caching support

👥 Contributors

Thanks to all contributors who made this release possible!


Full Changelog: v0.3.0...v0.4.0

Don't miss a new next-ai-draw-io release

NewReleases is sending notifications on new releases.