mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-10 14:55:16 -05:00
Restructuring the Repo to make it clear the difference between classic autogpt and the autogpt platform: * Move the "classic" projects `autogpt`, `forge`, `frontend`, and `benchmark` into a `classic` folder * Also rename `autogpt` to `original_autogpt` for absolute clarity * Rename `rnd/` to `autogpt_platform/` * `rnd/autogpt_builder` -> `autogpt_platform/frontend` * `rnd/autogpt_server` -> `autogpt_platform/backend` * Adjust any paths accordingly
35 lines
700 B
TypeScript
35 lines
700 B
TypeScript
import {
|
|
BaseEdge,
|
|
ConnectionLineComponentProps,
|
|
getBezierPath,
|
|
Position,
|
|
} from "@xyflow/react";
|
|
|
|
const ConnectionLine: React.FC<ConnectionLineComponentProps> = ({
|
|
fromPosition,
|
|
fromHandle,
|
|
fromX,
|
|
fromY,
|
|
toPosition,
|
|
toX,
|
|
toY,
|
|
}) => {
|
|
const sourceX =
|
|
fromPosition === Position.Right
|
|
? fromX + (fromHandle?.width! / 2 - 5)
|
|
: fromX - (fromHandle?.width! / 2 - 5);
|
|
|
|
const [path] = getBezierPath({
|
|
sourceX: sourceX,
|
|
sourceY: fromY,
|
|
sourcePosition: fromPosition,
|
|
targetX: toX,
|
|
targetY: toY,
|
|
targetPosition: toPosition,
|
|
});
|
|
|
|
return <BaseEdge path={path} style={{ strokeWidth: 2, stroke: "#555" }} />;
|
|
};
|
|
|
|
export default ConnectionLine;
|