mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
Adds support for custom tools - user-defined functions that the LLM can call during conversations. Custom tools work alongside opencode's built-in tools and are configured through the new `tools` option. The configuration follows the same pattern as other opencode settings like `agents` and `commands`, supporting: - Inline TypeScript content - Individual file paths - Bulk directory imports
14 lines
292 B
Nix
14 lines
292 B
Nix
{
|
|
programs.opencode = {
|
|
enable = true;
|
|
tools = {
|
|
test-tool = ./test-tool.ts;
|
|
};
|
|
};
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/opencode/tool/test-tool.ts
|
|
assertFileContent home-files/.config/opencode/tool/test-tool.ts \
|
|
${./test-tool.ts}
|
|
'';
|
|
}
|