Skip to content

Add Character Counter and Input Length Validation in Chat Interface #300

Description

@anushka1330

Problem:

Currently, the chat input field does not provide any indication of the number of characters entered or warn users when the input exceeds a practical limit. Extremely long prompts may lead to poor user experience, increased API costs, or failures due to model token limits.

Expected Behavior:
Display a live character counter below the chat input.
Warn users when approaching the maximum input length.
Prevent submission when the configured limit is exceeded.
Display a clear validation message.

Benefits:
Improves user experience.
Prevents accidental oversized requests.
Reduces unnecessary API usage.
Makes application behavior more predictable.

Possible Solution:
Add a TextEditingController listener.
Display the current character count.
Disable the Send button after reaching the configured limit.
Keep the limit configurable through a constants file.

Additional Notes:
This enhancement only affects the frontend and does not require changes to the backend or AI
Hi, I would like to work on this issue under GSSoC 2026. Kindly assign it to me if it is available. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions