fix: keep contact summary counts (#625) (thanks @mahmoudashraf93)

This commit is contained in:
Peter Steinberger
2026-01-10 01:02:28 +01:00
parent d1e10af1e1
commit 103dd3af64
2 changed files with 27 additions and 2 deletions

View File

@@ -801,7 +801,10 @@ function formatContactsPlaceholder(labels: string[], total: number): string {
const suffix = total === 1 ? "contact" : "contacts";
return `<contacts: ${total} ${suffix}>`;
}
return `<contacts: ${cleaned.join(", ")}>`;
const shown = cleaned.slice(0, 3);
const remaining = Math.max(total - shown.length, 0);
const suffix = remaining > 0 ? ` +${remaining} more` : "";
return `<contacts: ${shown.join(", ")}${suffix}>`;
}
function formatContactLabel(