Skip to content

Commit f8f4dd2

Browse files
ConcedoConcedo
Concedo
authored and
Concedo
committed
touchup
1 parent d6077f3 commit f8f4dd2

File tree

1 file changed

+37
-20
lines changed

1 file changed

+37
-20
lines changed

index.html

+37-20
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-->
1313

1414
<script>
15-
const LITEVER = 151;
15+
const LITEVER = 152;
1616
const urlParams = new URLSearchParams(window.location.search);
1717
const localflag = urlParams.get('local');
1818
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
@@ -9718,6 +9718,15 @@
97189718
}
97199719
}
97209720

9721+
function toggle_include_chatnames()
9722+
{
9723+
if (document.getElementById("inject_chatnames_instruct").checked) {
9724+
document.getElementById('chatnamessection').classList.remove('hidden');
9725+
} else {
9726+
document.getElementById('chatnamessection').classList.add('hidden');
9727+
}
9728+
}
9729+
97219730
function toggle_opmode() {
97229731

97239732
switch(document.getElementById('opmode').value)
@@ -9733,6 +9742,8 @@
97339742
document.getElementById('uipicker_messenger').classList.add('hidden');
97349743
document.getElementById('uipicker_aesthetic').classList.add('hidden');
97359744
document.getElementById('uipicker_corpo').classList.add('hidden');
9745+
document.getElementById('chatnamessection').classList.add('hidden');
9746+
document.getElementById('instructtagsection').classList.add('hidden');
97369747

97379748
if (document.getElementById('opmode').value == 1) {
97389749
document.getElementById('gui_type').value = localsettings.gui_type_story;
@@ -9746,11 +9757,14 @@
97469757
document.getElementById('gui_type').value = localsettings.gui_type_chat;
97479758
document.getElementById('uipicker_messenger').classList.remove('hidden');
97489759
document.getElementById('uipicker_aesthetic').classList.remove('hidden');
9760+
document.getElementById('chatnamessection').classList.remove('hidden');
97499761
}
97509762
if (document.getElementById('opmode').value == 4) {
97519763
document.getElementById('gui_type').value = localsettings.gui_type_instruct;
97529764
document.getElementById('uipicker_aesthetic').classList.remove('hidden');
97539765
document.getElementById('uipicker_corpo').classList.remove('hidden');
9766+
document.getElementById('instructtagsection').classList.remove('hidden');
9767+
toggle_include_chatnames();
97549768
}
97559769

97569770
//deselect invalid
@@ -10790,6 +10804,7 @@
1079010804
}
1079110805
function ptt_end()
1079210806
{
10807+
var voice_end_delay = document.getElementById("voice_end_delay").value;
1079310808
if(voice_typing_mode>0)
1079410809
{
1079510810
voice_is_speaking = false;
@@ -10823,7 +10838,7 @@
1082310838
}
1082410839
}
1082510840
}
10826-
}, 280); //prevent premature stopping
10841+
}, voice_end_delay); //prevent premature stopping
1082710842
}
1082810843
}
1082910844
function submit_generation_button(aesthetic_ui)
@@ -16965,18 +16980,16 @@
1696516980
</div>
1696616981
</div>
1696716982

16968-
<div class="settingitem wide">
16983+
<div class="settingitem wide" id="instructtagsection">
1696916984
<div class="settinglabel">
1697016985
<div id="instructsection_basic" class="settinglabel" style="width:100%">
1697116986
<div class="justifyleft settingsmall">Instruct Tag Preset <span class="helpicon">?<span class="helptext">Quickly select between common instruct tag formats. Different models are trained with different tags.</span></span></div>
1697216987
<select class="form-control" id="instruct_tag_format" style="height:26px;padding:0;margin:0px 0 0;width:100%" onchange="toggle_instruct_tag_format()">
1697316988
</select>
1697416989
</div>
1697516990
</div>
16976-
</div>
1697716991

