updated ver, updated lite (+1 squashed commits)

Squashed commits:

[891291bc] updated lite to v67
This commit is contained in:
Concedo 2023-09-21 17:40:35 +08:00
parent 2dda63a4eb
commit 14295922f9
2 changed files with 112 additions and 73 deletions

View file

@ -6,7 +6,7 @@ It requires no dependencies, installation or setup.
Just copy this single static HTML file anywhere and open it in a browser, or from a webserver. Just copy this single static HTML file anywhere and open it in a browser, or from a webserver.
Please go to https://github.com/LostRuins/lite.koboldai.net for updates on Kobold Lite. Please go to https://github.com/LostRuins/lite.koboldai.net for updates on Kobold Lite.
Kobold Lite is under the AGPL v3.0 License for the purposes of koboldcpp. Please do not remove this line. Kobold Lite is under the AGPL v3.0 License for the purposes of koboldcpp. Please do not remove this line.
Current version: 66 Current version: 67
-Concedo -Concedo
--> -->
@ -1736,6 +1736,11 @@ Current version: 66
@media screen and (max-width: 880px) { @media screen and (max-width: 880px) {
#aesthetic_text_preview_panel { display: none; } #aesthetic_text_preview_panel { display: none; }
} }
.aui_nametag
{
margin: 0 0 3px;
font-weight: bold;
}
/*--------- end instruct-UI -----------*/ /*--------- end instruct-UI -----------*/
</style> </style>
@ -3472,6 +3477,11 @@ Current version: 66
story.savedsettings.saved_oai_addr = ""; story.savedsettings.saved_oai_addr = "";
story.savedsettings.saved_claude_key = ""; story.savedsettings.saved_claude_key = "";
story.savedsettings.saved_claude_addr = ""; story.savedsettings.saved_claude_addr = "";
if (!strip_images)
{
story.savedaestheticsettings = JSON.parse(JSON.stringify(aestheticInstructUISettings, null, 2));
}
} }
var storyjson = JSON.stringify(story); var storyjson = JSON.stringify(story);
console.log("Exporting story: " + storyjson); console.log("Exporting story: " + storyjson);
@ -3594,6 +3604,10 @@ Current version: 66
localsettings.saved_claude_addr = tmp_claude2; localsettings.saved_claude_addr = tmp_claude2;
} }
if (story.savedaestheticsettings && story.savedaestheticsettings != "") {
import_props_into_object(aestheticInstructUISettings,story.savedaestheticsettings);
}
} else { } else {
msgbox("Could not import from URL. Is it valid?"); msgbox("Could not import from URL. Is it valid?");
@ -3702,8 +3716,11 @@ Current version: 66
loaded_storyobj.savedsettings.saved_oai_addr = ""; loaded_storyobj.savedsettings.saved_oai_addr = "";
loaded_storyobj.savedsettings.saved_claude_key = ""; loaded_storyobj.savedsettings.saved_claude_key = "";
loaded_storyobj.savedsettings.saved_claude_addr = ""; loaded_storyobj.savedsettings.saved_claude_addr = "";
loaded_storyobj.savedaestheticsettings = JSON.parse(JSON.stringify(aestheticInstructUISettings, null, 2));
}else{ }else{
loaded_storyobj.savedsettings = null; loaded_storyobj.savedsettings = null;
loaded_storyobj.savedaestheticsettings = null;
} }
@ -3795,7 +3812,7 @@ Current version: 66
//replace portraits //replace portraits
compressImage(data, (compressedImageURI, aspectratio)=>{ compressImage(data, (compressedImageURI, aspectratio)=>{
aestheticInstructUISettings.AI_portrait = compressedImageURI; aestheticInstructUISettings.AI_portrait = compressedImageURI;
document.getElementById('portrait_height').value = Math.round(document.getElementById('portrait_width').value / aspectratio); document.getElementById('portrait_ratio_AI').value = aspectratio.toFixed(2);
refreshPreview(true); refreshPreview(true);
render_gametext(); render_gametext();
}, true); }, true);
@ -3910,6 +3927,11 @@ Current version: 66
localsettings.instruct_endtag = "\\n"+localsettings.instruct_endtag+"\\n"; localsettings.instruct_endtag = "\\n"+localsettings.instruct_endtag+"\\n";
} }
} }
if (loaded_storyobj.savedaestheticsettings && loaded_storyobj.savedaestheticsettings != "") {
import_props_into_object(aestheticInstructUISettings,loaded_storyobj.savedaestheticsettings);
}
hide_popups(); hide_popups();
render_gametext(); render_gametext();
}, hide_popups); }, hide_popups);
@ -4321,7 +4343,7 @@ Current version: 66
`; `;
inputBox(warntxt,"AI Safety Warning","","Acknowledgement Required",()=>{ inputBox(warntxt,"AI Safety Warning","","Acknowledgement Required",()=>{
let userinput = getInputBoxValue().toLowerCase().trim(); let userinput = getInputBoxValue().toLowerCase().trim();
if(userinput=="i understand") if(userinput.includes("understand"))
{ {
confirm_scenario(); confirm_scenario();
} }
@ -8786,17 +8808,19 @@ Current version: 66
this.bubbleColor_you = '#29343a'; this.bubbleColor_you = '#29343a';
this.bubbleColor_AI = 'rgba(20, 20, 40, 1)'; this.bubbleColor_AI = 'rgba(20, 20, 40, 1)';
// this.background_anchor_style_you = 'left';
// this.background_anchor_style_AI = 'left';
this.background_margin = [10, 10, 5, 0]; this.background_margin = [10, 10, 5, 0];
this.background_padding = [40, 40, 10, 0]; this.background_padding = [25, 25, 10, 10];
this.background_minHeight = 100; this.background_minHeight = 100;
this.centerHorizontally = false; this.centerHorizontally = false;
this.show_portraits = true; // Shows/hides the rest of the fields below on the UI, and is also used on the display part of the code. this.border_style = 'Rounded';
this.border_style = 'Rect'; this.portrait_width_AI = 100;
this.portrait_width = 100; this.portrait_ratio_AI = 1.0;
this.portrait_height = 100; this.portrait_width_you = 100;
this.portrait_ratio_you = 1.0;
this.show_chat_names = true;
this.rounded_bubbles = true;
this.you_portrait = null; this.you_portrait = null;
this.AI_portrait = niko_square; this.AI_portrait = niko_square;
@ -8817,8 +8841,14 @@ Current version: 66
padding() { return `${this.background_padding[2]}px ${this.background_padding[1]}px ${this.background_padding[3]}px ${this.background_padding[0]}px`; } padding() { return `${this.background_padding[2]}px ${this.background_padding[1]}px ${this.background_padding[3]}px ${this.background_padding[0]}px`; }
margin() { return `${this.background_margin[2]}px ${this.background_margin[1]}px ${this.background_margin[3]}px ${this.background_margin[0]}px`; } margin() { return `${this.background_margin[2]}px ${this.background_margin[1]}px ${this.background_margin[3]}px ${this.background_margin[0]}px`; }
portraitSize() { return { width: this.portrait_width, height: this.border_style == 'Circle' ? this.portrait_width : this.portrait_height }; } portraitSize(role) {
portraitRadius() { return this.border_style == 'Circle' ? '1000rem' : (this.border_style == 'Rounded' ? '2rem' : '0.1rem'); } if (role == "you") {
return { width: this.portrait_width_you, height: this.border_style == 'Circle' ? this.portrait_width_you : this.portrait_width_you / this.portrait_ratio_you };
} else {
return { width: this.portrait_width_AI, height: this.border_style == 'Circle' ? this.portrait_width_AI : this.portrait_width_AI / this.portrait_ratio_AI };
}
}
portraitRadius() { return this.border_style == 'Circle' ? '1000rem' : (this.border_style == 'Rounded' ? '1.6rem' : '0.1rem'); }
} }
const sideMapping = { 'left': 0, 'right': 1, 'top': 2, 'bottom': 3 }; const sideMapping = { 'left': 0, 'right': 1, 'top': 2, 'bottom': 3 };
@ -8827,15 +8857,6 @@ Current version: 66
let tempAestheticInstructUISettings = null; // These exist to act as backup when customizing, to revert when pressing the 'Cancel' button. let tempAestheticInstructUISettings = null; // These exist to act as backup when customizing, to revert when pressing the 'Cancel' button.
function initializeInstructUIFunctionality() { function initializeInstructUIFunctionality() {
// Load the default settings (by default), or the latest chosen ones.
if (localsettings.persist_session === true) {
const jsonString = localStorage.getItem((localflag?"e_":"")+'koboldLiteUICustomizationOptions');
if (jsonString) {
var obj = JSON.parse(jsonString);
for (let key in obj) { if (aestheticInstructUISettings.hasOwnProperty(key)) { aestheticInstructUISettings[key] = obj[key]; } }
}
} // If persist session isn't toggled, reset to the default settings.
else { localStorage.setItem((localflag ? 'e_': '') + 'koboldLiteUICustomizationOptions', JSON.stringify(aestheticInstructUISettings, null, 2)); }
// Initialize foregroundColorPickers and backgroundColorPickers. // Initialize foregroundColorPickers and backgroundColorPickers.
document.querySelectorAll('.enhancedTextColorPicker, .enhancedStandardColorPicker').forEach(element => { document.querySelectorAll('.enhancedTextColorPicker, .enhancedStandardColorPicker').forEach(element => {
@ -8908,11 +8929,12 @@ Current version: 66
if(isSelfPortrait) if(isSelfPortrait)
{ {
aestheticInstructUISettings.you_portrait = compressedImageURI; aestheticInstructUISettings.you_portrait = compressedImageURI;
document.getElementById('portrait_ratio_you').value = aspectratio.toFixed(2);
} }
else else
{ {
aestheticInstructUISettings.AI_portrait = compressedImageURI; aestheticInstructUISettings.AI_portrait = compressedImageURI;
document.getElementById('portrait_height').value = Math.round(document.getElementById('portrait_width').value / aspectratio); document.getElementById('portrait_ratio_AI').value = aspectratio.toFixed(2);
} }
refreshPreview(true); refreshPreview(true);
} }
@ -8928,7 +8950,10 @@ Current version: 66
document.getElementById("reset-portrait").addEventListener('click', (e) => { document.getElementById("reset-portrait").addEventListener('click', (e) => {
aestheticInstructUISettings.you_portrait = null; aestheticInstructUISettings.you_portrait = null;
aestheticInstructUISettings.AI_portrait = niko_square; aestheticInstructUISettings.AI_portrait = niko_square;
document.getElementById('portrait_height').value = document.getElementById('portrait_width').value = 100; document.getElementById('portrait_ratio_AI').value = 1.0;
document.getElementById('portrait_width_AI').value = 100;
document.getElementById('portrait_ratio_you').value = 1.0;
document.getElementById('portrait_width_you').value = 100;
refreshPreview(true); refreshPreview(true);
}); });
@ -8979,29 +9004,29 @@ Current version: 66
if (role != 'uniform') { aestheticInstructUISettings[`bubbleColor_${role}`] = document.getElementById(`${role}-bubble-colorselector`).style.backgroundColor; } if (role != 'uniform') { aestheticInstructUISettings[`bubbleColor_${role}`] = document.getElementById(`${role}-bubble-colorselector`).style.backgroundColor; }
} }
aestheticInstructUISettings.rounded_bubbles = document.getElementById('aui_rounded_bubbles').checked;
aestheticInstructUISettings.show_chat_names = document.getElementById('aui_show_chat_names').checked;
aestheticInstructUISettings.use_markdown = document.getElementById('instructModeMarkdown').checked; aestheticInstructUISettings.use_markdown = document.getElementById('instructModeMarkdown').checked;
aestheticInstructUISettings.use_uniform_colors = !document.getElementById('instructModeCustomized').checked; aestheticInstructUISettings.use_uniform_colors = !document.getElementById('instructModeCustomized').checked;
aestheticInstructUISettings.code_block_background = document.getElementById('code-block-background-colorselector').style.color; aestheticInstructUISettings.code_block_background = document.getElementById('code-block-background-colorselector').style.color;
aestheticInstructUISettings.code_block_foreground = document.getElementById('code-block-foreground-colorselector').style.color; aestheticInstructUISettings.code_block_foreground = document.getElementById('code-block-foreground-colorselector').style.color;
aestheticInstructUISettings.font_size = document.getElementById('instruct-font-size').value; aestheticInstructUISettings.font_size = document.getElementById('instruct-font-size').value;
aestheticInstructUISettings.border_style = document.getElementById('instructBorderStyle').value; aestheticInstructUISettings.border_style = document.getElementById('instructBorderStyle').value;
aestheticInstructUISettings.portrait_width = document.getElementById('portrait_width').value; aestheticInstructUISettings.portrait_width_AI = document.getElementById('portrait_width_AI').value;
aestheticInstructUISettings.portrait_height = document.getElementById('portrait_height').value; aestheticInstructUISettings.portrait_ratio_AI = document.getElementById('portrait_ratio_AI').value;
aestheticInstructUISettings.portrait_width_you = document.getElementById('portrait_width_you').value;
aestheticInstructUISettings.portrait_ratio_you = document.getElementById('portrait_ratio_you').value;
aestheticInstructUISettings.background_minHeight = document.getElementById('instruct-min-backgroundHeight').value; aestheticInstructUISettings.background_minHeight = document.getElementById('instruct-min-backgroundHeight').value;
aestheticInstructUISettings.centerHorizontally = document.getElementById('instructModeCenterHorizontally').checked; aestheticInstructUISettings.centerHorizontally = document.getElementById('instructModeCenterHorizontally').checked;
// aestheticInstructUISettings.background_anchor_style_you = document.getElementById('background-anchor-style-you').value;
// aestheticInstructUISettings.background_anchor_style_AI = document.getElementById('background-anchor-style-AI').value;
//basic sanitization //basic sanitization
aestheticInstructUISettings.font_size = cleannum(aestheticInstructUISettings.font_size, 5, 50); aestheticInstructUISettings.font_size = cleannum(aestheticInstructUISettings.font_size, 5, 50);
aestheticInstructUISettings.portrait_width = cleannum(aestheticInstructUISettings.portrait_width, 10, 250); aestheticInstructUISettings.portrait_width_AI = cleannum(aestheticInstructUISettings.portrait_width_AI, 10, 250);
aestheticInstructUISettings.portrait_height = cleannum(aestheticInstructUISettings.portrait_height, 10, 250); aestheticInstructUISettings.portrait_ratio_AI = cleannum(aestheticInstructUISettings.portrait_ratio_AI, 0.01, 3).toFixed(2);
aestheticInstructUISettings.portrait_width_you = cleannum(aestheticInstructUISettings.portrait_width_you, 10, 250);
aestheticInstructUISettings.portrait_ratio_you = cleannum(aestheticInstructUISettings.portrait_ratio_you, 0.01, 3).toFixed(2);
aestheticInstructUISettings.background_minHeight = cleannum(aestheticInstructUISettings.background_minHeight, 0, 300); aestheticInstructUISettings.background_minHeight = cleannum(aestheticInstructUISettings.background_minHeight, 0, 300);
// NOTE: Portraits are loaded automatically from the json, and are stored to aestheticInstructUISettings directly.
localStorage.setItem((localflag?"e_":"")+'koboldLiteUICustomizationOptions', JSON.stringify(aestheticInstructUISettings, null, 2));
function getTextStyleFromElement(id) { function getTextStyleFromElement(id) {
let element = document.getElementById(id); let element = document.getElementById(id);
let computedStyle = window.getComputedStyle(element); let computedStyle = window.getComputedStyle(element);
@ -9018,18 +9043,20 @@ Current version: 66
} }
// Apply the settings from the json file to the UI. // Apply the settings from the json file to the UI.
document.getElementById('aui_rounded_bubbles').checked = aestheticInstructUISettings.rounded_bubbles;
document.getElementById('aui_show_chat_names').checked = aestheticInstructUISettings.show_chat_names;
document.getElementById('instructModeMarkdown').checked = aestheticInstructUISettings.use_markdown; document.getElementById('instructModeMarkdown').checked = aestheticInstructUISettings.use_markdown;
document.getElementById('instructModeCustomized').checked = !aestheticInstructUISettings.use_uniform_colors; document.getElementById('instructModeCustomized').checked = !aestheticInstructUISettings.use_uniform_colors;
document.getElementById('code-block-background-colorselector').style.color = aestheticInstructUISettings.code_block_background; document.getElementById('code-block-background-colorselector').style.color = aestheticInstructUISettings.code_block_background;
document.getElementById('code-block-foreground-colorselector').style.color = aestheticInstructUISettings.code_block_foreground; document.getElementById('code-block-foreground-colorselector').style.color = aestheticInstructUISettings.code_block_foreground;
document.getElementById('instruct-font-size').value = aestheticInstructUISettings.font_size; document.getElementById('instruct-font-size').value = aestheticInstructUISettings.font_size;
document.getElementById('instructBorderStyle').value = aestheticInstructUISettings.border_style; document.getElementById('instructBorderStyle').value = aestheticInstructUISettings.border_style;
document.getElementById('portrait_width').value = aestheticInstructUISettings.portrait_width; document.getElementById('portrait_width_AI').value = aestheticInstructUISettings.portrait_width_AI;
document.getElementById('portrait_height').value = aestheticInstructUISettings.portrait_height; document.getElementById('portrait_ratio_AI').value = aestheticInstructUISettings.portrait_ratio_AI;
document.getElementById('portrait_width_you').value = aestheticInstructUISettings.portrait_width_you;
document.getElementById('portrait_ratio_you').value = aestheticInstructUISettings.portrait_ratio_you;
document.getElementById('instruct-min-backgroundHeight').value = aestheticInstructUISettings.background_minHeight; document.getElementById('instruct-min-backgroundHeight').value = aestheticInstructUISettings.background_minHeight;
document.getElementById('instructModeCenterHorizontally').checked = aestheticInstructUISettings.centerHorizontally; document.getElementById('instructModeCenterHorizontally').checked = aestheticInstructUISettings.centerHorizontally;
// document.getElementById('background-anchor-style-AI').value = aestheticInstructUISettings.background_anchor_style_AI;
// document.getElementById('background-anchor-style-you').value = aestheticInstructUISettings.background_anchor_style_you;
// Show or hide customization UI elements based on whether they should be visible in the UI or not. // Show or hide customization UI elements based on whether they should be visible in the UI or not.
showOrHide('.uniform-mode-font', document.getElementById('instructModeCustomized').checked == false); showOrHide('.uniform-mode-font', document.getElementById('instructModeCustomized').checked == false);
@ -9066,6 +9093,8 @@ Current version: 66
{ {
const contextDict = { sysOpen: '<sys_context_koboldlite_internal>', youOpen: '<user_context_koboldlite_internal>', AIOpen: '<AI_context_koboldlite_internal>', closeTag: '<end_of_context_koboldlite_internal>' } const contextDict = { sysOpen: '<sys_context_koboldlite_internal>', youOpen: '<user_context_koboldlite_internal>', AIOpen: '<AI_context_koboldlite_internal>', closeTag: '<end_of_context_koboldlite_internal>' }
let you = get_instruct_starttag(); let bot = get_instruct_endtag(); // Instruct tags will be used to wrap text in styled bubbles. let you = get_instruct_starttag(); let bot = get_instruct_endtag(); // Instruct tags will be used to wrap text in styled bubbles.
let as = aestheticInstructUISettings; // ..and use this as shortcut to avoid typing it each time.
if(localsettings.opmode==3) if(localsettings.opmode==3)
{ {
//replace all possible instances with placeholders //replace all possible instances with placeholders
@ -9077,20 +9106,26 @@ Current version: 66
input = input.replaceAll(mynameregex, '{{userplaceholder}}'); input = input.replaceAll(mynameregex, '{{userplaceholder}}');
input = input.replaceAll(mynameregex2, '{{userplaceholder}}'); input = input.replaceAll(mynameregex2, '{{userplaceholder}}');
input = input.replaceAll(mynameregex3, '{{userplaceholder}}'); input = input.replaceAll(mynameregex3, '{{userplaceholder}}');
input = input.replaceAll("{{userplaceholder}}", '{{userplaceholder}}<p><b>'+localsettings.chatname+'</b></p>'); if(as.show_chat_names)
{
input = input.replaceAll(othernamesregex, function(match) { input = input.replaceAll("{{userplaceholder}}", `{{userplaceholder}}<p class='aui_nametag'>`+localsettings.chatname+`</p>`);
return "{{botplaceholder}}<p><b>" + match.substring(0,match.length-2).trim() + "</b></p>"; input = input.replaceAll(othernamesregex, function(match) {
}); return "{{botplaceholder}}<p class='aui_nametag'>" + match.substring(0,match.length-2).trim() + "</p>";
input = input.replaceAll(othernamesregex2, function(match) { });
return "{{botplaceholder}}<p><b>" + match.substring(0,match.length-2).trim() + "</b></p>"; input = input.replaceAll(othernamesregex2, function(match) {
}); return "{{botplaceholder}}<p class='aui_nametag'>" + match.substring(0,match.length-2).trim() + "</p>";
});
}
else
{
input = input.replaceAll(othernamesregex, "{{botplaceholder}}");
input = input.replaceAll(othernamesregex2, "{{botplaceholder}}");
}
you = "{{userplaceholder}}"; you = "{{userplaceholder}}";
bot = "{{botplaceholder}}"; bot = "{{botplaceholder}}";
} }
let as = aestheticInstructUISettings; // ..and use this as shortcut to avoid typing it each time.
let portraitsStyling = // Also, implement portraits as css classes. Now chat entries can reuse them instead of recreating them. let portraitsStyling = // Also, implement portraits as css classes. Now chat entries can reuse them instead of recreating them.
`<style> `<style>
.you-portrait-image`+classSuffixStr+` {margin: 10px 6px; background:url(`+ as.you_portrait +`); background-clip: content-box; background-position: 50% 50%; background-size: 100% 100%; background-origin: content-box; background-repeat: no-repeat; border:none;} .you-portrait-image`+classSuffixStr+` {margin: 10px 6px; background:url(`+ as.you_portrait +`); background-clip: content-box; background-position: 50% 50%; background-size: 100% 100%; background-origin: content-box; background-repeat: no-repeat; border:none;}
@ -9123,11 +9158,11 @@ Current version: 66
// Helper functions to allow styling the chat log properly. These affect both the background of the chat bubbles and its content. // Helper functions to allow styling the chat log properly. These affect both the background of the chat bubbles and its content.
function style(role) { return `${contextDict.closeTag}</p></div></div><div style='display:flex; align-items:stretch; flex-direction: row;'>${image(role)}<div style='flex: 1; color: ${as[`text_color_${as.use_uniform_colors ? 'uniform' : role}`].color}; background-color:${as[`bubbleColor_${role}`]}; padding: ${as.padding()}; margin: ${as.margin()}; min-height:${as.background_minHeight}px; font-size: ${as.font_size}px; flex-direction:column; align-items: ${as.centerHorizontally ? 'center' : 'flex-start'}; justify-content: center; border-radius: 15px'><p>${contextDict[`${role}Open`]}`; } function style(role) { return `${contextDict.closeTag}</div></div><div style='display:flex; align-items:stretch; flex-direction: row;'>${image(role)}<div style='flex: 1; display:flex; color: ${as[`text_color_${as.use_uniform_colors ? 'uniform' : role}`].color}; background-color:${as[`bubbleColor_${role}`]}; padding: ${as.padding()}; margin: ${as.margin()}; min-height:${as.background_minHeight}px; font-size: ${as.font_size}px; flex-direction:column; align-items: ${as.centerHorizontally ? 'center' : 'flex-start'}; justify-content: center; border-radius: ${as.rounded_bubbles ? '15px' : '0px'}'>${contextDict[`${role}Open`]}`; }
function wrapperSpan(role, type) { let textStyle = as[`${type}_color_${role}`]; return `<span style='color: ${textStyle.color}; font-style: ${textStyle.fontStyle}; font-weight: ${textStyle.fontWeight}'>$1</span>`; } function wrapperSpan(role, type) { let textStyle = as[`${type}_color_${role}`]; return `<span style='color: ${textStyle.color}; font-style: ${textStyle.fontStyle}; font-weight: ${textStyle.fontWeight}'>$1</span>`; }
function image(role) { function image(role) {
if (!as[`${role}_portrait`] || as.border_style == 'None' || role == 'sys') { return ''; } if (!as[`${role}_portrait`] || as.border_style == 'None' || role == 'sys') { return ''; }
return `<div class='${role}-portrait-image${classSuffixStr}' style='width:${as.portraitSize().width}px; height:${as.portraitSize().height}px; border-radius: ${as.portraitRadius()}'></div>`; return `<div class='${role}-portrait-image${classSuffixStr}' style='width:${as.portraitSize(role).width}px; height:${as.portraitSize(role).height}px; border-radius: ${as.portraitRadius()}'></div>`;
} }
function applyStylizedCodeBlocks() { function applyStylizedCodeBlocks() {
let blocks = newbodystr.split(/(```[\s\S]*?\n[\s\S]*?```)/g); let blocks = newbodystr.split(/(```[\s\S]*?\n[\s\S]*?```)/g);
@ -9151,7 +9186,11 @@ Current version: 66
if(localsettings.opmode==3) if(localsettings.opmode==3)
{ {
preview = replaceAll(preview,'\n[USER_REPLY]\n', "{{userplaceholder}}"); preview = replaceAll(preview,'\n[USER_REPLY]\n', "{{userplaceholder}}");
preview = replaceAll(preview,'\n[AI_REPLY]\n', "{{botplaceholder}}"); if(aestheticInstructUISettings.show_chat_names){
preview = replaceAll(preview,'\n[AI_REPLY]\n', "{{botplaceholder}}<p class='aui_nametag'>Bot</p>");
}else{
preview = replaceAll(preview,'\n[AI_REPLY]\n', "{{botplaceholder}}");
}
} }
else else
{ {
@ -9930,7 +9969,7 @@ Current version: 66
<input type="checkbox" id="persist_session" style="margin:0px 0 0;"> <input type="checkbox" id="persist_session" style="margin:0px 0 0;">
</div> </div>
<div class="settinglabel"> <div class="settinglabel">
<div class="justifyleft settingsmall" title="Includes your current settings when saving or sharing your story">JSON Exports Settings </div> <div class="justifyleft settingsmall" title="Includes your current settings when saving or sharing your story">Save File Incl. Settings </div>
<input type="checkbox" id="export_settings" style="margin:0px 0 0;"> <input type="checkbox" id="export_settings" style="margin:0px 0 0;">
</div> </div>
<div class="settinglabel"> <div class="settinglabel">
@ -10215,21 +10254,12 @@ Current version: 66
<div class="enhancedStandardColorPicker" id="you-bubble-colorselector">You 🖌️</div> <div class="enhancedStandardColorPicker" id="you-bubble-colorselector">You 🖌️</div>
<div class="enhancedStandardColorPicker" id="AI-bubble-colorselector">AI 🖌️</div> <div class="enhancedStandardColorPicker" id="AI-bubble-colorselector">AI 🖌️</div>
</div> </div>
<!-- ANCHOR NOT IMPLEMENTED -->
<!-- <div class="ui-settings-inline hidden"> <div class="ui-settings-inline" style="font-size: 10px; margin-left: 10px">
<div style="margin-right: 38px">Anchor: </div> <div style="padding-top: 2px;">Rounded Bubbles: </div>
<div style="text-align: center; margin: 0px 10px">You:</div> <input id="aui_rounded_bubbles" type="checkbox" style="height: 10px">
<select class="form-control" id="background-anchor-style-you" style="width:50px;height:16px;padding:0; font-size: 10px;"> </div>
<option value="0">Left</option>
<option value="1">Right</option>
</select>
<div style="text-align: center; margin: 0px 10px">AI:</div>
<select class="form-control" id="background-anchor-style-AI" style="width:50px;height:16px;padding:0; font-size: 10px;">
<option value="0">Left</option>
<option value="1">Right</option>
</select>
</div> -->
<!-- ^^ TODO: IMPLEMENT ANCHOR ABOVE ^^-->
<div class="ui-settings-inline"> <div class="ui-settings-inline">
<div style="margin-right:20px;">Min Height: </div> <div style="margin-right:20px;">Min Height: </div>
<div class="instruct-settings-input"><input id ="instruct-min-backgroundHeight" type="number"/> px</div> <div class="instruct-settings-input"><input id ="instruct-min-backgroundHeight" type="number"/> px</div>
@ -10273,7 +10303,7 @@ Current version: 66
<div style="margin-left: 12px;"> <div style="margin-left: 12px;">
<div class="ui-settings-inline"> <div class="ui-settings-inline">
<div style="margin-right:17px;">Portrait Style: </div> <div style="margin-right:17px;">Portrait Style: </div>
<select class="form-control" id="instructBorderStyle" style="width:60px;height:16px;padding:0; font-size: 10px;"> <select class="form-control" id="instructBorderStyle" style="width:70px;height:16px;padding:0; font-size: 10px;">
<option value="None">None</option> <option value="None">None</option>
<option value="Circle">Circle</option> <option value="Circle">Circle</option>
<option value="Rounded">Rounded</option> <option value="Rounded">Rounded</option>
@ -10282,12 +10312,21 @@ Current version: 66
<div id="reset-portrait" style="margin-left: 10px;"><a href="#" class="color_blueurl">(Reset Image)</a></div> <div id="reset-portrait" style="margin-left: 10px;"><a href="#" class="color_blueurl">(Reset Image)</a></div>
</div> </div>
<div class="ui-settings-inline"> <div class="ui-settings-inline">
<div style="margin-right:18px;">Portrait Size: </div> <div style="margin-right:18px;">User Portrait: </div>
<div> <span class="rectPortraitMode">W: </span><input id="portrait_width" type="number" placeholder="100" value="100" style='width:40px;height:20px;font-size:10px;'/></div> <div> <span class="rectPortraitMode">Size: </span><input id="portrait_width_you" type="number" placeholder="100" value="100" style='width:40px;height:20px;font-size:10px;'/></div>
<div style="margin-left:5px"><span class="rectPortraitMode">H: </span><input id="portrait_height" type="number" placeholder="100" value="100" style='width:40px;height:20px;font-size:10px;' class="rectPortraitMode"/></div> <div style="align-self: left;">px</div>
<div style="align-self: center;">px</div> <div style="margin-left:20px"><span class="rectPortraitMode">A/R: </span><input id="portrait_ratio_you" type="number" placeholder="1.0" step="0.01" value="1.0" style='width:46px;height:20px;font-size:10px;' class="rectPortraitMode"/></div>
</div>
<div class="ui-settings-inline">
<div style="margin-right:32px;">AI Portrait: </div>
<div> <span class="rectPortraitMode">Size: </span><input id="portrait_width_AI" type="number" placeholder="100" value="100" style='width:40px;height:20px;font-size:10px;'/></div>
<div style="align-self: left;">px</div>
<div style="margin-left:20px"><span class="rectPortraitMode">A/R: </span><input id="portrait_ratio_AI" type="number" placeholder="1.0" step="0.01" value="1.0" style='width:46px;height:20px;font-size:10px;' class="rectPortraitMode"/></div>
</div>
<div class="ui-settings-inline" style="font-size: 10px; margin-left: 10px">
<div style="padding-top: 2px;">Show Names (Chat Mode): </div>
<input id="aui_show_chat_names" type="checkbox" style="height: 10px">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -10311,7 +10350,7 @@ Current version: 66
<input id="instructModeCustomized" type="checkbox" style="height: 10px;"> <input id="instructModeCustomized" type="checkbox" style="height: 10px;">
</div> </div>
<div class="ui-settings-inline" style="font-size: 10px; margin-left: 10px"> <div class="ui-settings-inline" style="font-size: 10px; margin-left: 10px">
<div style="padding-top: 2px;">Markdown: </div> <div style="padding-top: 2px;">Style Text: </div>
<input id="instructModeMarkdown" type="checkbox" style="height: 10px"> <input id="instructModeMarkdown" type="checkbox" style="height: 10px">
</div> </div>
</div> </div>

View file

@ -354,7 +354,7 @@ maxhordelen = 256
modelbusy = threading.Lock() modelbusy = threading.Lock()
requestsinqueue = 0 requestsinqueue = 0
defaultport = 5001 defaultport = 5001
KcppVersion = "1.44" KcppVersion = "1.44.1"
showdebug = True showdebug = True
showsamplerwarning = True showsamplerwarning = True
showmaxctxwarning = True showmaxctxwarning = True