Documentation - v1.2.0-alpha.3
    Preparing search index...

    Waits for an activity to be received.

    This prompt requires a validator be passed in and is useful when waiting for non-message activities like an event to be received. The validator can ignore received events until the expected activity is received.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    EndOfTurn: DialogTurnResult = ...

    Gets a default end-of-turn result.

    This result indicates that a dialog (or a logical step within a dialog) has completed processing for the current turn, is still active, and is waiting for more input.

    Accessors

    Methods

    • Called when a prompt dialog is the active dialog and the user replied with a new activity.

      Parameters

      • dialogContext: DialogContext

        The DialogContext for the current turn of conversation.

      Returns Promise<DialogTurnResult<any>>

      A Promise representing the asynchronous operation.

      If the promise is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. The prompt generally continues to receive the user's replies until it accepts the user's reply as valid input for the prompt.

    • An encoded string used to aid in the detection of agent changes on re-deployment.

      Returns string

      Unique string which should only change when dialog has changed in a way that should restart the dialog.

      This defaults to returning the dialog's id but can be overridden to provide more precise change detection logic. Any dialog on the stack that has its version change will result in a versionChanged event will be raised. If this event is not handled by the agent, an error will be thrown resulting in the agent error handler logic being run.

      Returning an empty string will disable version tracking for the component all together.

    • Called when a unique ID needs to be computed for a dialog.

      Returns string

      SHOULD be overridden to provide a more contextually relevant ID. The preferred pattern for ID's is <dialog type>(this.hashedLabel('<dialog args>')).

    • Called after an event was bubbled to all parents and wasn't handled.

      Parameters

      Returns Promise<boolean>

      Whether the event is handled by the current dialog and further processing should stop.

      This is a good place to perform default processing logic for an event. Returning true will prevent any processing of the event by child dialogs.

    • Called before an event is bubbled to its parent.

      Parameters

      Returns Promise<boolean>

      Whether the event is handled by the current dialog and further processing should stop.

      This is a good place to perform interception of an event as returning true will prevent any further bubbling of the event to the dialogs parents and will also prevent any child dialogs from performing their default processing.

    • When overridden in a derived class, prompts the user for input.

      Parameters

      • context: TurnContext

        TurnContext, context for the current turn of conversation with the user.

      • state: object

        Contains state for the current instance of the prompt on the dialog stack.

      • options: PromptOptions

        A PromptOptions object constructed from the options initially provided in the call to Prompt.

      • isRetry: boolean

        A boolean representing if the prompt is a retry.

      Returns Promise<void>

      A Promise representing the asynchronous operation.