Added character count to alert message (#135)
This improvement adds additional information to the alert that is displayed when the user enters more characters than allowed in the rich text element. Now, the alert also shows the number of characters that the user has entered, which helps to provide clearer and more useful feedback to the use
This commit is contained in:
@@ -20,7 +20,7 @@ export const ChatInput: FC<Props> = ({ onSend, messageIsStreaming, model, stopCo
|
||||
const maxLength = model.id === OpenAIModelID.GPT_3_5 ? 12000 : 24000;
|
||||
|
||||
if (value.length > maxLength) {
|
||||
alert(`Message limit is ${maxLength} characters`);
|
||||
alert(`Message limit is ${maxLength} characters. You have entered ${value.length} characters.`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user