mirror of
https://github.com/langgenius/dify.git
synced 2026-04-22 11:47:40 +08:00
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:
@ -1,12 +1,15 @@
|
||||
import contextvars
|
||||
from collections.abc import Iterator
|
||||
from contextlib import contextmanager
|
||||
from typing import TypeVar
|
||||
from typing import TYPE_CHECKING, TypeVar
|
||||
|
||||
from flask import Flask, g
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from models import Account, EndUser
|
||||
|
||||
|
||||
@contextmanager
|
||||
def preserve_flask_contexts(
|
||||
@ -64,3 +67,7 @@ def preserve_flask_contexts(
|
||||
finally:
|
||||
# Any cleanup can be added here if needed
|
||||
pass
|
||||
|
||||
|
||||
def set_login_user(user: "Account | EndUser"):
|
||||
g._login_user = user
|
||||
|
||||
Reference in New Issue
Block a user