mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-07 11:08:52 +01:00
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.
This commit is contained in:
parent
339e222fe9
commit
e43ea7a4f4
11 changed files with 279 additions and 20 deletions
|
|
@ -226,6 +226,8 @@ export const agents = ({ path = '', options }: { path?: string; options?: object
|
|||
return url;
|
||||
};
|
||||
|
||||
export const activeJobs = () => `${BASE_URL}/api/agents/chat/active`;
|
||||
|
||||
export const mcp = {
|
||||
tools: `${BASE_URL}/api/mcp/tools`,
|
||||
servers: `${BASE_URL}/api/mcp/servers`,
|
||||
|
|
|
|||
|
|
@ -1037,3 +1037,12 @@ export function getGraphApiToken(params: q.GraphTokenParams): Promise<q.GraphTok
|
|||
export function getDomainServerBaseUrl(): string {
|
||||
return `${endpoints.apiBaseUrl()}/api`;
|
||||
}
|
||||
|
||||
/* Active Jobs */
|
||||
export interface ActiveJobsResponse {
|
||||
activeJobIds: string[];
|
||||
}
|
||||
|
||||
export const getActiveJobs = (): Promise<ActiveJobsResponse> => {
|
||||
return request.get(endpoints.activeJobs());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ export enum QueryKeys {
|
|||
/* MCP Servers */
|
||||
mcpServers = 'mcpServers',
|
||||
mcpServer = 'mcpServer',
|
||||
/* Active Jobs */
|
||||
activeJobs = 'activeJobs',
|
||||
}
|
||||
|
||||
// Dynamic query keys that require parameters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue