Skip to content

v0.3.0 - Intelligent Notification, Online Model Circuit Breaker and Recommendation Animations

Choose a tag to compare

@Xe-Persistent Xe-Persistent released this 12 Jan 08:08
· 277 commits to master since this release

简体中文 (Simplified Chinese)

本次更新重点引入了智能通知系统、在线模型熔断机制,并对 Bot 架构和UI交互体验进行了全面优化。

✨ 新功能

  • 智能通知系统: 新增状态栏和 Toast 双层通知机制,实时反馈系统状态(如在线服务断线、模型切换、资源缺失等),提升用户感知。
  • 在线模型熔断机制: 为 AkagiOT 在线推理引入自动熔断保护。当连续 3 次请求失败时自动切换至本地模型,30 秒后尝试恢复,确保对局不中断。
  • 打牌推荐动画: 新增流畅的推荐动画效果,让 AI 建议更加直观易懂。

🚀 改进与优化

  • Bot 架构重构:
    • 统一 Controller 和 MortalBot 的职责划分,延迟初始化 Bot 至首次 start_kyoku 事件,提升启动速度。
    • 优化三麻/四麻模式自动切换逻辑,修复了中途重连时模式识别错误的问题。
  • DataServer 重构: 改进错误处理和通知代码映射,确保前端能准确接收后端状态。
  • UI/UX 优化:
    • 程序退出页面适配明亮/暗黑主题,图标统一使用 lucide-react 组件。
    • 优化设置面板布局,新增独立的"在线模型"配置区。

🐛 问题修复

  • 模型切换 Bug: 修复了三麻与四麻切换时 Bot 未正确重新加载的问题。
  • 立直前瞻 Bug: 修复了立直 Lookahead 有时会导致程序崩溃的问题。
  • 资源缺失提示: 修复了本地模型文件缺失时前端无提示的问题,现在会在状态栏显示持久性错误警告。

English

This release introduces an intelligent notification system, online model circuit breaker, and comprehensive refactoring of the Bot architecture and UI experience.

✨ New Features

  • Intelligent Notification System: Introduced a dual-layer notification mechanism (status bar + toast) to provide real-time feedback on system states such as online service disconnections, model switches, and missing resources.
  • Online Model Circuit Breaker: Added automatic failover protection for AkagiOT online inference. After 3 consecutive failures, the system automatically switches to the local model and attempts recovery after 30 seconds, ensuring uninterrupted gameplay.
  • Tile Recommendation Animations: Added smooth animation effects for AI recommendations in the frontend, making suggestions more intuitive and visually appealing.

🚀 Improvements

  • Bot Architecture Refactoring:
    • Clarified responsibilities between Controller and MortalBot. Bot initialization is now deferred until the first start_kyoku event, improving startup performance.
    • Optimized automatic switching logic between 3-player and 4-player modes, fixing mode detection errors during mid-game reconnections.
  • DataServer Refactoring: Improved error handling and notification code mapping to ensure accurate status delivery to the frontend.
  • UI/UX Enhancements:
    • Adapted the shutdown screen to support both light and dark themes, with standardized icons using lucide-react components.
    • Optimized settings panel layout with a dedicated "Online Model" configuration section.

🐛 Bug Fixes

  • Model Switching Bug: Fixed an issue where the Bot failed to reload correctly when switching between 3-player and 4-player modes.
  • Riichi Lookahead Bug: Fixed an issue where Riichi Lookahead sometimes caused the program to crash.
  • Missing Resource Alerts: Fixed an issue where missing local model files would not trigger frontend notifications. A persistent error warning now appears in the status bar.

Full Changelog: v0.2.2...v0.3.0