@@ -134,7 +134,7 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
134134 return ;
135135 }
136136
137- if ( isGlobalUploading ) return ;
137+ if ( isGlobalUploading || isRagProcessing ) return ;
138138
139139 const successfulUploads = attachments . filter ( ( a ) => a . status === "success" && a . uploadData ) . map ( ( a ) => a . uploadData ! ) ;
140140
@@ -228,10 +228,10 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
228228
229229 const isGlobalUploading = attachments . some ( ( a ) => a . status === "uploading" ) ;
230230 const hasContent = message ?. trim ( ) . length > 0 || attachments . length > 0 ;
231- const isBusy = isGenerating || isGlobalUploading || isRagProcessing ;
231+ const isBusy = isGenerating || isGlobalUploading ;
232232
233233 return (
234- < div className = "w-full flex justify-center items-center px-4 pb-4 bg-transparent relative" >
234+ < div className = "w-full flex justify-center items-center px-4 pb-6 sm:pb- 4 bg-transparent relative" >
235235 { isDragging && (
236236 < div className = "fixed inset-0 z-99 flex items-center justify-center bg-black/40 backdrop-blur-sm pointer-events-none transition-all duration-200" >
237237 < div className = "absolute inset-4 sm:inset-6 md:inset-8 border-4 border-dashed border-white/60 rounded-3xl z-0" />
@@ -246,8 +246,8 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
246246 < div className = "w-full max-w-svw sm:max-w-180 transition-all duration-300 ease-in-out" >
247247 < form onSubmit = { handleSubmit } >
248248 < div className = "bg-white rounded-2xl border border-primary px-3 py-2 transition-all duration-200 ease-in-out shadow-md" >
249- { attachments . length > 0 && (
250- < div className = "flex flex-wrap gap-2 mb-2 pl-1" >
249+ { ( attachments . length > 0 || isRagProcessing ) && (
250+ < div className = "flex flex-wrap gap-2 mb-2 pl-1 items-center " >
251251 { attachments . map ( ( att ) => (
252252 < div key = { att . id } className = "relative group" >
253253 { att . file . type . startsWith ( "image/" ) ? (
@@ -299,6 +299,13 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
299299 ) }
300300 </ div >
301301 ) ) }
302+
303+ { isRagProcessing && (
304+ < div className = "flex items-center gap-2 text-xs text-primary bg-primary/5 px-3 py-1.5 rounded-lg border border-primary/10 font-medium" >
305+ < Loader2 size = { 14 } className = "animate-spin" />
306+ < span > Processing document...</ span >
307+ </ div >
308+ ) }
302309 </ div >
303310 ) }
304311
@@ -311,7 +318,7 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
311318 onKeyDown = { handleKeyDown }
312319 onPaste = { handlePaste }
313320 disabled = { isBusy }
314- placeholder = { isRagProcessing ? "Document is processing..." : " Ask Anything"}
321+ placeholder = " Ask Anything"
315322 rows = { 1 }
316323 className = "w-full custom-scroll custom-scroll-xs py-2 px-1.5 text-primary text-sm focus:outline-none resize-none overflow-y-auto max-h-28 transition-all duration-200 ease-in-out"
317324 />
@@ -334,7 +341,7 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
334341 } `}
335342 title = "Attach files"
336343 >
337- < Paperclip size = { 16 } strokeWidth = { 1.8 } />
344+ < Paperclip size = { isMobile ? 20 : 16 } strokeWidth = { 1.8 } />
338345 </ label >
339346 </ div >
340347
@@ -343,7 +350,7 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
343350
344351 < button
345352 type = "submit"
346- disabled = { ( ! hasContent && ! isGenerating ) || isGlobalUploading }
353+ disabled = { ( ! hasContent && ! isGenerating ) || isGlobalUploading || isRagProcessing }
347354 className = { `
348355 flex items-center justify-center h-8 w-8 rounded-full transition-all duration-200
349356 ${ isBusy || hasContent
@@ -352,7 +359,7 @@ export default function InputContainer({ sendMessage, isGenerating, selectedMode
352359 }
353360 ` }
354361 >
355- { isGenerating || isGlobalUploading ? < Loader2 size = { 16 } className = "animate-spin" /> : < ArrowUp size = { 18 } strokeWidth = { 2.5 } /> }
362+ { isGenerating || isGlobalUploading || isRagProcessing ? < Loader2 size = { isMobile ? 20 : 16 } className = "animate-spin" /> : < ArrowUp size = { isMobile ? 22 : 18 } strokeWidth = { 2.5 } /> }
356363 </ button >
357364 </ div >
358365 </ div >
0 commit comments