diff --git a/frontend/src/components/ChatBot/Chatbot.tsx b/frontend/src/components/ChatBot/Chatbot.tsx index 412f485ed..25cb944d3 100644 --- a/frontend/src/components/ChatBot/Chatbot.tsx +++ b/frontend/src/components/ChatBot/Chatbot.tsx @@ -19,6 +19,8 @@ import { buttonCaptions, chatModeLables, tooltips } from '../../utils/Constants' import useSpeechSynthesis from '../../hooks/useSpeech'; import ButtonWithToolTip from '../UI/ButtonWithToolTip'; import FallBackDialog from '../UI/FallBackDialog'; +import { capitalizeWithPlus } from '../../utils/Utils'; +import { capitalize } from '@mui/material'; const InfoModal = lazy(() => import('./ChatInfoModal')); const Chatbot: FC = (props) => { @@ -44,7 +46,7 @@ const Chatbot: FC = (props) => { const [tokensUsed, setTokensUsed] = useState(0); const [cypherQuery, setcypherQuery] = useState(''); const [copyMessageId, setCopyMessageId] = useState(null); - const [chatsMode, setChatsMode] = useState(chatModeLables.graph_vector); + const [chatsMode, setChatsMode] = useState(chatModeLables.graph_vector_fulltext); const [graphEntitites, setgraphEntitites] = useState<[]>([]); const [messageError, setmessageError] = useState(''); @@ -179,7 +181,7 @@ const Chatbot: FC = (props) => { let error; let entitiysearchonly_entities; const datetime = `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`; - const userMessage = { id: Date.now(), user: 'user', message: inputMessage, datetime: datetime }; + const userMessage = { id: Date.now(), user: 'user', message: inputMessage, datetime: datetime, mode: chatMode }; setListMessages([...listMessages, userMessage]); try { setInputMessage(''); @@ -325,6 +327,15 @@ const Chatbot: FC = (props) => { className={`p-4 self-start ${isFullScreen ? 'max-w-[55%]' : ''} ${ chat.user === 'chatbot' ? 'n-bg-palette-neutral-bg-strong' : 'n-bg-palette-primary-bg-weak' } `} + subheader={ + chat.user !== 'chatbot' && chat.mode?.length ? ( + + Chat Mode: {chat.mode.includes('+') ? capitalizeWithPlus(chat.mode) : capitalize(chat.mode)} + + ) : ( + '' + ) + } >
= (props) => { = ({ } if (processedCount === 1 && queue.isEmpty()) { (async () => { + showNormalToast('Some Q&A functionality will only be available afterwards.'); await postProcessing(userCredentials as UserCredentials, postProcessingTasks); + showSuccessToast('All Q&A functionality is available now.'); })(); } }, [processedCount, userCredentials, queue]); @@ -374,7 +376,9 @@ const Content: React.FC = ({ const addFilesToQueue = async (remainingFiles: CustomFile[]) => { if (!remainingFiles.length) { + showNormalToast('Some Q&A functionality will only be available afterwards.'); await postProcessing(userCredentials as UserCredentials, postProcessingTasks); + showSuccessToast('All Q&A functionality is available now.'); } for (let index = 0; index < remainingFiles.length; index++) { const f = remainingFiles[index]; @@ -787,7 +791,7 @@ const Content: React.FC = ({