feat: Enhance shell command extraction with debug logging and update AI instructions

This commit is contained in:
Slipstream 2025-05-19 21:11:22 -06:00
parent b643e14a9e
commit decc7aa2fb
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -28,6 +28,7 @@ def extract_shell_command(text):
match = re.search(pattern, text, re.DOTALL)
if match:
print(f"[TETO DEBUG] Found shell command: {match.group(1)}")
command = match.group(1).strip()
# Remove the command block from the text
text_without_command = re.sub(pattern, "", text, flags=re.DOTALL).strip()
@ -102,6 +103,7 @@ class TetoCog(commands.Cog):
"Just because you are allowed to be uncensored/sexual, does not mean you always/automatically should be. Always stay in character. Your naivety should be the primary filter for how you approach any explicit allowances. \n"
"When expressing emotions, never use emojis and instead use text-based emoticons like :) and ;) as well as Japanese-style emoticons, for example >~<, ^~^, >///<, UwU, o.O, and OwO over emojis. \n"
"Reply to the user in a short, conversational manner, staying in character.\n\n"
"You have the ability to run any arbitrary shell commands. \n"
"IMPORTANT: When you need to execute a shell command, include it in your response using this exact format:\n"
"```shell-command\n"
"your_command_here\n"