Skip to content

v8.1.0

Choose a tag to compare

@knoop7 knoop7 released this 15 May 17:53

Bug Fixes

  • Fix infinite page reload caused by JS exec queue replay — New WebSocket connections now initialize their cursor at the queue tail, preventing historical JS commands (including navigation and location.reload()) from being re-executed on page refresh, new tabs, or new devices. Also removes history replay in frontend_exec_subscribe.

  • Minor improvements to agent fallback and core tools — Refine goal gate logic, remove unused imports, fix registry lookup edge case.

New Features

  • Frontend navigation guard against AI path pollution — Tracks user's real navigation path in sessionStorage. When AI executes navigation commands, the path is marked as AI-initiated. On page reload, if an AI navigation mark is detected, the user's original path is automatically restored via replaceState.

  • Helper tools: use collection API for hot-reload_create_collection and _delete now use HA's internal StorageCollection API (async_create_item / async_delete_item) instead of direct file writes, ensuring helper entities are immediately available in the runtime without restart. Includes proper decorator chain unwrapping to reach the StorageCollectionWebsocket instance.

  • Dashboard card tools: add verify_card action — Lightweight single-card verification with frontend error detection. Post-creation verification and lovelace reload. Better error feedback for missing views and dependencies. Differentiate storage vs YAML mode handling.


修复

  • 修复 JS 执行队列重放导致的无限页面刷新 — 新 WebSocket 连接现在在队列尾部初始化游标,防止历史 JS 命令(包括导航和 location.reload())在页面刷新、新标签页或新设备上被重复执行。同时移除了 frontend_exec_subscribe 中的历史重放逻辑。 #12

  • 优化 Agent 回退机制与核心工具 — 细化目标门控逻辑,移除未使用的导入,修复注册表查找的边缘情况。#11

新增

  • 前端导航守卫:防止 AI 路径污染 — 在 sessionStorage 中追踪用户的真实导航路径。当 AI 执行导航命令时,该路径被标记为 AI 发起。页面重载时若检测到 AI 导航标记,自动通过 replaceState 恢复用户的原始路径。

  • Helper 工具:使用 Storage Collection API 实现热重载_create_collection_delete 现在使用 HA 内部 StorageCollection API(async_create_item / async_delete_item)替代直接文件写入,确保 Helper 实体无需重启即可在运行时立即可用。包含正确的装饰器链解包,以访问底层的 StorageCollectionWebsocket 实例。

  • 仪表盘卡片工具:新增 verify_card 操作 — 轻量级单卡片验证,支持前端错误检测。创建后自动验证并重新加载 Lovelace。针对缺失视图和依赖项提供更清晰的错误反馈。区分 Storage 模式与 YAML 模式的处理逻辑。

Full Changelog: v8.0.0...v8.1.0