Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Handle, Position, type NodeProps } from "reactflow";
import MarchingBorder from "./MarchingBorder";

export default function DefaultNode({ data }: NodeProps) {
const status = data.status as string | undefined;
Expand All @@ -14,7 +15,7 @@ export default function DefaultNode({ data }: NodeProps) {
: isExecutingNode
? "var(--success)"
: isActiveNode
? "var(--accent)"
? "transparent"
: status === "completed"
? "var(--success)"
: status === "running"
Expand Down Expand Up @@ -53,6 +54,7 @@ export default function DefaultNode({ data }: NodeProps) {
}}
/>
)}
{isActiveNode && <MarchingBorder />}
<Handle type="target" position={Position.Top} />
<div className="overflow-hidden text-ellipsis whitespace-nowrap">
{label}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Handle, Position, type NodeProps } from "reactflow";
import MarchingBorder from "./MarchingBorder";

const hiddenHandle = {
opacity: 0,
Expand All @@ -24,7 +25,7 @@ export default function EndNode({ data }: NodeProps) {
: isExecutingNode
? "var(--success)"
: isActiveNode
? "var(--accent)"
? "transparent"
: status === "completed"
? "var(--success)"
: status === "failed"
Expand Down Expand Up @@ -61,6 +62,7 @@ export default function EndNode({ data }: NodeProps) {
}}
/>
)}
{isActiveNode && <MarchingBorder rx={999} />}
<Handle type="target" position={Position.Top} style={hiddenHandle} />
{label}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Handle, Position, type NodeProps } from "reactflow";
import MarchingBorder from "./MarchingBorder";

const invisibleHandle = {
opacity: 0,
Expand All @@ -24,7 +25,7 @@ export default function GroupNode({ data }: NodeProps) {
: isExecutingNode
? "var(--success)"
: isActiveNode
? "var(--accent)"
? "transparent"
: status === "completed"
? "var(--success)"
: status === "running"
Expand Down Expand Up @@ -64,6 +65,7 @@ export default function GroupNode({ data }: NodeProps) {
}}
/>
)}
{isActiveNode && <MarchingBorder strokeWidth={3} />}
<Handle type="target" position={Position.Top} style={invisibleHandle} />
<div
style={{
Expand All @@ -72,7 +74,7 @@ export default function GroupNode({ data }: NodeProps) {
color: "var(--text-muted)",
fontWeight: 600,
textAlign: "center",
borderBottom: `1px solid ${borderColor}`,
borderBottom: `1px solid ${isActiveNode ? "var(--accent)" : borderColor}`,
background: "var(--bg-tertiary)",
borderRadius: "8px 8px 0 0",
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Handle, Position, type NodeProps } from "reactflow";
import MarchingBorder from "./MarchingBorder";

const hiddenHandle = {
opacity: 0,
Expand All @@ -25,7 +26,7 @@ export default function ModelNode({ data }: NodeProps) {
: isExecutingNode
? "var(--success)"
: isActiveNode
? "var(--accent)"
? "transparent"
: status === "completed"
? "var(--success)"
: status === "running"
Expand Down Expand Up @@ -64,6 +65,7 @@ export default function ModelNode({ data }: NodeProps) {
}}
/>
)}
{isActiveNode && <MarchingBorder />}
<Handle type="target" position={Position.Top} style={hiddenHandle} />
<div style={{ color: "var(--info)", fontSize: 9, marginBottom: 1 }}>model</div>
<div className="overflow-hidden text-ellipsis whitespace-nowrap">{label}</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Handle, Position, type NodeProps } from "reactflow";
import MarchingBorder from "./MarchingBorder";

const hiddenHandle = {
opacity: 0,
Expand All @@ -24,7 +25,7 @@ export default function StartNode({ data }: NodeProps) {
: isExecutingNode
? "var(--success)"
: isActiveNode
? "var(--accent)"
? "transparent"
: status === "completed"
? "var(--success)"
: status === "running"
Expand Down Expand Up @@ -61,6 +62,7 @@ export default function StartNode({ data }: NodeProps) {
}}
/>
)}
{isActiveNode && <MarchingBorder rx={999} />}
{label}
<Handle type="source" position={Position.Bottom} style={hiddenHandle} />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Handle, Position, type NodeProps } from "reactflow";
import MarchingBorder from "./MarchingBorder";

const hiddenHandle = {
opacity: 0,
Expand Down Expand Up @@ -28,7 +29,7 @@ export default function ToolNode({ data }: NodeProps) {
: isExecutingNode
? "var(--success)"
: isActiveNode
? "var(--accent)"
? "transparent"
: status === "completed"
? "var(--success)"
: status === "running"
Expand Down Expand Up @@ -70,6 +71,7 @@ export default function ToolNode({ data }: NodeProps) {
}}
/>
)}
{isActiveNode && <MarchingBorder />}
<Handle type="target" position={Position.Top} style={hiddenHandle} />
<div style={{ color: "var(--warning)", fontSize: 9, marginBottom: 1 }}>
tools{toolCount ? ` (${toolCount})` : ""}
Expand Down