refactor: Update tenant ID handling across the application

This commit is contained in:
wizardchen
2025-11-25 16:30:54 +08:00
parent 9f6f5f5773
commit 64c44c9e27
78 changed files with 437 additions and 601 deletions
@@ -38,6 +38,9 @@ func (c *CompositeRetrieveEngine) Retrieve(ctx context.Context,
func(ctx context.Context, param types.RetrieveParams, results *[]*types.RetrieveResult, mu *sync.Mutex) error {
found := false
for _, engineInfo := range c.engineInfos {
if engineInfo == nil {
continue
}
if slices.Contains(engineInfo.retrieverType, param.RetrieverType) {
result, err := engineInfo.retrieveEngine.Retrieve(ctx, param)
if err != nil {
@@ -86,6 +89,9 @@ func NewCompositeRetrieveEngine(registry interfaces.RetrieveEngineRegistry, engi
// SupportRetriever checks if a retriever type is supported by any of the registered engines
func (c *CompositeRetrieveEngine) SupportRetriever(r types.RetrieverType) bool {
for _, engineInfo := range c.engineInfos {
if engineInfo == nil {
continue
}
if slices.Contains(engineInfo.retrieverType, r) {
return true
}