feat(agent-list): support multi-select canvas category filtering (#17843)

This commit is contained in:
chanx
2026-08-05 19:32:45 +08:00
committed by GitHub
parent dc6c0e5de5
commit 2dfb34f7ab
4 changed files with 67 additions and 19 deletions

View File

@@ -130,7 +130,7 @@ class UserCanvasService(CommonService):
orderby,
desc,
keywords,
canvas_category=None,
canvas_category_list=None,
tags=None,
canvas_type=None,
):
@@ -160,8 +160,8 @@ class UserCanvasService(CommonService):
)
else:
agents = cls.model.select(*fields).join(User, on=(cls.model.user_id == User.id)).where(owner_filter)
if canvas_category:
agents = agents.where(cls.model.canvas_category == canvas_category)
if canvas_category_list:
agents = agents.where(cls.model.canvas_category.in_(canvas_category_list))
if canvas_type:
agents = agents.where(cls.model.canvas_type == canvas_type)
if tags: