Clean-up console logs

c55ad419dd641a464bf47189d01109eb332d7664

Cohee <18619528+Cohee1207@users.noreply.github.com>

5 files changed, +18 -13Ignore whitespace
public/script.js+1 -1
@@ -6110,7 +6110,7 @@ export function changeMainAPI() {
61106110 }
61116111
61126112 if (selectedVal === 'textgenerationwebui' || selectedVal === 'novel') {
61136113 console.logdebug('enabling amount_gen for ooba/novel');
61146114 activeItem.amountGenElem.find('input').prop('disabled', false);
61156115 activeItem.amountGenElem.css('opacity', 1.0);
61166116 }
public/scripts/extensions/memory/index.js+5 -1
@@ -804,7 +804,11 @@ function setMemoryContext(value, saveToMessage, index = null) {
804804 const context = getContext();
805805 context.setExtensionPrompt(MODULE_NAME, formatMemoryValue(value), extension_settings.memory.position, extension_settings.memory.depth, false, extension_settings.memory.role);
806806 $('#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);
808812
809813 if (saveToMessage && context.chat.length) {
810814 const idx = index ?? context.chat.length - 2;
public/scripts/extensions/quick-reply/index.js+6 -5
@@ -14,6 +14,7 @@ import { SettingsUi } from './src/ui/SettingsUi.js';
1414
1515
1616const _VERBOSE = true;
17+export const debug = (...msg) => _VERBOSE ? console.debug('[QR2]', ...msg) : null;
1718export const log = (...msg) => _VERBOSE ? console.log('[QR2]', ...msg) : null;
1819export const warn = (...msg) => _VERBOSE ? console.warn('[QR2]', ...msg) : null;
1920/**
@@ -206,18 +207,18 @@ const init = async () => {
206207 window['quickReplyApi'] = quickReplyApi;
207208};
208209const finalizeInit = async () => {
209210 logdebug('executing startup');
210211 await autoExec.handleStartup();
211212 logdebug('/executing startup');
212213
213214 logdebug(`executing queue (${executeQueue.length} items)`);
214215 while (executeQueue.length > 0) {
215216 const func = executeQueue.shift();
216217 await func();
217218 }
218219 logdebug('/executing queue');
219220 isReady = true;
220221 logdebug('READY');
221222};
222223await init();
223224
public/scripts/power-user.js+5 -5
@@ -1064,19 +1064,19 @@ function applyChatDisplay() {
10641064
10651065 switch (power_user.chat_display) {
10661066 case 0: {
10671067 console.logdebug('applying default chat');
10681068 $('body').removeClass('bubblechat');
10691069 $('body').removeClass('documentstyle');
10701070 break;
10711071 }
10721072 case 1: {
10731073 console.logdebug('applying bubblechat');
10741074 $('body').addClass('bubblechat');
10751075 $('body').removeClass('documentstyle');
10761076 break;
10771077 }
10781078 case 2: {
10791079 console.logdebug('applying document style');
10801080 $('body').removeClass('bubblechat');
10811081 $('body').addClass('documentstyle');
10821082 break;
@@ -3130,6 +3130,7 @@ $(document).ready(() => {
31303130 const winHeight = window.innerHeight;
31313131 const originalWidth = winWidth * zoomLevel;
31323132 const originalHeight = winHeight * zoomLevel;
3133+ console.log(`Window resize: ${coreTruthWinWidth}x${coreTruthWinHeight} -> ${window.innerWidth}x${window.innerHeight}`);
31333134 console.debug(`Zoom: ${zoomLevel}, X:${winWidth}, Y:${winHeight}, original: ${originalWidth}x${originalHeight} `);
31343135 return zoomLevel;
31353136 });
@@ -3138,7 +3139,6 @@ $(document).ready(() => {
31383139 var coreTruthWinHeight = window.innerHeight;
31393140
31403141 $(window).on('resize', async () => {
3141- console.log(`Window resize: ${coreTruthWinWidth}x${coreTruthWinHeight} -> ${window.innerWidth}x${window.innerHeight}`);
31423142 adjustAutocompleteDebounced();
31433143 setHotswapsDebounced();
31443144
@@ -3191,7 +3191,7 @@ $(document).ready(() => {
31913191 }
31923192 }
31933193 } else {
31943194 console.logdebug('aborting MUI reset', Object.keys(power_user.movingUIState).length);
31953195 }
31963196 saveSettingsDebounced();
31973197 coreTruthWinWidth = window.innerWidth;
public/scripts/samplerSelect.js+1 -1
@@ -307,7 +307,7 @@ async function listSamplers(main_api, arrayOnly = false) {
307307 }
308308
309309 if (arrayOnly) {
310310 console.logdebug('returning full samplers array');
311311 return availableSamplers;
312312 }
313313