Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions codebase_rag/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,11 @@ class RelationshipType(StrEnum):
CYPHER_QUERY_EMBEDDINGS = """
MATCH (m:Module)-[:DEFINES]->(n)
WHERE (n:Function OR n:Method)
AND m.qualified_name STARTS WITH $project_name + '.'
AND (m.qualified_name = $project_name
OR m.qualified_name STARTS WITH ($project_name + '.'))
RETURN id(n) AS node_id, n.qualified_name AS qualified_name,
n.start_line AS start_line, n.end_line AS end_line,
m.path AS path
n.start_line AS start_line, n.end_line AS end_line,
m.path AS path
"""


Expand Down
3 changes: 2 additions & 1 deletion codebase_rag/graph_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,9 @@ def _generate_semantic_embeddings(self) -> None:

logger.info(ls.PASS_4_EMBEDDINGS)

project_name = str(self.project_name).rstrip(".")
results = self.ingestor.fetch_all(
cs.CYPHER_QUERY_EMBEDDINGS, {"project_name": self.project_name + "."}
cs.CYPHER_QUERY_EMBEDDINGS, {"project_name": project_name}
)

if not results:
Expand Down