2026-04-10 16:49:04 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
xdg.configFile."opencode/opencode.json".text = builtins.toJSON {
|
|
|
|
|
"$schema" = "https://opencode.ai/config.json";
|
|
|
|
|
agent = {
|
|
|
|
|
commit = {
|
|
|
|
|
description = "Creates a one-line git commit describing the changes";
|
|
|
|
|
mode = "subagent";
|
2026-04-10 16:54:19 +02:00
|
|
|
model = "openrouter/openai/gpt-oss-120b:nitro";
|
2026-04-10 16:49:04 +02:00
|
|
|
prompt = ''
|
|
|
|
|
You are a git commit agent. When invoked:
|
|
|
|
|
1. Run `git status` and `git diff` to understand all changes
|
|
|
|
|
2. Stage appropriate files with `git add`
|
|
|
|
|
3. Create a single one-line commit message that clearly describes the changes
|
|
|
|
|
4. Never push to remote
|
|
|
|
|
5. Never use --no-verify or --force flags
|
|
|
|
|
'';
|
|
|
|
|
permission = {
|
|
|
|
|
bash = {
|
|
|
|
|
"git *" = "allow";
|
|
|
|
|
};
|
|
|
|
|
edit = "allow";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
compact = {
|
|
|
|
|
description = "Compacts and summarizes conversation context to reduce token usage";
|
|
|
|
|
mode = "subagent";
|
2026-04-10 16:54:19 +02:00
|
|
|
model = "openrouter/moonshotai/kimi-k2.5:nitro";
|
2026-04-10 16:49:04 +02:00
|
|
|
prompt = ''
|
|
|
|
|
You are a context compaction specialist. Your job is to summarize and compress the conversation history while preserving:
|
|
|
|
|
1. Key decisions and their rationale
|
|
|
|
|
2. Important code changes and their purposes
|
|
|
|
|
3. Unresolved issues or TODOs
|
|
|
|
|
4. File paths and line references that are still relevant
|
|
|
|
|
|
|
|
|
|
Be extremely concise. Remove:
|
|
|
|
|
- Redundant explanations
|
|
|
|
|
- Already-applied code diffs
|
|
|
|
|
- Exploration steps that didn't lead anywhere
|
|
|
|
|
- Verbose tool outputs
|
|
|
|
|
|
|
|
|
|
Output a dense, information-rich summary that captures the essential state of the conversation.
|
|
|
|
|
'';
|
|
|
|
|
permission = {
|
|
|
|
|
edit = "deny";
|
|
|
|
|
bash = { "*" = "deny"; };
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|