mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-01 08:08:49 +01:00
🚀 feat: Banner (#3952)
* feat: Add banner schema and model * feat: Add optional JwtAuth To handle the conditional logic with and without authentication within the model. * feat: Add an endpoint to retrieve a banner * feat: Add implementation for client to use banner and access API * feat: Display a banner on UI * feat: Script for updating and deleting banners * style: Update banner style * fix: Adjust the height when the banner is displayed * fix: failed specs
This commit is contained in:
parent
07e5531b5b
commit
aea01f0bc5
26 changed files with 453 additions and 4 deletions
|
|
@ -21,6 +21,27 @@ const askQuestion = (query) => {
|
|||
);
|
||||
};
|
||||
|
||||
const askMultiLineQuestion = (query) => {
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
});
|
||||
|
||||
console.cyan(query);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
let lines = [];
|
||||
rl.on('line', (line) => {
|
||||
if (line.trim() === '.') {
|
||||
rl.close();
|
||||
resolve(lines.join('\n'));
|
||||
} else {
|
||||
lines.push(line);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
function isDockerRunning() {
|
||||
try {
|
||||
execSync('docker info');
|
||||
|
|
@ -56,6 +77,7 @@ console.gray = (msg) => console.log('\x1b[90m%s\x1b[0m', msg);
|
|||
|
||||
module.exports = {
|
||||
askQuestion,
|
||||
askMultiLineQuestion,
|
||||
silentExit,
|
||||
isDockerRunning,
|
||||
deleteNodeModules,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue