mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +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
|
|
@ -24,8 +24,6 @@ export enum EModelEndpoint {
|
|||
custom = 'custom',
|
||||
bedrock = 'bedrock',
|
||||
/** @deprecated */
|
||||
bingAI = 'bingAI',
|
||||
/** @deprecated */
|
||||
chatGPTBrowser = 'chatGPTBrowser',
|
||||
/** @deprecated */
|
||||
gptPlugins = 'gptPlugins',
|
||||
|
|
@ -592,25 +590,6 @@ export const tConversationSchema = z.object({
|
|||
greeting: z.string().optional(),
|
||||
spec: z.string().nullable().optional(),
|
||||
iconURL: z.string().nullable().optional(),
|
||||
/*
|
||||
Deprecated fields
|
||||
*/
|
||||
/** @deprecated */
|
||||
suggestions: z.array(z.string()).optional(),
|
||||
/** @deprecated */
|
||||
systemMessage: z.string().nullable().optional(),
|
||||
/** @deprecated */
|
||||
jailbreak: z.boolean().optional(),
|
||||
/** @deprecated */
|
||||
jailbreakConversationId: z.string().nullable().optional(),
|
||||
/** @deprecated */
|
||||
conversationSignature: z.string().nullable().optional(),
|
||||
/** @deprecated */
|
||||
clientId: z.string().nullable().optional(),
|
||||
/** @deprecated */
|
||||
invocationId: z.number().nullable().optional(),
|
||||
/** @deprecated */
|
||||
toneStyle: z.string().nullable().optional(),
|
||||
/** @deprecated */
|
||||
resendImages: z.boolean().optional(),
|
||||
/** @deprecated */
|
||||
|
|
@ -816,41 +795,6 @@ export const googleGenConfigSchema = z
|
|||
.strip()
|
||||
.optional();
|
||||
|
||||
export const bingAISchema = tConversationSchema
|
||||
.pick({
|
||||
jailbreak: true,
|
||||
systemMessage: true,
|
||||
context: true,
|
||||
toneStyle: true,
|
||||
jailbreakConversationId: true,
|
||||
conversationSignature: true,
|
||||
clientId: true,
|
||||
invocationId: true,
|
||||
})
|
||||
.transform((obj) => ({
|
||||
...obj,
|
||||
model: '',
|
||||
jailbreak: obj.jailbreak ?? false,
|
||||
systemMessage: obj.systemMessage ?? null,
|
||||
context: obj.context ?? null,
|
||||
toneStyle: obj.toneStyle ?? 'creative',
|
||||
jailbreakConversationId: obj.jailbreakConversationId ?? null,
|
||||
conversationSignature: obj.conversationSignature ?? null,
|
||||
clientId: obj.clientId ?? null,
|
||||
invocationId: obj.invocationId ?? 1,
|
||||
}))
|
||||
.catch(() => ({
|
||||
model: '',
|
||||
jailbreak: false,
|
||||
systemMessage: null,
|
||||
context: null,
|
||||
toneStyle: 'creative',
|
||||
jailbreakConversationId: null,
|
||||
conversationSignature: null,
|
||||
clientId: null,
|
||||
invocationId: 1,
|
||||
}));
|
||||
|
||||
export const chatGPTBrowserSchema = tConversationSchema
|
||||
.pick({
|
||||
model: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue