mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-10 00:50:43 +01:00
Code lint
This commit is contained in:
parent
91429ce516
commit
52d9855916
@ -659,7 +659,7 @@ async function onSourceChange() {
|
||||
extension_settings.sd.sampler = null;
|
||||
toggleSourceControls();
|
||||
saveSettingsDebounced();
|
||||
await Promise.all([loadModels(), loadSamplers()]);
|
||||
await loadSettingOptions();
|
||||
}
|
||||
|
||||
async function onOpenAiStyleSelect() {
|
||||
@ -791,8 +791,7 @@ async function validateAutoUrl() {
|
||||
throw new Error('SD WebUI returned an error.');
|
||||
}
|
||||
|
||||
await loadSamplers();
|
||||
await loadModels();
|
||||
await loadSettingOptions();
|
||||
toastr.success('SD WebUI API connected.');
|
||||
} catch (error) {
|
||||
toastr.error(`Could not validate SD WebUI API: ${error.message}`);
|
||||
@ -815,8 +814,7 @@ async function validateVladUrl() {
|
||||
throw new Error('SD.Next returned an error.');
|
||||
}
|
||||
|
||||
await loadSamplers();
|
||||
await loadModels();
|
||||
await loadSettingOptions();
|
||||
toastr.success('SD.Next API connected.');
|
||||
} catch (error) {
|
||||
toastr.error(`Could not validate SD.Next API: ${error.message}`);
|
||||
@ -840,11 +838,7 @@ async function validateComfyUrl() {
|
||||
throw new Error('ComfyUI returned an error.');
|
||||
}
|
||||
|
||||
await loadSamplers();
|
||||
await loadSchedulers();
|
||||
await loadModels();
|
||||
await loadVaes();
|
||||
await loadComfyWorkflows();
|
||||
await loadSettingOptions();
|
||||
toastr.success('ComfyUI API connected.');
|
||||
} catch (error) {
|
||||
toastr.error(`Could not validate ComfyUI API: ${error.message}`);
|
||||
@ -2444,7 +2438,7 @@ jQuery(async () => {
|
||||
})
|
||||
|
||||
eventSource.on(event_types.EXTRAS_CONNECTED, async () => {
|
||||
await Promise.all([loadSamplers(), loadModels()]);
|
||||
await loadSettingOptions();
|
||||
});
|
||||
|
||||
eventSource.on(event_types.CHAT_CHANGED, onChatChanged);
|
||||
|
@ -45,7 +45,7 @@ function removePattern(x, pattern) {
|
||||
function getComfyWorkflows() {
|
||||
return fs
|
||||
.readdirSync(DIRECTORIES.comfyWorkflows)
|
||||
.filter(file => file[0]!='.' && file.toLowerCase().endsWith('.json'))
|
||||
.filter(file => file[0] != '.' && file.toLowerCase().endsWith('.json'))
|
||||
.sort(Intl.Collator().compare);
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ function registerEndpoints(app, jsonParser) {
|
||||
}
|
||||
const data = fs.readFileSync(
|
||||
path,
|
||||
{encoding:'utf-8'}
|
||||
{ encoding: 'utf-8' }
|
||||
);
|
||||
return response.send(JSON.stringify(data));
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user