diff --git a/public/index.html b/public/index.html index 3f6044d58..60306bf47 100644 --- a/public/index.html +++ b/public/index.html @@ -98,12 +98,12 @@
- - - - - - + + + + + +
@@ -120,12 +120,12 @@
- - - - - - + + + + + +
@@ -140,9 +140,9 @@ - - - + + + @@ -154,17 +154,17 @@
- - - - - - + + + + + +
-
+
AI Module @@ -271,7 +271,7 @@
-
+
Rep Pen Range
@@ -284,7 +284,7 @@
-
+
Repetition Penalty Slope
@@ -297,7 +297,7 @@
-
+
Repetition Penalty Frequency
@@ -310,7 +310,7 @@
-
+
Repetition Penalty Presence
@@ -323,7 +323,7 @@
-
+
TFS
@@ -336,7 +336,7 @@
-
+
Phrase Repetition Penalty
@@ -351,7 +351,7 @@
-
+
-
+
Frequency Penalty
@@ -449,7 +449,7 @@
-
+
Presence Penalty
@@ -462,7 +462,7 @@
-
+
Top K
@@ -475,7 +475,7 @@
-
+
Top P
@@ -488,7 +488,7 @@
-
+
Repetition Penalty
@@ -501,7 +501,7 @@
-
+
Min P
@@ -514,7 +514,7 @@
-
+
Top A
@@ -712,7 +712,7 @@
-
+
Seed
@@ -736,7 +736,7 @@
-
+
Top K
@@ -744,7 +744,7 @@
-
+
Top P
@@ -752,7 +752,7 @@
-
+
Typical P
@@ -768,7 +768,7 @@
-
+
Top A
@@ -776,7 +776,7 @@
-
+
TFS
@@ -798,14 +798,14 @@
-
+
Repetition Penalty Slope
-
+

Mirostat

@@ -835,7 +835,7 @@

-
+
-
+
Seed
-
+ -
+

Samplers Order @@ -906,7 +906,7 @@
-
+
Preamble @@ -1117,7 +1117,7 @@
-
+
@@ -1128,7 +1128,7 @@
-
+
Multiple swipes per generation
@@ -1141,7 +1141,7 @@
-
+
Top K
@@ -1149,7 +1149,7 @@
-
+
Top P
@@ -1157,7 +1157,7 @@
-
+
Typical P
@@ -1173,7 +1173,7 @@
-
+
Top A
@@ -1181,7 +1181,7 @@
-
+
TFS
@@ -1189,7 +1189,7 @@
-
+
Epsilon Cutoff
@@ -1197,7 +1197,7 @@
-
+
Eta Cutoff
@@ -1225,53 +1225,53 @@
-
+
Encoder Penalty
-
+
Frequency Penalty
-
+
Presence Penalty
-
+
No Repeat Ngram Size
-
+
Skew
-
+
Min Length
-
+
Maximum tokens/second
-
+

- -
+

Contrastive Search

@@ -1435,7 +1435,7 @@
-
+
-
+
Seed
-
-
+
+

Banned Tokens/Strings
@@ -1515,7 +1515,7 @@

-
+

CFG
@@ -1537,7 +1537,7 @@

-
+ -
+

-
+

Samplers Order @@ -1606,7 +1606,7 @@ Load default order
-
+

Sampler Order @@ -1627,7 +1627,7 @@ Load default order

-
+

Sampler Priority @@ -1814,7 +1814,7 @@

-
+
Assistant Prefill @@ -1849,7 +1849,7 @@
-
+
Logit Bias
@@ -1887,7 +1887,7 @@
-
+
@@ -2438,7 +2438,7 @@ -
+
Reverse Proxy
@@ -3073,17 +3073,17 @@
- - + + - +
-
+
@@ -3134,7 +3134,7 @@ Collapse Consecutive Newlines - -
+
-
+
-
+
-
+ -
+ -
+
@@ -3332,7 +3332,7 @@
-
+

@@ -3653,10 +3653,6 @@

User Settings

-
@@ -3715,7 +3711,7 @@

-
+
@@ -3735,7 +3731,7 @@
-
+
Theme Colors
@@ -3786,7 +3782,7 @@

-
+
@@ -3832,11 +3828,11 @@ Reduced Motion -
-
+

