From 4ecc45a4bd0fd7d36613445cb76296a6f79831bf Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 6 Dec 2024 12:02:35 +0000 Subject: [PATCH] feat(git.nix): add `ais` alias for staged diffs - Introduced `ais` alias to generate commit messages from staged diffs using `aichat` - The alias runs `git diff --staged HEAD` and pipes the output to `aichat` with the specified model and request type --- roles/home/git.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home/git.nix b/roles/home/git.nix index eb2b819..202343d 100644 --- a/roles/home/git.nix +++ b/roles/home/git.nix @@ -15,6 +15,7 @@ lfs.enable = true; aliases = { ai = ''! cd -- "''${GIT_PREFIX:-.}" && git diff HEAD -- "$@" | aichat -m ollama:pino-coder -r commitmessage #''; + ais = ''! cd -- "''${GIT_PREFIX:-.}" && git diff --staged HEAD -- "$@" | aichat -m ollama:pino-coder -r commitmessage #''; }; }; home.packages = [ pkgs.git-lfs ];