mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): introduce chat/ category; dissolve top-level agents/shared
Recursive shared-folder rule: a shared/ must be shared by ALL siblings at its
level. The kernel (context, compaction, retry_after, web_search) was shared by
only 2 of the agents -- anonymous_chat + multi_agent_chat -- never by podcaster
or video_presentation. Those 2 are the "chat" category, so their shared code
belongs in that category's shared/, not the top-level one.
app/agents/anonymous_chat/ -> app/agents/chat/anonymous_chat/
app/agents/multi_agent_chat/ -> app/agents/chat/multi_agent_chat/
app/agents/shared/ -> app/agents/chat/shared/ (anon<->mac kernel)
Top-level app/agents/shared/ is gone: nothing was shared across all three
categories (chat / podcaster / video_presentation).
~289 import sites rewritten (app.agents.{anonymous_chat,multi_agent_chat,shared}
-> app.agents.chat.*); all moves are git renames (history preserved).
app/agents/ now: chat/, podcaster/, video_presentation/, runtime/.
This commit is contained in:
parent
d59bb2b5aa
commit
24b62a63b4
570 changed files with 712 additions and 613 deletions
|
|
@ -14,7 +14,7 @@ from typing import Any
|
|||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.agents.multi_agent_chat.shared.llm_config import (
|
||||
from app.agents.chat.multi_agent_chat.shared.llm_config import (
|
||||
AgentConfig,
|
||||
create_chat_litellm_from_agent_config,
|
||||
create_chat_litellm_from_config,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from dataclasses import dataclass
|
|||
from typing import TYPE_CHECKING
|
||||
from uuid import UUID
|
||||
|
||||
from app.agents.multi_agent_chat.shared.llm_config import AgentConfig
|
||||
from app.agents.chat.multi_agent_chat.shared.llm_config import AgentConfig
|
||||
from app.db import shielded_async_session
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from typing import Literal
|
|||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.agents.multi_agent_chat.shared.middleware.busy_mutex import end_turn
|
||||
from app.agents.chat.multi_agent_chat.shared.middleware.busy_mutex import end_turn
|
||||
from app.observability import otel as ot
|
||||
from app.services.auto_model_pin_service import (
|
||||
mark_runtime_cooldown,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from __future__ import annotations
|
|||
from collections.abc import AsyncGenerator, Awaitable, Callable
|
||||
from typing import Any
|
||||
|
||||
from app.agents.multi_agent_chat.shared.filesystem_selection import FilesystemMode
|
||||
from app.agents.chat.multi_agent_chat.shared.filesystem_selection import FilesystemMode
|
||||
from app.services.new_streaming_service import VercelStreamingService
|
||||
from app.tasks.chat.streaming.agent.event_loop import stream_agent_events
|
||||
from app.tasks.chat.streaming.shared.stream_result import StreamResult
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import traceback
|
|||
from collections.abc import Iterator
|
||||
from typing import Any, Literal
|
||||
|
||||
from app.agents.multi_agent_chat.shared.errors import BusyError
|
||||
from app.agents.chat.multi_agent_chat.shared.errors import BusyError
|
||||
from app.observability import metrics as ot_metrics, otel as ot
|
||||
from app.services.new_streaming_service import VercelStreamingService
|
||||
from app.tasks.chat.streaming.errors.classifier import classify_stream_exception
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue