Merge branch 'staging' into tabby-models-list

This commit is contained in:
Cohee 2024-09-09 22:09:47 +03:00
commit dc3be8afc1
8 changed files with 459 additions and 434 deletions

View File

@ -65,7 +65,7 @@
<!-- background selection menu -->
<div id="ai-config-button" class="drawer">
<div class="drawer-toggle drawer-header">
<div id="leftNavDrawerIcon" class="drawer-icon fa-solid fa-sliders closedIcon" title="AI Response Configuration" data-i18n="[title]AI Response Configuration"></div>
<div id="leftNavDrawerIcon" class="drawer-icon fa-solid fa-sliders fa-fw closedIcon" title="AI Response Configuration" data-i18n="[title]AI Response Configuration"></div>
</div>
<div id="left-nav-panel" class="drawer-content fillLeft closedDrawer">
<div id="left-nav-panelheader" class="fa-solid fa-grip drag-grabber"></div>
@ -1898,7 +1898,7 @@
</div>
<div id="sys-settings-button" class="drawer">
<div class="drawer-toggle drawer-header">
<div id="API-status-top" class="drawer-icon fa-solid fa-plug-circle-exclamation closedIcon" title="API Connections" data-i18n="[title]API Connections;[no_connection_text]api_no_connection" no_connection_text="No connection..."></div>
<div id="API-status-top" class="drawer-icon fa-solid fa-plug-circle-exclamation fa-fw closedIcon" title="API Connections" data-i18n="[title]API Connections;[no_connection_text]api_no_connection" no_connection_text="No connection..."></div>
</div>
<div id="rm_api_block" class="drawer-content closedDrawer">
<h3 class="margin0" id="title_api">API</h3>
@ -3071,7 +3071,7 @@
</div>
<div id="advanced-formatting-button" class="drawer">
<div class="drawer-toggle">
<div class="drawer-icon fa-solid fa-font closedIcon" title="AI Response Formatting" data-i18n="[title]AI Response Formatting"></div>
<div class="drawer-icon fa-solid fa-font fa-fw closedIcon" title="AI Response Formatting" data-i18n="[title]AI Response Formatting"></div>
</div>
<div id="AdvancedFormatting" class="drawer-content">
<h3 class="margin0" data-i18n="Advanced Formatting">
@ -3467,7 +3467,7 @@
</div>
<div id="WI-SP-button" class="drawer">
<div class="drawer-toggle drawer-header">
<div id="WIDrawerIcon" class="drawer-icon fa-solid fa-book-atlas closedIcon " title="World Info" data-i18n="[title]World Info"></div>
<div id="WIDrawerIcon" class="drawer-icon fa-solid fa-book-atlas fa-fw closedIcon " title="World Info" data-i18n="[title]World Info"></div>
</div>
<div id="WorldInfo" class="drawer-content closedDrawer">
<div id="WorldInfoheader" class="fa-solid fa-grip drag-grabber"></div>
@ -3668,7 +3668,7 @@
</div>
<div id="user-settings-button" class="drawer">
<div class="drawer-toggle">
<div class="drawer-icon fa-solid fa-user-cog closedIcon" title="User Settings" data-i18n="[title]User Settings"></div>
<div class="drawer-icon fa-solid fa-user-cog fa-fw closedIcon" title="User Settings" data-i18n="[title]User Settings"></div>
</div>
<div id="user-settings-block" class="drawer-content closedDrawer">
<div class="flex-container flexFlowColumn">
@ -3737,7 +3737,7 @@
<div name="themeElements" class="flex-container flexFlowColumn flexNoGap">
<!-- <h4><span data-i18n="UI Colors">Theme Settings</span></h4> -->
<div name="AvatarAndChatDisplay" class="flex-container flexFlowColumn">
<div class="flex-container">
<div class="flex-container alignItemsBaseline">
<span data-i18n="Avatar Style">Avatars:</span>
<select id="avatar_style" class="widthNatural flex1 margin0">
<option value="0" data-i18n="Circle">Circle</option>
@ -3745,7 +3745,7 @@
<option value="1" data-i18n="Rectangle">Rectangle</option>
</select>
</div>
<div class="flex-container">
<div class="flex-container alignItemsBaseline">
<span data-i18n="Chat Style:">Chat Style:</span><br>
<select id="chat_display" class="widthNatural flex1 margin0">
<option value="0" data-i18n="Flat">Flat</option>
@ -4348,7 +4348,7 @@
</div>
<div id="logo_block" class="drawer">
<div id="site_logo" class="drawer-toggle drawer-header" title="Change Background Image" data-i18n="[title]Change Background Image">
<div class="drawer-icon fa-solid fa-panorama closedIcon"></div>
<div class="drawer-icon fa-solid fa-panorama fa-fw closedIcon"></div>
</div>
<div id="Backgrounds" class="drawer-content closedDrawer">
<div class="flex-container">
@ -4386,7 +4386,7 @@
</div>
<div id="extensions-settings-button" class="drawer">
<div class="drawer-toggle">
<div class="drawer-icon fa-solid fa-cubes closedIcon" title="Extensions" data-i18n="[title]Extensions"></div>
<div class="drawer-icon fa-solid fa-cubes fa-fw closedIcon" title="Extensions" data-i18n="[title]Extensions"></div>
</div>
<div id="rm_extensions_block" class="drawer-content closedDrawer">
<div class="extensions_block flex-container">
@ -4459,7 +4459,7 @@
</div>
<div id="persona-management-button" class="drawer">
<div class="drawer-toggle">
<div class="drawer-icon fa-solid fa-face-smile closedIcon" title="Persona Management" data-i18n="[title]Persona Management"></div>
<div class="drawer-icon fa-solid fa-face-smile fa-fw closedIcon" title="Persona Management" data-i18n="[title]Persona Management"></div>
</div>
<div class="drawer-content closedDrawer">
<div class="flex-container wide100p alignitemscenter spaceBetween flexNoGap">
@ -4567,7 +4567,7 @@
</div>
<div id="rightNavHolder" class="drawer">
<div id="unimportantYes" class="drawer-toggle drawer-header">
<div id="rightNavDrawerIcon" class="drawer-icon fa-solid fa-address-card closedIcon" title="Character Management" data-i18n="[title]Character Management">
<div id="rightNavDrawerIcon" class="drawer-icon fa-solid fa-address-card fa-fw closedIcon" title="Character Management" data-i18n="[title]Character Management">
</div>
</div>
<nav id="right-nav-panel" class="drawer-content closedDrawer fillRight">

