/** * Interactive Question Handler Service * * Handles clarifying questions from LLM responses by prompting the user * via console for answers before proceeding with file modifications. * * This service is used during pipeline execution when the "refine" stage * produces clarifying questions that need user input. */ import { type PromptAdapter } from '../ui/prompt-adapter.interface.js'; /** * Structure of a clarifying question from the refine-requirements prompt */ export interface ClarifyingQuestion { context?: string; id: string; options: string[]; priority: 'P0' | 'P1' | 'P2'; question: string; } /** * User's answer to a clarifying question */ export interface QuestionAnswer { customAnswer?: string; question: string; questionId: string; selectedOption: string; } /** * Result of processing all clarifying questions */ export interface InteractiveQuestionResult { answeredCount: number; answers: QuestionAnswer[]; skipped: boolean; summary: string; } export declare class InteractiveQuestionHandlerService { private readonly color; private readonly console; private readonly logger; private readonly promptAdapter; constructor(promptAdapter?: PromptAdapter); /** * Check if stage outputs contain clarifying questions that need user input */ hasQuestions(stageOutputs: Record): boolean; /** * Extract clarifying questions from stage outputs */ extractQuestions(stageOutputs: Record): ClarifyingQuestion[]; /** * Validate that an object is a valid ClarifyingQuestion */ private isValidQuestion; /** * Prompt user for answers to all clarifying questions */ promptForAnswers(questions: ClarifyingQuestion[]): Promise; /** * Display header before prompting questions */ private displayQuestionsHeader; /** * Prompt user for a single question */ private promptSingleQuestion; /** * Build a summary of all answers for display and storage */ private buildAnswersSummary; /** * Format answers for passing to subsequent pipeline stages */ formatAnswersForStage(answers: QuestionAnswer[]): Record; } export declare function getInteractiveQuestionHandler(): InteractiveQuestionHandlerService; //# sourceMappingURL=interactive-question-handler.service.d.ts.map