feat: 优化部分代码及提示词
This commit is contained in:
+2
-2
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user