From f8fb8822413df790ae74f284d932de5371448772 Mon Sep 17 00:00:00 2001 From: yangdx Date: Sat, 5 Apr 2025 13:38:15 +0800 Subject: [PATCH] Limit max edge size to 10 --- lightrag_webui/src/components/graph/Settings.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lightrag_webui/src/components/graph/Settings.tsx b/lightrag_webui/src/components/graph/Settings.tsx index 40d02a5e..3be61795 100644 --- a/lightrag_webui/src/components/graph/Settings.tsx +++ b/lightrag_webui/src/components/graph/Settings.tsx @@ -310,7 +310,7 @@ export default function Settings() { }} className="h-6 w-16 min-w-0 pr-1" min={1} - max={maxEdgeSize} + max={Math.min(maxEdgeSize, 10)} /> - { const newValue = Number(e.target.value); - if (!isNaN(newValue) && newValue >= minEdgeSize && newValue >= 1) { + if (!isNaN(newValue) && newValue >= minEdgeSize && newValue >= 1 && newValue <= 10) { useSettingsStore.setState({ maxEdgeSize: newValue }); } }} className="h-6 w-16 min-w-0 pr-1" min={minEdgeSize} + max={10} />