feat: 优化部分代码及提示词

This commit is contained in:
2026-09-25 17:12:38 +08:00
parent db41f2c679
commit 0e5738788e
16 changed files with 520 additions and 47 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
"""显式注册动作处理器"""
"""按动作 type 分配处理器,统一提供大屏 JSON 副本的执行入口"""
from typing import Any
@@ -20,7 +20,7 @@ ACTION_HANDLERS: dict[str, BaseActionHandler[Any]] = {
def apply_action(screen: Screen, action: Action) -> Screen:
"""接收已通过 Schema 校验的动作,返回执行后的副本"""
"""接收已通过 Schema 校验的动作,返回修改后的大屏副本,不保存或更新前端"""
handler = ACTION_HANDLERS.get(action.type)
if handler is None:
raise ValueError(f"尚未实现动作处理器: {action.type}")