mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-02 12:26:59 +01:00
Enable object-curly-spacing lint
This commit is contained in:
parent
414c9bd5fb
commit
5f1bed1e70
@ -58,6 +58,7 @@ module.exports = {
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'eol-last': ['error', 'always'],
|
||||
'no-trailing-spaces': 'error',
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
|
||||
// These rules should eventually be enabled.
|
||||
'no-async-promise-executor': 'off',
|
||||
|
@ -4157,7 +4157,7 @@ async function DupeChar() {
|
||||
const confirm = await callPopup(`
|
||||
<h3>Are you sure you want to duplicate this character?</h3>
|
||||
<span>If you just want to start a new chat with the same character, use "Start new chat" option in the bottom-left options menu.</span><br><br>`,
|
||||
'confirm',
|
||||
'confirm',
|
||||
);
|
||||
|
||||
if (!confirm) {
|
||||
@ -7635,22 +7635,22 @@ function addDebugFunctions() {
|
||||
`Recalculates token counts of all messages in the current chat to refresh the counters.
|
||||
Useful when you switch between models that have different tokenizers.
|
||||
This is a visual change only. Your chat will be reloaded.`, async () => {
|
||||
for (const message of chat) {
|
||||
for (const message of chat) {
|
||||
// System messages are not counted
|
||||
if (message.is_system) {
|
||||
continue;
|
||||
if (message.is_system) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!message.extra) {
|
||||
message.extra = {};
|
||||
}
|
||||
|
||||
message.extra.token_count = getTokenCount(message.mes, 0);
|
||||
}
|
||||
|
||||
if (!message.extra) {
|
||||
message.extra = {};
|
||||
}
|
||||
|
||||
message.extra.token_count = getTokenCount(message.mes, 0);
|
||||
}
|
||||
|
||||
await saveChatConditional();
|
||||
await reloadCurrentChat();
|
||||
});
|
||||
await saveChatConditional();
|
||||
await reloadCurrentChat();
|
||||
});
|
||||
|
||||
registerDebugFunction('generationTest', 'Send a generation request', 'Generates text using the currently selected API.', async () => {
|
||||
const text = prompt('Input text:', 'Hello');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { characters, getCharacters, handleDeleteCharacter, callPopup } from '../script.js';
|
||||
import {BulkEditOverlay, BulkEditOverlayState} from './BulkEditOverlay.js';
|
||||
import { BulkEditOverlay, BulkEditOverlayState } from './BulkEditOverlay.js';
|
||||
|
||||
|
||||
let is_bulk_edit = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export {translate};
|
||||
export { translate };
|
||||
|
||||
import {
|
||||
callPopup,
|
||||
|
@ -10,7 +10,7 @@ import { NovelTtsProvider } from './novel.js';
|
||||
import { power_user } from '../../power-user.js';
|
||||
import { registerSlashCommand } from '../../slash-commands.js';
|
||||
import { OpenAITtsProvider } from './openai.js';
|
||||
import {XTTSTtsProvider} from './xtts.js';
|
||||
import { XTTSTtsProvider } from './xtts.js';
|
||||
export { talkingAnimation };
|
||||
|
||||
const UPDATE_INTERVAL = 1000;
|
||||
|
@ -125,7 +125,7 @@ class NovelTtsProvider {
|
||||
throw 'TTS Voice name not provided';
|
||||
}
|
||||
|
||||
return { name: voiceName, voice_id: voiceName, lang: 'en-US', preview_url: false};
|
||||
return { name: voiceName, voice_id: voiceName, lang: 'en-US', preview_url: false };
|
||||
}
|
||||
|
||||
async generateTts(text, voiceId) {
|
||||
|
@ -666,7 +666,7 @@ async function CreateZenSliders(elmnt) {
|
||||
min: sliderMin,
|
||||
max: sliderMax,
|
||||
create: async function () {
|
||||
await delay(100)
|
||||
await delay(100);
|
||||
var handle = $(this).find('.ui-slider-handle');
|
||||
var handleText, stepNumber, leftMargin;
|
||||
|
||||
@ -711,7 +711,7 @@ async function CreateZenSliders(elmnt) {
|
||||
stepNumber = ((sliderValue - sliderMin) / stepScale);
|
||||
leftMargin = (stepNumber / numSteps) * 50 * -1;
|
||||
originalSlider.val(numVal)
|
||||
.data('newSlider', newSlider)
|
||||
.data('newSlider', newSlider);
|
||||
//console.log(`${newSlider.attr('id')} sliderValue = ${sliderValue}, handleText:${handleText, numVal}, stepNum:${stepNumber}, numSteps:${numSteps}, left-margin:${leftMargin}`)
|
||||
var isManualInput = false;
|
||||
var valueBeforeManualInput;
|
||||
@ -737,8 +737,8 @@ async function CreateZenSliders(elmnt) {
|
||||
isManualInput = true;
|
||||
//allow enter to trigger slider update
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault
|
||||
handle.trigger('blur')
|
||||
e.preventDefault;
|
||||
handle.trigger('blur');
|
||||
}
|
||||
})
|
||||
//trigger slider changes when user clicks away
|
||||
|
Loading…
x
Reference in New Issue
Block a user