From cb0a9f216ae8e11ac23e905133340404a5c87fc7 Mon Sep 17 00:00:00 2001 From: Aljaz Ceru Date: Mon, 15 Sep 2025 06:50:59 +0200 Subject: [PATCH] fixing kb selection --- .../src/components/chatbot/ChatbotManager.tsx | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/chatbot/ChatbotManager.tsx b/frontend/src/components/chatbot/ChatbotManager.tsx index 66340e0..9178c66 100644 --- a/frontend/src/components/chatbot/ChatbotManager.tsx +++ b/frontend/src/components/chatbot/ChatbotManager.tsx @@ -61,7 +61,7 @@ interface ChatbotInstance { } interface RagCollection { - id: string + id: number | string // Can be either number (from API) or string (when stored) name: string description: string document_count: number @@ -614,15 +614,17 @@ export function ChatbotManager() {
setEditChatbot(prev => ({ ...prev, rag_collection: String(value) }))} + value={String(editChatbot.rag_collection ?? '')} + onValueChange={(value) => setEditChatbot(prev => ({ ...prev, rag_collection: value }))} > - + + {editChatbot.rag_collection && ragCollections.find(c => String(c.id) === String(editChatbot.rag_collection))?.name} + {ragCollections.map((collection) => ( - +
{collection.name}