opencode: wire commands

This commit is contained in:
Sridhar Ratnakumar 2026-03-11 21:56:53 -04:00
parent f13b2406c6
commit 0e07a3fbc2
2 changed files with 13 additions and 2 deletions

View file

@ -1,11 +1,22 @@
{ pkgs, ... }:
{ flake, lib, pkgs, ... }:
let
inherit (flake.inputs) AI;
juspayProvider = import ./juspay;
commandsDir = AI + "/commands";
autoCommands = if builtins.pathExists commandsDir then
lib.mapAttrs'
(fileName: _: lib.nameValuePair
(lib.removeSuffix ".md" fileName)
(commandsDir + "/${fileName}"))
(builtins.readDir commandsDir)
else { };
in
{
programs.opencode = {
enable = true;
package = pkgs.opencode;
commands = autoCommands;
settings = {
model = "litellm/glm-latest";
# Explore agent for fast codebase search/reading tasks

2
vendor/AI vendored

@ -1 +1 @@
Subproject commit d4fec34a2750439093ce5bcffdaa430ddea6d734
Subproject commit 957882d54641938a538a08bbf61c5195261c1052