mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-04 17:48:50 +01:00
🧹 chore: Remove Deprecated BingAI Code & Address Mobile Focus (#5565)
* chore: remove all bing code * chore: remove bing code and auto-focus effects * chore: add back escapeRegExp helper function for regex special character handling * chore: remove deprecated fields from settings and conversation schema * fix: ensure default endpoint is set correctly in conversation setup * feat: add disableFocus option to newConversation for improved search behavior
This commit is contained in:
parent
1226f56d0c
commit
19fa4d9f54
52 changed files with 52 additions and 1384 deletions
|
|
@ -27,25 +27,15 @@ export default function HeaderOptions({
|
|||
);
|
||||
const localize = useLocalize();
|
||||
|
||||
const { showPopover, conversation, latestMessage, setShowPopover, setShowBingToneSetting } =
|
||||
useChatContext();
|
||||
const { showPopover, conversation, setShowPopover } = useChatContext();
|
||||
const { setOption } = useSetIndexOptions();
|
||||
const { endpoint, conversationId, jailbreak = false } = conversation ?? {};
|
||||
|
||||
const altConditions: { [key: string]: boolean } = {
|
||||
bingAI: !!(latestMessage && jailbreak && endpoint === 'bingAI'),
|
||||
};
|
||||
|
||||
const altSettings: { [key: string]: () => void } = {
|
||||
bingAI: () => setShowBingToneSetting((prev) => !prev),
|
||||
};
|
||||
const { endpoint, conversationId } = conversation ?? {};
|
||||
|
||||
const noSettings = useMemo<{ [key: string]: boolean }>(
|
||||
() => ({
|
||||
[EModelEndpoint.chatGPTBrowser]: true,
|
||||
[EModelEndpoint.bingAI]: jailbreak ? false : conversationId !== 'new',
|
||||
}),
|
||||
[jailbreak, conversationId],
|
||||
[conversationId],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -63,9 +53,7 @@ export default function HeaderOptions({
|
|||
return null;
|
||||
}
|
||||
|
||||
const triggerAdvancedMode = altConditions[endpoint]
|
||||
? altSettings[endpoint]
|
||||
: () => setShowPopover((prev) => !prev);
|
||||
const triggerAdvancedMode = () => setShowPopover((prev) => !prev);
|
||||
|
||||
const endpointType = getEndpointField(endpointsConfig, endpoint, 'type');
|
||||
const paramEndpoint = isParamEndpoint(endpoint, endpointType);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import {
|
|||
GPTIcon,
|
||||
AnthropicIcon,
|
||||
AzureMinimalIcon,
|
||||
BingAIMinimalIcon,
|
||||
GoogleMinimalIcon,
|
||||
CustomMinimalIcon,
|
||||
AssistantIcon,
|
||||
|
|
@ -68,7 +67,6 @@ export const icons: IconsRecord = {
|
|||
[EModelEndpoint.anthropic]: AnthropicIcon,
|
||||
[EModelEndpoint.chatGPTBrowser]: LightningIcon,
|
||||
[EModelEndpoint.google]: GoogleMinimalIcon,
|
||||
[EModelEndpoint.bingAI]: BingAIMinimalIcon,
|
||||
[EModelEndpoint.custom]: CustomMinimalIcon,
|
||||
[EModelEndpoint.assistants]: AssistantAvatar,
|
||||
[EModelEndpoint.azureAssistants]: AssistantAvatar,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue