mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804)
WIP: pre-granular-permissions commit
feat: Add category and support contact fields to Agent schema and UI components
Revert "feat: Add category and support contact fields to Agent schema and UI components"
This reverts commit c43a52b4c9.
Fix: Update import for renderHook in useAgentCategories.spec.tsx
fix: Update icon rendering in AgentCategoryDisplay tests to use empty spans
refactor: Improve category synchronization logic and clean up AgentConfig component
refactor: Remove unused UI flow translations from translation.json
feat: agent marketplace features
🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804)
This commit is contained in:
parent
abc32e66ce
commit
76d75030b9
147 changed files with 17564 additions and 645 deletions
|
|
@ -0,0 +1,44 @@
|
|||
import React, { useMemo } from 'react';
|
||||
|
||||
import { EModelEndpoint } from 'librechat-data-provider';
|
||||
|
||||
import { ChatContext } from '~/Providers';
|
||||
|
||||
/**
|
||||
* Minimal marketplace provider that provides only what SidePanel actually needs
|
||||
* Replaces the bloated 44-function ChatContext implementation
|
||||
*/
|
||||
interface MarketplaceProviderProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export const MarketplaceProvider: React.FC<MarketplaceProviderProps> = ({ children }) => {
|
||||
// Create more complete context to prevent FileRow and other component errors
|
||||
// when agents with files are opened in the marketplace
|
||||
const marketplaceContext = useMemo(
|
||||
() => ({
|
||||
conversation: {
|
||||
endpoint: EModelEndpoint.agents,
|
||||
conversationId: 'marketplace',
|
||||
title: 'Agent Marketplace',
|
||||
},
|
||||
// File-related context properties to prevent FileRow errors
|
||||
files: new Map(),
|
||||
setFiles: () => {},
|
||||
setFilesLoading: () => {},
|
||||
// Other commonly used context properties to prevent undefined errors
|
||||
isSubmitting: false,
|
||||
setIsSubmitting: () => {},
|
||||
latestMessage: null,
|
||||
setLatestMessage: () => {},
|
||||
// Minimal functions to prevent errors when components try to use them
|
||||
ask: () => {},
|
||||
regenerate: () => {},
|
||||
stopGenerating: () => {},
|
||||
submitMessage: () => {},
|
||||
}),
|
||||
[],
|
||||
);
|
||||
|
||||
return <ChatContext.Provider value={marketplaceContext as any}>{children}</ChatContext.Provider>;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue