Add aichat-wrapper script to dwm configuration

- Add a new script to the dwm configuration that allows for easy selection
and use of different AI models using the aichat command line interface.
This commit is contained in:
Sam 2024-06-22 21:10:15 +01:00
parent aef3c1c1ce
commit 5c7a624c94
2 changed files with 13 additions and 0 deletions

View File

@ -26,6 +26,7 @@
./scripts/clipboard-recall.nix
./scripts/get-focused-monitor.nix
./scripts/git-commit-ai.nix
./scripts/aichat-wrapper.nix
];
home.packages = [

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellScriptBin "aichat-wrapper" ''
#!/usr/bin/env bash
model=$(${pkgs.aichat}/bin/aichat --list-models | ${pkgs.fzf}/bin/fzf)
${pkgs.aichat}/bin/aichat --model "$model"
'')
];
}