@@ -283,14 +283,14 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
283
283
</ Select >
284
284
</ div >
285
285
286
- < div className = "flex items-center gap-4 " >
286
+ < div className = "flex items-center gap-2 " >
287
287
{ /* Magic enhance tooltip */ }
288
288
< TooltipProvider >
289
289
< Tooltip >
290
290
< TooltipTrigger asChild >
291
291
< div
292
292
onClick = {
293
- ! isLoading && ! isRegenerating
293
+ ! isLoading && ! isRegenerating && message . trim ( )
294
294
? handleMagicEnhance
295
295
: undefined
296
296
}
@@ -300,10 +300,10 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
300
300
'active:outline-none active:ring-0 active:border-0' ,
301
301
isEnhanced
302
302
? isDarkMode
303
- ? 'text-blue-700 hover:text-blue-700 '
303
+ ? 'text-primary-100 hover:text-primary-100 '
304
304
: 'text-yellow-300 hover:text-yellow-300'
305
305
: 'text-gray-500 hover:text-gray-500' ,
306
- ( isLoading || isRegenerating ) &&
306
+ ( isLoading || isRegenerating || ! message . trim ( ) ) &&
307
307
'opacity-50 cursor-not-allowed'
308
308
) }
309
309
style = { {
@@ -321,9 +321,9 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
321
321
onMouseUp = { ( e ) => e . preventDefault ( ) }
322
322
>
323
323
< Sparkles
324
- size = { 36 }
324
+ size = { 24 }
325
325
className = { cn (
326
- 'w-6 h-6 ' ,
326
+ 'w-5 h-5 ' ,
327
327
isRegenerating && 'animate-spin'
328
328
) }
329
329
/>
@@ -343,11 +343,11 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
343
343
< Button
344
344
className = { cn (
345
345
'bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 text-white shadow-md hover:shadow-lg transition-all px-5 py-3 h-10 rounded-full' ,
346
- ( isLoading || isRegenerating ) &&
346
+ ( isLoading || isRegenerating || ! message . trim ( ) ) &&
347
347
'opacity-80 cursor-not-allowed'
348
348
) }
349
349
onClick = { handleSubmit }
350
- disabled = { isLoading || isRegenerating }
350
+ disabled = { isLoading || isRegenerating || ! message . trim ( ) }
351
351
>
352
352
{ isLoading ? (
353
353
< >
0 commit comments