@elsikora/commitizen-plugin-commitlint-ai
Version:
AI-powered Commitizen adapter with Commitlint integration
29 lines (28 loc) • 1.08 kB
TypeScript
type TCommit = (message: string) => void;
/**
* Main adapter for Commitizen integration
*/
export declare class CommitizenAdapter {
private readonly CONTAINER;
constructor();
/**
* Main entry point for commitizen
* @param {unknown} _inquirerIns - Instance passed by commitizen (unused in our implementation)
* @param {TCommit} commit - Callback to execute with complete commit message
*/
prompter(_inquirerIns: unknown, commit: TCommit): Promise<void>;
/**
* Extract LLM prompt context from commitlint rules and prompts
* @param {QualifiedRules} rules - The commitlint rules
* @param {UserPromptConfig} prompts - The user prompt configuration
* @returns {ILlmPromptContext} The extracted LLM prompt context
*/
private extractLlmPromptContext;
/**
* Get API key prompt information based on provider
* @param {string} provider - The LLM provider name
* @returns {{ hint: string; prompt: string }} The hint and prompt text for API key input
*/
private getApiKeyPromptInfo;
}
export {};