Return instruct and context names when no name provided for slash command

This commit is contained in:
Cohee 2024-04-03 00:36:40 +03:00
parent d6b700483f
commit c0bb90b649
1 changed files with 2 additions and 4 deletions

View File

@ -8248,8 +8248,7 @@ const CONNECT_API_MAP = {
async function selectContextCallback(_, name) {
if (!name) {
toastr.warning('Context preset name is required');
return '';
return power_user.context.preset;
}
const contextNames = context_presets.map(preset => preset.name);
@ -8268,8 +8267,7 @@ async function selectContextCallback(_, name) {
async function selectInstructCallback(_, name) {
if (!name) {
toastr.warning('Instruct preset name is required');
return '';
return power_user.instruct.preset;
}
const instructNames = instruct_presets.map(preset => preset.name);