mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
fix(BingAI): show censored message, fix toneStyle UI bug (#644)
* fix(frontend/BingAI): prevent Settings from not showing on new conversation, also prevent showing toneStyle change without jailbreak * fix(Input/index.jsx): fix typo in comment, change "also prevents toneStyle change without jailbreak" to "also prevents showing toneStyle change without jailbreak" * fix(BingAI): show message despite censor trigger
This commit is contained in:
parent
1a5144be76
commit
1a21eb5bae
5 changed files with 100 additions and 48 deletions
|
|
@ -11,7 +11,7 @@ import NewConversationMenu from './NewConversationMenu';
|
|||
import AdjustToneButton from './AdjustToneButton';
|
||||
import Footer from './Footer';
|
||||
import TextareaAutosize from 'react-textarea-autosize';
|
||||
import { useMessageHandler } from '../../utils/handleSubmit';
|
||||
import { useMessageHandler } from '~/utils/handleSubmit';
|
||||
|
||||
import store from '~/store';
|
||||
|
||||
|
|
@ -36,8 +36,20 @@ export default function TextChat({ isSearchView = false }) {
|
|||
|
||||
// auto focus to input, when enter a conversation.
|
||||
useEffect(() => {
|
||||
if (conversation?.conversationId !== 'search') inputRef.current?.focus();
|
||||
}, [conversation?.conversationId]);
|
||||
const { conversationId } = conversation || {};
|
||||
if (!conversationId) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevents Settings from not showing on new conversation, also prevents showing toneStyle change without jailbreak
|
||||
if (conversationId === 'new' || !conversation?.jailbreak) {
|
||||
setShowBingToneSetting(false);
|
||||
}
|
||||
|
||||
if (conversationId !== 'search') {
|
||||
inputRef.current?.focus();
|
||||
}
|
||||
}, [conversation]);
|
||||
|
||||
useEffect(() => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
|
|
@ -146,7 +158,7 @@ export default function TextChat({ isSearchView = false }) {
|
|||
>
|
||||
<NewConversationMenu />
|
||||
<TextareaAutosize
|
||||
// set test id for e2e testing
|
||||
// set test id for e2e testing
|
||||
data-testid="text-input"
|
||||
tabIndex="0"
|
||||
autoFocus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue