Feat: Delete useless knowledge base, chat, and search files. #10427 (#11568)

### What problem does this PR solve?

Feat: Delete useless knowledge base, chat, and search files.  #10427
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-27 17:54:27 +08:00
committed by GitHub
parent c71d25f744
commit 89d82ff031
171 changed files with 161 additions and 11112 deletions

View File

@ -2,8 +2,7 @@ import {
ChatVariableEnabledField,
EmptyConversationId,
} from '@/constants/chat';
import { Message } from '@/interfaces/database/chat';
import { IMessage } from '@/pages/chat/interface';
import { IMessage, Message } from '@/interfaces/database/chat';
import { omit } from 'lodash';
import { v4 as uuid } from 'uuid';
@ -84,3 +83,13 @@ export function setChatVariableEnabledFieldValuePage() {
return variableCheckBoxFieldMap;
}
const oldReg = /(#{2}\d+\${2})/g;
export const currentReg = /\[ID:(\d+)\]/g;
// To be compatible with the old index matching mode
export const replaceTextByOldReg = (text: string) => {
return text?.replace(oldReg, (substring: string) => {
return `[ID:${substring.slice(2, -2)}]`;
});
};