mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add quiet arg to /context
This commit is contained in:
@ -130,19 +130,20 @@ function highlightDefaultPreset() {
|
||||
/**
|
||||
* Select context template if not already selected.
|
||||
* @param {string} preset Preset name.
|
||||
* @param {boolean} quiet Suppress info message.
|
||||
*/
|
||||
export function selectContextPreset(preset) {
|
||||
export function selectContextPreset(preset, quiet) {
|
||||
// If context template is not already selected, select it
|
||||
if (preset !== power_user.context.preset) {
|
||||
$('#context_presets').val(preset).trigger('change');
|
||||
toastr.info(`Context Template: preset "${preset}" auto-selected`);
|
||||
!quiet && toastr.info(`Context Template: preset "${preset}" auto-selected`);
|
||||
}
|
||||
|
||||
// If instruct mode is disabled, enable it, except for default context template
|
||||
if (!power_user.instruct.enabled && preset !== power_user.default_context) {
|
||||
power_user.instruct.enabled = true;
|
||||
$('#instruct_enabled').prop('checked', true).trigger('change');
|
||||
toastr.info('Instruct Mode enabled');
|
||||
!quiet && toastr.info('Instruct Mode enabled');
|
||||
}
|
||||
|
||||
saveSettingsDebounced();
|
||||
|
Reference in New Issue
Block a user