mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 15:10:22 +00:00
fix(gateway): hide phantom main agent when agents.list is configured (openclaw#12364) thanks @arosstale
Verified: - pnpm build - pnpm check - pnpm test Co-authored-by: arosstale <117890364+arosstale@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -394,7 +394,7 @@ export function listAgentsForGateway(cfg: OpenClawConfig): {
|
||||
let agentIds = listConfiguredAgentIds(cfg).filter((id) =>
|
||||
allowedIds ? allowedIds.has(id) : true,
|
||||
);
|
||||
if (mainKey && !agentIds.includes(mainKey)) {
|
||||
if (mainKey && !agentIds.includes(mainKey) && (!allowedIds || allowedIds.has(mainKey))) {
|
||||
agentIds = [...agentIds, mainKey];
|
||||
}
|
||||
const agents = agentIds.map((id) => {
|
||||
|
||||
Reference in New Issue
Block a user