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