File diff suppressed because it is too large Load Diff

View File

@ -3415,7 +3415,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
.filter((index) => index !== undefined && index !== null);
if (memberIds.length > 0) {
setCharacterId(memberIds[0]);
if (menu_type != 'character_edit') setCharacterId(memberIds[0]);
setCharacterName('');
} else {
console.log('No enabled members found');
@ -4944,7 +4944,7 @@ async function duplicateCharacter() {
return '';
}
export async function itemizedParams(itemizedPrompts, thisPromptSet) {
export async function itemizedParams(itemizedPrompts, thisPromptSet, incomingMesId) {
const params = {
charDescriptionTokens: await getTokenCountAsync(itemizedPrompts[thisPromptSet].charDescription),
charPersonalityTokens: await getTokenCountAsync(itemizedPrompts[thisPromptSet].charPersonality),
@ -4963,8 +4963,20 @@ export async function itemizedParams(itemizedPrompts, thisPromptSet) {
chatInjects: await getTokenCountAsync(itemizedPrompts[thisPromptSet].chatInjects),
chatVectorsStringTokens: await getTokenCountAsync(itemizedPrompts[thisPromptSet].chatVectorsString),
dataBankVectorsStringTokens: await getTokenCountAsync(itemizedPrompts[thisPromptSet].dataBankVectorsString),
modelUsed: chat[incomingMesId]?.extra?.model,
apiUsed: chat[incomingMesId]?.extra?.api,
};
const getFriendlyName = (value) => $(`#rm_api_block select option[value="${value}"]`).first().text() || value;
if (params.apiUsed) {
params.apiUsed = getFriendlyName(params.apiUsed);
}
if (params.this_main_api) {
params.mainApiFriendlyName = getFriendlyName(params.this_main_api);
}
if (params.chatInjects) {
params.ActualChatHistoryTokens = params.ActualChatHistoryTokens - params.chatInjects;
}
@ -5079,7 +5091,7 @@ async function promptItemize(itemizedPrompts, requestedMesId) {
return null;
}
const params = await itemizedParams(itemizedPrompts, thisPromptSet);
const params = await itemizedParams(itemizedPrompts, thisPromptSet, incomingMesId);
const flatten = (rawPrompt) => Array.isArray(rawPrompt) ? rawPrompt.map(x => x.content).join('\n') : rawPrompt;
const template = params.this_main_api == 'openai'

View File

@ -1697,6 +1697,18 @@ async function loadPollinationsModels() {
value: 'flux',
text: 'FLUX.1 [schnell]',
},
{
value: 'flux-realism',
text: 'FLUX Realism',
},
{
value: 'flux-anime',
text: 'FLUX Anime',
},
{
value: 'flux-3d',
text: 'FLUX 3D',
},
{
value: 'turbo',
text: 'SDXL Turbo',

View File

@ -13,8 +13,8 @@ import { setting_names } from './textgen-settings.js';
const TGsamplerNames = setting_names;
const forcedOnColoring = 'filter: sepia(1) hue-rotate(59deg) contrast(1.5) saturate(3.5)';
const forcedOffColoring = 'filter: sepia(1) hue-rotate(308deg) contrast(0.7) saturate(10)';
const forcedOnColoring = 'color: #89db35;';
const forcedOffColoring = 'color: #e84f62;';
let userDisabledSamplers, userShownSamplers;

View File

@ -4,8 +4,8 @@
<div id="copyPromptToClipboard" class="fa-solid fa-copy menu_button" title="Copy Prompt" data-i18n="[title]Copy Prompt"></div>
<div id="diffPrevPrompt" class="fa-solid fa-code-compare menu_button" title="Show Prompt Differences" data-i18n="[title]Show Prompt Differences"></div>
</h3>
API/Model Used: {{mainApiFriendlyName}} {{#if apiUsed}}({{apiUsed}}){{/if}} {{#if modelUsed}}&ndash; {{modelUsed}}{{/if}}<br>
Tokenizer: {{selectedTokenizer}}<br>
API Used: {{this_main_api}}<br>
<span class="tokenItemizingSubclass">
Only the white numbers really matter. All numbers are estimates.
Grey color items may not have been included in the context due to certain prompt format settings.

View File

@ -4,8 +4,8 @@
<div id="copyPromptToClipboard" class="fa-solid fa-copy menu_button" title="Copy Prompt" data-i18n="[title]Copy Prompt"></div>
<div id="diffPrevPrompt" class="fa-solid fa-code-compare menu_button" title="Show Prompt Differences" data-i18n="[title]Show Prompt Differences"></div>
</h3>
API/Model Used: {{mainApiFriendlyName}} {{#if apiUsed}}({{apiUsed}}){{/if}} {{#if modelUsed}}&ndash; {{modelUsed}}{{/if}}<br>
Tokenizer: {{selectedTokenizer}}<br>
API Used: {{this_main_api}}<br>
<span class="tokenItemizingSubclass">
Only the white numbers really matter. All numbers are estimates.
Grey color items may not have been included in the context due to certain prompt format settings.

View File

@ -993,6 +993,7 @@ body .panelControlBar {
padding: 0;
font-family: var(--mainFontFamily);
font-weight: 400;
align-self: self-end;
}
.swipe_left {
@ -5458,4 +5459,4 @@ body:not(.movingUI) .drawer-content.maximized {
#AdvancedFormatting .autoSetHeight {
overflow-wrap: anywhere;
}
}