refactor: rename plugin manager to plugin client and rename path from manager to impl (#18876)

This commit is contained in:
Yeuoly
2025-04-27 14:22:25 +08:00
committed by GitHub
parent d91828dd90
commit abafa68647
38 changed files with 116 additions and 103 deletions

View File

@@ -1,12 +1,12 @@
from core.agent.strategy.plugin import PluginAgentStrategy
from core.plugin.manager.agent import PluginAgentManager
from core.plugin.impl.agent import PluginAgentClient
def get_plugin_agent_strategy(
tenant_id: str, agent_strategy_provider_name: str, agent_strategy_name: str
) -> PluginAgentStrategy:
# TODO: use contexts to cache the agent provider
manager = PluginAgentManager()
manager = PluginAgentClient()
agent_provider = manager.fetch_agent_strategy_provider(tenant_id, agent_strategy_provider_name)
for agent_strategy in agent_provider.declaration.strategies:
if agent_strategy.identity.name == agent_strategy_name: