mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
⚙️ feat: includedTools and script changes (#2690)
* chore: add email to npm scripts (user-stats and list-balances) * feat: included tools * chore: update console terminal links * chore: add back typing
This commit is contained in:
parent
89899164ed
commit
6fc664e4a3
9 changed files with 94 additions and 79 deletions
|
|
@ -21,6 +21,7 @@ const AppService = async (app) => {
|
|||
const configDefaults = getConfigDefaults();
|
||||
|
||||
const filteredTools = config.filteredTools;
|
||||
const includedTools = config.includedTools;
|
||||
const fileStrategy = config.fileStrategy ?? configDefaults.fileStrategy;
|
||||
const imageOutputType = config?.imageOutputType ?? configDefaults.imageOutputType;
|
||||
|
||||
|
|
@ -37,23 +38,26 @@ const AppService = async (app) => {
|
|||
const availableTools = loadAndFormatTools({
|
||||
directory: paths.structuredTools,
|
||||
adminFilter: filteredTools,
|
||||
adminIncluded: includedTools,
|
||||
});
|
||||
|
||||
const socialLogins =
|
||||
config?.registration?.socialLogins ?? configDefaults?.registration?.socialLogins;
|
||||
const interfaceConfig = loadDefaultInterface(config, configDefaults);
|
||||
|
||||
if (!Object.keys(config).length) {
|
||||
app.locals = {
|
||||
paths,
|
||||
fileStrategy,
|
||||
socialLogins,
|
||||
filteredTools,
|
||||
availableTools,
|
||||
imageOutputType,
|
||||
interfaceConfig,
|
||||
};
|
||||
const defaultLocals = {
|
||||
paths,
|
||||
fileStrategy,
|
||||
socialLogins,
|
||||
filteredTools,
|
||||
includedTools,
|
||||
availableTools,
|
||||
imageOutputType,
|
||||
interfaceConfig,
|
||||
};
|
||||
|
||||
if (!Object.keys(config).length) {
|
||||
app.locals = defaultLocals;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -79,13 +83,7 @@ const AppService = async (app) => {
|
|||
}
|
||||
|
||||
app.locals = {
|
||||
paths,
|
||||
socialLogins,
|
||||
fileStrategy,
|
||||
filteredTools,
|
||||
availableTools,
|
||||
imageOutputType,
|
||||
interfaceConfig,
|
||||
...defaultLocals,
|
||||
modelSpecs: config.modelSpecs,
|
||||
fileConfig: config?.fileConfig,
|
||||
secureImageLinks: config?.secureImageLinks,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue