feat: KnowledgeFS and New Knowledge (#44165)

Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: zhaohao1004 <zhaohao1004@gmail.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: FFXN <lizy@dify.ai>
This commit is contained in:
authored and GitHub committed 2026-10-23 03:34:59 +00:00
1 parent 7445e48323
commit fd2db63184
1480 files changed
+312818 -3239

No files matched your search

+8
View File
@@ -5,6 +5,7 @@ from dataclasses import dataclass
from enum import Enum
from typing import TYPE_CHECKING, Any, Literal, Protocol, cast, overload, override
from flask import current_app
from pydantic import JsonValue
from sqlalchemy import select
from sqlalchemy.orm import Session, sessionmaker
@@ -574,6 +575,7 @@ class DifyToolNodeRuntime(ToolNodeRuntimeProtocol):
else None
),
)
tool_runtime.runtime.dify_run_context = self._run_context
except ToolNodeError:
raise
except Exception as exc:
@@ -1057,3 +1059,9 @@ def build_dify_llm_file_saver(
file_reference_factory=DifyFileReferenceFactory(run_context),
http_client=http_client,
)
def build_knowledge_fs_node_dependencies() -> dict[str, object]:
"""Resolve the retrieval capabilities registered by the application composition root."""
factory = cast(Callable[[], dict[str, object]], current_app.extensions["knowledge_fs_node_dependencies"])
return factory()