mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 15:36:50 +08:00
### What problem does this PR solve? Feat: Submit clean data operations form data to the backend. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { setInitialChatVariableEnabledFieldValue } from '@/utils/chat';
|
||||
import { Circle, CircleSlash2 } from 'lucide-react';
|
||||
import { ChatVariableEnabledField, variableEnabledFieldMap } from './chat';
|
||||
|
||||
export enum ProgrammingLanguage {
|
||||
@ -117,3 +118,53 @@ export enum Operator {
|
||||
HierarchicalMerger = 'HierarchicalMerger',
|
||||
Extractor = 'Extractor',
|
||||
}
|
||||
|
||||
export enum ComparisonOperator {
|
||||
Equal = '=',
|
||||
NotEqual = '≠',
|
||||
GreatThan = '>',
|
||||
GreatEqual = '≥',
|
||||
LessThan = '<',
|
||||
LessEqual = '≤',
|
||||
Contains = 'contains',
|
||||
NotContains = 'not contains',
|
||||
StartWith = 'start with',
|
||||
EndWith = 'end with',
|
||||
Empty = 'empty',
|
||||
NotEmpty = 'not empty',
|
||||
}
|
||||
|
||||
export const SwitchOperatorOptions = [
|
||||
{ value: ComparisonOperator.Equal, label: 'equal', icon: 'equal' },
|
||||
{ value: ComparisonOperator.NotEqual, label: 'notEqual', icon: 'not-equals' },
|
||||
{ value: ComparisonOperator.GreatThan, label: 'gt', icon: 'Less' },
|
||||
{
|
||||
value: ComparisonOperator.GreatEqual,
|
||||
label: 'ge',
|
||||
icon: 'Greater-or-equal',
|
||||
},
|
||||
{ value: ComparisonOperator.LessThan, label: 'lt', icon: 'Less' },
|
||||
{ value: ComparisonOperator.LessEqual, label: 'le', icon: 'less-or-equal' },
|
||||
{ value: ComparisonOperator.Contains, label: 'contains', icon: 'Contains' },
|
||||
{
|
||||
value: ComparisonOperator.NotContains,
|
||||
label: 'notContains',
|
||||
icon: 'not-contains',
|
||||
},
|
||||
{
|
||||
value: ComparisonOperator.StartWith,
|
||||
label: 'startWith',
|
||||
icon: 'list-start',
|
||||
},
|
||||
{ value: ComparisonOperator.EndWith, label: 'endWith', icon: 'list-end' },
|
||||
{
|
||||
value: ComparisonOperator.Empty,
|
||||
label: 'empty',
|
||||
icon: <Circle className="size-4" />,
|
||||
},
|
||||
{
|
||||
value: ComparisonOperator.NotEmpty,
|
||||
label: 'notEmpty',
|
||||
icon: <CircleSlash2 className="size-4" />,
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user