2
0
Fork 0
forked from zynk/zynk

Show full AI error output instead of generic error message

When an AI query fails (opencode exits non-zero), the bot previously
sent a generic 'AI query failed (opencode exited with error)' message
to IRC, discarding all useful output. Users had no way to diagnose why
the query failed.

Changes:
- Redirect opencode's stderr into the capture pipe instead of /dev/null,
  so error messages that go to stderr are no longer lost.
- On non-zero exit, include the actual captured output in the error
  message sent to IRC: 'AI error (exit N): <output>' (truncated to
  4000 chars). If no output was captured, show 'AI error (exit N, no
  output)' instead.
- Applied strip_formatting() to the error output before sending so
  ANSI codes and markdown don't leak into IRC.
- Bumped VERSION to 0.34.3.
This commit is contained in:
Johannes Findeisen 2026-07-19 23:01:55 +02:00
commit c4d9011bdb
2 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2026.07.19 – Show full AI error output on failure.
- AI error messages now include the actual opencode output instead of a generic "(opencode exited with error)" message.
- Captured stderr from opencode (previously sent to /dev/null) so error details are no longer lost.
- Version bumped to 0.34.3.
2026.07.19 – Collapsed double spaces in `!forecast` and `!stock` responses
- Collapsed double spaces in `!forecast` and `!stock` responses (e.g., when weather condition is empty).