mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): move filesystem_selection to app/agents/shared (slice 3a)
Promote the filesystem mode contracts (FilesystemMode, FilesystemSelection, ClientPlatform, LocalFilesystemMount) out of `new_chat` into the cross-agent `app/agents/shared` kernel. Pure leaf consumed across the whole multi-agent filesystem middleware/tool tree, the chat flows/monolith, routes and tests. git mv (content unchanged) + flipped all ~48 importers. A re-export shim remains at new_chat/filesystem_selection.py only for the not-yet-retired single-agent (chat_deepagent). Also updated the stream parity test's annotation normalizer to strip the new app.agents.shared.filesystem_selection. prefix (the dataclasses' __module__ changed with the move), keeping monolith<->flows signature parity intact. Behavior-preserving: only import paths change. 1326 tests green.
This commit is contained in:
parent
a975754e7d
commit
1b536b8aee
51 changed files with 110 additions and 86 deletions
|
|
@ -20,7 +20,7 @@ from unittest.mock import AsyncMock
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.new_chat.filesystem_selection import FilesystemMode
|
||||
from app.agents.shared.filesystem_selection import FilesystemMode
|
||||
from app.agents.new_chat.middleware.filesystem import SurfSenseFilesystemMiddleware
|
||||
from app.agents.new_chat.middleware.kb_postgres_backend import KBPostgresBackend
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from pathlib import Path
|
|||
import pytest
|
||||
|
||||
from app.agents.new_chat.filesystem_backends import build_backend_resolver
|
||||
from app.agents.new_chat.filesystem_selection import (
|
||||
from app.agents.shared.filesystem_selection import (
|
||||
ClientPlatform,
|
||||
FilesystemMode,
|
||||
FilesystemSelection,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ from types import SimpleNamespace
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.new_chat.filesystem_selection import FilesystemMode
|
||||
from app.agents.shared.filesystem_selection import FilesystemMode
|
||||
from app.agents.new_chat.middleware.filesystem import (
|
||||
SurfSenseFilesystemMiddleware,
|
||||
_build_filesystem_system_prompt,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from pathlib import Path
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.new_chat.filesystem_selection import FilesystemMode
|
||||
from app.agents.shared.filesystem_selection import FilesystemMode
|
||||
from app.agents.new_chat.middleware.filesystem import SurfSenseFilesystemMiddleware
|
||||
from app.agents.new_chat.middleware.multi_root_local_folder_backend import (
|
||||
MultiRootLocalFolderBackend,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ def _normalize_annotation(ann: Any) -> str:
|
|||
raw.replace("typing.", "")
|
||||
.replace("collections.abc.", "")
|
||||
.replace("app.db.", "")
|
||||
.replace("app.agents.new_chat.filesystem_selection.", "")
|
||||
.replace("app.agents.shared.filesystem_selection.", "")
|
||||
.replace("app.agents.shared.context.", "")
|
||||
)
|
||||
# Unwrap ``<class 'int'>`` → ``int`` (legacy-side type objects).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue