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:
Ernesto Barrera 2023-03-25 13:11:30 +01:00 committed by GitHub
parent 338ddedfec
commit 69e05160a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export const ChatInput: FC<Props> = ({ onSend, messageIsStreaming, model, stopCo
const maxLength = model.id === OpenAIModelID.GPT_3_5 ? 12000 : 24000; const maxLength = model.id === OpenAIModelID.GPT_3_5 ? 12000 : 24000;
if (value.length > maxLength) { if (value.length > maxLength) {
alert(`Message limit is ${maxLength} characters`); alert(`Message limit is ${maxLength} characters. You have entered ${value.length} characters.`);
return; return;
} }