mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-22 15:07:42 +01:00
Image Generation: Add tool message visibility toggle
This commit is contained in:
parent
f3c12fb926
commit
e83182c03b
@ -319,6 +319,7 @@ const defaultSettings = {
|
||||
wand_visible: false,
|
||||
command_visible: false,
|
||||
interactive_visible: false,
|
||||
tool_visible: false,
|
||||
|
||||
// Stability AI settings
|
||||
stability_style_preset: 'anime',
|
||||
@ -488,6 +489,7 @@ async function loadSettings() {
|
||||
$('#sd_wand_visible').prop('checked', extension_settings.sd.wand_visible);
|
||||
$('#sd_command_visible').prop('checked', extension_settings.sd.command_visible);
|
||||
$('#sd_interactive_visible').prop('checked', extension_settings.sd.interactive_visible);
|
||||
$('#sd_tool_visible').prop('checked', extension_settings.sd.tool_visible);
|
||||
$('#sd_stability_style_preset').val(extension_settings.sd.stability_style_preset);
|
||||
$('#sd_huggingface_model_id').val(extension_settings.sd.huggingface_model_id);
|
||||
$('#sd_function_tool').prop('checked', extension_settings.sd.function_tool);
|
||||
@ -844,6 +846,11 @@ function onInteractiveVisibleInput() {
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function onToolVisibleInput() {
|
||||
extension_settings.sd.tool_visible = !!$('#sd_tool_visible').prop('checked');
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function onClipSkipInput() {
|
||||
extension_settings.sd.clip_skip = Number($('#sd_clip_skip').val());
|
||||
$('#sd_clip_skip_value').val(extension_settings.sd.clip_skip);
|
||||
@ -3670,6 +3677,8 @@ function getVisibilityByInitiator(initiator) {
|
||||
return !!extension_settings.sd.wand_visible;
|
||||
case initiators.command:
|
||||
return !!extension_settings.sd.command_visible;
|
||||
case initiators.tool:
|
||||
return !!extension_settings.sd.tool_visible;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@ -4417,6 +4426,7 @@ jQuery(async () => {
|
||||
$('#sd_wand_visible').on('input', onWandVisibleInput);
|
||||
$('#sd_command_visible').on('input', onCommandVisibleInput);
|
||||
$('#sd_interactive_visible').on('input', onInteractiveVisibleInput);
|
||||
$('#sd_tool_visible').on('input', onToolVisibleInput);
|
||||
$('#sd_swap_dimensions').on('click', onSwapDimensionsClick);
|
||||
$('#sd_stability_key').on('click', onStabilityKeyClick);
|
||||
$('#sd_stability_style_preset').on('change', onStabilityStylePresetChange);
|
||||
|
@ -459,25 +459,32 @@
|
||||
<div class="flex-container flexFlowColumn marginTopBot5 flexGap10">
|
||||
<label for="sd_wand_visible" class="checkbox_label">
|
||||
<span class="flex1 flex-container alignItemsCenter">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
||||
<i class="fa-solid fa-wand-magic-sparkles fa-fw"></i>
|
||||
<span data-i18n="Extensions Menu">Extensions Menu</span>
|
||||
</span>
|
||||
<input id="sd_wand_visible" type="checkbox" />
|
||||
</label>
|
||||
<label for="sd_command_visible" class="checkbox_label">
|
||||
<span class="flex1 flex-container alignItemsCenter">
|
||||
<i class="fa-solid fa-terminal"></i>
|
||||
<i class="fa-solid fa-terminal fa-fw"></i>
|
||||
<span data-i18n="Slash Command">Slash Command</span>
|
||||
</span>
|
||||
<input id="sd_command_visible" type="checkbox" />
|
||||
</label>
|
||||
<label for="sd_interactive_visible" class="checkbox_label">
|
||||
<span class="flex1 flex-container alignItemsCenter">
|
||||
<i class="fa-solid fa-message"></i>
|
||||
<i class="fa-solid fa-message fa-fw"></i>
|
||||
<span data-i18n="Interactive Mode">Interactive Mode</span>
|
||||
</span>
|
||||
<input id="sd_interactive_visible" type="checkbox" />
|
||||
</label>
|
||||
<label for="sd_tool_visible" class="checkbox_label">
|
||||
<span class="flex1 flex-container alignItemsCenter">
|
||||
<i class="fa-solid fa-code fa-fw"></i>
|
||||
<span data-i18n="Function Tool">Function Tool</span>
|
||||
</span>
|
||||
<input id="sd_tool_visible" type="checkbox" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user