Фиксация изменений
This commit is contained in:
Binary file not shown.
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from app.modules.rag.contracts import RagDocument, RagLayer, RagSource, RagSpan
|
||||
from app.modules.rag.indexing.code.code_text.chunker import CodeChunk
|
||||
from app.modules.rag.retrieval.test_filter import is_test_path
|
||||
|
||||
|
||||
class CodeTextDocumentBuilder:
|
||||
@@ -17,6 +18,7 @@ class CodeTextDocumentBuilder:
|
||||
"chunk_index": chunk_index,
|
||||
"chunk_type": chunk.chunk_type,
|
||||
"module_or_unit": source.path.replace("/", ".").removesuffix(".py"),
|
||||
"is_test": is_test_path(source.path),
|
||||
"artifact_type": "CODE",
|
||||
},
|
||||
)
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from app.modules.rag.contracts import EvidenceLink, EvidenceType, RagDocument, RagLayer, RagSource, RagSpan
|
||||
from app.modules.rag.indexing.code.edges.extractor import PyEdge
|
||||
from app.modules.rag.retrieval.test_filter import is_test_path
|
||||
|
||||
|
||||
class EdgeDocumentBuilder:
|
||||
@@ -22,6 +23,7 @@ class EdgeDocumentBuilder:
|
||||
"dst_symbol_id": edge.dst_symbol_id,
|
||||
"dst_ref": edge.dst_ref,
|
||||
"resolution": edge.resolution,
|
||||
"is_test": is_test_path(source.path),
|
||||
"lang_payload": edge.metadata,
|
||||
"artifact_type": "CODE",
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from app.modules.rag.contracts import EvidenceLink, EvidenceType, RagDocument, RagLayer, RagSource, RagSpan
|
||||
from app.modules.rag.indexing.code.entrypoints.registry import Entrypoint
|
||||
from app.modules.rag.retrieval.test_filter import is_test_path
|
||||
|
||||
|
||||
class EntrypointDocumentBuilder:
|
||||
@@ -19,6 +20,7 @@ class EntrypointDocumentBuilder:
|
||||
"framework": entrypoint.framework,
|
||||
"route_or_command": entrypoint.route_or_command,
|
||||
"handler_symbol_id": entrypoint.handler_symbol_id,
|
||||
"is_test": is_test_path(source.path),
|
||||
"lang_payload": entrypoint.metadata,
|
||||
"artifact_type": "CODE",
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from app.modules.rag.contracts import RagDocument, RagLayer, RagSource, RagSpan
|
||||
from app.modules.rag.indexing.code.symbols.extractor import PySymbol
|
||||
from app.modules.rag.retrieval.test_filter import is_test_path
|
||||
|
||||
|
||||
class SymbolDocumentBuilder:
|
||||
@@ -26,6 +27,7 @@ class SymbolDocumentBuilder:
|
||||
"parent_symbol_id": symbol.parent_symbol_id,
|
||||
"package_or_module": source.path.replace("/", ".").removesuffix(".py"),
|
||||
"is_entry_candidate": bool(symbol.decorators),
|
||||
"is_test": is_test_path(source.path),
|
||||
"lang_payload": symbol.lang_payload,
|
||||
"artifact_type": "CODE",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user