Skip to content

Commit 4dc48ee

Browse files
committed
commit
1 parent ca995ff commit 4dc48ee

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app/components/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ export function Chat({ repo, path, setPath, graph, selectedPathId, isPathRespons
405405
"flex text-wrap border p-2 gap-2 rounded-md",
406406
p.nodes.length === selectedPath?.nodes.length &&
407407
selectedPath?.nodes.every(node => p?.nodes.some((n) => n.id === node.id)) &&
408-
"border-[#FF66B3] bg-[#FFF0F7]",
408+
"border-[#ffde21] bg-[#ffde2133]",
409409
message.graphName !== graph.Id && "opacity-50 bg-gray-200"
410410
)}
411411
title={message.graphName !== graph.Id ? `Move to graph ${message.graphName} to use this path` : undefined}

app/components/graphView.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface Props {
3333
setCooldownTime: Dispatch<SetStateAction<number>>
3434
}
3535

36+
const PATH_COLOR = "#ffde21"
3637
const NODE_SIZE = 6;
3738
const PADDING = 2;
3839

@@ -142,10 +143,13 @@ export default function GraphView({
142143
nodeVisibility="visible"
143144
linkVisibility="visible"
144145
linkCurvature="curve"
146+
linkDirectionalArrowRelPos={1}
147+
linkDirectionalArrowColor={(link) => (link.isPath || link.isPathSelected) ? PATH_COLOR : link.color}
148+
linkDirectionalArrowLength={(link) => link.source.id === link.target.id ? 0 : (link.id === selectedObj?.id || link.isPathSelected) ? 3 : 2}
145149
nodeRelSize={NODE_SIZE}
146150
linkLineDash={(link) => (link.isPath && !link.isPathSelected) ? [5, 5] : []}
147-
linkColor={(link) => (link.isPath || link.isPathSelected) ? "#FF66B3" : link.color}
148-
linkWidth={(link) => (link.id === selectedObj?.id || link.isPathSelected) ? 1 : 0.5}
151+
linkColor={(link) => (link.isPath || link.isPathSelected) ? PATH_COLOR : link.color}
152+
linkWidth={(link) => (link.id === selectedObj?.id || link.isPathSelected) ? 2 : 1}
149153
nodeCanvasObjectMode={() => 'after'}
150154
linkCanvasObjectMode={() => 'after'}
151155
nodeCanvasObject={(node, ctx) => {
@@ -154,11 +158,11 @@ export default function GraphView({
154158
if (isPathResponse) {
155159
if (node.isPathSelected) {
156160
ctx.fillStyle = node.color;
157-
ctx.strokeStyle = '#FF66B3';
161+
ctx.strokeStyle = PATH_COLOR;
158162
ctx.lineWidth = 1
159163
} else if (node.isPath) {
160164
ctx.fillStyle = node.color;
161-
ctx.strokeStyle = '#FF66B3';
165+
ctx.strokeStyle = PATH_COLOR;
162166
ctx.lineWidth = 0.5
163167
} else {
164168
ctx.fillStyle = '#E5E5E5';
@@ -168,11 +172,11 @@ export default function GraphView({
168172
} else if (isPathResponse === undefined) {
169173
if (node.isPathSelected) {
170174
ctx.fillStyle = node.color;
171-
ctx.strokeStyle = '#FF66B3';
175+
ctx.strokeStyle = PATH_COLOR;
172176
ctx.lineWidth = 1
173177
} else if (node.isPath) {
174178
ctx.fillStyle = node.color;
175-
ctx.strokeStyle = '#FF66B3';
179+
ctx.strokeStyle = PATH_COLOR;
176180
ctx.lineWidth = 0.5
177181
} else {
178182
ctx.fillStyle = node.color;

0 commit comments

Comments
 (0)