Feat: Display the pipeline on the agent canvas #9869 (#10638)

### What problem does this PR solve?

Feat: Display the pipeline on the agent canvas #9869
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-10-17 18:47:33 +08:00
committed by GitHub
parent c9e56d20cf
commit 685114d253
48 changed files with 2636 additions and 423 deletions

View File

@ -14,6 +14,7 @@ import pipe from 'lodash/fp/pipe';
import isObject from 'lodash/isObject';
import {
CategorizeAnchorPointPositions,
NoCopyOperatorsList,
NoDebugOperatorsList,
NodeHandleId,
Operator,
@ -403,6 +404,10 @@ export const needsSingleStepDebugging = (label: string) => {
return !NoDebugOperatorsList.some((x) => (label as Operator) === x);
};
export function showCopyIcon(label: string) {
return !NoCopyOperatorsList.some((x) => (label as Operator) === x);
}
// Get the coordinates of the node relative to the Iteration node
export function getRelativePositionToIterationNode(
nodes: RAGFlowNodeType[],
@ -464,7 +469,9 @@ export function convertToStringArray(
return list.map((x) => x.value);
}
export function convertToObjectArray(list: Array<string | number | boolean>) {
export function convertToObjectArray<T extends string | number | boolean>(
list: Array<T>,
) {
if (!Array.isArray(list)) {
return [];
}
@ -488,7 +495,7 @@ export const buildCategorizeListFromObject = (
// Categorize's to field has two data sources, with edges as the data source.
// Changes in the edge or to field need to be synchronized to the form field.
return Object.keys(categorizeItem)
.reduce<Array<ICategorizeItem>>((pre, cur) => {
.reduce<Array<Omit<ICategorizeItem, 'uuid'>>>((pre, cur) => {
// synchronize edge data to the to field
pre.push({