Skip to content

feat: add live character counter to command input#263

Open
jahnavipriya7 wants to merge 2 commits into
VyomKulshrestha:mainfrom
jahnavipriya7:feature-char-counter
Open

feat: add live character counter to command input#263
jahnavipriya7 wants to merge 2 commits into
VyomKulshrestha:mainfrom
jahnavipriya7:feature-char-counter

Conversation

@jahnavipriya7
Copy link
Copy Markdown

Description

Added a real-time character counter to the command input bar.

Features

  • Live character count updates while typing
  • Displays current count against configurable limit
  • Counter turns red when limit exceeds
  • Minimal UI impact

Fixes #224

@jahnavipriya7
Copy link
Copy Markdown
Author

Implemented the requested real-time character counter feature. Looking forward to feedback. Thanks!

@VyomKulshrestha
Copy link
Copy Markdown
Owner

Thanks for implementing the character counter!

We have a couple of suggestions for improvement:

  1. Enforce the Limit: Currently, the counter turns red when the count exceeds 20,000, but the form is still allowed to submit and the submit button remains active. If 20,000 is a strict limit, either the submit button should be disabled when the limit is exceeded, or you should set maxlength="20000" on the <input> element.
  2. Styling/Alignment: The .char-counter has margin-top: 4px; but is placed inside a horizontal flexbox container (.input-wrapper). This might cause vertical alignment misalignment inside the input bar. It would be cleaner to align it using standard flex utilities or position it relative to the input field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Implement a Token/Character Counter in the Command Input Bar

2 participants