fix: add logfire spans to cli

This commit is contained in:
phernandez
2025-02-18 19:56:20 -06:00
parent 812136c8c2
commit 00d23a5ee1
10 changed files with 91 additions and 16 deletions
+7 -3
View File
@@ -66,15 +66,19 @@ class ContextService:
# Pattern matching - use search
if "*" in path:
logger.debug(f"Pattern search for '{path}'")
primary = await self.search_repository.search(permalink_match=path)
primary = await self.search_repository.search(
permalink_match=path, limit=max_results
)
# Direct lookup for exact path
else:
logger.debug(f"Direct lookup for '{path}'")
primary = await self.search_repository.search(permalink=path)
primary = await self.search_repository.search(permalink=path, limit=max_results)
else:
logger.debug(f"Build context for '{types}'")
primary = await self.search_repository.search(types=types, after_date=since)
primary = await self.search_repository.search(
types=types, after_date=since, limit=max_results
)
# Get type_id pairs for traversal
+3 -1
View File
@@ -51,7 +51,7 @@ class SearchService:
logger.info("Reindex complete")
async def search(self, query: SearchQuery) -> List[SearchIndexRow]:
async def search(self, query: SearchQuery, limit=10, offset=0) -> List[SearchIndexRow]:
"""Search across all indexed content.
Supports three modes:
@@ -84,6 +84,8 @@ class SearchService:
types=query.types,
entity_types=query.entity_types,
after_date=after_date,
limit=limit,
offset=offset,
)
return results