2
0
Fork 0
forked from zynk/zynk

Raise AI code mode limit, simplify plan mode prompt. (0.40.4)

- Increased AI code mode response limit back to 2000 chars (was reduced
  to 1000 in 0.40.3, but code changes need more room).
- Simplified the AI plan mode system prompt further: removed the explicit
  'tell them you are in plan mode' instruction, keeping it to a short
  'You are in plan mode. Answer briefly.' directive.
- Fixed !gitlog default count in README.md from 5 to 1 (matching the
  actual GITLOG_COUNT value set in 0.38.2).
- Re-aligned the utilities command table in README.md for cleaner
  formatting.
- Minor grammar and punctuation fixes across older changelog entries.
This commit is contained in:
Johannes Findeisen 2026-07-23 21:34:12 +02:00
commit 1f9f4b60f5
4 changed files with 26 additions and 20 deletions

View file

@ -1,10 +1,18 @@
2026.07.23 - Raise AI code mode limit, simplify plan mode prompt. (0.40.4)
- Increased AI code mode response limit back to 2000 chars (was reduced to 1000 in 0.40.3, but code changes need more room).
- Simplified the AI plan mode system prompt further: removed the explicit "tell them you are in plan mode" instruction, keeping it to a short "You are in plan mode. Answer briefly." directive.
- Fixed `!gitlog` default count in README.md from 5 to 1 (matching the actual `GITLOG_COUNT` value set in 0.38.2).
- Re-aligned the utilities command table in README.md for cleaner formatting.
- Minor grammar and punctuation fixes across older changelog entries.
2026.07.23 - Simplify CMake feature loop, adjust AI response limits. (0.40.3)
- Refactored CMake feature configuration: merged the two separate `foreach` loops (one for building `_cmd_defs` and one for printing status) into a single loop, removing redundant iteration. Improved the status banner formatting for clearer feature configuration output.
- Reduced AI code mode response limit from 2000 to 1000 chars to keep IRC replies concise.
- Increased AI plan mode response limit from 800 to 1000 chars, giving slightly more room for explanations.
- Simplified AI plan mode system prompt description for clarity.
- Fixed minor whitespace alignment in README.md command table.
- Simplified AI plan mode system prompts description for clarity.
- Fixed a minor whitespace alignment in the README.md command table.
2026.07.23 - Show commit date/time in !gitlog output. (0.40.2)
@ -36,7 +44,7 @@
- `reload_do()` now accepts an `exec_new` parameter: when 0 (`!reload`/`!restart`), the child inherits the socket fd and SSL context directly and continues the event loop without reconnecting; when 1 (`!rebuild`/`!code`), the old fork+exec path is used.
- Removed `irc_part_all()` from the reload path — the bot no longer parts channels on reload, so voice mode (+v) and channel presence are preserved.
- Reset `pending_ai_pid`/`pending_ai_id` in the fork child to avoid stale state from orphaned AI processes.
- Reset `pending_ai_pid`/`pending_ai_id` in the fork child to avoid the stale state from orphaned AI processes.
- `!reload` and `!restart` now keep the bot's IRC session alive (no nick collision, no rejoin, no lost voice). `!rebuild`/`!code` still do a clean QUIT+exec since the binary changed.
2026.07.21 - Strip opencode header from !ai responses. (0.38.3)
@ -61,7 +69,7 @@
2026.07.21 - Add !changelog command. (0.38.0)
- Added `!changelog [count]` command: displays the latest changelog entries from `CHANGELOG.md`. Defaults to 5 entries (`CHANGELOG_COUNT`), accepts 1-10 as count. Each entry title (date line) is sent as a separate IRC message with a 200ms delay to avoid IRC server flood protection.
- Added `!changelog [count]` command: displays the latest changelog entries from `CHANGELOG.md`. Defaults to five entries (`CHANGELOG_COUNT`), accepts 1-10 as count. Each entry title (date line) is sent as a separate IRC message with a 200ms delay to avoid IRC server flood protection.
- Reduced `GITLOG_MAX` and `CHANGELOG_MAX` from 20 to 10.
- Updated `!help` to list `!changelog`.
- Updated README.md with `!changelog` documentation and corrected max values.
@ -74,7 +82,7 @@
2026.07.20 - Fix !seen showing UTC instead of local time. (0.36.1)
- Fixed `!seen` command storing UTC timestamps instead of local time: `seen_update()` used `datetime('now')` which returns UTC, causing `!seen <nick>` to display a time offset by the server's timezone difference (e.g. 16:00 instead of 18:00 on a UTC+2 system). Changed to `datetime('now','localtime')` so seen timestamps match the system's local time.
- Fixed `!seen` command storing UTC timestamps instead of local time: `seen_update()` used `datetime('now')` which returns UTC, causing `!seen <nick>` to display a time offset by the server's timezone difference (e.g., 16:00 instead of 18:00 on a UTC+2 system). Changed to `datetime('now','localtime')` so seen timestamps match the system's local time.
2026.07.20 - Add !gitlog command. (0.36.0)
@ -92,7 +100,7 @@
2026.07.20 - Fix !time to work without tzdata. (0.35.5)
- Rewrote `!time` to try the system `localtime_r()` first, then fall back to a built-in timezone table with 45 IANA zones and simplified DST rules when the system can't resolve timezones (e.g. no `tzdata` installed). This means `!time Australia/Sydney` now shows correct AEST/AEDT even on minimal systems.
- Rewrote `!time` to try the system `localtime_r()` first, then fall back to a built-in timezone table with 45 IANA zones and simplified DST rules when the system can't resolve timezones (e.g. no `tzdata` installed). This means `!time Australia/Sydney` now shows the correct AEST / AEDT even on minimal systems.
- Added doc comments to all undocumented functions in zynk.c: `seen_update`, `seen_lookup`, `tell_add`, `tell_deliver`, `valid_irc_word`, `normalize_city`, `collapse_spaces`, `cmd_reload`, `cmd_time`, `cmd_seen`, `cmd_tell`, `cmd_greeting_or_chat`, `tz_lookup`, `tz_format`.
- Added full list of built-in timezones to README.md (all 45 entries from `tz_table`) with region, offset, and DST status.

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.13)
project(zynk VERSION 0.40.3 LANGUAGES C)
project(zynk VERSION 0.40.4 LANGUAGES C)
# Prefer C99; the code is compatible with C99/C11
set(CMAKE_C_STANDARD 99)

