AgentContext new ctor;

This commit is contained in:
extio-de
2025-06-23 12:37:16 +02:00
parent 3b07338f94
commit 8aee0acb15
2 changed files with 7 additions and 1 deletions

View File

@@ -32,6 +32,12 @@ public final class AgentContext {
private volatile boolean skipNextCompletion;
public AgentContext(final Collection<? extends BaseAgent> agents) {
this.agents = agents.stream().collect(Collectors.toMap(BaseAgent::name, agent -> agent));
this.context = new ConcurrentHashMap<>();
this.requestStatistic = new AgentRequestStatistic();
}
public AgentContext(final Map<String, ? extends BaseAgent> agents) {
this.agents = agents;
this.context = new ConcurrentHashMap<>();