mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 19:30:15 +01:00
WIP: app.locals refactoring
WIP: appConfig fix: update memory configuration retrieval to use getAppConfig based on user role fix: update comment for AppConfig interface to clarify purpose
This commit is contained in:
parent
5a14ee9c6a
commit
b992fed16c
66 changed files with 706 additions and 366 deletions
|
|
@ -1,15 +1,15 @@
|
|||
const { logger } = require('@librechat/data-schemas');
|
||||
const { getCachedTools, setCachedTools } = require('./Config');
|
||||
const { getCachedTools, setCachedTools, getAppConfig } = require('./Config');
|
||||
const { CacheKeys } = require('librechat-data-provider');
|
||||
const { createMCPManager } = require('~/config');
|
||||
const { getLogStores } = require('~/cache');
|
||||
|
||||
/**
|
||||
* Initialize MCP servers
|
||||
* @param {import('express').Application} app - Express app instance
|
||||
*/
|
||||
async function initializeMCPs(app) {
|
||||
const mcpServers = app.locals.mcpConfig;
|
||||
async function initializeMCPs() {
|
||||
const appConfig = await getAppConfig();
|
||||
const mcpServers = appConfig.mcpConfig;
|
||||
if (!mcpServers) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -17,7 +17,6 @@ async function initializeMCPs(app) {
|
|||
const mcpManager = await createMCPManager(mcpServers);
|
||||
|
||||
try {
|
||||
delete app.locals.mcpConfig;
|
||||
const cachedTools = await getCachedTools();
|
||||
|
||||
if (!cachedTools) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue