Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Chore: remove empty files and unused code (#23990)

Yongtao Huangc9e18346ce89
diff --git a/api/core/mcp/auth/auth_provider.py b/api/core/mcp/auth/auth_provider.py
index 00d5a259564..bad99fc092b 100644
--- a/api/core/mcp/auth/auth_provider.py
+++ b/api/core/mcp/auth/auth_provider.py
@@ -10,8 +10,6 @@ from core.mcp.types import (
from models.tools import MCPToolProvider
from services.tools.mcp_tools_manage_service import MCPToolManageService
-LATEST_PROTOCOL_VERSION = "1.0"
-
class OAuthClientProvider:
mcp_provider: MCPToolProvider
diff --git a/api/core/mcp/client/sse_client.py b/api/core/mcp/client/sse_client.py
index c6fe768a60a..cc38954eca9 100644
--- a/api/core/mcp/client/sse_client.py
+++ b/api/core/mcp/client/sse_client.py
@@ -38,11 +38,6 @@ WriteQueue: TypeAlias = queue.Queue[SessionMessage | Exception | None]
StatusQueue: TypeAlias = queue.Queue[_StatusReady | _StatusError]
-def remove_request_params(url: str) -> str:
- """Remove request parameters from URL, keeping only the path."""
- return urljoin(url, urlparse(url).path)
-
-
class SSETransport:
"""SSE client transport implementation."""
diff --git a/api/core/tools/entities/agent_entities.py b/api/core/tools/entities/agent_entities.py
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/api/core/tools/entities/file_entities.py b/api/core/tools/entities/file_entities.py
deleted file mode 100644
index 8b137891791..00000000000
--- a/api/core/tools/entities/file_entities.py
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/api/tests/unit_tests/core/mcp/client/test_sse.py b/api/tests/unit_tests/core/mcp/client/test_sse.py
index 8122cd08eb7..880a0d49400 100644
--- a/api/tests/unit_tests/core/mcp/client/test_sse.py
+++ b/api/tests/unit_tests/core/mcp/client/test_sse.py
@@ -262,26 +262,6 @@ def test_sse_client_queue_cleanup():
# Note: In real implementation, cleanup should put None to signal shutdown
-def test_sse_client_url_processing():
- """Test SSE client URL processing functions."""
- from core.mcp.client.sse_client import remove_request_params
-
- # Test URL with parameters
- url_with_params = "http://example.com/sse?param1=value1&param2=value2"
- cleaned_url = remove_request_params(url_with_params)
- assert cleaned_url == "http://example.com/sse"
-
- # Test URL without parameters
- url_without_params = "http://example.com/sse"
- cleaned_url = remove_request_params(url_without_params)
- assert cleaned_url == "http://example.com/sse"
-
- # Test URL with path and parameters
- complex_url = "http://example.com/path/to/sse?session=123&token=abc"
- cleaned_url = remove_request_params(complex_url)
- assert cleaned_url == "http://example.com/path/to/sse"
-
-
def test_sse_client_headers_propagation():
"""Test that custom headers are properly propagated in SSE client."""
test_url = "http://test.example/sse"