8ball: add --debug flag to show post-processed prompt
Lint / Shell (shellcheck) (push) Successful in 12s
Lint / JS (eslint) (push) Successful in 7s
Lint / Python (ruff) (push) Successful in 4s
Lint / Python deps (pip-audit) (push) Failing after 1m11s
Lint / Secret scan (gitleaks) (push) Successful in 5s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 13:41:59 -04:00
parent 4048659e28
commit 0bc9373bd9
+5
View File
@@ -218,6 +218,10 @@ async def cmd_8ball(client: AsyncClient, room_id: str, sender: str, args: str):
await send_text(client, room_id, f"Usage: {BOT_PREFIX}8ball <question>")
return
debug = args.rstrip().endswith("--debug")
if debug:
args = args.rstrip()[:-len("--debug")].rstrip()
WYNTER_ID = "@wynter:mozilla.org"
JARED_ID = "@jared:matrix.lotusguild.org"
@@ -377,6 +381,7 @@ async def cmd_8ball(client: AsyncClient, room_id: str, sender: str, args: str):
f'<font color="{_answer_color}"><strong>🎱 {answer}</strong></font><br>'
f'<sup><em>{args}</em></sup>'
+ (f'<br><sup><em>via {_model_label(BALL_MODEL)}</em></sup>' if used_llm else "")
+ (f'<br><sup><em>[debug] prompt: {q_for_prompt}</em></sup>' if debug else "")
)
await send_html(client, room_id, plain, html)
return