Merge pull request #4057 from omahs/patch-2 Fix typos

8ccbbe8cdcb2af90c4bef19078a76c87a9f6d68f

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
10 files changed, +19 -19Showing whitespace changes
public/script.js+1 -1
@@ -8566,7 +8566,7 @@ export function showSwipeButtons() {
85668566
8567 //had to add this to make the swipe counter work8567 //had to add this to make the swipe counter work
8568 //(copied from the onclick functions for swipe buttons..8568 //(copied from the onclick functions for swipe buttons..
8569 //don't know why the array isn't set for non-swipe messsages in Generate or addOneMessage..)8569 //don't know why the array isn't set for non-swipe messages in Generate or addOneMessage..)
8570 if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array8570 if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array
8571 chat[chat.length - 1]['swipe_id'] = 0; // set it to id 08571 chat[chat.length - 1]['swipe_id'] = 0; // set it to id 0
8572 chat[chat.length - 1]['swipes'] = []; // empty the array8572 chat[chat.length - 1]['swipes'] = []; // empty the array
public/scripts/custom-request.js+4 -4
@@ -279,9 +279,9 @@ export class TextCompletionService {
279 instructPreset,279 instructPreset,
280 );280 );
281 } else { // e.g. "<|im_start|>assistant: Hello, my name is"281 } else { // e.g. "<|im_start|>assistant: Hello, my name is"
282 const overridenInstructPreset = structuredClone(instructPreset);282 const overriddenInstructPreset = structuredClone(instructPreset);
283 overridenInstructPreset.output_suffix = '';283 overriddenInstructPreset.output_suffix = '';
284 overridenInstructPreset.wrap = false;284 overriddenInstructPreset.wrap = false;
285 messageContent = formatInstructModeChat(285 messageContent = formatInstructModeChat(
286 message.role,286 message.role,
287 message.content,287 message.content,
@@ -291,7 +291,7 @@ export class TextCompletionService {
291 undefined,291 undefined,
292 undefined,292 undefined,
293 undefined,293 undefined,
294 overridenInstructPreset,294 overriddenInstructPreset,
295 );295 );
296 }296 }
297 }297 }
public/scripts/nai-settings.js+1 -1
@@ -584,7 +584,7 @@ export function getNovelGenerationData(finalPrompt, settings, maxLength, isImper
584 };584 };
585}585}
586586
587// Check if the prefix needs to be overriden to use instruct mode587// Check if the prefix needs to be overridden to use instruct mode
588function selectPrefix(selected_prefix, finalPrompt) {588function selectPrefix(selected_prefix, finalPrompt) {
589 let useInstruct = false;589 let useInstruct = false;
590 const clio = nai_settings.model_novel.includes('clio');590 const clio = nai_settings.model_novel.includes('clio');
public/scripts/personas.js+3 -3
@@ -132,7 +132,7 @@ function reloadUserAvatar(force = false) {
132/**132/**
133 * Sort the given personas133 * Sort the given personas
134 * @param {string[]} personas - The persona names to sort134 * @param {string[]} personas - The persona names to sort
135 * @returns {string[]} The sorted persona names arrray, same reference as passed in135 * @returns {string[]} The sorted persona names array, same reference as passed in
136 */136 */
137function sortPersonas(personas) {137function sortPersonas(personas) {
138 const option = $('#persona_sort_order').find(':selected');138 const option = $('#persona_sort_order').find(':selected');
@@ -1821,7 +1821,7 @@ function registerPersonaSlashCommands() {
1821 defaultValue: 'chat',1821 defaultValue: 'chat',
1822 enumList: [1822 enumList: [
1823 new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),1823 new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),
1824 new SlashCommandEnumValue('character', 'Lock this persona to the currently selected character. If the setting is enabled, mutliple personas can be locked to the same character.'),1824 new SlashCommandEnumValue('character', 'Lock this persona to the currently selected character. If the setting is enabled, multiple personas can be locked to the same character.'),
1825 new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),1825 new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),
1826 ],1826 ],
1827 }),1827 }),
@@ -1857,7 +1857,7 @@ function registerPersonaSlashCommands() {
1857 defaultValue: 'chat',1857 defaultValue: 'chat',
1858 enumList: [1858 enumList: [
1859 new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),1859 new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),
1860 new SlashCommandEnumValue('character', 'Lock this persona to the currently selected character. If the setting is enabled, mutliple personas can be locked to the same character.'),1860 new SlashCommandEnumValue('character', 'Lock this persona to the currently selected character. If the setting is enabled, multiple personas can be locked to the same character.'),
1861 new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),1861 new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),
1862 ],1862 ],
1863 }),1863 }),
public/scripts/popup.js+1 -1
@@ -315,7 +315,7 @@ export class Popup {
315 if (defaultButton) defaultButton.classList.add('menu_button_default');315 if (defaultButton) defaultButton.classList.add('menu_button_default');
316316
317 // Styling differences depending on the popup type317 // Styling differences depending on the popup type
318 // General styling for all types first, that might be overriden for specific types below318 // General styling for all types first, that might be overridden for specific types below
319 this.mainInput.style.display = 'none';319 this.mainInput.style.display = 'none';
320 this.inputControls.style.display = customInputs ? 'block' : 'none';320 this.inputControls.style.display = customInputs ? 'block' : 'none';
321 this.closeButton.style.display = 'none';321 this.closeButton.style.display = 'none';
public/scripts/reasoning.js+1 -1
@@ -426,7 +426,7 @@ export class ReasoningHandler {
426 if (!this.#isParsingReasoning)426 if (!this.#isParsingReasoning)
427 return mesChanged;427 return mesChanged;
428428
429 // If we are in manual parsing mode, all currently streaming mes tokens will go the the reasoning block429 // If we are in manual parsing mode, all currently streaming mes tokens will go to the reasoning block
430 this.reasoning = parseTarget.slice(power_user.reasoning.prefix.length);430 this.reasoning = parseTarget.slice(power_user.reasoning.prefix.length);
431 message.mes = '';431 message.mes = '';
432432
public/scripts/stats.js+4 -4
@@ -264,9 +264,9 @@ function countWords(str) {
264 * @param {string} type - The type of the message processing (e.g., 'append', 'continue', 'appendFinal', 'swipe').264 * @param {string} type - The type of the message processing (e.g., 'append', 'continue', 'appendFinal', 'swipe').
265 * @param {Object} characters - Object containing character data.265 * @param {Object} characters - Object containing character data.
266 * @param {string} this_chid - The character id.266 * @param {string} this_chid - The character id.
267 * @param {string} oldMesssage - The old message that's being processed.267 * @param {string} oldMessage - The old message that's being processed.
268 */268 */
269async function statMesProcess(line, type, characters, this_chid, oldMesssage) {269async function statMesProcess(line, type, characters, this_chid, oldMessage) {
270 if (this_chid === undefined || characters[this_chid] === undefined) {270 if (this_chid === undefined || characters[this_chid] === undefined) {
271 return;271 return;
272 }272 }
@@ -295,7 +295,7 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
295 stat.user_msg_count++;295 stat.user_msg_count++;
296 stat.user_word_count += countWords(line.mes);296 stat.user_word_count += countWords(line.mes);
297 } else {297 } else {
298 let oldLen = oldMesssage.split(' ').length;298 let oldLen = oldMessage.split(' ').length;
299 stat.user_word_count += countWords(line.mes) - oldLen;299 stat.user_word_count += countWords(line.mes) - oldLen;
300 }300 }
301 } else {301 } else {
@@ -305,7 +305,7 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
305 stat.non_user_msg_count++;305 stat.non_user_msg_count++;
306 stat.non_user_word_count += countWords(line.mes);306 stat.non_user_word_count += countWords(line.mes);
307 } else {307 } else {
308 let oldLen = oldMesssage.split(' ').length;308 let oldLen = oldMessage.split(' ').length;
309 stat.non_user_word_count += countWords(line.mes) - oldLen;309 stat.non_user_word_count += countWords(line.mes) - oldLen;
310 }310 }
311 }311 }
public/scripts/tags.js+1 -1
@@ -917,7 +917,7 @@ function newTag(tagName) {
917/**917/**
918 * @typedef {object} PrintTagListOptions - Optional parameters for printing the tag list.918 * @typedef {object} PrintTagListOptions - Optional parameters for printing the tag list.
919 * @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.919 * @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.
920 * @property {Tag|Tag[]} [addTag=undefined] - Optionally provide one or multiple tags that should be manually added to this print. Either to the overriden tag list or the found tags based on the entity/key. Will respect the tag exists check.920 * @property {Tag|Tag[]} [addTag=undefined] - Optionally provide one or multiple tags that should be manually added to this print. Either to the overridden tag list or the found tags based on the entity/key. Will respect the tag exists check.
921 * @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.921 * @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.
922 * @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.922 * @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.
923 * @property {boolean} [sort=true] - Whether the tags should be sorted via the sort function, or kept as is.923 * @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) {
2316/**2316/**
2317 * Splits a given input string that contains one or more keywords or regexes, separated by commas.2317 * Splits a given input string that contains one or more keywords or regexes, separated by commas.
2318 *2318 *
2319 * Each part can be a valid regex following the pattern `/myregex/flags` with optional flags. Commmas inside the regex are allowed, slashes have to be escaped like this: `\/`2319 * Each part can be a valid regex following the pattern `/myregex/flags` with optional flags. Commas inside the regex are allowed, slashes have to be escaped like this: `\/`
2320 * If a regex doesn't stand alone, it is not treated as a regex.2320 * If a regex doesn't stand alone, it is not treated as a regex.
2321 *2321 *
2322 * @param {string} input - One or multiple keywords or regexes, separated by commas2322 * @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
1048 return response.sendStatus(200);1048 return response.sendStatus(200);
1049 }1049 }
1050 catch {1050 catch {
1051 console.error('An error occured, character edit invalidated.');1051 console.error('An error occurred, character edit invalidated.');
1052 }1052 }
1053});1053});
10541054
@@ -1094,7 +1094,7 @@ router.post('/edit-attribute', validateAvatarUrlMiddleware, async function (requ
1094 await writeCharacterData(avatarPath, newCharJSON, targetFile, request);1094 await writeCharacterData(avatarPath, newCharJSON, targetFile, request);
1095 return response.sendStatus(200);1095 return response.sendStatus(200);
1096 } catch (err) {1096 } catch (err) {
1097 console.error('An error occured, character edit invalidated.', err);1097 console.error('An error occurred, character edit invalidated.', err);
1098 }1098 }
1099});1099});
11001100