From 0217ac0bfa135a12d92d7df9a1cc3ef6bf4649b9 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Tue, 30 Jun 2026 20:01:24 +0800 Subject: [PATCH] refactor: remove unused moveKnowledgeBase function and related UI elements from KnowledgeRetrieveConfigPanel --- .../_components/node-config-panel.tsx | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx index 22ca9d7..d84223b 100644 --- a/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx +++ b/web/app/dashboard/ai-workflows/_components/node-config-panel.tsx @@ -1,7 +1,7 @@ "use client" import { useEffect, useMemo, useState, type ReactNode } from "react" -import { ArrowDownIcon, ArrowUpIcon, CheckIcon, ChevronsUpDownIcon, Trash2Icon } from "lucide-react" +import { CheckIcon, ChevronsUpDownIcon, Trash2Icon } from "lucide-react" import { Button } from "@/components/ui/button" import { @@ -346,16 +346,6 @@ function KnowledgeRetrieveConfigPanel({ } updateKnowledgeBaseIds([...selectedKnowledgeIds, id]) } - const moveKnowledgeBase = (index: number, direction: -1 | 1) => { - const targetIndex = index + direction - if (targetIndex < 0 || targetIndex >= selectedKnowledgeIds.length) return - const next = [...selectedKnowledgeIds] - const current = next[index] - next[index] = next[targetIndex] - next[targetIndex] = current - updateKnowledgeBaseIds(next) - } - return ( @@ -426,28 +416,6 @@ function KnowledgeRetrieveConfigPanel({
{option.label}
- -