diff --git a/public/script.js b/public/script.js
index 9a2d91a48..9d99c08ef 100644
--- a/public/script.js
+++ b/public/script.js
@@ -1703,7 +1703,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
}
if (main_api == 'textgenerationwebui' && textgenerationwebui_settings.streaming && !textgenerationwebui_settings.streaming_url) {
- callPopup('Streaming URL is not set. Look it up in the console window when starting TextGen Web UI', 'text');
+ toastr.error('Streaming URL is not set. Look it up in the console window when starting TextGen Web UI');
is_send_press = false;
return;
}
@@ -2998,11 +2998,6 @@ function extractMessageFromData(data) {
if (main_api == 'textgenerationwebui') {
getMessage = data.results[0].text;
- if (getMessage == null || data.error) {
- activateSendButtons();
- callPopup('
Got empty response from Text generation web UI. Try restarting the API with recommended options.
', 'text');
- return;
- }
}
if (main_api == 'novel') {
@@ -4520,7 +4515,7 @@ function setGenerationProgress(progress) {
function isHordeGenerationNotAllowed() {
if (main_api == "kobold" && horde_settings.use_horde && preset_settings == "gui") {
- callPopup('GUI Settings preset is not supported for Horde. Please select another preset.', 'text');
+ toastr.error('GUI Settings preset is not supported for Horde. Please select another preset.');
return true;
}
@@ -5587,7 +5582,7 @@ $(document).ready(function () {
let value = formatKoboldUrl($.trim($("#api_url_text").val()));
if (!value) {
- callPopup('Please enter a valid URL.', 'text');
+ toastr.error('Please enter a valid URL.');
return;
}
diff --git a/public/scripts/bookmarks.js b/public/scripts/bookmarks.js
index df8c41014..cf39397c6 100644
--- a/public/scripts/bookmarks.js
+++ b/public/scripts/bookmarks.js
@@ -266,7 +266,7 @@ async function convertSoloToGroupChat() {
$(`.group_select[grid="${group.id}"]`).click();
await delay(1);
- callPopup('The chat has been successfully converted!', 'text');
+ toastr.success('The chat has been successfully converted!');
}
$(document).ready(function () {
diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js
index f26a5a03f..1cadb1292 100644
--- a/public/scripts/extensions/stable-diffusion/index.js
+++ b/public/scripts/extensions/stable-diffusion/index.js
@@ -414,7 +414,7 @@ async function generatePicture(_, trigger, message, callback) {
}
if (!modules.includes('sd') && !extension_settings.sd.horde) {
- callPopup("Extensions API is not connected or doesn't provide SD module. Enable Stable Horde to generate images.", 'text');
+ toastr.warning("Extensions API is not connected or doesn't provide SD module. Enable Stable Horde to generate images.");
return;
}
@@ -545,7 +545,7 @@ async function generateHordeImage(prompt, callback) {
const base64Image = `data:image/webp;base64,${data}`;
callback ? callback(prompt, base64Image) : sendMessage(prompt, base64Image);
} else {
- callPopup('Image generation has failed. Please try again.', 'text');
+ toastr.error('Image generation has failed. Please try again.');
}
}
diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js
index 65f33cc14..90f189f1f 100644
--- a/public/scripts/group-chats.js
+++ b/public/scripts/group-chats.js
@@ -480,7 +480,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) {
activatedMembers = activateSwipe(group.members);
if (activatedMembers.length === 0) {
- callPopup('Deleted group member swiped. To get a reply, add them back to the group.
', 'text');
+ toastr.warning('Deleted group member swiped. To get a reply, add them back to the group.');
throw new Error('Deleted group member swiped');
}
}
@@ -961,7 +961,7 @@ function select_group_chats(groupId, skipAnimation) {
$("#rm_group_delete").off();
$("#rm_group_delete").on("click", function () {
if (is_group_generating) {
- callPopup('Not so fast! Wait for the characters to stop typing before deleting the group.
', 'text');
+ toastr.warning('Not so fast! Wait for the characters to stop typing before deleting the group.');
return;
}
diff --git a/public/scripts/horde.js b/public/scripts/horde.js
index 95532261f..348dd2ae7 100644
--- a/public/scripts/horde.js
+++ b/public/scripts/horde.js
@@ -41,7 +41,7 @@ function validateHordeModel() {
let selectedModels = models.filter(m => horde_settings.models.includes(m.name));
if (selectedModels.length === 0) {
- callPopup('No Horde model selected or the selected models are no longer available. Please choose another model', 'text');
+ toastr.warning('No Horde model selected or the selected models are no longer available. Please choose another model');
throw new Error('No Horde model available');
}
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index bc35e3b05..e336ff532 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -146,7 +146,7 @@ function validateReverseProxy() {
new URL(oai_settings.reverse_proxy);
}
catch (err) {
- callPopup('Entered reverse proxy address is not a valid URL', 'text');
+ toastr.error('Entered reverse proxy address is not a valid URL');
setOnlineStatus('no_connection');
resultCheckStatusOpen();
throw err;
@@ -930,7 +930,7 @@ async function showApiKeyUsage() {
}
catch (err) {
console.error(err);
- callPopup('Invalid API key', 'text');
+ toastr.error('Invalid API key');
}
}
@@ -995,7 +995,7 @@ async function createNewLogitBiasPreset() {
}
if (name in oai_settings.bias_presets) {
- callPopup('Preset name should be unique.', 'text');
+ toastr.error('Preset name should be unique.');
return;
}
@@ -1032,12 +1032,12 @@ async function onLogitBiasPresetImportFileChange(e) {
e.target.value = '';
if (name in oai_settings.bias_presets) {
- callPopup('Preset name should be unique.', 'text');
+ toastr.error('Preset name should be unique.');
return;
}
if (!Array.isArray(importedFile)) {
- callPopup('Invalid logit bias preset file.', 'text');
+ toastr.error('Invalid logit bias preset file.');
return;
}
@@ -1341,7 +1341,7 @@ $(document).ready(function () {
$("#update_oai_preset").on('click', async function () {
const name = oai_settings.preset_settings_openai;
await saveOpenAIPreset(name, oai_settings);
- callPopup('Preset updated', 'text');
+ toastr.success('Preset updated');
});
$("#main_prompt_restore").on('click', function () {
diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js
index 7911cb5ed..1effa42f4 100644
--- a/public/scripts/world-info.js
+++ b/public/scripts/world-info.js
@@ -80,7 +80,7 @@ function setWorldInfoSettings(settings, data) {
// World Info Editor
async function showWorldEditor() {
if (!world_info) {
- callPopup("Select a world info first!
", "text");
+ toastr.warning("Select a world info first!");
return;
}