View file

@ -161,14 +161,14 @@ rm -rf build
### Utilities
| Command | Description |
|-----------------------------|---------------------------------------------------------------------------------|
| `!calc <expression>` | Evaluate math (see below) |
| `!time [timezone]` | Show current time (see below) |
| `!seen <nick>` | Check when a user was last seen |
| `!tell <nick> <message>` | Leave a message for an offline user |
| `!gitlog [count]` | Show recent git commits with links (default: 5, max: 20) |
| `!changelog [count]` | Show changelog entries (default: 1, max: 10) |
| Command | Description |
|-----------------------------|----------------------------------------------------------|
| `!calc <expression>` | Evaluate math (see below) |
| `!time [timezone]` | Show current time (see below) |
| `!seen <nick>` | Check when a user was last seen |
| `!tell <nick> <message>` | Leave a message for an offline user |
| `!gitlog [count]` | Show recent git commits with links (default: 1, max: 10) |
| `!changelog [count]` | Show changelog entries (default: 1, max: 10) |
#### Time (`!time`)

8
ai.h
View file

@ -129,14 +129,12 @@ void ai_child_task(Session *s, long long id, const char *agent) {
plen = snprintf(prefix, sizeof prefix,
"Your name is zynk. You are a coding assistant in a project. Execute code changes as requested. "
"Make real file edits and run commands as needed. Answer in English when asked in English, answer in German when asked in German. "
"Max 1000 chars. No disclaimers or AI-sounding phrases. No markdown/formatting. "
"Max 2000 chars. No disclaimers or AI-sounding phrases. No markdown/formatting. "
"Just make the changes directly and confirm what you did.");
} else {
plen = snprintf(prefix, sizeof prefix,
"Your name is zynk. You are in plan mode - If someone asks you to change or edit code, "
"tell them you are in plan mode and can only answer questions. Suggest they use !code <instruction> to make actual code changes. "
"Answer briefly. Answer in English when asked in English, answer in German when asked in German. Max 1000 chars. "
"No disclaimers or AI-sounding phrases. No markdown/formatting. "
"Your name is zynk. You are in plan mode. Answer briefly. Answer in English when asked in English, answer in German when asked in German. "
"Max 1000 chars. No disclaimers or AI-sounding phrases. No markdown/formatting. "
"Just answer directly.");
}
if (have_history) {