Character Handling

@@ -3916,7 +3912,7 @@
-
+
-

Miscellaneous

-
+
@@ -3994,15 +3990,15 @@ Background Sound Only -
+
-
+

Custom CSS @@ -4066,7 +4062,7 @@

-
+
@@ -4076,7 +4072,7 @@
-
+
Enter to Send: @@ -4086,7 +4082,7 @@
-
-
+
Auto-Continue
@@ -4231,7 +4227,7 @@
-
+
@@ -5829,21 +5820,11 @@ SillyTavern is aimed at advanced users. -
- - If you're new to this, enable the simplified UI mode below. - -
- - Change it later in the 'User Settings' panel. - -
- +

@@ -6401,11 +6382,11 @@ Author's Note - + CFG Scale - + Token Probabilities diff --git a/public/script.js b/public/script.js index 57aa7643f..4f79fb94f 100644 --- a/public/script.js +++ b/public/script.js @@ -1,4 +1,4 @@ -import { humanizedDateTime, favsToHotswap, getMessageTimeStamp, dragElement, isMobile, initRossMods, shouldSendOnEnter } from './scripts/RossAscends-mods.js'; +import { humanizedDateTime, favsToHotswap, getMessageTimeStamp, dragElement, isMobile, initRossMods, shouldSendOnEnter, addSafariPatch } from './scripts/RossAscends-mods.js'; import { userStatsHandler, statMesProcess, initStats } from './scripts/stats.js'; import { generateKoboldWithStreaming, @@ -78,8 +78,6 @@ import { renderStoryString, sortEntitiesList, registerDebugFunction, - ui_mode, - switchSimpleMode, flushEphemeralStoppingStrings, context_presets, resetMovableStyles, @@ -918,6 +916,7 @@ async function firstLoadInit() { throw new Error('Initialization failed'); } + addSafariPatch(); await getClientVersion(); await readSecretState(); initLocales(); @@ -6323,15 +6322,11 @@ export function setUserName(value) { } async function doOnboarding(avatarId) { - let simpleUiMode = false; const template = $('#onboarding_template .onboarding'); - template.find('input[name="enable_simple_mode"]').on('input', function () { - simpleUiMode = $(this).is(':checked'); - }); - let userName = await callGenericPopup(template, POPUP_TYPE.INPUT, currentUser?.name || name1, { rows: 2, wide: true, large: true }); + let userName = await callGenericPopup(template, POPUP_TYPE.INPUT, currentUser?.name || name1, { rows: 2, wider: true, cancelButton: false }); if (userName) { - userName = userName.replace('\n', ' '); + userName = String(userName).replace('\n', ' '); setUserName(userName); console.log(`Binding persona ${avatarId} to name ${userName}`); power_user.personas[avatarId] = userName; @@ -6340,12 +6335,6 @@ async function doOnboarding(avatarId) { position: persona_description_positions.IN_PROMPT, }; } - - if (simpleUiMode) { - power_user.ui_mode = ui_mode.SIMPLE; - $('#ui_mode_select').val(power_user.ui_mode); - switchSimpleMode(); - } } function reloadLoop() { @@ -8008,7 +7997,7 @@ window['SillyTavern'].getContext = function () { registerHelper: () => { }, registerMacro: MacrosParser.registerMacro.bind(MacrosParser), unregisterMacro: MacrosParser.unregisterMacro.bind(MacrosParser), - registedDebugFunction: registerDebugFunction, + registerDebugFunction: registerDebugFunction, /** @deprecated Use renderExtensionTemplateAsync instead. */ renderExtensionTemplate: renderExtensionTemplate, renderExtensionTemplateAsync: renderExtensionTemplateAsync, @@ -8943,6 +8932,12 @@ function addDebugFunctions() { await reloadCurrentChat(); }; + registerDebugFunction('forceOnboarding', 'Force onboarding', 'Forces the onboarding process to restart.', async () => { + firstRun = true; + await saveSettings(); + location.reload(); + }); + registerDebugFunction('backfillTokenCounts', 'Backfill token counters', `Recalculates token counts of all messages in the current chat to refresh the counters. Useful when you switch between models that have different tokenizers. diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 8e292b167..9c07ce851 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -711,6 +711,18 @@ export const autoFitSendTextAreaDebounced = debounce(autoFitSendTextArea, deboun // --------------------------------------------------- +export function addSafariPatch() { + const userAgent = getParsedUA(); + console.debug('User Agent', userAgent); + const isMobileSafari = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); + const isDesktopSafari = userAgent?.browser?.name === 'Safari' && userAgent?.platform?.type === 'desktop'; + const isIOS = userAgent?.os?.name === 'iOS'; + + if (isIOS || isMobileSafari || isDesktopSafari) { + document.body.classList.add('safari'); + } +} + export function initRossMods() { // initial status check setTimeout(() => { @@ -725,16 +737,6 @@ export function initRossMods() { RA_autoconnect(); } - const userAgent = getParsedUA(); - console.debug('User Agent', userAgent); - const isMobileSafari = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); - const isDesktopSafari = userAgent?.browser?.name === 'Safari' && userAgent?.platform?.type === 'desktop'; - const isIOS = userAgent?.os?.name === 'iOS'; - - if (isIOS || isMobileSafari || isDesktopSafari) { - document.body.classList.add('safari'); - } - $('#main_api').change(function () { var PrevAPI = main_api; setTimeout(() => RA_autoconnect(PrevAPI), 100); diff --git a/public/scripts/popup.js b/public/scripts/popup.js index a91781562..7315fd536 100644 --- a/public/scripts/popup.js +++ b/public/scripts/popup.js @@ -281,6 +281,7 @@ export class Popup { case POPUP_TYPE.INPUT: { this.mainInput.style.display = 'block'; if (!okButton) this.okButton.textContent = template.getAttribute('popup-button-save'); + if (cancelButton === false) this.cancelButton.style.display = 'none'; break; } case POPUP_TYPE.DISPLAY: { diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index a8e8517ec..469d460ed 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -75,11 +75,6 @@ const defaultStoryString = '{{#if system}}{{system}}\n{{/if}}{{#if description}} const defaultExampleSeparator = '***'; const defaultChatStart = '***'; -export const ui_mode = { - SIMPLE: 0, - POWER: 1, -}; - const avatar_styles = { ROUND: 0, RECTANGULAR: 1, @@ -132,7 +127,6 @@ let power_user = { smooth_streaming: false, smooth_streaming_speed: 50, - ui_mode: ui_mode.POWER, fast_ui_mode: true, avatar_style: avatar_styles.ROUND, chat_display: chat_styles.DEFAULT, @@ -331,12 +325,6 @@ const debug_functions = []; const setHotswapsDebounced = debounce(favsToHotswap); -export function switchSimpleMode() { - $('[data-newbie-hidden]').each(function () { - $(this).toggleClass('displayNone', power_user.ui_mode === ui_mode.SIMPLE); - }); -} - function playMessageSound() { if (!power_user.play_message_sound) { return; @@ -1586,7 +1574,6 @@ async function loadPowerUserSettings(settings, data) { $('#bot-mes-blur-tint-color-picker').attr('color', power_user.bot_mes_blur_tint_color); $('#shadow-color-picker').attr('color', power_user.shadow_color); $('#border-color-picker').attr('color', power_user.border_color); - $('#ui_mode_select').val(power_user.ui_mode).find(`option[value="${power_user.ui_mode}"]`).attr('selected', true); $('#reduced_motion').prop('checked', power_user.reduced_motion); $('#auto-connect-checkbox').prop('checked', power_user.auto_connect); $('#auto-load-chat-checkbox').prop('checked', power_user.auto_load_chat); @@ -1620,7 +1607,6 @@ async function loadPowerUserSettings(settings, data) { switchSpoilerMode(); loadMovingUIState(); loadCharListState(); - switchSimpleMode(); } async function loadCharListState() { @@ -3683,13 +3669,6 @@ $(document).ready(() => { showDebugMenu(); }); - $('#ui_mode_select').on('change', function () { - const value = $(this).find(':selected').val(); - power_user.ui_mode = Number(value); - switchSimpleMode(); - saveSettingsDebounced(); - }); - $('#bogus_folders').on('input', function () { power_user.bogus_folders = !!$(this).prop('checked'); printCharactersDebounced();