feat: snippet new (#36617)

This commit is contained in:
FFXN
2026-05-25 16:36:35 +08:00
committed by GitHub
parent d859728dd7
commit d925ed2f28

View File

@ -1,7 +1,7 @@
import dataclasses
import json
import logging
from collections.abc import Mapping, Sequence
from collections.abc import Mapping, Sequence, Set
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from enum import StrEnum
@ -271,12 +271,20 @@ class WorkflowDraftVariableService:
)
def list_variables_without_values(
self, app_id: str, page: int, limit: int, user_id: str
self,
app_id: str,
page: int,
limit: int,
user_id: str,
*,
exclude_node_ids: Set[str] | None = None,
) -> WorkflowDraftVariableList:
criteria = [
WorkflowDraftVariable.app_id == app_id,
WorkflowDraftVariable.user_id == user_id,
]
if exclude_node_ids:
criteria.append(WorkflowDraftVariable.node_id.notin_(list(exclude_node_ids)))
total = None
base_stmt = select(WorkflowDraftVariable).where(*criteria)
if page == 1: