UNPKG

@elsikora/commitizen-plugin-commitlint-ai

Version:
19 lines (18 loc) 1.06 kB
import type { CommitMessage } from '../../domain/entity/commit-message.entity'; import type { LLMConfiguration } from '../../domain/entity/llm-configuration.entity'; import type { ILlmPromptContext, ILlmService } from '../interface/llm-service.interface'; /** * Use case for generating commit messages */ export declare class GenerateCommitMessageUseCase { private readonly LLM_SERVICES; constructor(llmServices: Array<ILlmService>); /** * Execute the commit message generation * @param {ILlmPromptContext} context - The context for generating the commit message * @param {LLMConfiguration} configuration - The LLM configuration * @param {(attempt: number, maxRetries: number, error: Error) => void} onRetry - Callback function called on retry attempts * @returns {Promise<CommitMessage>} Promise resolving to the generated commit message */ execute(context: ILlmPromptContext, configuration: LLMConfiguration, onRetry?: (attempt: number, maxRetries: number, error: Error) => void): Promise<CommitMessage>; }