From 44302870328ec7eb0ce11b05641ff4bb1b95e5c9 Mon Sep 17 00:00:00 2001 From: Alban Dumouilla Date: Wed, 24 Jan 2024 14:41:20 +0100 Subject: [PATCH] Add mutateAgentConfigurations to assistantpicker --- front/components/assistant/AssistantPicker.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/front/components/assistant/AssistantPicker.tsx b/front/components/assistant/AssistantPicker.tsx index 9ac5841ff2c5..fcf761bd1e1f 100644 --- a/front/components/assistant/AssistantPicker.tsx +++ b/front/components/assistant/AssistantPicker.tsx @@ -17,6 +17,7 @@ import { isBuilder } from "@dust-tt/types"; import Link from "next/link"; import { useEffect, useState } from "react"; +import { useAgentConfigurations } from "@app/lib/swr"; import { filterAndSortAgents } from "@app/lib/utils"; import { AssistantDetails } from "./AssistantDetails"; @@ -41,6 +42,14 @@ export function AssistantPicker({ const [showDetails, setShowDetails] = useState(null); + + const { mutateAgentConfigurations } = + useAgentConfigurations({ + workspaceId: owner.sId, + agentsGetView: "list", + includes: ["authors"], + }); + useEffect(() => { setSearchedAssistants(filterAndSortAgents(assistants, searchText)); }, [searchText, assistants]);