16978-
<div class="settingitem wide">
16979-
<div class="settinglabel">
16992+
<div class="settinglabel" style="margin-top: 4px;">
1698016993
<div class="settinglabel" style="width:100%">
1698116994
<div class="justifyleft settingsmall" style="width:100%">Instruct Tag Format <span class="helpicon">?<span class="helptext">Specify the exact text formatting used for instruct mode.</span></span></div>
1698216995
</div>
@@ -16986,7 +16999,7 @@
1698616999
</div>
1698717000
<div class="justifyleft" style="display: flex; width: 100%; font-size: 12px; margin:2px">
1698817001
<div style="width:100px">Sys. Prompt <span class="helpicon">?<span class="helptext">A fixed system message sent at the very start to guide the AI behavior. Usually NOT needed</span></span></div>
16989-
<input class="settinglabel miniinput" style="width:calc(100% - 100px)" type="text" placeholder="(Unused)" value="" id="instruct_sysprompt" onchange="edit_instruct_tag_format()">
17002+
<textarea class="settinglabel miniinput" style="resize:vertical;width:calc(100% - 100px)" rows="1" type="text" placeholder="(Unused)" value="" id="instruct_sysprompt" onchange="edit_instruct_tag_format()"></textarea>
1699017003
</div>
1699117004
<div class="justifyleft" style="display: flex; width: 100%; font-size: 12px; margin:2px">
1699217005
<div style="width:100px">User Tag <span class="helpicon">?<span class="helptext">The sequence to start an instruction prompt</span></span></div>
@@ -16997,10 +17010,9 @@
1699717010
<input class="settinglabel miniinput" style="width:calc(100% - 100px)" type="text" placeholder="\\n### Response:\\n" value="" id="instruct_endtag" onchange="edit_instruct_tag_format()" title="The sequence to end an instruction prompt">
1699817011
</div>
1699917012
</div>
17000-
1700117013
</div>
1700217014

