From af383dd9415cb27efd6b1c96b8d354e52e829e25 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 8 Nov 2025 16:48:08 +0800 Subject: [PATCH] Enhance GetAssistants filtering to include locales - Updated the GetAssistants method to allow filtering by locales in addition to keywords in name and description. - Improved query flexibility for retrieving assistants based on multiple criteria, enhancing user search capabilities. --- agent/store/xun/assistant.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/store/xun/assistant.go b/agent/store/xun/assistant.go index a5d9d0f1..0157108e 100644 --- a/agent/store/xun/assistant.go +++ b/agent/store/xun/assistant.go @@ -303,7 +303,8 @@ func (conv *Xun) GetAssistants(filter types.AssistantFilter, locale ...string) ( if filter.Keywords != "" { qb.Where(func(qb query.Query) { qb.Where("name", "like", fmt.Sprintf("%%%s%%", filter.Keywords)). - OrWhere("description", "like", fmt.Sprintf("%%%s%%", filter.Keywords)) + OrWhere("description", "like", fmt.Sprintf("%%%s%%", filter.Keywords)). + OrWhere("locales", "like", fmt.Sprintf("%%%s%%", filter.Keywords)) }) }