feat: Human Input Node (#32060)

The frontend and backend implementation for the human input node.

Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zhsama <torvalds@linux.do>
This commit is contained in:
QuantumGhost
2026-02-09 14:57:23 +08:00
committed by GitHub
parent 56e3a55023
commit a1fc280102
474 changed files with 32667 additions and 2050 deletions

View File

@@ -1,4 +1,5 @@
from datetime import datetime
from uuid import uuid4
from sqlalchemy import DateTime, func
from sqlalchemy.orm import DeclarativeBase, Mapped, MappedAsDataclass, mapped_column
@@ -41,7 +42,7 @@ class DefaultFieldsMixin:
)
updated_at: Mapped[datetime] = mapped_column(
__name_pos=DateTime,
DateTime,
nullable=False,
default=naive_utc_now,
server_default=func.current_timestamp(),
@@ -50,3 +51,16 @@ class DefaultFieldsMixin:
def __repr__(self) -> str:
return f"<{self.__class__.__name__}(id={self.id})>"
def gen_uuidv4_string() -> str:
"""gen_uuidv4_string generate a UUIDv4 string.
NOTE: This function exists only for historical reasons. New models should use uuidv7 for primary key generation.
"""
return str(uuid4())
def gen_uuidv7_string() -> str:
"""gen_uuidv4_string generate a UUIDv4 string."""
return str(uuidv7())