Explorar el Código

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

Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com>
tags/1.8.0
Yongtao Huang hace 2 meses
padre
commit
c9e18346ce
No account linked to committer's email address

+ 0
- 2
api/core/mcp/auth/auth_provider.py Ver fichero

from models.tools import MCPToolProvider from models.tools import MCPToolProvider
from services.tools.mcp_tools_manage_service import MCPToolManageService from services.tools.mcp_tools_manage_service import MCPToolManageService


LATEST_PROTOCOL_VERSION = "1.0"



class OAuthClientProvider: class OAuthClientProvider:
mcp_provider: MCPToolProvider mcp_provider: MCPToolProvider

+ 0
- 5
api/core/mcp/client/sse_client.py Ver fichero

StatusQueue: TypeAlias = queue.Queue[_StatusReady | _StatusError] 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: class SSETransport:
"""SSE client transport implementation.""" """SSE client transport implementation."""



+ 0
- 0
api/core/tools/entities/agent_entities.py Ver fichero


+ 0
- 1
api/core/tools/entities/file_entities.py Ver fichero



+ 0
- 20
api/tests/unit_tests/core/mcp/client/test_sse.py Ver fichero

# Note: In real implementation, cleanup should put None to signal shutdown # 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(): def test_sse_client_headers_propagation():
"""Test that custom headers are properly propagated in SSE client.""" """Test that custom headers are properly propagated in SSE client."""
test_url = "http://test.example/sse" test_url = "http://test.example/sse"

Cargando…
Cancelar
Guardar