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 @@
"""动作处理器公共接口"""
"""动作处理器公共接口,供后端校验时修改大屏 JSON 副本,不操作前端画布"""
from abc import ABC, abstractmethod
from typing import Generic, TypeVar
@@ -12,7 +12,7 @@ ActionT = TypeVar("ActionT", bound=ActionModel)
class BaseActionHandler(ABC, Generic[ActionT]):
@abstractmethod
def apply(self, screen: Screen, action: ActionT) -> Screen:
"""校验并在副本上执行动作,返回新的大屏"""
"""检查动作能否执行,返回修改后的大屏副本,保留原始输入"""
raise NotImplementedError
def copy_target(self, screen: Screen, target_id: str) -> tuple[Screen, ScreenNode]: