Feat: Supports to debug single component in Agent. #3993 (#4007)

### What problem does this PR solve?

Feat: Supports to debug single component in Agent. #3993
Fix: The github button on the login page is displayed incorrectly  #4002

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-12-13 14:43:24 +08:00
committed by GitHub
parent 0bca46ac3a
commit 1defe0b19b
23 changed files with 645 additions and 262 deletions

View File

@ -7,7 +7,12 @@ import pipe from 'lodash/fp/pipe';
import isObject from 'lodash/isObject';
import { Edge, Node, Position } from 'reactflow';
import { v4 as uuidv4 } from 'uuid';
import { CategorizeAnchorPointPositions, NodeMap, Operator } from './constant';
import {
CategorizeAnchorPointPositions,
NoDebugOperatorsList,
NodeMap,
Operator,
} from './constant';
import { ICategorizeItemResult, IPosition, NodeData } from './interface';
const buildEdges = (
@ -124,7 +129,7 @@ export const buildDslComponentsByGraph = (
const components: DSLComponents = {};
nodes
.filter((x) => x.data.label !== Operator.Note)
?.filter((x) => x.data.label !== Operator.Note)
.forEach((x) => {
const id = x.id;
const operatorName = x.data.label;
@ -323,3 +328,7 @@ export const duplicateNodeForm = (nodeData?: NodeData) => {
export const getDrawerWidth = () => {
return window.innerWidth > 1278 ? '40%' : 470;
};
export const needsSingleStepDebugging = (label: string) => {
return !NoDebugOperatorsList.some((x) => (label as Operator) === x);
};