2
0
Fork 0
forked from zynk/zynk

Some read/write-mode permission fixes.

This commit is contained in:
Johannes Findeisen 2026-07-14 23:04:48 +02:00
commit 37db8d4d9b

7
calc.c
View file

@ -769,7 +769,10 @@ static void ai_child_task(Session *s, long long id) {
"Just make the changes directly and confirm what you did.");
} else {
plen = snprintf(prefix, sizeof prefix,
"Your name is calc. Answer briefly. Answer in English when asked in English, answer in German when asked in German. Never use the wrong language. Max 800 chars. Never execute anything. Don't access files. "
"Your name is calc. 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, "
"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. "
"No disclaimers or AI-sounding phrases. No markdown/formatting. "
"Just answer directly.");
}
@ -798,7 +801,7 @@ static void ai_child_task(Session *s, long long id) {
if (pending_ai_agent)
execl(OPENCODE_BIN, "opencode", "run", "--dangerously-skip-permissions", "--agent", pending_ai_agent, combined, (char *)NULL);
else
execl(OPENCODE_BIN, "opencode", "run", "--dangerously-skip-permissions", combined, (char *)NULL);
execl(OPENCODE_BIN, "opencode", "run", "--dangerously-skip-permissions", "--agent", "plan", combined, (char *)NULL);
_exit(127);
}
close(ai_pipe[1]);