From 8e563073d02610526936531b31965ba3bcf35346 Mon Sep 17 00:00:00 2001 From: Alban Dumouilla Date: Wed, 24 Jan 2024 14:18:50 +0100 Subject: [PATCH] Make AssistantPicker able to show assistant details + fix links --- .../components/assistant/AssistantPicker.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/front/components/assistant/AssistantPicker.tsx b/front/components/assistant/AssistantPicker.tsx index adafa39d746e..94e383d8f1a2 100644 --- a/front/components/assistant/AssistantPicker.tsx +++ b/front/components/assistant/AssistantPicker.tsx @@ -18,6 +18,8 @@ import { useEffect, useState } from "react"; import { filterAndSortAgents } from "@app/lib/utils"; +import { AssistantDetails } from "./AssistantDetails"; + export function AssistantPicker({ owner, assistants, @@ -35,6 +37,7 @@ export function AssistantPicker({ }) { const [searchText, setSearchText] = useState(""); const [searchedAssistants, setSearchedAssistants] = useState(assistants); + const [showDetails, setShowDetails] = useState(null); useEffect(() => { setSearchedAssistants(filterAndSortAgents(assistants, searchText)); @@ -42,6 +45,22 @@ export function AssistantPicker({ return ( + + {showDetails && ( + { + setShowDetails(null); + }} + onUpdate={() => { + void mutateAgentConfigurations(); + }} + flow="personal" + /> + )} +
setSearchText("")} className="flex"> {pickerButton ? ( {pickerButton} @@ -91,7 +110,7 @@ export function AssistantPicker({ /> {console.log('ellipsis clicked')}} + onClick={() => {setShowDetails(c);}} variant="tertiary" size="sm" />