From b035546241d842053c7f19c517e330d79d1dc801 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 16 Sep 2025 21:31:06 -0500 Subject: [PATCH] news: add opencode entry for new agent and command support Signed-off-by: Austin Horstman --- .../misc/news/2025/09/2025-09-16_21-29-29.nix | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/misc/news/2025/09/2025-09-16_21-29-29.nix diff --git a/modules/misc/news/2025/09/2025-09-16_21-29-29.nix b/modules/misc/news/2025/09/2025-09-16_21-29-29.nix new file mode 100644 index 000000000..a27a88a8c --- /dev/null +++ b/modules/misc/news/2025/09/2025-09-16_21-29-29.nix @@ -0,0 +1,39 @@ +{ config, ... }: +{ + time = "2025-09-17T02:29:29+00:00"; + condition = config.programs.opencode.enable; + message = '' + The opencode module now supports enhanced customization with custom commands and agents. + + You can now define custom commands and agents for opencode in two ways: + + - Inline content as strings + - File paths to external markdown files + + Example configuration: + + programs.opencode = { + commands = { + # Inline content + changelog = ''' + # Update Changelog Command + Update CHANGELOG.md with new entries. + '''; + # File path + fix-issue = ./commands/fix-issue.md; + }; + + agents = { + # Inline content + code-reviewer = ''' + # Code Reviewer Agent + Specialized code review assistant. + '''; + # File path + documentation = ./agents/documentation.md; + }; + }; + + Commands are stored in ~/.config/opencode/command/ and agents in ~/.config/opencode/agent/. + ''; +}