Skip to content

Commit

Permalink
Linter check pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Dumouilla committed Jan 24, 2024
1 parent 3fd6996 commit b238251
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions front/components/assistant/AssistantPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
MoreIcon,
PlusIcon,
RobotIcon,
Searchbar} from "@dust-tt/sparkle";
Searchbar,
} from "@dust-tt/sparkle";
import type {
LightAgentConfigurationType,
WorkspaceType,
Expand Down Expand Up @@ -37,15 +38,15 @@ export function AssistantPicker({
}) {
const [searchText, setSearchText] = useState("");
const [searchedAssistants, setSearchedAssistants] = useState(assistants);
const [showDetails, setShowDetails] = useState<LightAgentConfigurationType | null>(null);
const [showDetails, setShowDetails] =
useState<LightAgentConfigurationType | null>(null);

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

return (
<DropdownMenu>

{showDetails && (
<AssistantDetails
owner={owner}
Expand Down Expand Up @@ -93,7 +94,10 @@ export function AssistantPicker({
)}
<div className="max-h-[22.5rem] overflow-y-auto [&>*]:w-full">
{searchedAssistants.map((c) => (
<div key={`assistant-picker-container-${c.sId}`} className="flex flex-row justify-between items-center pr-2">
<div
key={`assistant-picker-container-${c.sId}`}
className="flex flex-row items-center justify-between pr-2"
>
<Item.Avatar
key={`assistant-picker-${c.sId}`}
label={"@" + c.name}
Expand All @@ -110,7 +114,9 @@ export function AssistantPicker({
/>
<IconButton
icon={MoreIcon}
onClick={() => {setShowDetails(c);}}
onClick={() => {
setShowDetails(c);
}}
variant="tertiary"
size="sm"
/>
Expand All @@ -119,7 +125,9 @@ export function AssistantPicker({
</div>
{showBuilderButtons && (
<div className="flex flex-row justify-between border-t border-structure-100 px-3 pb-1 pt-2">
<Link href={`/w/${owner.sId}/builder/assistants/new?flow=personal_assistants`}>
<Link
href={`/w/${owner.sId}/builder/assistants/new?flow=personal_assistants`}
>
<Button
label="Create"
size="xs"
Expand Down

0 comments on commit b238251

Please sign in to comment.