fix: show netlify deployed link
netlify deploy button to be disabled on streaming and show link icon when deployed
This commit is contained in:
@@ -45,6 +45,7 @@ interface BaseChatProps {
|
||||
showChat?: boolean;
|
||||
chatStarted?: boolean;
|
||||
isStreaming?: boolean;
|
||||
onStreamingChange?: (streaming: boolean) => void;
|
||||
messages?: Message[];
|
||||
description?: string;
|
||||
enhancingPrompt?: boolean;
|
||||
@@ -79,6 +80,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
||||
showChat = true,
|
||||
chatStarted = false,
|
||||
isStreaming = false,
|
||||
onStreamingChange,
|
||||
model,
|
||||
setModel,
|
||||
provider,
|
||||
@@ -126,6 +128,10 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
||||
console.log(transcript);
|
||||
}, [transcript]);
|
||||
|
||||
useEffect(() => {
|
||||
onStreamingChange?.(isStreaming);
|
||||
}, [isStreaming, onStreamingChange]);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window !== 'undefined' && ('SpeechRecognition' in window || 'webkitSpeechRecognition' in window)) {
|
||||
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
||||
@@ -337,7 +343,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
||||
}}
|
||||
</ClientOnly>
|
||||
<div
|
||||
className={classNames('flex flex-col gap-4 w-full max-w-chat mx-auto z-prompt', {
|
||||
className={classNames('flex flex-col w-full max-w-chat mx-auto z-prompt', {
|
||||
'sticky bottom-2': chatStarted,
|
||||
'position-absolute': chatStarted,
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user