mirror of
https://github.com/langgenius/dify.git
synced 2026-03-25 23:01:33 -04:00
fix: resolve import migrations and test failures after segment 3 merge
- Migrate core.model_runtime -> dify_graph.model_runtime across 20+ files - Migrate core.workflow.file -> dify_graph.file across 15+ files - Migrate core.workflow.enums -> dify_graph.enums in service files - Fix SandboxContext phantom import in dify_graph/context/__init__.py - Fix core.app.workflow.node_factory -> core.workflow.node_factory - Fix toast import paths (useToastContext from toast/context) - Fix app-info.tsx import paths for relocated app-operations - Fix 15 frontend test files for API changes, missing QueryClientProvider, i18n key renames, and component behavior changes Made-with: Cursor
This commit is contained in:
@@ -378,7 +378,7 @@ class Node(Generic[NodeDataT]):
|
||||
Nested nodes are nodes with parent_node_id == self._node_id.
|
||||
They are executed before the main node to extract values from list[PromptMessage].
|
||||
"""
|
||||
from core.app.workflow.node_factory import DifyNodeFactory
|
||||
from core.workflow.node_factory import DifyNodeFactory
|
||||
|
||||
extractor_configs = self._find_extractor_node_configs()
|
||||
logger.debug("[NestedNode] Found %d nested nodes for parent '%s'", len(extractor_configs), self._node_id)
|
||||
@@ -689,7 +689,7 @@ class Node(Generic[NodeDataT]):
|
||||
|
||||
@_dispatch.register
|
||||
def _(self, event: StreamChunkEvent) -> NodeRunStreamChunkEvent:
|
||||
from core.workflow.graph_events import ChunkType
|
||||
from dify_graph.graph_events import ChunkType
|
||||
|
||||
return NodeRunStreamChunkEvent(
|
||||
id=self.execution_id,
|
||||
@@ -711,7 +711,7 @@ class Node(Generic[NodeDataT]):
|
||||
|
||||
@_dispatch.register
|
||||
def _(self, event: ToolCallChunkEvent) -> NodeRunStreamChunkEvent:
|
||||
from core.workflow.graph_events import ChunkType
|
||||
from dify_graph.graph_events import ChunkType
|
||||
|
||||
return NodeRunStreamChunkEvent(
|
||||
id=self._node_execution_id,
|
||||
@@ -726,8 +726,8 @@ class Node(Generic[NodeDataT]):
|
||||
|
||||
@_dispatch.register
|
||||
def _(self, event: ToolResultChunkEvent) -> NodeRunStreamChunkEvent:
|
||||
from core.workflow.entities import ToolResult, ToolResultStatus
|
||||
from core.workflow.graph_events import ChunkType
|
||||
from dify_graph.entities import ToolResult, ToolResultStatus
|
||||
from dify_graph.graph_events import ChunkType
|
||||
|
||||
tool_result = event.tool_result or ToolResult()
|
||||
status: ToolResultStatus = tool_result.status or ToolResultStatus.SUCCESS
|
||||
@@ -748,7 +748,7 @@ class Node(Generic[NodeDataT]):
|
||||
|
||||
@_dispatch.register
|
||||
def _(self, event: ThoughtChunkEvent) -> NodeRunStreamChunkEvent:
|
||||
from core.workflow.graph_events import ChunkType
|
||||
from dify_graph.graph_events import ChunkType
|
||||
|
||||
return NodeRunStreamChunkEvent(
|
||||
id=self._node_execution_id,
|
||||
|
||||
Reference in New Issue
Block a user