Skip to content

Commit d936c01

Browse files
ui-ux: prompt-enhanced-toast
ui-ux: prompt enhanced toast notification
2 parents 4541a3e + 2cb8c82 commit d936c01

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

app/components/chat/BaseChat.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { ModelSelector } from '~/components/chat/ModelSelector';
2727
import { SpeechRecognitionButton } from '~/components/chat/SpeechRecognition';
2828
import type { IProviderSetting, ProviderInfo } from '~/types/model';
2929
import { ScreenshotStateManager } from './ScreenshotStateManager';
30+
import { toast } from 'react-toastify';
3031

3132
const TEXTAREA_MIN_HEIGHT = 76;
3233

@@ -492,22 +493,16 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
492493
className={classNames(
493494
'transition-all',
494495
enhancingPrompt ? 'opacity-100' : '',
495-
promptEnhanced ? 'text-bolt-elements-item-contentAccent' : '',
496-
promptEnhanced ? 'pr-1.5' : '',
497-
promptEnhanced ? 'enabled:hover:bg-bolt-elements-item-backgroundAccent' : '',
498496
)}
499-
onClick={() => enhancePrompt?.()}
497+
onClick={() => {
498+
enhancePrompt?.();
499+
toast.success('Prompt enhanced!');
500+
}}
500501
>
501502
{enhancingPrompt ? (
502-
<>
503-
<div className="i-svg-spinners:90-ring-with-bg text-bolt-elements-loader-progress text-xl animate-spin"></div>
504-
<div className="ml-1.5">Enhancing prompt...</div>
505-
</>
503+
<div className="i-svg-spinners:90-ring-with-bg text-bolt-elements-loader-progress text-xl animate-spin"></div>
506504
) : (
507-
<>
508-
<div className="i-bolt:stars text-xl"></div>
509-
{promptEnhanced && <div className="ml-1.5">Prompt enhanced</div>}
510-
</>
505+
<div className="i-bolt:stars text-xl"></div>
511506
)}
512507
</IconButton>
513508

0 commit comments

Comments
 (0)