openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
17 lines (16 loc) • 704 B
JavaScript
//#region src/commands/agents.binding-format.ts
function describeBinding(binding) {
const match = binding.match;
const parts = [match.channel];
if (match.accountId) parts.push(`accountId=${match.accountId}`);
if (match.peer) parts.push(`peer=${match.peer.kind}:${match.peer.id}`);
if (match.guildId) parts.push(`guild=${match.guildId}`);
if (match.teamId) parts.push(`team=${match.teamId}`);
if (match.roles?.length) parts.push(`roles=${match.roles.join(",")}`);
return parts.join(" ");
}
function describeBindingConflict(conflict) {
return `${describeBinding(conflict.binding)} (agent=${conflict.existingAgentId})`;
}
//#endregion
export { describeBindingConflict as n, describeBinding as t };