17003-
<div class="settingitem wide">
17015+
<div class="settingitem wide" id="chatnamessection">
1700417016
<div class="settinglabel" style="padding-top: 3px;">
1700517017
<div style="display:flex;width:100%;">
1700617018
<div class="settinglabel settingcell" style="padding-bottom:0px">
@@ -17086,7 +17098,7 @@
1708617098
<div class="settinglabel">
1708717099
<div class="justifyleft settingsmall">Inject ChatNames <span class="helpicon">?<span
1708817100
class="helptext">Appends chat names after every instruct tag, a hybrid chat mode.</span></span></div>
17089-
<input type="checkbox" id="inject_chatnames_instruct" style="margin:0px 0px 0px auto;">
17101+
<input type="checkbox" id="inject_chatnames_instruct" style="margin:0px 0px 0px auto;" onchange="toggle_include_chatnames()">
1709017102
</div>
1709117103
<div class="settinglabel">
1709217104
<div class="justifyleft settingsmall">Assistant Jailbreak <span class="helpicon">?<span
@@ -17393,9 +17405,9 @@
1739317405
<div class="settingitem">
1739417406
<div class="settinglabel">
1739517407
<div class="justifyleft settingsmall">TTS <span class="helpicon">?<span class="helptext">Enable Text-To-Speech to have your story automatically read to you.</span></span></div>
17396-
<select class="form-control" id="ttsselect" style="font-size:12px;height:20px;padding:0;margin:0px 0 0;width:calc(100% - 32px);" onchange="toggle_tts_mode()">
17408+
<select class="form-control" id="ttsselect" style="font-size:12px;height:20px;padding:0;margin:0px 0 0;width:calc(100% - 35px);" onchange="toggle_tts_mode()">
1739717409
</select>
17398-
<button id="test_tts" type="button" class="bg_green btn btn-primary" style="height:20px; width:30px; padding:2px 3px;font-size:11px;" onclick="test_tts()">Test</button>
17410+
<button id="test_tts" type="button" class="bg_green btn btn-primary" style="height:20px; width:30px; padding:2px 3px;font-size:11px; margin-left: 2px;" onclick="test_tts()">Test</button>
1739917411
<div id="xtts_container" class="settinglabel hidden">
1740017412
<table width="100%"><tr>
1740117413
<td><button id="xtts_url" type="button" class="btn btn-primary" style="width:100%; padding:2px 3px;margin-top:2px;font-size:11px;" onclick="set_xtts_url()">Set URL</button></td>
@@ -17408,31 +17420,36 @@
1740817420
</div>
1740917421
<div class="settinglabel">
1741017422
<div class="justifyleft settingsmall" title="If unchecked, only speak AI replies, not other text.">Narrate Both Sides </div>
17411-
<input type="checkbox" id="narrate_both_sides" style="margin:0px 0 0;">
17423+
<input type="checkbox" id="narrate_both_sides" style="margin:0px 0px 0px auto;">
1741217424
</div>
1741317425
<div class="settinglabel">
1741417426
<div class="justifyleft settingsmall" title="If unchecked, only speak AI replies, not other text.">Narrate Only Dialog </div>
17415-
<input type="checkbox" id="narrate_only_dialog" style="margin:0px 0 0;">
17427+
<input type="checkbox" id="narrate_only_dialog" style="margin:0px 0px 0px auto;">
1741617428
</div>
1741717429
<div class="settinglabel">
1741817430
<div class="justifyleft settingsmall" title="Play a sound when generation is complete">Beep on Done </div>
17419-
<input type="checkbox" id="beep_on" style="margin:0px 0 0;">
17431+
<input type="checkbox" id="beep_on" style="margin:0px 0px 0px auto;">
1742017432
</div>
1742117433
<div class="settinglabel">
1742217434
<div class="justifyleft settingsmall" title="Show notification when generation is complete">Notify on Done </div>
17423-
<input type="checkbox" id="notify_on" style="margin:0px 0 0;">
17435+
<input type="checkbox" id="notify_on" style="margin:0px 0px 0px auto;">
1742417436
</div>
17425-
<div class="settinglabel">
17426-
<div class="justifyleft settingsmall" title="">Speech Ctrl. <span class="helpicon">?<span
17427-
class="helptext">Requires KoboldCpp with Whisper model loaded. Enables Speech-To-Text voice input. Automatically listens for speech in 'On' mode (Voice Detection), or use Push-To-Talk (PTT).</span></span></div>
17428-
<select style="padding:1px; height:auto; width: 60px; appearance: none; font-size: 6pt; margin:0px 0px 0px auto;" class="form-control" id="voice_typing_mode">
17437+
17438+
<div class="settinglabel" style="margin-top: 5px;">
17439+
<div class="justifyleft settingsmall">Speech Control <span class="helpicon">?<span class="helptext">Requires KoboldCpp with Whisper model loaded. Enables Speech-To-Text voice input. Automatically listens for speech in 'On' mode (Voice Detection), or use Push-To-Talk (PTT).</span></span></div>
17440+
<select style="padding:1px; height:auto; font-size: 8pt;" class="form-control" id="voice_typing_mode">
1742917441
<option value="0">Off</option>
1743017442
<option value="1">Detect Voice</option>
1743117443
<option value="2">Push-To-Talk</option>
1743217444
</select>
1743317445
</div>
17446+
<div class="inlinelabel" style="font-size: 11px;">
17447+
<div class="justifyleft" style="padding:4px">Voice Delay: </div>
17448+
<input type="text" inputmode="decimal" value="300" id="voice_end_delay" style="width:40px">
17449+
</div>
1743417450
</div>
1743517451

17452+
1743617453
<div class="settingitem wide">
1743717454
<div style="font-size:12px;">
1743817455
<div class="settingsdesctxt">Style tags to use for generating images:<br>(E.g. Sketch, Realistic, Anime, 3D Render, Drawing)<br></div>

0 commit comments

Comments
 (0)