fix: fix passage listing for sources (#894)

This commit is contained in:
Sarah Wooders 2025-02-03 16:38:14 -08:00 committed by GitHub
parent cb301eda63
commit f57f894b8a

View File

@ -1000,8 +1000,8 @@ class SyncServer(Server):
return passage_count, document_count
def list_data_source_passages(self, user_id: str, source_id: str) -> List[Passage]:
warnings.warn("list_data_source_passages is not yet implemented, returning empty list.", category=UserWarning)
return []
# TODO: move this query into PassageManager
return self.agent_manager.list_passages(actor=self.user_manager.get_user_or_default(user_id=user_id), source_id=source_id)
def list_all_sources(self, actor: User) -> List[Source]:
"""List all sources (w/ extra metadata) belonging to a user"""