remove random as any casts

This commit is contained in:
Andrew Pareles 2025-06-29 16:34:35 -07:00
parent 9031215001
commit 9732f74ba7

View file

@ -1129,7 +1129,7 @@ const UserMessageComponent = ({ chatMessage, messageIdx, isCheckpointGhost, curr
if (e.key === 'Escape') {
onCloseEdit()
}
if (e.key === 'Enter' && !e.shiftKey) {
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
onSubmit()
}
}
@ -3056,7 +3056,7 @@ export const SidebarChat = () => {
setInstructionsAreEmpty(!newStr)
}, [setInstructionsAreEmpty])
const onKeyDown = useCallback((e: KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter' && !e.shiftKey) {
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
onSubmit()
} else if (e.key === 'Escape' && isRunning) {
onAbort()