fix: 修复并行搜索中WebSearchStateService缺失问题

This commit is contained in:
wizardchen
2025-12-30 19:36:35 +08:00
committed by lyingbug
parent 6a123f4620
commit 99eabed688
2 changed files with 10 additions and 8 deletions
@@ -491,7 +491,7 @@ func (p *PluginSearch) tryDirectChunkLoading(ctx context.Context, tenantID uint6
// searchWebIfEnabled executes web search when enabled and returns converted results
func (p *PluginSearch) searchWebIfEnabled(ctx context.Context, chatManage *types.ChatManage) []*types.SearchResult {
if !chatManage.WebSearchEnabled || p.webSearchService == nil || p.tenantService == nil || chatManage.TenantID <= 0 {
if !chatManage.WebSearchEnabled || p.webSearchService == nil || p.tenantService == nil {
return nil
}
tenant := ctx.Value(types.TenantInfoContextKey).(*types.Tenant)