feat:新增代码注释

This commit is contained in:
2026-09-29 19:52:52 +08:00
parent ff8adba01b
commit af84485e8d
11 changed files with 224 additions and 7 deletions
+3
View File
@@ -7,6 +7,9 @@ from app.schemas.screen import Screen
class DeleteHandler(BaseActionHandler[DeleteAction]):
def apply(self, screen: Screen, action: DeleteAction) -> Screen:
# 确认删除目标存在,并取得与原始输入隔离的大屏副本及目标节点
result, target = self.copy_target(screen, action.target_id)
# 从副本中移除目标组件,保留其余组件及共享数据源
result.nodes = [node for node in result.nodes if node.id != target.id]
# 返回删除后的完整大屏,原始输入保持不变
return result