LibreChat/packages/data-provider/src/keys.ts
Danny Avila e43ea7a4f4
feat: Add active job management for user and show progress in conversation list
- Implemented a new endpoint to retrieve active generation job IDs for the current user, enhancing user experience by allowing visibility of ongoing tasks.
- Integrated active job tracking in the Conversations component, displaying generation indicators based on active jobs.
- Optimized job management in the GenerationJobManager and InMemoryJobStore to support user-specific job queries, ensuring efficient resource handling and cleanup.
- Updated relevant components and hooks to utilize the new active jobs feature, improving overall application responsiveness and user feedback.
2025-12-18 14:12:26 -05:00

95 lines
2.8 KiB
TypeScript

export enum QueryKeys {
messages = 'messages',
sharedMessages = 'sharedMessages',
sharedLinks = 'sharedLinks',
allConversations = 'allConversations',
archivedConversations = 'archivedConversations',
searchConversations = 'searchConversations',
conversation = 'conversation',
searchEnabled = 'searchEnabled',
user = 'user',
name = 'name', // user key name
models = 'models',
balance = 'balance',
endpoints = 'endpoints',
presets = 'presets',
searchResults = 'searchResults',
tokenCount = 'tokenCount',
availablePlugins = 'availablePlugins',
startupConfig = 'startupConfig',
assistants = 'assistants',
assistant = 'assistant',
agents = 'agents',
agent = 'agent',
files = 'files',
fileConfig = 'fileConfig',
tools = 'tools',
toolAuth = 'toolAuth',
toolCalls = 'toolCalls',
mcpTools = 'mcpTools',
mcpConnectionStatus = 'mcpConnectionStatus',
mcpAuthValues = 'mcpAuthValues',
agentTools = 'agentTools',
actions = 'actions',
assistantDocs = 'assistantDocs',
agentDocs = 'agentDocs',
fileDownload = 'fileDownload',
voices = 'voices',
customConfigSpeech = 'customConfigSpeech',
prompts = 'prompts',
prompt = 'prompt',
promptGroups = 'promptGroups',
allPromptGroups = 'allPromptGroups',
promptGroup = 'promptGroup',
categories = 'categories',
randomPrompts = 'randomPrompts',
agentCategories = 'agentCategories',
marketplaceAgents = 'marketplaceAgents',
roles = 'roles',
conversationTags = 'conversationTags',
health = 'health',
userTerms = 'userTerms',
banner = 'banner',
/* Memories */
memories = 'memories',
principalSearch = 'principalSearch',
accessRoles = 'accessRoles',
resourcePermissions = 'resourcePermissions',
effectivePermissions = 'effectivePermissions',
graphToken = 'graphToken',
/* MCP Servers */
mcpServers = 'mcpServers',
mcpServer = 'mcpServer',
/* Active Jobs */
activeJobs = 'activeJobs',
}
// Dynamic query keys that require parameters
export const DynamicQueryKeys = {
agentFiles: (agentId: string) => ['agentFiles', agentId] as const,
} as const;
export enum MutationKeys {
fileUpload = 'fileUpload',
fileDelete = 'fileDelete',
updatePreset = 'updatePreset',
deletePreset = 'deletePreset',
loginUser = 'loginUser',
logoutUser = 'logoutUser',
refreshToken = 'refreshToken',
avatarUpload = 'avatarUpload',
speechToText = 'speechToText',
textToSpeech = 'textToSpeech',
assistantAvatarUpload = 'assistantAvatarUpload',
agentAvatarUpload = 'agentAvatarUpload',
updateAction = 'updateAction',
updateAgentAction = 'updateAgentAction',
deleteAction = 'deleteAction',
deleteAgentAction = 'deleteAgentAction',
revertAgentVersion = 'revertAgentVersion',
deleteUser = 'deleteUser',
updateRole = 'updateRole',
enableTwoFactor = 'enableTwoFactor',
verifyTwoFactor = 'verifyTwoFactor',
updateMemoryPreferences = 'updateMemoryPreferences',
}