Fix Browse All to use list_tools instead of search_tools

search_tools requires a query, but list_tools allows browsing
without a search term. Use list_tools when no query or tags are set.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rob 2026-01-14 05:01:01 -04:00
parent 305c09a929
commit ebb70f5865
1 changed files with 20 additions and 9 deletions

View File

@ -32,15 +32,26 @@ class SearchWorker(QThread):
def run(self): def run(self):
try: try:
client = RegistryClient() client = RegistryClient()
result = client.search_tools( category = self.category if self.category and self.category != "All" else None
self.query,
category=self.category if self.category and self.category != "All" else None, # Use list_tools for browsing (no query/tags), search_tools for searching
tags=self.tags, if not self.query and not self.tags:
page=self.page, result = client.list_tools(
per_page=self.per_page, category=category,
sort=self.sort, page=self.page,
include_facets=True per_page=self.per_page,
) sort=self.sort
)
else:
result = client.search_tools(
self.query,
category=category,
tags=self.tags,
page=self.page,
per_page=self.per_page,
sort=self.sort,
include_facets=True
)
self.finished.emit(result) self.finished.emit(result)
except Exception as e: except Exception as e:
self.error.emit(str(e)) self.error.emit(str(e))