mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
some fixes
This commit is contained in:
12
server.js
12
server.js
@ -499,11 +499,14 @@ const setupTasks = async function () {
|
|||||||
|
|
||||||
const cleanupPlugins = await loadPlugins();
|
const cleanupPlugins = await loadPlugins();
|
||||||
|
|
||||||
|
const BackUpTitle = process.title;
|
||||||
|
|
||||||
const exitProcess = async () => {
|
const exitProcess = async () => {
|
||||||
statsEndpoint.onExit();
|
statsEndpoint.onExit();
|
||||||
if (typeof cleanupPlugins === 'function') {
|
if (typeof cleanupPlugins === 'function') {
|
||||||
await cleanupPlugins();
|
await cleanupPlugins();
|
||||||
}
|
}
|
||||||
|
setWindowTitle(BackUpTitle);
|
||||||
process.exit();
|
process.exit();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -520,7 +523,7 @@ const setupTasks = async function () {
|
|||||||
|
|
||||||
if (autorun) open(autorunUrl.toString());
|
if (autorun) open(autorunUrl.toString());
|
||||||
|
|
||||||
console.log(String.fromCharCode(27) + "]0;SillyTavern WebServer" + String.fromCharCode(7)); // set window title
|
setWindowTitle('SillyTavern WebServer');
|
||||||
|
|
||||||
console.log(color.green('SillyTavern is listening on: ' + tavernUrl));
|
console.log(color.green('SillyTavern is listening on: ' + tavernUrl));
|
||||||
|
|
||||||
@ -589,3 +592,10 @@ function ensurePublicDirectoriesExist() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setWindowTitle(title) {
|
||||||
|
if (process.platform == 'win32')
|
||||||
|
process.title = title
|
||||||
|
else
|
||||||
|
process.stdout.write('\x1b]2;' + title + '\x1b\x5c')
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user