bodhi-commit-genius-js
Version:
🚀 Smart commit message generator with AI - supports local LLMs and cloud APIs
30 lines (29 loc) • 849 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Config = void 0;
const conf_1 = __importDefault(require("conf"));
class Config {
constructor() {
this.conf = new conf_1.default({
projectName: 'commit-genius-js',
defaults: {
provider: 'ollama',
model: 'codellama',
conventionalCommits: true,
template: '{type}: {description}'
}
});
}
get(key) {
return this.conf.get(key);
}
set(config) {
for (const [key, value] of Object.entries(config)) {
this.conf.set(key, value);
}
}
}
exports.Config = Config;