Refactor web search plugin logic to remove fallback check for enabled searches

This commit is contained in:
qianlifeng 2024-12-01 18:28:10 +08:00
parent 5764443362
commit 1e81e77327
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ func (r *WebSearchPlugin) Query(ctx context.Context, query plugin.Query) (result
otherQuery := strings.Join(queries[1:], " ")
for _, search := range r.webSearches {
if search.IsFallback || !search.Enabled {
if !search.Enabled {
continue
}
if strings.ToLower(search.Keyword) == strings.ToLower(triggerKeyword) {