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.
This commit is contained in:
parent
d614cbfd01
commit
db72b957b8
4 changed files with 29 additions and 22 deletions
|
|
@ -1,3 +1,11 @@
|
|||
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.
|
||||
|
||||
2026.07.23 - Show commit date/time in !gitlog output. (0.40.2)
|
||||
|
||||
- `!gitlog` now shows the commit date and time in `[YYYY-MM-DD HH:MM:SS]` format at the beginning of each commit line (e.g. `[2026-07-22 14:30:15] 184d4c4 Fix whitespace...`).
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(zynk VERSION 0.40.2 LANGUAGES C)
|
||||
project(zynk VERSION 0.40.3 LANGUAGES C)
|
||||
|
||||
# Prefer C99; the code is compatible with C99/C11
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
|
@ -32,31 +32,31 @@ option(WITH_RESTART "Restart command (ops only)" ON)
|
|||
option(WITH_GREETING_OR_CHAT "Greeting/chat with AI fallback" ON)
|
||||
|
||||
# Map WITH_* options to HAS_CMD_* compile definitions
|
||||
#foreach(_feat ZYNK PING VERSION HELP QUIT WEATHER FORECAST STOCK
|
||||
# CALC TIME SEEN TELL GITLOG CHANGELOG AI CODE
|
||||
# REBUILD UPTIME RELOAD RESTART GREETING_OR_CHAT)
|
||||
# string(TOLOWER "${_feat}" _feat_lower)
|
||||
# if(WITH_${_feat})
|
||||
# list(APPEND _cmd_defs "HAS_CMD_${_feat}")
|
||||
# endif()
|
||||
#endforeach()
|
||||
|
||||
# Map WITH_* options to HAS_CMD_* compile definitions and print feature status
|
||||
message(STATUS "=============================================================================")
|
||||
message(STATUS "Feature configuration for zynk (${PROJECT_VERSION}):")
|
||||
message(STATUS "=============================================================================")
|
||||
foreach(_feat ZYNK PING VERSION HELP QUIT WEATHER FORECAST STOCK
|
||||
CALC TIME SEEN TELL GITLOG CHANGELOG AI CODE
|
||||
REBUILD UPTIME RELOAD RESTART GREETING_OR_CHAT)
|
||||
string(TOLOWER "${_feat}" _feat_lower)
|
||||
if(WITH_${_feat})
|
||||
list(APPEND _cmd_defs "HAS_CMD_${_feat}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Print feature status
|
||||
message(STATUS "")
|
||||
message(STATUS "zynk feature configuration:")
|
||||
message(STATUS "=============================================")
|
||||
foreach(_feat ZYNK PING VERSION HELP QUIT WEATHER FORECAST STOCK
|
||||
CALC TIME SEEN TELL GITLOG CHANGELOG AI CODE
|
||||
REBUILD UPTIME RELOAD RESTART GREETING_OR_CHAT)
|
||||
string(TOLOWER "${_feat}" _feat_lower)
|
||||
if(WITH_${_feat})
|
||||
message(STATUS "[ON] ${_feat} (!${_feat_lower})")
|
||||
else()
|
||||
message(STATUS "[OFF] ${_feat} (!${_feat_lower})")
|
||||
endif()
|
||||
endforeach()
|
||||
message(STATUS "=============================================")
|
||||
message(STATUS "")
|
||||
message(STATUS "=============================================================================")
|
||||
|
||||
# Homebrew OpenSSL hint on macOS (set before find_package)
|
||||
if(APPLE AND DEFINED ENV{HOMEBREW_PREFIX})
|
||||
|
|
|
|||
|
|
@ -167,8 +167,8 @@ rm -rf build
|
|||
| `!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) |
|
||||
| `!gitlog [count]` | Show recent git commits with links (default: 5, max: 20) |
|
||||
| `!changelog [count]` | Show changelog entries (default: 1, max: 10) |
|
||||
|
||||
#### Time (`!time`)
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ The calculator uses `bc -l` (POSIX arbitrary-precision calculator with the math
|
|||
|
||||
| Command | Description |
|
||||
|-----------------------|-------------------------------------------------------------------------------------|
|
||||
| `!reload` | Hot reload (preserve IRC session, fork-in-place) |
|
||||
| `!reload` | Hot reload (preserve IRC session, fork-in-place) |
|
||||
| `!restart` | Restart the bot (preserves session, same as !reload) |
|
||||
| `!rebuild [pull]` | Rebuild and restart (ops only, in channels; `pull` runs Git pull before rebuilding) |
|
||||
| `!code <instruction>` | Make AI-powered code changes |
|
||||
|
|
|
|||
7
ai.h
7
ai.h
|
|
@ -129,14 +129,13 @@ 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 2000 chars. No disclaimers or AI-sounding phrases. No markdown/formatting. "
|
||||
"Max 1000 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 - you can only answer questions and discuss code, "
|
||||
"but you CANNOT make any changes to files or execute commands. If someone asks you to change or edit code, "
|
||||
"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 800 chars. "
|
||||
"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.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue