Skip to content

Commit e4c5881

Browse files
committed
commit
1 parent e90b48c commit e4c5881

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

app/components/chat.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -457,19 +457,12 @@ export function Chat({ repo, path, setPath, graph, chartRef, selectedPathId, isP
457457
className={cn(
458458
"flex text-wrap border p-2 gap-2 rounded-md",
459459
p.nodes.length === selectedPath?.nodes.length &&
460-
selectedPath?.nodes.every(node => p?.nodes.some((n) => n.id === node.id)) && "border-[#FF66B3] bg-[#FFF0F7]",
460+
selectedPath?.nodes.every(node => p?.nodes.some((n) => n.id === node.id)) && selectedPath.nodes.length === p.nodes.length && "border-[#FF66B3] bg-[#FFF0F7]",
461461
message.graphName !== graph.Id && "opacity-50 bg-gray-200"
462462
)}
463463
title={message.graphName !== graph.Id ? `Move to graph ${message.graphName} to use this path` : undefined}
464464
disabled={message.graphName !== graph.Id}
465465
onClick={() => {
466-
if (message.graphName !== graph.Id) {
467-
toast({
468-
title: "Path Disabled",
469-
description: "The path is disabled because it is not from this graph.",
470-
});
471-
return;
472-
}
473466
if (p.nodes.length === selectedPath?.nodes.length &&
474467
selectedPath?.nodes.every(node => p?.nodes.some((n) => n.id === node.id))) return;
475468
handleSetSelectedPath(p);
@@ -478,11 +471,13 @@ export function Chat({ repo, path, setPath, graph, chartRef, selectedPathId, isP
478471
>
479472
<p className="font-bold">#{i + 1}</p>
480473
<div className="flex flex-wrap">
481-
{p.nodes.map((node: any, j: number) => (
482-
<span key={j} className={cn((j === 0 || j === p.nodes.length - 1) && "font-bold")}>
483-
{` - ${node.properties.name}`}
484-
</span>
485-
))}
474+
{
475+
p.nodes.map((node: any, j: number) => (
476+
<span key={j} className={cn((j === 0 || j === p.nodes.length - 1) && "font-bold")}>
477+
{` - ${node.properties.name}`}
478+
</span>
479+
))
480+
}
486481
</div>
487482
</button>
488483
))

0 commit comments

Comments
 (0)