mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-14 22:52:15 +02:00
refactor(agents): rename intelligence_agent subagent to scraping
This commit is contained in:
parent
790507d107
commit
9738392161
18 changed files with 87 additions and 81 deletions
|
|
@ -63,7 +63,7 @@ def tools_use_test_session(monkeypatch, db_session: AsyncSession) -> None:
|
|||
async def _session_cm():
|
||||
yield db_session # owned by the outer fixture; do not close
|
||||
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
refresh_watch,
|
||||
start_watch,
|
||||
stop_watch,
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ import pytest
|
|||
import pytest_asyncio
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools.refresh_watch import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools.refresh_watch import (
|
||||
create_refresh_watch_tool,
|
||||
)
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools.start_watch import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools.start_watch import (
|
||||
create_start_watch_tool,
|
||||
)
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools.stop_watch import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools.stop_watch import (
|
||||
create_stop_watch_tool,
|
||||
)
|
||||
from app.auth.context import AuthContext
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
"""Unit tests for the ``start_watch`` tool on the intelligence_agent.
|
||||
"""Unit tests for the ``start_watch`` tool on the scraping sub-agent.
|
||||
|
||||
``start_watch`` binds a recurring watch to the *current* chat: it distils the
|
||||
question + cadence the agent extracted and creates a ``schedule`` +
|
||||
|
|
@ -26,7 +26,7 @@ class _FakeSessionCM:
|
|||
|
||||
|
||||
def _patch_deps(monkeypatch: pytest.MonkeyPatch, *, created: Any) -> AsyncMock:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
start_watch as mod,
|
||||
)
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ def _patch_deps(monkeypatch: pytest.MonkeyPatch, *, created: Any) -> AsyncMock:
|
|||
async def test_start_watch_binds_watch_to_current_chat(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
start_watch as mod,
|
||||
)
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ async def test_start_watch_binds_watch_to_current_chat(
|
|||
async def test_start_watch_errors_without_thread_or_auth(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
start_watch as mod,
|
||||
)
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ async def test_start_watch_errors_without_thread_or_auth(
|
|||
|
||||
|
||||
def test_load_tools_includes_start_watch_only_when_bindable() -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools.index import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools.index import (
|
||||
load_tools,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ def _watch(automation_id: int) -> Any:
|
|||
async def test_stop_watch_stops_every_watch_on_the_chat(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
stop_watch as mod,
|
||||
)
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ async def test_stop_watch_stops_every_watch_on_the_chat(
|
|||
async def test_stop_watch_reports_when_nothing_to_stop(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
stop_watch as mod,
|
||||
)
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ async def test_stop_watch_reports_when_nothing_to_stop(
|
|||
async def test_refresh_watch_runs_each_watch_now(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools import (
|
||||
refresh_watch as mod,
|
||||
)
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ async def test_refresh_watch_runs_each_watch_now(
|
|||
|
||||
|
||||
def test_load_tools_includes_control_tools_when_bindable() -> None:
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.intelligence_agent.tools.index import (
|
||||
from app.agents.chat.multi_agent_chat.subagents.builtins.scraping.tools.index import (
|
||||
load_tools,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ _EXPECTED_SUBAGENTS = frozenset(
|
|||
"dropbox",
|
||||
"gmail",
|
||||
"google_drive",
|
||||
"intelligence_agent",
|
||||
"jira",
|
||||
"knowledge_base",
|
||||
"linear",
|
||||
|
|
@ -42,6 +41,7 @@ _EXPECTED_SUBAGENTS = frozenset(
|
|||
"notion",
|
||||
"onedrive",
|
||||
"research",
|
||||
"scraping",
|
||||
"slack",
|
||||
"teams",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue