const configuredAgents = Array.isArray(cfg.agents?.list) ? cfg.agents?.list : []; const configuredIds = configuredAgents.map((entry) => normalizeAgentId(entry.id)); const configuredNameMap = new Map<string, string>(); for (const entry of configuredAgents) { const name = entry?.name?.trim() ?? ""; if (!name) { continue;
}
configuredNameMap.set(normalizeAgentId(entry.id), name);
}
const allowed = new Set<string>();
allowed.add(requesterAgentId); if (allowAny) { for (const id of configuredIds) {
allowed.add(id);
}
} else { for (const id of allowSet) {
allowed.add(id);
}
}
const all = Array.from(allowed); const rest = all
.filter((id) => id !== requesterAgentId)
.toSorted((a, b) => a.localeCompare(b)); const ordered = [requesterAgentId, ...rest]; const agents: AgentListEntry[] = ordered.map((id) => ({
id,
name: configuredNameMap.get(id),
configured: configuredIds.includes(id),
}));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.