mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Add the iteration Node #4242 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -50,7 +50,9 @@ import {
|
||||
} from '@ant-design/icons';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import {
|
||||
CirclePower,
|
||||
CloudUpload,
|
||||
IterationCcw,
|
||||
ListOrdered,
|
||||
OptionIcon,
|
||||
TextCursorInput,
|
||||
@ -58,6 +60,8 @@ import {
|
||||
WrapText,
|
||||
} from 'lucide-react';
|
||||
|
||||
export const BeginId = 'begin';
|
||||
|
||||
export enum Operator {
|
||||
Begin = 'Begin',
|
||||
Retrieval = 'Retrieval',
|
||||
@ -93,6 +97,8 @@ export enum Operator {
|
||||
Invoke = 'Invoke',
|
||||
Template = 'Template',
|
||||
Email = 'Email',
|
||||
Iteration = 'Iteration',
|
||||
IterationStart = 'IterationItem',
|
||||
}
|
||||
|
||||
export const CommonOperatorList = Object.values(Operator).filter(
|
||||
@ -134,6 +140,8 @@ export const operatorIconMap = {
|
||||
[Operator.Invoke]: InvokeIcon,
|
||||
[Operator.Template]: TemplateIcon,
|
||||
[Operator.Email]: EmailIcon,
|
||||
[Operator.Iteration]: IterationCcw,
|
||||
[Operator.IterationStart]: CirclePower,
|
||||
};
|
||||
|
||||
export const operatorMap: Record<
|
||||
@ -270,6 +278,8 @@ export const operatorMap: Record<
|
||||
backgroundColor: '#dee0e2',
|
||||
},
|
||||
[Operator.Email]: { backgroundColor: '#e6f7ff' },
|
||||
[Operator.Iteration]: { backgroundColor: '#e6f7ff' },
|
||||
[Operator.IterationStart]: { backgroundColor: '#e6f7ff' },
|
||||
};
|
||||
|
||||
export const componentMenuList = [
|
||||
@ -306,6 +316,9 @@ export const componentMenuList = [
|
||||
{
|
||||
name: Operator.Template,
|
||||
},
|
||||
{
|
||||
name: Operator.Iteration,
|
||||
},
|
||||
{
|
||||
name: Operator.Note,
|
||||
},
|
||||
@ -606,6 +619,11 @@ export const initialEmailValues = {
|
||||
content: '',
|
||||
};
|
||||
|
||||
export const initialIterationValues = {
|
||||
delimiter: ',',
|
||||
};
|
||||
export const initialIterationStartValues = {};
|
||||
|
||||
export const CategorizeAnchorPointPositions = [
|
||||
{ top: 1, right: 34 },
|
||||
{ top: 8, right: 18 },
|
||||
@ -687,6 +705,8 @@ export const RestrictedUpstreamMap = {
|
||||
[Operator.Invoke]: [Operator.Begin],
|
||||
[Operator.Template]: [Operator.Begin, Operator.Relevant],
|
||||
[Operator.Email]: [Operator.Begin],
|
||||
[Operator.Iteration]: [Operator.Begin],
|
||||
[Operator.IterationStart]: [Operator.Begin],
|
||||
};
|
||||
|
||||
export const NodeMap = {
|
||||
@ -724,6 +744,8 @@ export const NodeMap = {
|
||||
[Operator.Invoke]: 'invokeNode',
|
||||
[Operator.Template]: 'templateNode',
|
||||
[Operator.Email]: 'emailNode',
|
||||
[Operator.Iteration]: 'group',
|
||||
[Operator.IterationStart]: 'iterationStartNode',
|
||||
};
|
||||
|
||||
export const LanguageOptions = [
|
||||
@ -2940,4 +2962,5 @@ export const NoDebugOperatorsList = [
|
||||
Operator.Message,
|
||||
Operator.RewriteQuestion,
|
||||
Operator.Switch,
|
||||
Operator.Iteration,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user