Clean-up console logs
| @@ -6110,7 +6110,7 @@ export function changeMainAPI() { | ||
| 6110 | 6110 | } |
| 6111 | 6111 | |
| 6112 | 6112 | if (selectedVal === 'textgenerationwebui' || selectedVal === 'novel') { |
| 6113 | 6113 | console.logdebug('enabling amount_gen for ooba/novel'); |
| 6114 | 6114 | activeItem.amountGenElem.find('input').prop('disabled', false); |
| 6115 | 6115 | activeItem.amountGenElem.css('opacity', 1.0); |
| 6116 | 6116 | } |
| @@ -804,7 +804,11 @@ function setMemoryContext(value, saveToMessage, index = null) { | ||
| 804 | 804 | const context = getContext(); |
| 805 | 805 | context.setExtensionPrompt(MODULE_NAME, formatMemoryValue(value), extension_settings.memory.position, extension_settings.memory.depth, false, extension_settings.memory.role); |
| 806 | 806 | $('#memory_contents').val(value); |
| 807 | - console.log('Summary set to: ' + value, 'Position: ' + extension_settings.memory.position, 'Depth: ' + extension_settings.memory.depth, 'Role: ' + extension_settings.memory.role); | |
| 807 | + | |
| 808 | + const summaryLog = value | |
| 809 | + ? `Summary set to: ${value}. Position: ${extension_settings.memory.position}. Depth: ${extension_settings.memory.depth}. Role: ${extension_settings.memory.role}` | |
| 810 | + : 'Summary has no content'; | |
| 811 | + console.debug(summaryLog); | |
| 808 | 812 | |
| 809 | 813 | if (saveToMessage && context.chat.length) { |
| 810 | 814 | const idx = index ?? context.chat.length - 2; |
| @@ -14,6 +14,7 @@ import { SettingsUi } from './src/ui/SettingsUi.js'; | ||
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | const _VERBOSE = true; |
| 17 | +export const debug = (...msg) => _VERBOSE ? console.debug('[QR2]', ...msg) : null; | |
| 17 | 18 | export const log = (...msg) => _VERBOSE ? console.log('[QR2]', ...msg) : null; |
| 18 | 19 | export const warn = (...msg) => _VERBOSE ? console.warn('[QR2]', ...msg) : null; |
| 19 | 20 | /** |
| @@ -206,18 +207,18 @@ const init = async () => { | ||
| 206 | 207 | window['quickReplyApi'] = quickReplyApi; |
| 207 | 208 | }; |
| 208 | 209 | const finalizeInit = async () => { |
| 209 | 210 | logdebug('executing startup'); |
| 210 | 211 | await autoExec.handleStartup(); |
| 211 | 212 | logdebug('/executing startup'); |
| 212 | 213 | |
| 213 | 214 | logdebug(`executing queue (${executeQueue.length} items)`); |
| 214 | 215 | while (executeQueue.length > 0) { |
| 215 | 216 | const func = executeQueue.shift(); |
| 216 | 217 | await func(); |
| 217 | 218 | } |
| 218 | 219 | logdebug('/executing queue'); |
| 219 | 220 | isReady = true; |
| 220 | 221 | logdebug('READY'); |
| 221 | 222 | }; |
| 222 | 223 | await init(); |
| 223 | 224 | |
| @@ -1064,19 +1064,19 @@ function applyChatDisplay() { | ||
| 1064 | 1064 | |
| 1065 | 1065 | switch (power_user.chat_display) { |
| 1066 | 1066 | case 0: { |
| 1067 | 1067 | console.logdebug('applying default chat'); |
| 1068 | 1068 | $('body').removeClass('bubblechat'); |
| 1069 | 1069 | $('body').removeClass('documentstyle'); |
| 1070 | 1070 | break; |
| 1071 | 1071 | } |
| 1072 | 1072 | case 1: { |
| 1073 | 1073 | console.logdebug('applying bubblechat'); |
| 1074 | 1074 | $('body').addClass('bubblechat'); |
| 1075 | 1075 | $('body').removeClass('documentstyle'); |
| 1076 | 1076 | break; |
| 1077 | 1077 | } |
| 1078 | 1078 | case 2: { |
| 1079 | 1079 | console.logdebug('applying document style'); |
| 1080 | 1080 | $('body').removeClass('bubblechat'); |
| 1081 | 1081 | $('body').addClass('documentstyle'); |
| 1082 | 1082 | break; |
| @@ -3130,6 +3130,7 @@ $(document).ready(() => { | ||
| 3130 | 3130 | const winHeight = window.innerHeight; |
| 3131 | 3131 | const originalWidth = winWidth * zoomLevel; |
| 3132 | 3132 | const originalHeight = winHeight * zoomLevel; |
| 3133 | + console.log(`Window resize: ${coreTruthWinWidth}x${coreTruthWinHeight} -> ${window.innerWidth}x${window.innerHeight}`); | |
| 3133 | 3134 | console.debug(`Zoom: ${zoomLevel}, X:${winWidth}, Y:${winHeight}, original: ${originalWidth}x${originalHeight} `); |
| 3134 | 3135 | return zoomLevel; |
| 3135 | 3136 | }); |
| @@ -3138,7 +3139,6 @@ $(document).ready(() => { | ||
| 3138 | 3139 | var coreTruthWinHeight = window.innerHeight; |
| 3139 | 3140 | |
| 3140 | 3141 | $(window).on('resize', async () => { |
| 3141 | - console.log(`Window resize: ${coreTruthWinWidth}x${coreTruthWinHeight} -> ${window.innerWidth}x${window.innerHeight}`); | |
| 3142 | 3142 | adjustAutocompleteDebounced(); |
| 3143 | 3143 | setHotswapsDebounced(); |
| 3144 | 3144 | |
| @@ -3191,7 +3191,7 @@ $(document).ready(() => { | ||
| 3191 | 3191 | } |
| 3192 | 3192 | } |
| 3193 | 3193 | } else { |
| 3194 | 3194 | console.logdebug('aborting MUI reset', Object.keys(power_user.movingUIState).length); |
| 3195 | 3195 | } |
| 3196 | 3196 | saveSettingsDebounced(); |
| 3197 | 3197 | coreTruthWinWidth = window.innerWidth; |
| @@ -307,7 +307,7 @@ async function listSamplers(main_api, arrayOnly = false) { | ||
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | if (arrayOnly) { |
| 310 | 310 | console.logdebug('returning full samplers array'); |
| 311 | 311 | return availableSamplers; |
| 312 | 312 | } |
| 313 | 313 | |