feat(web-search): refactor web search provider

- Updated relevant files to include provider registration, implementation, and metadata.
- Enhanced frontend components to support provider management and configuration.
- Added localization for new provider settings and messages.
- Implemented backend repository methods for CRUD operations on web search providers.
This commit is contained in:
wizardchen
2026-03-31 20:14:26 +08:00
committed by lyingbug
parent c59ae84157
commit a5ca9a2784
46 changed files with 2311 additions and 1499 deletions
+20 -17
View File
@@ -36,9 +36,10 @@ type sessionService struct {
sessionStorage llmcontext.ContextStorage // Session storage
knowledgeService interfaces.KnowledgeService // Service for knowledge operations
chunkService interfaces.ChunkService // Service for chunk operations
webSearchStateRepo interfaces.WebSearchStateService // Service for web search state
kbShareService interfaces.KBShareService // Service for KB sharing operations
memoryService interfaces.MemoryService // Service for memory operations
webSearchStateRepo interfaces.WebSearchStateService // Service for web search state
webSearchProviderRepo interfaces.WebSearchProviderRepository // Repository for web search provider entities
kbShareService interfaces.KBShareService // Service for KB sharing operations
memoryService interfaces.MemoryService // Service for memory operations
}
// NewSessionService creates a new session service instance with all required dependencies
@@ -54,24 +55,26 @@ func NewSessionService(cfg *config.Config,
agentService interfaces.AgentService,
sessionStorage llmcontext.ContextStorage,
webSearchStateRepo interfaces.WebSearchStateService,
webSearchProviderRepo interfaces.WebSearchProviderRepository,
kbShareService interfaces.KBShareService,
memoryService interfaces.MemoryService,
) interfaces.SessionService {
return &sessionService{
cfg: cfg,
sessionRepo: sessionRepo,
messageRepo: messageRepo,
knowledgeBaseService: knowledgeBaseService,
knowledgeService: knowledgeService,
chunkService: chunkService,
modelService: modelService,
tenantService: tenantService,
eventManager: eventManager,
agentService: agentService,
sessionStorage: sessionStorage,
webSearchStateRepo: webSearchStateRepo,
kbShareService: kbShareService,
memoryService: memoryService,
cfg: cfg,
sessionRepo: sessionRepo,
messageRepo: messageRepo,
knowledgeBaseService: knowledgeBaseService,
knowledgeService: knowledgeService,
chunkService: chunkService,
modelService: modelService,
tenantService: tenantService,
eventManager: eventManager,
agentService: agentService,
sessionStorage: sessionStorage,
webSearchStateRepo: webSearchStateRepo,
webSearchProviderRepo: webSearchProviderRepo,
kbShareService: kbShareService,
memoryService: memoryService,
}
}