mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 23:46:52 +08:00
### 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:
@ -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)}]`;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user