Member Junction
    Preparing search index...

    Emitted when the engine needs user input during interactive mode.

    The frontend must call Resolve with the user's answer to unblock the engine. In --yes mode, prompts are auto-resolved with defaults and this event is not emitted.

    engine.On('prompt', (e) => {
    if (e.PromptType === 'select') {
    // Show choices to user and resolve with selected value
    const choice = showSelectDialog(e.Message, e.Choices!);
    e.Resolve(choice);
    } else {
    e.Resolve(readline.question(e.Message));
    }
    });
    interface PromptEvent {
        Choices?: { Label: string; Value: string }[];
        Default?: string;
        Message: string;
        PromptId: string;
        PromptType: "input" | "confirm" | "select";
        Resolve: (answer: string) => void;
        Type: "prompt";
    }
    Index

    Properties

    Choices?: { Label: string; Value: string }[]

    Available choices (present only for 'select' prompts).

    Default?: string

    Default value to use if the user presses Enter without input.

    Message: string

    Question or instruction to display to the user.

    PromptId: string

    Unique identifier for this prompt (e.g., 'db-host', 'version-select').

    PromptType: "input" | "confirm" | "select"

    Type of input expected from the user.

    Resolve: (answer: string) => void

    Callback that the frontend must invoke with the user's answer. Calling this unblocks the engine to continue execution.

    Type: "prompt"

    Event type discriminator.