mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
const port = 8000;
|
||||
const whitelist = ['127.0.0.1','192.168.0.*']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
|
||||
const whitelistMode = false//Disabling enabling the ip whitelist mode. true/false
|
||||
const whitelistMode = false; //Disabling enabling the ip whitelist mode. true/false
|
||||
const autorun = true; //Autorun in the browser. true/false
|
||||
const enableExtensions = true; //Enables support for TavernAI-extras project
|
||||
const listen = true; // If true, Can be access from other device or PC. otherwise can be access only from hosting machine.
|
||||
|
@ -4189,4 +4189,10 @@ $(document).ready(function () {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.inline-drawer-toggle', function () {
|
||||
var icon = $(this).find('.inline-drawer-icon');
|
||||
icon.toggleClass('down up');
|
||||
$(this).closest('.inline-drawer').find('.inline-drawer-content').slideToggle();
|
||||
});
|
||||
})
|
||||
|
@ -202,8 +202,16 @@ async function setExpression(character, expression) {
|
||||
const html = `
|
||||
<div class="expression_settings">
|
||||
<h4>Expression images</h4>
|
||||
<div class="inline-drawer">
|
||||
<div class="inline-drawer-toggle inline-drawer-header">
|
||||
<b>View supported images</b>
|
||||
<div class="inline-drawer-icon down"></div>
|
||||
</div>
|
||||
<div class="inline-drawer-content">
|
||||
<ul id="image_list"></ul>
|
||||
<p><b>Hint:</b> <i>Create new folder in the <tt>public/characters/</tt> folder and name it as the name of the character. Put PNG images with expressions there.</i></p>
|
||||
<p class="hint"><b>Hint:</b> <i>Create new folder in the <b>public/characters/</b> folder and name it as the name of the character. Put PNG images with expressions there.</i></p>
|
||||
</div>
|
||||
</div>
|
||||
<label for="expressions_show_default"><input id="expressions_show_default" type="checkbox">Show default images (emojis) if missing</label>
|
||||
</div>
|
||||
`;
|
||||
|
@ -45,12 +45,9 @@ img.expression {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.expression_settings {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.expression_settings p {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.expression_settings label {
|
||||
|
@ -320,14 +320,20 @@ function setMemoryContext(value, saveToMessage) {
|
||||
$(document).ready(function () {
|
||||
function addExtensionControls() {
|
||||
const settingsHtml = `
|
||||
<h4>Memory</h4>
|
||||
<div id="memory_settings">
|
||||
<h4>Memory</h4>
|
||||
<label for="memory_contents">Memory contents</label>
|
||||
<textarea id="memory_contents" class="text_pole" rows="8" placeholder="Context will be generated here..."></textarea>
|
||||
<div class="memory_contents_controls">
|
||||
<input id="memory_restore" class="menu_button" type="submit" value="Restore previous state" />
|
||||
<label for="memory_frozen"><input id="memory_frozen" type="checkbox" /> Freeze context</label>
|
||||
</div>
|
||||
<div class="inline-drawer">
|
||||
<div class="inline-drawer-toggle inline-drawer-header">
|
||||
<b>Summarization settings</b>
|
||||
<div class="inline-drawer-icon down"></div>
|
||||
</div>
|
||||
<div class="inline-drawer-content">
|
||||
<label for="memory_short_length">Memory summarization [short-term] length (<span id="memory_short_length_tokens"></span> tokens)</label>
|
||||
<input id="memory_short_length" type="range" value="${defaultSettings.shortMemoryLength}" min="${defaultSettings.minShortMemory}" max="${defaultSettings.maxShortMemory}" step="${defaultSettings.shortMemoryStep}" />
|
||||
<label for="memory_long_length">Memory context [long-term] length (<span id="memory_long_length_tokens"></span> tokens)</label>
|
||||
@ -339,6 +345,8 @@ $(document).ready(function () {
|
||||
<label for="memory_length_penalty">Summarization length penalty (<span id="memory_length_penalty_value"></span>)</label>
|
||||
<input id="memory_length_penalty" type="range" value="${defaultSettings.lengthPenalty}" min="${defaultSettings.minLengthPenalty}" max="${defaultSettings.maxLengthPenalty}" step="${defaultSettings.lengthPenaltyStep}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
$('#extensions_settings').append(settingsHtml);
|
||||
$('#memory_restore').on('click', onMemoryRestoreClick);
|
||||
|
@ -2744,10 +2744,37 @@ filter: invert(20%) sepia(100%) saturate(2518%) hue-rotate(353deg) brightness(93
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* .drawer-header {
|
||||
.inline-drawer {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.inline-drawer-icon {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
filter: invert(1) brightness(75%);
|
||||
}
|
||||
|
||||
.inline-drawer-icon.up {
|
||||
background-image: url('img/circle-chevron-up-solid.svg');
|
||||
}
|
||||
|
||||
.inline-drawer-icon.down {
|
||||
background-image: url('img/circle-chevron-down-solid.svg');
|
||||
}
|
||||
|
||||
.inline-drawer-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
} */
|
||||
}
|
||||
|
||||
.inline-drawer-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.drawer-content {
|
||||
background-color: var(--black50a);
|
||||
|
Reference in New Issue
Block a user