Merge branch 'staging' into reasoning-continue
| @@ -2003,7 +2003,7 @@ export function messageFormatting(mes, ch_name, isSystem, isUser, messageId, san | ||
| 2003 | 2003 | return ''; |
| 2004 | 2004 | } |
| 2005 | 2005 | |
| 2006 | 2006 | if (Number(messageId) === 0 && !isSystem && !isUser && !isReasoning) { |
| 2007 | 2007 | const mesBeforeReplace = mes; |
| 2008 | 2008 | const chatMessage = chat[messageId]; |
| 2009 | 2009 | mes = substituteParams(mes, undefined, ch_name); |
| @@ -3171,7 +3171,7 @@ class StreamingProcessor { | ||
| 3171 | 3171 | this.sendTextarea.dispatchEvent(new Event('input', { bubbles: true })); |
| 3172 | 3172 | } |
| 3173 | 3173 | else { |
| 3174 | 3174 | await saveReply(this.type, text, true, '', [], ''); |
| 3175 | 3175 | messageId = chat.length - 1; |
| 3176 | 3176 | this.#checkDomElements(messageId); |
| 3177 | 3177 | this.showMessageButtons(messageId); |
| @@ -3365,7 +3365,7 @@ class StreamingProcessor { | ||
| 3365 | 3365 | const timestamps = []; |
| 3366 | 3366 | for await (const { text, swipes, logprobs, toolCalls, state } of this.generator()) { |
| 3367 | 3367 | timestamps.push(Date.now()); |
| 3368 | 3368 | if (this.isStopped || this.abortController.signal.aborted) { |
| 3369 | 3369 | return; |
| 3370 | 3370 | } |
| 3371 | 3371 | |
| @@ -96,8 +96,13 @@ function highlightLockedBackground() { | ||
| 96 | 96 | }); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | +/** | |
| 100 | + * Locks the background for the current chat | |
| 101 | + * @param {Event} e Click event | |
| 102 | + * @returns {string} Empty string | |
| 103 | + */ | |
| 99 | 104 | function onLockBackgroundClick(e) { |
| 100 | 105 | e?.stopPropagation(); |
| 101 | 106 | |
| 102 | 107 | const chatName = getCurrentChatId(); |
| 103 | 108 | |
| @@ -114,8 +119,13 @@ function onLockBackgroundClick(e) { | ||
| 114 | 119 | return ''; |
| 115 | 120 | } |
| 116 | 121 | |
| 122 | +/** | |
| 123 | + * Locks the background for the current chat | |
| 124 | + * @param {Event} e Click event | |
| 125 | + * @returns {string} Empty string | |
| 126 | + */ | |
| 117 | 127 | function onUnlockBackgroundClick(e) { |
| 118 | 128 | e?.stopPropagation(); |
| 119 | 129 | removeBackgroundMetadata(); |
| 120 | 130 | unsetCustomBackground(); |
| 121 | 131 | highlightLockedBackground(); |
| @@ -513,12 +523,12 @@ export function initBackgrounds() { | ||
| 513 | 523 | $('#add_bg_button').on('change', onBackgroundUploadSelected); |
| 514 | 524 | $('#bg-filter').on('input', onBackgroundFilterInput); |
| 515 | 525 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'lockbg', |
| 516 | - callback: onLockBackgroundClick, | |
| 526 | + callback: () => onLockBackgroundClick(new CustomEvent('click')), | |
| 517 | 527 | aliases: ['bglock'], |
| 518 | 528 | helpString: 'Locks a background for the currently selected chat', |
| 519 | 529 | })); |
| 520 | 530 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'unlockbg', |
| 521 | - callback: onUnlockBackgroundClick, | |
| 531 | + callback: () => onUnlockBackgroundClick(new CustomEvent('click')), | |
| 522 | 532 | aliases: ['bgunlock'], |
| 523 | 533 | helpString: 'Unlocks a background for the currently selected chat', |
| 524 | 534 | })); |
| @@ -123,6 +123,7 @@ function loadReasoningSettings() { | ||
| 123 | 123 | function registerReasoningSlashCommands() { |
| 124 | 124 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 125 | 125 | name: 'reasoning-get', |
| 126 | + aliases: ['get-reasoning'], | |
| 126 | 127 | returns: ARGUMENT_TYPE.STRING, |
| 127 | 128 | helpString: t`Get the contents of a reasoning block of a message. Returns an empty string if the message does not have a reasoning block.`, |
| 128 | 129 | unnamedArgumentList: [ |
| @@ -142,6 +143,7 @@ function registerReasoningSlashCommands() { | ||
| 142 | 143 | |
| 143 | 144 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 144 | 145 | name: 'reasoning-set', |
| 146 | + aliases: ['set-reasoning'], | |
| 145 | 147 | returns: ARGUMENT_TYPE.STRING, |
| 146 | 148 | helpString: t`Set the reasoning block of a message. Returns the reasoning block content.`, |
| 147 | 149 | namedArgumentList: [ |
| @@ -176,6 +178,7 @@ function registerReasoningSlashCommands() { | ||
| 176 | 178 | |
| 177 | 179 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 178 | 180 | name: 'reasoning-parse', |
| 181 | + aliases: ['parse-reasoning'], | |
| 179 | 182 | returns: 'reasoning string', |
| 180 | 183 | helpString: t`Extracts the reasoning block from a string using the Reasoning Formatting settings.`, |
| 181 | 184 | namedArgumentList: [ |
| @@ -54,6 +54,12 @@ const OPENROUTER_PROVIDERS = [ | ||
| 54 | 54 | 'xAI', |
| 55 | 55 | 'Cloudflare', |
| 56 | 56 | 'SF Compute', |
| 57 | + 'Minimax', | |
| 58 | + 'Nineteen', | |
| 59 | + 'Liquid', | |
| 60 | + 'Nebius', | |
| 61 | + 'Chutes', | |
| 62 | + 'Kluster', | |
| 57 | 63 | '01.AI', |
| 58 | 64 | 'HuggingFace', |
| 59 | 65 | 'Mancer', |