mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +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
|
|
@ -51,7 +51,7 @@ test.describe('Key suite', () => {
|
|||
|
||||
test('Test Setting and Revoking Keys from Settings', async ({ page }) => {
|
||||
await page.goto('http://localhost:3080/', { timeout: 5000 });
|
||||
const endpoint = 'bingAI';
|
||||
const endpoint = 'openAI';
|
||||
|
||||
const newTopicButton = page.getByTestId('new-conversation-menu');
|
||||
await newTopicButton.click();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { Response, Page, BrowserContext } from '@playwright/test';
|
|||
|
||||
const basePath = 'http://localhost:3080/c/';
|
||||
const initialUrl = `${basePath}new`;
|
||||
const endpoints = ['google', 'openAI', 'azureOpenAI', 'bingAI', 'chatGPTBrowser', 'gptPlugins'];
|
||||
const endpoints = ['google', 'openAI', 'azureOpenAI', 'chatGPTBrowser', 'gptPlugins'];
|
||||
const endpoint = endpoints[1];
|
||||
|
||||
function isUUID(uuid: string) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test.describe('Settings suite', () => {
|
||||
test('Last Bing settings', async ({ page }) => {
|
||||
test('Last OpenAI settings', async ({ page }) => {
|
||||
await page.goto('http://localhost:3080/', { timeout: 5000 });
|
||||
await page.evaluate(() =>
|
||||
window.localStorage.setItem(
|
||||
|
|
@ -9,17 +9,9 @@ test.describe('Settings suite', () => {
|
|||
JSON.stringify({
|
||||
conversationId: 'new',
|
||||
title: 'New Chat',
|
||||
endpoint: 'bingAI',
|
||||
endpoint: 'openAI',
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
jailbreak: false,
|
||||
context: null,
|
||||
systemMessage: null,
|
||||
toneStyle: 'creative',
|
||||
jailbreakConversationId: null,
|
||||
conversationSignature: null,
|
||||
clientId: null,
|
||||
invocationId: 1,
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
|
@ -27,13 +19,13 @@ test.describe('Settings suite', () => {
|
|||
|
||||
const initialLocalStorage = await page.evaluate(() => window.localStorage);
|
||||
const lastConvoSetup = JSON.parse(initialLocalStorage.lastConversationSetup);
|
||||
expect(lastConvoSetup.endpoint).toEqual('bingAI');
|
||||
expect(lastConvoSetup.endpoint).toEqual('openAI');
|
||||
|
||||
const newTopicButton = page.getByTestId('new-conversation-menu');
|
||||
await newTopicButton.click();
|
||||
|
||||
// includes the icon + endpoint names in obj property
|
||||
const endpointItem = page.getByTestId('endpoint-item-bingAI');
|
||||
const endpointItem = page.getByTestId('endpoint-item-openAI');
|
||||
await endpointItem.click();
|
||||
|
||||
await page.getByTestId('text-input').click();
|
||||
|
|
@ -65,10 +57,6 @@ test.describe('Settings suite', () => {
|
|||
|
||||
// Check if the settings persisted
|
||||
const localStorage = await page.evaluate(() => window.localStorage);
|
||||
const lastBingSettings = JSON.parse(localStorage.lastBingSettings);
|
||||
const { jailbreak, toneStyle } = lastBingSettings;
|
||||
expect(jailbreak).toBeTruthy();
|
||||
expect(toneStyle).toEqual('balanced');
|
||||
const button = page.getByRole('button', { name: 'Mode: Sydney' });
|
||||
expect(button.count()).toBeTruthy();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue