mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-06 20:15:17 +02:00
refactor(agents): move utils + document_xml to app/agents/shared (slice 5a)
Two pure leaf modules with no intra-new_chat deps and no frozen importer. Moving them now (before the middleware package) pre-empts two shared->new_chat back-edges that the middleware move would otherwise create (knowledge_search->utils, kb_postgres_backend->document_xml).
This commit is contained in:
parent
946f8a8c5d
commit
dcdf8f776b
6 changed files with 4 additions and 4 deletions
|
|
@ -42,7 +42,7 @@ from langchain.tools import ToolRuntime
|
|||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.agents.new_chat.document_xml import build_document_xml
|
||||
from app.agents.shared.document_xml import build_document_xml
|
||||
from app.agents.shared.path_resolver import (
|
||||
DOCUMENTS_ROOT,
|
||||
build_path_index,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ from app.agents.shared.path_resolver import (
|
|||
build_path_index,
|
||||
doc_to_virtual_path,
|
||||
)
|
||||
from app.agents.new_chat.utils import parse_date_or_datetime, resolve_date_range
|
||||
from app.agents.shared.utils import parse_date_or_datetime, resolve_date_range
|
||||
from app.db import (
|
||||
NATIVE_TO_LEGACY_DOCTYPE,
|
||||
Chunk,
|
||||
|
|
|
|||
|
|
@ -692,7 +692,7 @@ async def search_knowledge_base_raw_async(
|
|||
# Preserve the public signature for compatibility even if values are unused.
|
||||
_ = (db_session, connector_service)
|
||||
|
||||
from app.agents.new_chat.utils import resolve_date_range
|
||||
from app.agents.shared.utils import resolve_date_range
|
||||
|
||||
resolved_start_date, resolved_end_date = resolve_date_range(
|
||||
start_date=start_date,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import json
|
|||
import pytest
|
||||
from langchain_core.messages import AIMessage, HumanMessage
|
||||
|
||||
from app.agents.new_chat.document_xml import build_document_xml as _build_document_xml
|
||||
from app.agents.shared.document_xml import build_document_xml as _build_document_xml
|
||||
from app.agents.new_chat.middleware.knowledge_search import (
|
||||
KBSearchPlan,
|
||||
KnowledgeBaseSearchMiddleware,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue