/instruct command: add forceGet argument. Document that it enables instruct mode if disabled.

ea6fa265c7845c6d6df518070703a11fafb71715

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +10 -2Showing whitespace changes
public/script.js+10 -2
@@ -8563,7 +8563,7 @@ async function selectContextCallback(args, name) {
85638563
85648564async function selectInstructCallback(args, name) {
85658565 if (!name) {
85668566 return power_user.instruct.enabled || isTrueBoolean(args?.forceGet) ? power_user.instruct.preset : '';
85678567 }
85688568
85698569 const quiet = isTrueBoolean(args?.quiet);
@@ -9264,6 +9264,13 @@ jQuery(async function () {
92649264 defaultValue: 'false',
92659265 enumList: commonEnumProviders.boolean('trueFalse')(),
92669266 }),
9267+ SlashCommandNamedArgument.fromProps({
9268+ name: 'forceGet',
9269+ description: 'Force getting a name even if instruct mode is disabled',
9270+ typeList: [ARGUMENT_TYPE.BOOLEAN],
9271+ defaultValue: 'false',
9272+ enumList: commonEnumProviders.boolean('trueFalse')(),
9273+ }),
92679274 ],
92689275 unnamedArgumentList: [
92699276 SlashCommandArgument.fromProps({
@@ -9274,7 +9281,8 @@ jQuery(async function () {
92749281 ],
92759282 helpString: `
92769283 <div>
92779284 Selects instruct mode template by name. Gets the currentEnables instruct templatemode if no name is provided and instruct modenot isalready enabled.
9285+ Gets the current instruct template if no name is provided and instruct mode is enabled or <code>forceGet=true</code> is passed.
92789286 </div>
92799287 <div>
92809288 <strong>Example:</strong>