Fix typos

d7d20a67fa28e32cca1373d0eb764ac41e024e93

omahs <73983677+omahs@users.noreply.github.com>

Signed
10 files changed, +19 -19Ignore whitespace
public/script.js+1 -1
@@ -8566,7 +8566,7 @@ export function showSwipeButtons() {
85668566
85678567 //had to add this to make the swipe counter work
85688568 //(copied from the onclick functions for swipe buttons..
85698569 //don't know why the array isn't set for non-swipe messsagesmessages in Generate or addOneMessage..)
85708570 if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array
85718571 chat[chat.length - 1]['swipe_id'] = 0; // set it to id 0
85728572 chat[chat.length - 1]['swipes'] = []; // empty the array
public/scripts/custom-request.js+4 -4
@@ -279,9 +279,9 @@ export class TextCompletionService {
279279 instructPreset,
280280 );
281281 } else { // e.g. "<|im_start|>assistant: Hello, my name is"
282282 const overridenInstructPresetoverriddenInstructPreset = structuredClone(instructPreset);
283283 overridenInstructPresetoverriddenInstructPreset.output_suffix = '';
284284 overridenInstructPresetoverriddenInstructPreset.wrap = false;
285285 messageContent = formatInstructModeChat(
286286 message.role,
287287 message.content,
@@ -291,7 +291,7 @@ export class TextCompletionService {
291291 undefined,
292292 undefined,
293293 undefined,
294294 overridenInstructPresetoverriddenInstructPreset,
295295 );
296296 }
297297 }
public/scripts/nai-settings.js+1 -1
@@ -584,7 +584,7 @@ export function getNovelGenerationData(finalPrompt, settings, maxLength, isImper
584584 };
585585}
586586
587587// Check if the prefix needs to be overridenoverridden to use instruct mode
588588function selectPrefix(selected_prefix, finalPrompt) {
589589 let useInstruct = false;
590590 const clio = nai_settings.model_novel.includes('clio');
public/scripts/personas.js+3 -3
@@ -132,7 +132,7 @@ function reloadUserAvatar(force = false) {
132132/**
133133 * Sort the given personas
134134 * @param {string[]} personas - The persona names to sort
135135 * @returns {string[]} The sorted persona names arrrayarray, same reference as passed in
136136 */
137137function sortPersonas(personas) {
138138 const option = $('#persona_sort_order').find(':selected');
@@ -1821,7 +1821,7 @@ function registerPersonaSlashCommands() {
18211821 defaultValue: 'chat',
18221822 enumList: [
18231823 new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),
18241824 new SlashCommandEnumValue('character', 'Lock this persona to the currently selected character. If the setting is enabled, mutliplemultiple personas can be locked to the same character.'),
18251825 new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),
18261826 ],
18271827 }),
@@ -1857,7 +1857,7 @@ function registerPersonaSlashCommands() {
18571857 defaultValue: 'chat',
18581858 enumList: [
18591859 new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),
18601860 new SlashCommandEnumValue('character', 'Lock this persona to the currently selected character. If the setting is enabled, mutliplemultiple personas can be locked to the same character.'),
18611861 new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),
18621862 ],
18631863 }),
public/scripts/popup.js+1 -1
@@ -315,7 +315,7 @@ export class Popup {
315315 if (defaultButton) defaultButton.classList.add('menu_button_default');
316316
317317 // Styling differences depending on the popup type
318318 // General styling for all types first, that might be overridenoverridden for specific types below
319319 this.mainInput.style.display = 'none';
320320 this.inputControls.style.display = customInputs ? 'block' : 'none';
321321 this.closeButton.style.display = 'none';
public/scripts/reasoning.js+1 -1
@@ -426,7 +426,7 @@ export class ReasoningHandler {
426426 if (!this.#isParsingReasoning)
427427 return mesChanged;
428428
429429 // If we are in manual parsing mode, all currently streaming mes tokens will go theto the reasoning block
430430 this.reasoning = parseTarget.slice(power_user.reasoning.prefix.length);
431431 message.mes = '';
432432
public/scripts/stats.js+4 -4
@@ -264,9 +264,9 @@ function countWords(str) {
264264 * @param {string} type - The type of the message processing (e.g., 'append', 'continue', 'appendFinal', 'swipe').
265265 * @param {Object} characters - Object containing character data.
266266 * @param {string} this_chid - The character id.
267267 * @param {string} oldMesssageoldMessage - The old message that's being processed.
268268 */
269269async function statMesProcess(line, type, characters, this_chid, oldMesssageoldMessage) {
270270 if (this_chid === undefined || characters[this_chid] === undefined) {
271271 return;
272272 }
@@ -295,7 +295,7 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
295295 stat.user_msg_count++;
296296 stat.user_word_count += countWords(line.mes);
297297 } else {
298298 let oldLen = oldMesssageoldMessage.split(' ').length;
299299 stat.user_word_count += countWords(line.mes) - oldLen;
300300 }
301301 } else {
@@ -305,7 +305,7 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
305305 stat.non_user_msg_count++;
306306 stat.non_user_word_count += countWords(line.mes);
307307 } else {
308308 let oldLen = oldMesssageoldMessage.split(' ').length;
309309 stat.non_user_word_count += countWords(line.mes) - oldLen;
310310 }
311311 }
public/scripts/tags.js+1 -1
@@ -917,7 +917,7 @@ function newTag(tagName) {
917917/**
918918 * @typedef {object} PrintTagListOptions - Optional parameters for printing the tag list.
919919 * @property {Tag[]|function(): Tag[]} [tags=undefined] - Optional override of tags that should be printed. Those will not be sorted. If no supplied, tags for the relevant character are printed. Can also be a function that returns the tags.
920920 * @property {Tag|Tag[]} [addTag=undefined] - Optionally provide one or multiple tags that should be manually added to this print. Either to the overridenoverridden tag list or the found tags based on the entity/key. Will respect the tag exists check.
921921 * @property {object|number|string} [forEntityOrKey=undefined] - Optional override for the chosen entity, otherwise the currently selected is chosen. Can be an entity with id property (character, group, tag), or directly an id or tag key.
922922 * @property {boolean|string} [empty=true] - Whether the list should be initially empty. If a string string is provided, 'always' will always empty the list, otherwise it'll evaluate to a boolean.
923923 * @property {boolean} [sort=true] - Whether the tags should be sorted via the sort function, or kept as is.
public/scripts/world-info.js+1 -1
@@ -2316,7 +2316,7 @@ export function deleteWIOriginalDataValue(data, uid) {
23162316/**
23172317 * Splits a given input string that contains one or more keywords or regexes, separated by commas.
23182318 *
23192319 * Each part can be a valid regex following the pattern `/myregex/flags` with optional flags. CommmasCommas inside the regex are allowed, slashes have to be escaped like this: `\/`
23202320 * If a regex doesn't stand alone, it is not treated as a regex.
23212321 *
23222322 * @param {string} input - One or multiple keywords or regexes, separated by commas
src/endpoints/characters.js+2 -2
@@ -1048,7 +1048,7 @@ router.post('/edit', validateAvatarUrlMiddleware, async function (request, respo
10481048 return response.sendStatus(200);
10491049 }
10501050 catch {
10511051 console.error('An error occuredoccurred, character edit invalidated.');
10521052 }
10531053});
10541054
@@ -1094,7 +1094,7 @@ router.post('/edit-attribute', validateAvatarUrlMiddleware, async function (requ
10941094 await writeCharacterData(avatarPath, newCharJSON, targetFile, request);
10951095 return response.sendStatus(200);
10961096 } catch (err) {
10971097 console.error('An error occuredoccurred, character edit invalidated.', err);
10981098 }
10991099});
11001100