feat: add anthropic mcp endpoint (#5148)
* mcp WIP * [autofix.ci] apply automated fixes * logging and flow user check * mcp stdio client component * handle disconnect better * initialization * session fix and type fix * [autofix.ci] apply automated fixes * defensive against mcp server bugs * [autofix.ci] apply automated fixes * notifications and sse component * enabled flags and resource support * remove unneeded print * extract json schema util * [autofix.ci] apply automated fixes * ruff * fix tools [] bug and db asysnc session api change * Tool instead of StructuredTool * ruff fixes * ruff * validation optimization * fix frontend test * another playwright fix * Update src/frontend/tests/extended/features/notifications.spec.ts Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * mcp component descriptions * mypy fixes * fix setup_database_url test --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
ee19feaf39
commit
63d649b0f4
14 changed files with 1229 additions and 525 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
from langflow.services.deps import get_settings_service
|
||||
|
||||
|
|
@ -5,14 +7,18 @@ from langflow.services.deps import get_settings_service
|
|||
@pytest.fixture(autouse=True)
|
||||
def setup_database_url(tmp_path, monkeypatch):
|
||||
"""Setup a temporary database URL for testing."""
|
||||
settings_service = get_settings_service()
|
||||
db_path = tmp_path / "test_performance.db"
|
||||
original_value = monkeypatch.delenv("LANGFLOW_DATABASE_URL", raising=False)
|
||||
original_value = os.getenv("LANGFLOW_DATABASE_URL")
|
||||
monkeypatch.delenv("LANGFLOW_DATABASE_URL", raising=False)
|
||||
test_db_url = f"sqlite:///{db_path}"
|
||||
monkeypatch.setenv("LANGFLOW_DATABASE_URL", test_db_url)
|
||||
settings_service.set("database_url", test_db_url)
|
||||
yield
|
||||
# Restore original value if it existed
|
||||
if original_value is not None:
|
||||
monkeypatch.setenv("LANGFLOW_DATABASE_URL", original_value)
|
||||
settings_service.set("database_url", original_value)
|
||||
else:
|
||||
monkeypatch.delenv("LANGFLOW_DATABASE_URL", raising=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue