mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🤖 refactor: Side Panel Agent UI To Account For Ephemeral Agents (#9763)
* refactor: Remove unused imports and consolidate ephemeral agent logic * refactor: Side Panel agent handling to account for ephemeral agents for UI * refactor: Replace Constants.EPHEMERAL_AGENT_ID checks with isEphemeralAgent utility for consistency * ci: AgentPanel tests with additional mock configurations and utility functions
This commit is contained in:
parent
a6bf2b6ce3
commit
8a60e8990f
20 changed files with 87 additions and 77 deletions
|
|
@ -3,15 +3,15 @@ import { useLocalize } from '~/hooks';
|
|||
import { useToastContext } from '@librechat/client';
|
||||
import { useAgentPanelContext } from '~/Providers/AgentPanelContext';
|
||||
import MCP from '~/components/SidePanel/Builder/MCP';
|
||||
import { Panel } from '~/common';
|
||||
import { Panel, isEphemeralAgent } from '~/common';
|
||||
|
||||
export default function MCPSection() {
|
||||
const { showToast } = useToastContext();
|
||||
const localize = useLocalize();
|
||||
const { showToast } = useToastContext();
|
||||
const { mcps = [], agent_id, setMcp, setActivePanel } = useAgentPanelContext();
|
||||
|
||||
const handleAddMCP = useCallback(() => {
|
||||
if (!agent_id) {
|
||||
if (isEphemeralAgent(agent_id)) {
|
||||
showToast({
|
||||
message: localize('com_agents_mcps_disabled'),
|
||||
status: 'warning',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue