feat(aichat): add roles support and update model names
Some checks failed
Flake checker / Build Nix targets (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-08-20 01:05:28 +05:30
parent c2ab1a4cd1
commit a656221dd2
2 changed files with 24 additions and 4 deletions

View File

@@ -124,7 +124,7 @@
name = "gpt-3.5-turbo";
}
{
name = "gpt-4o";
name = "gpt-5-nano";
}
{
name = "o4-mini-high";
@@ -153,5 +153,17 @@
}
];
};
roles = {
"%git-commit%" =
/*
md
*/
''
---
model: openai:gpt-4o
---
Your task is to generate a concise and informative commit message based on the provided diff. Use the conventional commit format, which includes a type (feat, fix, chore, docs, style, refactor, perf, test) and an optional scope. The message should be in the imperative mood and should not exceed 72 characters in the subject line. Don't include any additional text or explanations, just the commit message.
'';
};
};
}

View File

@@ -75,7 +75,11 @@ in {
settings = lib.mkOption {
type = yamlFormat.type;
description = "Options";
description = "Settings";
};
roles = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "Roles for the AI chat clients";
};
};
};
@@ -102,7 +106,11 @@ in {
programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration;
programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration nuIntegration;
xdg.configFile."aichat/config.yaml".source =
yamlFormat.generate "config.yaml" cfg.settings;
xdg.configFile =
{
"aichat/config.yaml".source =
yamlFormat.generate "config.yaml" cfg.settings;
}
// (mapAttrs' (name: role: nameValuePair "aichat/roles/${name}.md" {text = role;}) cfg.roles);
};
}