Merge pull request #4057 from omahs/patch-2

Fix typos
This commit is contained in:
Cohee
2025-05-29 16:40:53 +03:00
committed by GitHub
10 changed files with 19 additions and 19 deletions

View File

@@ -8566,7 +8566,7 @@ export function showSwipeButtons() {
//had to add this to make the swipe counter work
//(copied from the onclick functions for swipe buttons..
//don't know why the array isn't set for non-swipe messsages in Generate or addOneMessage..)
//don't know why the array isn't set for non-swipe messages in Generate or addOneMessage..)
if (chat[chat.length - 1]['swipe_id'] === undefined) { // if there is no swipe-message in the last spot of the chat array
chat[chat.length - 1]['swipe_id'] = 0; // set it to id 0
chat[chat.length - 1]['swipes'] = []; // empty the array

View File

@@ -279,9 +279,9 @@ export class TextCompletionService {
instructPreset,
);
} else { // e.g. "<|im_start|>assistant: Hello, my name is"
const overridenInstructPreset = structuredClone(instructPreset);
overridenInstructPreset.output_suffix = '';
overridenInstructPreset.wrap = false;
const overriddenInstructPreset = structuredClone(instructPreset);
overriddenInstructPreset.output_suffix = '';
overriddenInstructPreset.wrap = false;
messageContent = formatInstructModeChat(
message.role,
message.content,
@@ -291,7 +291,7 @@ export class TextCompletionService {
undefined,
undefined,
undefined,
overridenInstructPreset,
overriddenInstructPreset,
);
}
}

View File

@@ -584,7 +584,7 @@ export function getNovelGenerationData(finalPrompt, settings, maxLength, isImper
};
}
// Check if the prefix needs to be overriden to use instruct mode
// Check if the prefix needs to be overridden to use instruct mode
function selectPrefix(selected_prefix, finalPrompt) {
let useInstruct = false;
const clio = nai_settings.model_novel.includes('clio');

View File

@@ -132,7 +132,7 @@ function reloadUserAvatar(force = false) {
/**
* Sort the given personas
* @param {string[]} personas - The persona names to sort
* @returns {string[]} The sorted persona names arrray, same reference as passed in
* @returns {string[]} The sorted persona names array, same reference as passed in
*/
function sortPersonas(personas) {
const option = $('#persona_sort_order').find(':selected');
@@ -1821,7 +1821,7 @@ function registerPersonaSlashCommands() {
defaultValue: 'chat',
enumList: [
new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),
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.'),
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.'),
new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),
],
}),
@@ -1857,7 +1857,7 @@ function registerPersonaSlashCommands() {
defaultValue: 'chat',
enumList: [
new SlashCommandEnumValue('chat', 'Lock the persona to the current chat.'),
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.'),
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.'),
new SlashCommandEnumValue('default', 'Lock this persona as the default persona for all new chats.'),
],
}),

View File

@@ -315,7 +315,7 @@ export class Popup {
if (defaultButton) defaultButton.classList.add('menu_button_default');
// Styling differences depending on the popup type
// General styling for all types first, that might be overriden for specific types below
// General styling for all types first, that might be overridden for specific types below
this.mainInput.style.display = 'none';
this.inputControls.style.display = customInputs ? 'block' : 'none';
this.closeButton.style.display = 'none';

View File

@@ -426,7 +426,7 @@ export class ReasoningHandler {
if (!this.#isParsingReasoning)
return mesChanged;
// If we are in manual parsing mode, all currently streaming mes tokens will go the the reasoning block
// If we are in manual parsing mode, all currently streaming mes tokens will go to the reasoning block
this.reasoning = parseTarget.slice(power_user.reasoning.prefix.length);
message.mes = '';

View File

@@ -264,9 +264,9 @@ function countWords(str) {
* @param {string} type - The type of the message processing (e.g., 'append', 'continue', 'appendFinal', 'swipe').
* @param {Object} characters - Object containing character data.
* @param {string} this_chid - The character id.
* @param {string} oldMesssage - The old message that's being processed.
* @param {string} oldMessage - The old message that's being processed.
*/
async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
async function statMesProcess(line, type, characters, this_chid, oldMessage) {
if (this_chid === undefined || characters[this_chid] === undefined) {
return;
}
@@ -295,7 +295,7 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
stat.user_msg_count++;
stat.user_word_count += countWords(line.mes);
} else {
let oldLen = oldMesssage.split(' ').length;
let oldLen = oldMessage.split(' ').length;
stat.user_word_count += countWords(line.mes) - oldLen;
}
} else {
@@ -305,7 +305,7 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
stat.non_user_msg_count++;
stat.non_user_word_count += countWords(line.mes);
} else {
let oldLen = oldMesssage.split(' ').length;
let oldLen = oldMessage.split(' ').length;
stat.non_user_word_count += countWords(line.mes) - oldLen;
}
}

View File

@@ -917,7 +917,7 @@ function newTag(tagName) {
/**
* @typedef {object} PrintTagListOptions - Optional parameters for printing the tag list.
* @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.
* @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.
* @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.
* @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.
* @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.
* @property {boolean} [sort=true] - Whether the tags should be sorted via the sort function, or kept as is.

View File

@@ -2316,7 +2316,7 @@ export function deleteWIOriginalDataValue(data, uid) {
/**
* Splits a given input string that contains one or more keywords or regexes, separated by commas.
*
* 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: `\/`
* 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: `\/`
* If a regex doesn't stand alone, it is not treated as a regex.
*
* @param {string} input - One or multiple keywords or regexes, separated by commas

View File

@@ -1048,7 +1048,7 @@ router.post('/edit', validateAvatarUrlMiddleware, async function (request, respo
return response.sendStatus(200);
}
catch {
console.error('An error occured, character edit invalidated.');
console.error('An error occurred, character edit invalidated.');
}
});
@@ -1094,7 +1094,7 @@ router.post('/edit-attribute', validateAvatarUrlMiddleware, async function (requ
await writeCharacterData(avatarPath, newCharJSON, targetFile, request);
return response.sendStatus(200);
} catch (err) {
console.error('An error occured, character edit invalidated.', err);
console.error('An error occurred, character edit invalidated.', err);
}
});