feat(identity): include emoji in message prefix
When identity.emoji is configured, include it in the resolved message prefix.
- If both name and emoji: [🦁 Richbot]
- If name only: [Richbot]
- If emoji only: [🦁]
Builds on the identity.name prefix feature from 8112b27.
This commit is contained in:
parent
01e0d3a320
commit
23f53f9a3a
@ -18,9 +18,12 @@ export function resolveAckReaction(cfg: MoltbotConfig, agentId: string): string
|
||||
}
|
||||
|
||||
export function resolveIdentityNamePrefix(cfg: MoltbotConfig, agentId: string): string | undefined {
|
||||
const name = resolveAgentIdentity(cfg, agentId)?.name?.trim();
|
||||
if (!name) return undefined;
|
||||
return `[${name}]`;
|
||||
const identity = resolveAgentIdentity(cfg, agentId);
|
||||
const name = identity?.name?.trim();
|
||||
const emoji = identity?.emoji?.trim();
|
||||
if (!name && !emoji) return undefined;
|
||||
const parts = [emoji, name].filter(Boolean);
|
||||
return `[${parts.join(" ")}]`;
|
||||
}
|
||||
|
||||
/** Returns just the identity name (without brackets) for template context. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user