Coverage for src / qdrant_loader_mcp_server / search / enhanced / cdi / extractors / conflicts.py: 100%
10 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 04:51 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 04:51 +0000
1from __future__ import annotations
3from ....models import SearchResult
4from ..interfaces import ConflictDetector
5from ..models import ConflictAnalysis
8class DefaultConflictDetector(ConflictDetector):
9 """Adapter to legacy ConflictDetector for behavior parity."""
11 def __init__(
12 self,
13 spacy_analyzer,
14 qdrant_client=None,
15 openai_client=None,
16 collection_name: str = "documents",
17 ):
18 from ...cross_document_intelligence import (
19 ConflictDetector as LegacyConflictDetector, # type: ignore
20 )
22 self._legacy = LegacyConflictDetector(
23 spacy_analyzer=spacy_analyzer,
24 qdrant_client=qdrant_client,
25 openai_client=openai_client,
26 collection_name=collection_name,
27 )
29 async def detect(self, results: list[SearchResult]) -> ConflictAnalysis: # type: ignore[override]
30 return await self._legacy.detect_conflicts(results)