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