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:
		
							parent
							
								
									338ddedfec
								
							
						
					
					
						commit
						69e05160a3
					
				|  | @ -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; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue