From c0bb90b6490bcc0a110dc21f9a6eb330fe3f3ee3 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 3 Apr 2024 00:36:40 +0300 Subject: [PATCH] Return instruct and context names when no name provided for slash command --- public/script.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/script.js b/public/script.js index c9f9d6fa8..3a9d5f5bb 100644 --- a/public/script.js +++ b/public/script.js @@ -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);