mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
📛 feat: Chat Badges via Model Specs (#10272)
* refactor: remove `useChatContext` from `useSelectMention`, explicitly pass `conversation` object * feat: ephemeral agents via model specs * refactor: Sync Jotai state with ephemeral agent state, also when Ephemeral Agent has no MCP servers selected * refactor: move `useUpdateEphemeralAgent` to store and clean up imports * refactor: reorder imports and invalidate queries for mcpConnectionStatus in event handler * refactor: replace useApplyModelSpecEffects with useApplyModelSpecAgents and update event handlers to use new agent template logic * ci: update useMCPSelect test to verify mcpValues sync with empty ephemeralAgent.mcp
This commit is contained in:
parent
64df54528d
commit
33d6b337bc
17 changed files with 254 additions and 41 deletions
|
|
@ -10,18 +10,19 @@ import type {
|
|||
} from 'librechat-data-provider';
|
||||
import type { MentionOption, ConvoGenerator } from '~/common';
|
||||
import { getConvoSwitchLogic, getModelSpecIconURL, removeUnavailableTools, logger } from '~/utils';
|
||||
import { useChatContext } from '~/Providers';
|
||||
import { useDefaultConvo } from '~/hooks';
|
||||
import store from '~/store';
|
||||
|
||||
export default function useSelectMention({
|
||||
presets,
|
||||
modelSpecs,
|
||||
conversation,
|
||||
assistantsMap,
|
||||
returnHandlers,
|
||||
endpointsConfig,
|
||||
newConversation,
|
||||
returnHandlers,
|
||||
}: {
|
||||
conversation: TConversation | null;
|
||||
presets?: TPreset[];
|
||||
modelSpecs: TModelSpec[];
|
||||
assistantsMap?: TAssistantsMap;
|
||||
|
|
@ -29,7 +30,6 @@ export default function useSelectMention({
|
|||
endpointsConfig: TEndpointsConfig;
|
||||
returnHandlers?: boolean;
|
||||
}) {
|
||||
const { conversation } = useChatContext();
|
||||
const getDefaultConversation = useDefaultConvo();
|
||||
const modularChat = useRecoilValue(store.modularChat);
|
||||
const availableTools = useRecoilValue(store.availableTools);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue