Skip to content

Latest commit

 

History

History
158 lines (113 loc) · 7.77 KB

File metadata and controls

158 lines (113 loc) · 7.77 KB

Changelog

All notable changes to this project will be documented in this file.

[1.7.13+14] - 2025-12-30

Fixed

  • System Prompt Injection: Unified system prompt handling in restoreChatHistory() to prepend to first user message (consistent with chatStream()). Previously sent as AI message which confused model turn-taking.
  • Corrupted Model Detection: Added detection of MediaPipe TFLite errors (ret_check, error building) and auto-deletes corrupted model files for clean re-download.
  • State Desync Bug: Removed stale _modelReady local state in chat_screen - now uses reactive llmService.isInitialized directly.
  • Double Initialization: Removed redundant _activateModel() call after installModel() in settings_screen.
  • Chat History Duplicates: Added _historyLoaded guard to prevent duplicate message loading.

Removed

  • Dead Code Cleanup: Removed unused _toolModel, _activeToolModel, hasToolModel, activeToolModel, and initializeToolModel() - flutter_gemma only supports one active model at a time.

[1.7.9+10] - 2025-12-27

Fixed

  • Race Condition Prevention: Added mutexes to initializeModel() and deleteModel() to prevent concurrent operations.
  • Install/Delete Guards: Cannot install while deleting or delete while initializing—mutual exclusion enforced.
  • Redundant Network Calls: Removed unnecessary installModel.fromNetwork() call for already-installed models—now just calls getActiveModel() directly.
  • Memory Leak: dispose() now clears _toolModel and _activeToolModel state.
  • State Verification: _installModel() now verifies actual installation success before updating UI state.
  • Error Feedback: Auto-initialization failures now display error messages to user (previously silent).
  • State Sync: _selectedModel now properly syncs after model deletion, including fallback to recommended when no models remain.
  • Init Failure UX: Chat screen now shows model download dialog if initialization fails (previously only logged).

Changed

  • Parallel Model Checks: getInstalledModels() now runs in parallel (12x faster on 12 models).

Added

  • Expandable Debug Panel: Tap the stats bar during processing to see model info, performance metrics, and recent LLM logs.
  • LogBuffer: In-memory log capture for displaying recent events in the debug panel.

[1.7.8+9] - 2025-12-27

Changed

  • Repo Cleanup: Removed accidentally committed video/GIF artifacts to reduce build size.
  • Version Bump: Incremented to 1.7.8+9.

[1.7.7+8] - 2025-12-27

Fixed

  • CRITICAL: User Message Persistence: User messages are now saved to Hive storage (previously only AI responses were persisted).
  • Model Deletion State Bug: deleteModelAndSwitch now only re-initializes when the active model is deleted, preventing unnecessary model switches.
  • Premature State Assignment: Removed early _activeModel assignment in installModel that could leave state stale if initialization failed.
  • Safer File Deletion: Changed path.contains() to path.endsWith() in deleteModel for more precise file matching.
  • Dead Code Removal: Removed unused try-catch block from initializeToolModel.

[1.7.5+6] - 2025-12-26

Fixed

  • CRITICAL: Model Deletion Bug: deleteModel() now uses correct getApplicationDocumentsDirectory() instead of broken systemTemp.parent.parent path. Models are now actually deleted when user taps Delete.
  • Model Preference Persistence: User's selected model is now saved and restored on app restart instead of falling back to hardcoded priority.

Added

  • Single Download Guard: Prevents multiple simultaneous model downloads to avoid memory exhaustion and network contention.

Removed

  • Dead Code Cleanup: Removed unused getModelDownloadedStatus() and setModelDownloadedStatus() from StorageService.

[1.5.0+9] - 2025-12-26

Fixed

  • Token Limit Error: Increased context window from 2048 to 8192 tokens to fix "input is too long" errors in longer conversations.

[1.4.0+7] - 2025-12-26

Fixed

  • Model Detection Bug: Chat screen now detects ANY installed model, not just Gemma 3n E2B.
  • ModelType Mismatch: FunctionGemma now uses correct ModelType.functionGemma instead of gemmaIt.
  • Gemma 3 1B Capabilities: Updated to support function calling per latest flutter_gemma docs.

Added

  • Swipe-to-Delete: Swipe left on installed models in Settings to delete them.
  • Model Prioritization: Auto-selects best available model (Gemma 3 1B > FunctionGemma > others).
  • chatLog Logger: Added dedicated logger for chat screen debugging.

Changed

  • Default Model: Gemma 3 1B is now the recommended model (was FunctionGemma 270M).
  • ModelConfig: Added modelType field to store correct flutter_gemma type per model.

[1.4.0+6] - 2025-12-26

Added

  • XML-Structured Prompts: System prompt and tool descriptions now use XML for better LLM parsing.
  • Agent Memory System: save_memory and search_memories tools for persistent AI observations.
  • Auto-Routing: Automatic model selection based on input type (images→E2B, tools→FunctionGemma, chat→Gemma 3 1B).
  • Dossier Persistence: update_dossier now saves to Hive storage.
  • Psychograph Persistence: update_psychograph now saves to Hive storage.
  • Model Deletion: Added deleteModel() method for removing cached models.

Changed

  • InputType enum: Added for categorizing request types (text, image, audio, toolRequest).

[1.3.0] - 2025-12-26

Added

  • FunctionGemma 270M: Added Google's specialized function-calling model for agentic features.
  • Multi-Model Architecture: Support for downloading multiple models and switching between them.
  • ModelCategory enum: Categorize models by use case (agent/chat/multimodal).

Changed

  • Package Upgrades: Updated 12 major dependencies for stability (flutter_riverpod 3.0.3, speech_to_text 7.3.0, flutter_local_notifications 19.5.0, etc.).
  • MODELS.md: Rewrote documentation with correct capability matrix and cross-referenced sources.

Fixed

  • Capability Bug: Gemma 3 1B no longer incorrectly claims function calling support.
  • Notification API: Updated for flutter_local_notifications v19 breaking change.

[1.2.0] - 2025-12-26

Added

  • Glassmorphism UI: Implemented frosted glass dialogs with backdrop blur effects.
  • Shimmer Buttons: Added animated ShimmerButton widget with sweeping gold highlight.
  • Background Gradients: Subtle radial gradients on Home and Chat screens for depth.

Changed

  • Dialog Styling: Dialogs now use AppTheme.frostedDecoration for a premium glass look.
  • Chat Bubbles: Updated to use AppTheme.userBubbleGlass and AppTheme.chatBubbleGlass.
  • Button Corners: Standardized all buttons to 12px rounded rectangles.
  • Color Consistency: Removed all legacy purple/blue hardcoded colors.

[1.1.0] - 2025-12-25

Added

  • Design System: Integrated "Onyx & Bullion" design language (Imperial Gold, Sterling Silver, Obsidian).
  • Notifications: Added persistent "hard" notifications for model download progress using flutter_local_notifications.
  • App Icon: Updated App Icon with new "Quadfecta" W logo.
  • Typography: Added google_fonts (Outfit & Inter).

Changed

  • Theme: Updated AppTheme to use new color palette and glassmorphism styles.
  • UI: Refactored TacticalHudScreen to match the new premium aesthetic.
  • Architecture: SettingsScreen now initializes notification permissions on launch.
  • Infrastructure: Updated iOS entitlements to support "Extended Virtual Addressing" for large model memory allocation.

Fixed

  • Crash: Fixed "Cannot allocate memory" error by linking Runner.entitlements correcty in project.pbxproj.