UNPKG

@elsikora/commitizen-plugin-commitlint-ai

Version:
25 lines (24 loc) 1.02 kB
import type { QualifiedRules, UserPromptConfig } from "@commitlint/types"; import type { ILlmPromptContext } from '../interface/llm-service.interface'; /** * Service for extracting LLM prompt context from commitlint configuration */ export declare class PromptContextExtractorService { private readonly TYPE_ENUM_INDEX; /** * 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 */ extractContext(rules: QualifiedRules, prompts: UserPromptConfig): ILlmPromptContext; /** * 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 */ getApiKeyPromptInfo(provider: string): { hint: string; prompt: string; }; }