@@ -111,14 +111,9 @@ export const ChatV2 = () => {
111
111
const handleSubmit = async ( message : string , ignoreTokenUsageWarning : boolean ) => {
112
112
const formData = new FormData ( )
113
113
114
- let file = fileInputRef . current ?. files ?. [ 0 ]
114
+ const file = fileInputRef . current ?. files ?. [ 0 ]
115
115
if ( file ) {
116
- if ( ALLOWED_FILE_TYPES . includes ( file . type ) ) {
117
- formData . append ( 'file' , file )
118
- } else {
119
- console . error ( 'File not attached' )
120
- file = undefined
121
- }
116
+ formData . append ( 'file' , file )
122
117
}
123
118
124
119
const newMessages = messages . concat ( {
@@ -463,7 +458,7 @@ export const ChatV2 = () => {
463
458
position : 'relative' ,
464
459
transition : 'border 300ms' ,
465
460
borderLeft : '1px solid' ,
466
- borderColor : showAnnotations ? 'rgba(0,0,0,0.12)' : 'rgba(0,0,0,0)'
461
+ borderColor : showAnnotations ? 'rgba(0,0,0,0.12)' : 'rgba(0,0,0,0)' ,
467
462
} }
468
463
>
469
464
< Box
@@ -472,8 +467,9 @@ export const ChatV2 = () => {
472
467
top : 65 ,
473
468
padding : '2rem' ,
474
469
transition : 'transform 250ms ease-in-out' ,
475
- transform : showAnnotations ? 'translateX(0%)' : 'translate(100%)'
476
- } } >
470
+ transform : showAnnotations ? 'translateX(0%)' : 'translate(100%)' ,
471
+ } }
472
+ >
477
473
{ activeFileSearchResult && < Annotations fileSearchResult = { activeFileSearchResult } setShowAnnotations = { setShowAnnotations } /> }
478
474
</ Box >
479
475
</ Box >
0 commit comments