mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): move filesystem_state, path_resolver, sandbox to app/agents/shared (slice 3b)
Relocate three leaf filesystem-cluster modules to the shared kernel and flip all 38 importers. No re-export shims needed (no frozen single-agent importer). This also resolves the pre-existing shared->new_chat back-edge from shared/receipt_command.py onto filesystem_state. filesystem_backends is intentionally deferred to slice 5: it depends on new_chat middleware (kb_postgres_backend, multi_root_local_folder_backend) that have not yet moved, so relocating it now would create a shared->new_chat edge.
This commit is contained in:
parent
1b536b8aee
commit
3efe51e6ec
41 changed files with 55 additions and 55 deletions
|
|
@ -22,7 +22,7 @@ from app.agents.new_chat.mention_resolver import (
|
|||
resolve_mentions,
|
||||
substitute_in_text,
|
||||
)
|
||||
from app.agents.new_chat.path_resolver import DOCUMENTS_ROOT, PathIndex
|
||||
from app.agents.shared.path_resolver import DOCUMENTS_ROOT, PathIndex
|
||||
from app.schemas.new_chat import MentionedDocumentInfo
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from unittest.mock import AsyncMock, MagicMock
|
|||
|
||||
import pytest
|
||||
|
||||
from app.agents.new_chat.path_resolver import (
|
||||
from app.agents.shared.path_resolver import (
|
||||
DOCUMENTS_ROOT,
|
||||
PathIndex,
|
||||
doc_to_virtual_path,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ contract cannot silently regress.
|
|||
from __future__ import annotations
|
||||
|
||||
from app.agents.new_chat.middleware.knowledge_tree import KnowledgeTreeMiddleware
|
||||
from app.agents.new_chat.path_resolver import DOCUMENTS_ROOT
|
||||
from app.agents.shared.path_resolver import DOCUMENTS_ROOT
|
||||
|
||||
|
||||
def _compute(folder_paths: list[str], doc_paths: list[str]) -> set[str]:
|
||||
|
|
@ -86,7 +86,7 @@ class TestFormatTreeRendering:
|
|||
folder_paths: list[str],
|
||||
doc_specs: list[dict],
|
||||
) -> str:
|
||||
from app.agents.new_chat.path_resolver import PathIndex
|
||||
from app.agents.shared.path_resolver import PathIndex
|
||||
|
||||
index = PathIndex(
|
||||
folder_paths={i + 1: p for i, p in enumerate(folder_paths)},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue