Skip to content

Commit

Permalink
Add mutateAgentConfigurations to assistantpicker
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Dumouilla committed Jan 24, 2024
1 parent e42168d commit 4430287
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions front/components/assistant/AssistantPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -41,6 +42,14 @@ export function AssistantPicker({
const [showDetails, setShowDetails] =
useState<LightAgentConfigurationType | null>(null);


const { mutateAgentConfigurations } =
useAgentConfigurations({
workspaceId: owner.sId,
agentsGetView: "list",
includes: ["authors"],
});

useEffect(() => {
setSearchedAssistants(filterAndSortAgents(assistants, searchText));
}, [searchText, assistants]);
Expand Down

0 comments on commit 4430287

Please sign in to comment.