mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
chore: add missing SidePanelProvider for AgentMarketplace and organize imports
This commit is contained in:
parent
04af67951b
commit
5ca9da378b
1 changed files with 125 additions and 122 deletions
|
|
@ -1,25 +1,24 @@
|
||||||
import React, { useState, useEffect, useMemo } from 'react';
|
import React, { useState, useEffect, useMemo } from 'react';
|
||||||
import { useOutletContext } from 'react-router-dom';
|
import { useOutletContext } from 'react-router-dom';
|
||||||
import { useSearchParams, useParams, useNavigate } from 'react-router-dom';
|
|
||||||
import { useSetRecoilState, useRecoilValue } from 'recoil';
|
import { useSetRecoilState, useRecoilValue } from 'recoil';
|
||||||
|
import { PermissionTypes, Permissions } from 'librechat-data-provider';
|
||||||
|
import { useSearchParams, useParams, useNavigate } from 'react-router-dom';
|
||||||
import type t from 'librechat-data-provider';
|
import type t from 'librechat-data-provider';
|
||||||
import type { ContextType } from '~/common';
|
import type { ContextType } from '~/common';
|
||||||
|
|
||||||
import { useGetEndpointsQuery, useGetAgentCategoriesQuery } from '~/data-provider';
|
import { useGetEndpointsQuery, useGetAgentCategoriesQuery } from '~/data-provider';
|
||||||
import { useDocumentTitle, useHasAccess } from '~/hooks';
|
|
||||||
import useLocalize from '~/hooks/useLocalize';
|
|
||||||
import { TooltipAnchor, Button } from '~/components/ui';
|
|
||||||
import { NewChatIcon } from '~/components/svg';
|
|
||||||
import { OpenSidebar } from '~/components/Chat/Menus';
|
|
||||||
import { SidePanelGroup } from '~/components/SidePanel';
|
|
||||||
import { MarketplaceProvider } from './MarketplaceContext';
|
import { MarketplaceProvider } from './MarketplaceContext';
|
||||||
|
import { useDocumentTitle, useHasAccess } from '~/hooks';
|
||||||
|
import { TooltipAnchor, Button } from '~/components/ui';
|
||||||
|
import { SidePanelGroup } from '~/components/SidePanel';
|
||||||
|
import { OpenSidebar } from '~/components/Chat/Menus';
|
||||||
|
import { SidePanelProvider } from '~/Providers';
|
||||||
|
import { NewChatIcon } from '~/components/svg';
|
||||||
|
import useLocalize from '~/hooks/useLocalize';
|
||||||
import CategoryTabs from './CategoryTabs';
|
import CategoryTabs from './CategoryTabs';
|
||||||
import AgentDetail from './AgentDetail';
|
import AgentDetail from './AgentDetail';
|
||||||
import SearchBar from './SearchBar';
|
import SearchBar from './SearchBar';
|
||||||
import AgentGrid from './AgentGrid';
|
import AgentGrid from './AgentGrid';
|
||||||
import store from '~/store';
|
import store from '~/store';
|
||||||
import { PermissionTypes, Permissions } from 'librechat-data-provider';
|
|
||||||
|
|
||||||
interface AgentMarketplaceProps {
|
interface AgentMarketplaceProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
@ -191,6 +190,7 @@ const AgentMarketplace: React.FC<AgentMarketplaceProps> = ({ className = '' }) =
|
||||||
return (
|
return (
|
||||||
<div className={`relative flex w-full grow overflow-hidden bg-presentation ${className}`}>
|
<div className={`relative flex w-full grow overflow-hidden bg-presentation ${className}`}>
|
||||||
<MarketplaceProvider>
|
<MarketplaceProvider>
|
||||||
|
<SidePanelProvider>
|
||||||
<SidePanelGroup
|
<SidePanelGroup
|
||||||
defaultLayout={defaultLayout}
|
defaultLayout={defaultLayout}
|
||||||
fullPanelCollapse={fullCollapse}
|
fullPanelCollapse={fullCollapse}
|
||||||
|
|
@ -285,7 +285,9 @@ const AgentMarketplace: React.FC<AgentMarketplaceProps> = ({ className = '' }) =
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<h2 className="text-2xl font-bold text-gray-900 dark:text-white">{name}</h2>
|
<h2 className="text-2xl font-bold text-gray-900 dark:text-white">
|
||||||
|
{name}
|
||||||
|
</h2>
|
||||||
{description && (
|
{description && (
|
||||||
<p className="mt-2 text-gray-600 dark:text-gray-300">{description}</p>
|
<p className="mt-2 text-gray-600 dark:text-gray-300">{description}</p>
|
||||||
)}
|
)}
|
||||||
|
|
@ -313,6 +315,7 @@ const AgentMarketplace: React.FC<AgentMarketplaceProps> = ({ className = '' }) =
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
</SidePanelGroup>
|
</SidePanelGroup>
|
||||||
|
</SidePanelProvider>
|
||||||
</MarketplaceProvider>
|
</MarketplaceProvider>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue