feat(ui): character counter in message compose box

This commit is contained in:
2026-07-09 16:00:28 -04:00
parent a7646481a4
commit 87d7345155
+9
View File
@@ -690,6 +690,15 @@ export const MessageInput = forwardRef<HTMLTextAreaElement, MessageInputProps>(f
<span className="flex-1" />
{/* character counter */}
{value.length > 0 && (
<span className={`text-xs font-mono tabular-nums px-1 ${
value.length > 3800 ? "text-gb-orange" : "text-gb-fg-f"
}`}>
{4000 - value.length}/4000
</span>
)}
{/* mode toggle */}
<button type="button" disabled={disabled} onClick={toggleMode}
title={mode === "md" ? "Switch to rich text" : "Switch to markdown"}