mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09: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
|
|
@ -17,6 +17,7 @@ import type { DropTargetMonitor } from 'react-dnd';
|
|||
import type * as t from 'librechat-data-provider';
|
||||
import store, { ephemeralAgentByConvoId } from '~/store';
|
||||
import useFileHandling from './useFileHandling';
|
||||
import { isEphemeralAgent } from '~/common';
|
||||
|
||||
export default function useDragHelpers() {
|
||||
const queryClient = useQueryClient();
|
||||
|
|
@ -78,7 +79,7 @@ export default function useDragHelpers() {
|
|||
let fileSearchAllowedByAgent = true;
|
||||
let codeAllowedByAgent = true;
|
||||
|
||||
if (agentId && agentId !== Constants.EPHEMERAL_AGENT_ID) {
|
||||
if (agentId && !isEphemeralAgent(agentId)) {
|
||||
/** Agent data from cache */
|
||||
const agent = queryClient.getQueryData<t.Agent>([QueryKeys.agent, agentId]);
|
||||
if (agent) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue