ui-ux: prompt-enhanced-toast
Browse filesui-ux: prompt enhanced toast notification
app/components/chat/BaseChat.tsx
CHANGED
@@ -27,6 +27,7 @@ import { ModelSelector } from '~/components/chat/ModelSelector';
|
|
27 |
import { SpeechRecognitionButton } from '~/components/chat/SpeechRecognition';
|
28 |
import type { IProviderSetting, ProviderInfo } from '~/types/model';
|
29 |
import { ScreenshotStateManager } from './ScreenshotStateManager';
|
|
|
30 |
|
31 |
const TEXTAREA_MIN_HEIGHT = 76;
|
32 |
|
@@ -492,22 +493,16 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
|
492 |
className={classNames(
|
493 |
'transition-all',
|
494 |
enhancingPrompt ? 'opacity-100' : '',
|
495 |
-
promptEnhanced ? 'text-bolt-elements-item-contentAccent' : '',
|
496 |
-
promptEnhanced ? 'pr-1.5' : '',
|
497 |
-
promptEnhanced ? 'enabled:hover:bg-bolt-elements-item-backgroundAccent' : '',
|
498 |
)}
|
499 |
-
onClick={() =>
|
|
|
|
|
|
|
500 |
>
|
501 |
{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 |
-
</>
|
506 |
) : (
|
507 |
-
|
508 |
-
<div className="i-bolt:stars text-xl"></div>
|
509 |
-
{promptEnhanced && <div className="ml-1.5">Prompt enhanced</div>}
|
510 |
-
</>
|
511 |
)}
|
512 |
</IconButton>
|
513 |
|
|
|
27 |
import { SpeechRecognitionButton } from '~/components/chat/SpeechRecognition';
|
28 |
import type { IProviderSetting, ProviderInfo } from '~/types/model';
|
29 |
import { ScreenshotStateManager } from './ScreenshotStateManager';
|
30 |
+
import { toast } from 'react-toastify';
|
31 |
|
32 |
const TEXTAREA_MIN_HEIGHT = 76;
|
33 |
|
|
|
493 |
className={classNames(
|
494 |
'transition-all',
|
495 |
enhancingPrompt ? 'opacity-100' : '',
|
|
|
|
|
|
|
496 |
)}
|
497 |
+
onClick={() => {
|
498 |
+
enhancePrompt?.();
|
499 |
+
toast.success('Prompt enhanced!');
|
500 |
+
}}
|
501 |
>
|
502 |
{enhancingPrompt ? (
|
503 |
+
<div className="i-svg-spinners:90-ring-with-bg text-bolt-elements-loader-progress text-xl animate-spin"></div>
|
|
|
|
|
|
|
504 |
) : (
|
505 |
+
<div className="i-bolt:stars text-xl"></div>
|
|
|
|
|
|
|
506 |
)}
|
507 |
</IconButton>
|
508 |
|