Merge branch 'staging' into getcontext-typed
| @@ -3591,9 +3591,9 @@ | ||
| 3591 | 3591 | "integrity": "sha512-c2bQfLNbMzLPmzQuOr8fy0csy84WmwnER81W88DzTp9CYNPJ6yzOj2EZAh9pywYpqHnshVLHQJ8WzldAyfY+Iw==" |
| 3592 | 3592 | }, |
| 3593 | 3593 | "node_modules/express": { |
| 3594 | 3594 | "version": "4.21.12", |
| 3595 | 3595 | "resolved": "https://registry.npmjs.org/express/-/express-4.21.12.tgz", |
| 3596 | 3596 | "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+BwuM1IPw8fmQBiQrXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", |
| 3597 | 3597 | "license": "MIT", |
| 3598 | 3598 | "dependencies": { |
| 3599 | 3599 | "accepts": "~1.3.8", |
| @@ -3615,7 +3615,7 @@ | ||
| 3615 | 3615 | "methods": "~1.1.2", |
| 3616 | 3616 | "on-finished": "2.4.1", |
| 3617 | 3617 | "parseurl": "~1.3.3", |
| 3618 | 3618 | "path-to-regexp": "0.1.1012", |
| 3619 | 3619 | "proxy-addr": "~2.0.7", |
| 3620 | 3620 | "qs": "6.13.0", |
| 3621 | 3621 | "range-parser": "~1.2.1", |
| @@ -3630,6 +3630,10 @@ | ||
| 3630 | 3630 | }, |
| 3631 | 3631 | "engines": { |
| 3632 | 3632 | "node": ">= 0.10.0" |
| 3633 | + }, | |
| 3634 | + "funding": { | |
| 3635 | + "type": "opencollective", | |
| 3636 | + "url": "https://opencollective.com/express" | |
| 3633 | 3637 | } |
| 3634 | 3638 | }, |
| 3635 | 3639 | "node_modules/express/node_modules/cookie": { |
| @@ -5725,9 +5729,9 @@ | ||
| 5725 | 5729 | } |
| 5726 | 5730 | }, |
| 5727 | 5731 | "node_modules/path-to-regexp": { |
| 5728 | 5732 | "version": "0.1.1012", |
| 5729 | 5733 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.1012.tgz", |
| 5730 | 5734 | "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfaRA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/BSsIwjuh56VU7katFvuM8hULfkwB3FnsTt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/rsVF7PwPKVw1sl5KQS9wbSeOZwt1pmEQ==", |
| 5731 | 5735 | "license": "MIT" |
| 5732 | 5736 | }, |
| 5733 | 5737 | "node_modules/peek-readable": { |
| @@ -2987,6 +2987,7 @@ | ||
| 2987 | 2987 | <optgroup label="Subversions"> |
| 2988 | 2988 | <option value="gemini-exp-1121">Gemini Experimental 2024-11-21</option> |
| 2989 | 2989 | <option value="gemini-exp-1114">Gemini Experimental 2024-11-14</option> |
| 2990 | + <option value="gemini-exp-1206">Gemini Experimental 2024-12-06</option> | |
| 2990 | 2991 | <option value="gemini-1.5-pro-exp-0801">Gemini 1.5 Pro Experiment 2024-08-01</option> |
| 2991 | 2992 | <option value="gemini-1.5-pro-exp-0827">Gemini 1.5 Pro Experiment 2024-08-27</option> |
| 2992 | 2993 | <option value="gemini-1.5-pro-latest">Gemini 1.5 Pro [latest]</option> |
| @@ -4183,7 +4184,7 @@ | ||
| 4183 | 4184 | </label> |
| 4184 | 4185 | <label for="show_swipe_num_all_messages" class="checkbox_label" title="Display swipe numbers for all messages, not just the last." data-i18n="[title]Display swipe numbers for all messages, not just the last."> |
| 4185 | 4186 | <input id="show_swipe_num_all_messages" type="checkbox" /> |
| 4186 | 4187 | <small data-i18n="Swipe # for All Messages">Swipe # for All Messages</small><i class="fa-solid fa-mobile-screen-button"></i> |
| 4187 | 4188 | </label> |
| 4188 | 4189 | <label for="hotswapEnabled" class="checkbox_label" title="In the Character Management panel, show quick selection buttons for favorited characters." data-i18n="[title]In the Character Management panel, show quick selection buttons for favorited characters"> |
| 4189 | 4190 | <input id="hotswapEnabled" type="checkbox" /> |
| @@ -94,7 +94,6 @@ import { | ||
| 94 | 94 | resetMovableStyles, |
| 95 | 95 | forceCharacterEditorTokenize, |
| 96 | 96 | applyPowerUserSettings, |
| 97 | - switchSwipeNumAllMessages, | |
| 98 | 97 | } from './scripts/power-user.js'; |
| 99 | 98 | |
| 100 | 99 | import { |
| @@ -7663,14 +7662,12 @@ export function showSwipeButtons() { | ||
| 7663 | 7662 | //allows for writing individual swipe counters for past messages |
| 7664 | 7663 | const lastSwipeCounter = $('.last_mes .swipes-counter'); |
| 7665 | 7664 | lastSwipeCounter.text(swipeCounterText).show(); |
| 7666 | - | |
| 7667 | - switchSwipeNumAllMessages(); | |
| 7668 | 7665 | } |
| 7669 | 7666 | |
| 7670 | 7667 | export function hideSwipeButtons() { |
| 7671 | 7668 | $('#chat')chatElement.find('.swipe_right').hide(); |
| 7672 | 7669 | $('#chat')chatElement.find('.last_mes .swipes-counter').hide(); |
| 7673 | 7670 | $('#chat')chatElement.find('.swipe_left').hide(); |
| 7674 | 7671 | } |
| 7675 | 7672 | |
| 7676 | 7673 | /** |
| @@ -62,6 +62,7 @@ | ||
| 62 | 62 | <option data-type="google" value="gemini-1.5-flash-8b-exp-0924">gemini-1.5-flash-8b-exp-0924</option> |
| 63 | 63 | <option data-type="google" value="gemini-exp-1114">gemini-exp-1114</option> |
| 64 | 64 | <option data-type="google" value="gemini-exp-1121">gemini-exp-1121</option> |
| 65 | + <option data-type="google" value="gemini-exp-1206">gemini-exp-1206</option> | |
| 65 | 66 | <option data-type="google" value="gemini-1.5-pro">gemini-1.5-pro</option> |
| 66 | 67 | <option data-type="google" value="gemini-1.5-pro-latest">gemini-1.5-pro-latest</option> |
| 67 | 68 | <option data-type="google" value="gemini-1.5-pro-001">gemini-1.5-pro-001</option> |
| @@ -60,7 +60,6 @@ import { ToolManager } from '../../tool-calling.js'; | ||
| 60 | 60 | export { MODULE_NAME }; |
| 61 | 61 | |
| 62 | 62 | const MODULE_NAME = 'sd'; |
| 63 | -const UPDATE_INTERVAL = 1000; | |
| 64 | 63 | // This is a 1x1 transparent PNG |
| 65 | 64 | const PNG_PIXEL = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='; |
| 66 | 65 | const CUSTOM_STOP_EVENT = 'sd_stop_generation'; |
| @@ -3687,8 +3686,6 @@ async function addSDGenButtons() { | ||
| 3687 | 3686 | const button = $('#sd_gen'); |
| 3688 | 3687 | const dropdown = $('#sd_dropdown'); |
| 3689 | 3688 | dropdown.hide(); |
| 3690 | - button.hide(); | |
| 3691 | - messageButton.hide(); | |
| 3692 | 3689 | |
| 3693 | 3690 | let popper = Popper.createPopper(button.get(0), dropdown.get(0), { |
| 3694 | 3691 | placement: 'top', |
| @@ -3770,18 +3767,6 @@ function isValidState() { | ||
| 3770 | 3767 | } |
| 3771 | 3768 | } |
| 3772 | 3769 | |
| 3773 | -async function moduleWorker() { | |
| 3774 | - if (isValidState()) { | |
| 3775 | - $('#sd_gen').show(); | |
| 3776 | - $('.sd_message_gen').show(); | |
| 3777 | - } | |
| 3778 | - else { | |
| 3779 | - $('#sd_gen').hide(); | |
| 3780 | - $('.sd_message_gen').hide(); | |
| 3781 | - } | |
| 3782 | -} | |
| 3783 | - | |
| 3784 | -setInterval(moduleWorker, UPDATE_INTERVAL); | |
| 3785 | 3770 | let buttonAbortController = null; |
| 3786 | 3771 | |
| 3787 | 3772 | async function sdMessageButton(e) { |
| @@ -4077,7 +4077,7 @@ async function onModelChange() { | ||
| 4077 | 4077 | $('#openai_max_context').attr('max', max_2mil); |
| 4078 | 4078 | } else if (value.includes('gemini-exp-1114') || value.includes('gemini-exp-1121')) { |
| 4079 | 4079 | $('#openai_max_context').attr('max', max_32k); |
| 4080 | 4080 | } else if (value.includes('gemini-1.5-pro') || value.includes('gemini-exp-1206')) { |
| 4081 | 4081 | $('#openai_max_context').attr('max', max_2mil); |
| 4082 | 4082 | } else if (value.includes('gemini-1.5-flash')) { |
| 4083 | 4083 | $('#openai_max_context').attr('max', max_1mil); |
| @@ -472,9 +472,9 @@ function switchCompactInputArea() { | ||
| 472 | 472 | $('#compact_input_area').prop('checked', power_user.compact_input_area); |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | export function switchSwipeNumAllMessages() { |
| 476 | 476 | $('#show_swipe_num_all_messages').prop('checked', power_user.show_swipe_num_all_messages); |
| 477 | 477 | $('.mes:not(.last_mes) .swipes-counterbody').csstoggleClass('opacityswipeAllMessages', '').toggle(!!power_user.show_swipe_num_all_messages); |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | var originalSliderValues = []; |
| @@ -947,7 +947,7 @@ export class ToolManager { | ||
| 947 | 947 | enumProvider: toolsEnumProvider, |
| 948 | 948 | }), |
| 949 | 949 | ], |
| 950 | 950 | callback: async (_, name) => { |
| 951 | 951 | if (typeof name !== 'string' || !name) { |
| 952 | 952 | throw new Error('The unnamed argument must be a non-empty string.'); |
| 953 | 953 | } |
| @@ -1040,8 +1040,14 @@ body .panelControlBar { | ||
| 1040 | 1040 | height: var(--swipeCounterHeight); |
| 1041 | 1041 | } |
| 1042 | 1042 | |
| 1043 | 1043 | body:not(.swipeAllMessages) .mes:not(.last_mes) .swipes-counter { |
| 1044 | 1044 | opacityvisibility: 0.3hidden; |
| 1045 | +} | |
| 1046 | + | |
| 1047 | +body.swipeAllMessages .mes:not(.last_mes) .swipes-counter { | |
| 1048 | + /* Avoid expensive DOM queries */ | |
| 1049 | + opacity: 0.3 !important; | |
| 1050 | + display: flex !important; | |
| 1045 | 1051 | } |
| 1046 | 1052 | |
| 1047 | 1053 | .swipe_left { |
| @@ -280,7 +280,7 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 280 | 280 | delete generationConfig.stopSequences; |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | const should_use_system_prompt = (model.includes('gemini-1.5-flash') || model.includes('gemini-1.5-pro') || model.includes('gemini-exp-1114') || model.includesstartsWith('gemini-exp-1121')) && request.body.use_makersuite_sysprompt; |
| 284 | 284 | const prompt = convertGooglePrompt(request.body.messages, model, should_use_system_prompt, request.body.char_name, request.body.user_name); |
| 285 | 285 | let body = { |
| 286 | 286 | contents: prompt.contents, |
| @@ -347,6 +347,7 @@ export function convertGooglePrompt(messages, model, useSysPrompt = false, charN | ||
| 347 | 347 | 'gemini-1.5-flash-8b-exp-0924', |
| 348 | 348 | 'gemini-exp-1114', |
| 349 | 349 | 'gemini-exp-1121', |
| 350 | + 'gemini-exp-1206', | |
| 350 | 351 | 'gemini-1.5-pro', |
| 351 | 352 | 'gemini-1.5-pro-latest', |
| 352 | 353 | 'gemini-1.5-pro-001', |