feat(ui): configure maxParallelToolCalls for factory-created agents

The acp and stdio-agent plugins only forwarded `model` into their created
agents, so every factory/ACP deployment was pinned to the agent-loop default
parallel cap with no cordis.yml override. Add a `maxParallelToolCalls` config
field (positive-integer validated) to both, threaded through the existing
per-agent options path — symmetric with `model`.
This commit is contained in:
Dudu-0223
2026-07-14 11:55:39 +08:00
parent 8c8e5fdd24
commit eae8b8ce2e
7 changed files with 50 additions and 3 deletions

View File

@@ -818,5 +818,7 @@ describe('agentOptions', () => {
it('includes only the fields present in config', () => {
expect(agentOptions({})).toEqual({})
expect(agentOptions({ model: 'm' })).toEqual({ model: 'm' })
expect(agentOptions({ maxParallelToolCalls: 3 })).toEqual({ maxParallelToolCalls: 3 })
expect(agentOptions({ model: 'm', maxParallelToolCalls: 1 })).toEqual({ model: 'm', maxParallelToolCalls: 1 })
})
})