refactor(workflow-file): move core.file to core.workflow.file (#32252)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
99
2026-02-16 22:38:19 +08:00
committed by GitHub
parent 6824eda1c6
commit 7656d514b9
120 changed files with 364 additions and 252 deletions

View File

@@ -94,6 +94,10 @@ class Storage:
@overload
def load(self, filename: str, /, *, stream: Literal[True]) -> Generator: ...
# Keep a bool fallback overload for callers that forward a runtime bool flag.
@overload
def load(self, filename: str, /, *, stream: bool = False) -> Union[bytes, Generator]: ...
def load(self, filename: str, /, *, stream: bool = False) -> Union[bytes, Generator]:
if stream:
return self.load_stream(filename)
@@ -124,3 +128,6 @@ storage = Storage()
def init_app(app: DifyApp):
storage.init_app(app)
from core.app.workflow.file_runtime import bind_dify_workflow_file_runtime
bind_dify_workflow_file_runtime()

View File

@@ -9,9 +9,9 @@ from opentelemetry.trace import Span
from opentelemetry.trace.status import Status, StatusCode
from pydantic import BaseModel
from core.file.models import File
from core.variables import Segment
from core.workflow.enums import NodeType
from core.workflow.file.models import File
from core.workflow.graph_events import GraphNodeEventBase
from core.workflow.nodes.base.node import Node
from extensions.otel.semconv.gen_ai import ChainAttributes, GenAIAttributes