mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
Clean-up console logs
This commit is contained in:
parent
bd4f3e733f
commit
c55ad419dd
@ -6110,7 +6110,7 @@ export function changeMainAPI() {
|
||||
}
|
||||
|
||||
if (selectedVal === 'textgenerationwebui' || selectedVal === 'novel') {
|
||||
console.log('enabling amount_gen for ooba/novel');
|
||||
console.debug('enabling amount_gen for ooba/novel');
|
||||
activeItem.amountGenElem.find('input').prop('disabled', false);
|
||||
activeItem.amountGenElem.css('opacity', 1.0);
|
||||
}
|
||||
|
@ -804,7 +804,11 @@ function setMemoryContext(value, saveToMessage, index = null) {
|
||||
const context = getContext();
|
||||
context.setExtensionPrompt(MODULE_NAME, formatMemoryValue(value), extension_settings.memory.position, extension_settings.memory.depth, false, extension_settings.memory.role);
|
||||
$('#memory_contents').val(value);
|
||||
console.log('Summary set to: ' + value, 'Position: ' + extension_settings.memory.position, 'Depth: ' + extension_settings.memory.depth, 'Role: ' + extension_settings.memory.role);
|
||||
|
||||
const summaryLog = value
|
||||
? `Summary set to: ${value}. Position: ${extension_settings.memory.position}. Depth: ${extension_settings.memory.depth}. Role: ${extension_settings.memory.role}`
|
||||
: 'Summary has no content';
|
||||
console.debug(summaryLog);
|
||||
|
||||
if (saveToMessage && context.chat.length) {
|
||||
const idx = index ?? context.chat.length - 2;
|
||||
|
@ -14,6 +14,7 @@ import { SettingsUi } from './src/ui/SettingsUi.js';
|
||||
|
||||
|
||||
const _VERBOSE = true;
|
||||
export const debug = (...msg) => _VERBOSE ? console.debug('[QR2]', ...msg) : null;
|
||||
export const log = (...msg) => _VERBOSE ? console.log('[QR2]', ...msg) : null;
|
||||
export const warn = (...msg) => _VERBOSE ? console.warn('[QR2]', ...msg) : null;
|
||||
/**
|
||||
@ -206,18 +207,18 @@ const init = async () => {
|
||||
window['quickReplyApi'] = quickReplyApi;
|
||||
};
|
||||
const finalizeInit = async () => {
|
||||
log('executing startup');
|
||||
debug('executing startup');
|
||||
await autoExec.handleStartup();
|
||||
log('/executing startup');
|
||||
debug('/executing startup');
|
||||
|
||||
log(`executing queue (${executeQueue.length} items)`);
|
||||
debug(`executing queue (${executeQueue.length} items)`);
|
||||
while (executeQueue.length > 0) {
|
||||
const func = executeQueue.shift();
|
||||
await func();
|
||||
}
|
||||
log('/executing queue');
|
||||
debug('/executing queue');
|
||||
isReady = true;
|
||||
log('READY');
|
||||
debug('READY');
|
||||
};
|
||||
await init();
|
||||
|
||||
|
@ -1064,19 +1064,19 @@ function applyChatDisplay() {
|
||||
|
||||
switch (power_user.chat_display) {
|
||||
case 0: {
|
||||
console.log('applying default chat');
|
||||
console.debug('applying default chat');
|
||||
$('body').removeClass('bubblechat');
|
||||
$('body').removeClass('documentstyle');
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
console.log('applying bubblechat');
|
||||
console.debug('applying bubblechat');
|
||||
$('body').addClass('bubblechat');
|
||||
$('body').removeClass('documentstyle');
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
console.log('applying document style');
|
||||
console.debug('applying document style');
|
||||
$('body').removeClass('bubblechat');
|
||||
$('body').addClass('documentstyle');
|
||||
break;
|
||||
@ -3130,6 +3130,7 @@ $(document).ready(() => {
|
||||
const winHeight = window.innerHeight;
|
||||
const originalWidth = winWidth * zoomLevel;
|
||||
const originalHeight = winHeight * zoomLevel;
|
||||
console.log(`Window resize: ${coreTruthWinWidth}x${coreTruthWinHeight} -> ${window.innerWidth}x${window.innerHeight}`);
|
||||
console.debug(`Zoom: ${zoomLevel}, X:${winWidth}, Y:${winHeight}, original: ${originalWidth}x${originalHeight} `);
|
||||
return zoomLevel;
|
||||
});
|
||||
@ -3138,7 +3139,6 @@ $(document).ready(() => {
|
||||
var coreTruthWinHeight = window.innerHeight;
|
||||
|
||||
$(window).on('resize', async () => {
|
||||
console.log(`Window resize: ${coreTruthWinWidth}x${coreTruthWinHeight} -> ${window.innerWidth}x${window.innerHeight}`);
|
||||
adjustAutocompleteDebounced();
|
||||
setHotswapsDebounced();
|
||||
|
||||
@ -3191,7 +3191,7 @@ $(document).ready(() => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log('aborting MUI reset', Object.keys(power_user.movingUIState).length);
|
||||
console.debug('aborting MUI reset', Object.keys(power_user.movingUIState).length);
|
||||
}
|
||||
saveSettingsDebounced();
|
||||
coreTruthWinWidth = window.innerWidth;
|
||||
|
@ -307,7 +307,7 @@ async function listSamplers(main_api, arrayOnly = false) {
|
||||
}
|
||||
|
||||
if (arrayOnly) {
|
||||
console.log('returning full samplers array');
|
||||
console.debug('returning full samplers array');
|
||||
return availableSamplers;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user