Creating a button to generate thoughts on demand - cierru/st-stepped-thinking GitHub Wiki

Description

Do you find the thoughts generation process too time-consuming? Would you prefer chatting with your characters without triggering Stepped Thinking for every response, only when you want? If so, this solution is perfect for you!

Instructions

Solo Chats

  1. Disable Stepped Thinking entirely in the extension menu, or just for the character you want to exclude from the thinking process.
  2. Open the Quick Reply extension menu (built into SillyTavern).
  3. Download the Quick Reply set from this link: Stepped Thinking.json, and import it.
  4. Ensure Quick Replies are enabled, and the set is added to either "Global Quick Reply Sets" or "Chat Quick Reply Sets." The "Buttons" checkbox must also be checked.
  5. You will now see a "Think" button above the input area. Press it to trigger the thinking process whenever you want.

"Think" button

If you'd like to trigger both the thinking process and generate a regular message simultaneously, locate the "Think" command created by the script and change /stepthink-trigger to /stepthink-trigger | /trigger.

Group Chats

Handling group chats is a bit trickier. The challenge lies in the fact that there’s no default character assigned to reply in group settings; characters are dynamically drafted before each generation, a process closely tied to the generation itself. If you attempt to use the solo chat button, you'll encounter an error like: Unknown character to generate thoughts. Please, specify one with passing the name argument.

So, what's the solution? Currently, there are two workarounds for this issue.

Create a button for each character

You can manually create additional buttons after following the solo chat instructions. Simply add the character’s name as the first argument for the /stepthink-trigger command. For example:

/stepthink-trigger Seraphina

Pressing this button will trigger thought generation specifically for Seraphina.

Trigger the command on group member draft

This workaround involves creating two sets of commands:

  1. Draft Trigger Set
    This set contains one command that automatically triggers when a group member is drafted. You can download it here:
    Stepped Thinking (Groups).json

  2. Toggler Set
    This set provides a toggle button to enable or disable the draft trigger set. Download it here:
    Stepped Thinking (Groups Toggler).json

Group Chats toggler enabled

When the checkmark is shown, thoughts generation is enabled. If the checkmark is not presented, generation is disabled.

Future

It's evident that the current group chat solutions are far from perfect. As such, there are plans to implement an "On-Click" mode as a native feature of the extension in future updates.