Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SystemAct

Base type for system dialog acts.

Each SystemAct represents a precise 'piece of information' that is to be communicated to the user. Each SystemAct is to be associated with a Control that can be used to render it.

There are two more specific base classes that should be used as the base for user-defined SystemActs:

  • ContentAct: the base class for System Acts that just communicate some information.
  • InitiativeAct: the base class for System Acts that ask a question or otherwise encourage the user to continue the conversation.

Usage:

  • Add SystemActs to the result in Control.canHandle and Control.takeInitiative to represent what the system wants to communicate.
  • Convert the SystemActs into surface forms (prompts, APL, etc) during the render phase.
  • Always extend ContentAct or InitiativeAct rather than this base type.
  • Introduce new System Acts whenever the available acts are not suitable or precise enough.

Hierarchy

Implements

Constructors

Properties

Methods

Constructors

constructor

  • Creates an instance of SystemAct.

    Each system act represent a specific 'atom of dialog' the system wishes to communicate to the user.

    Usage:

    • New acts should generally extend InitiativeAct or ContentAct rather than this class, to improve readability.

    Parameters

    • control: Control
    • props: object
      • takesInitiative: boolean

    Returns SystemAct

Properties

control

control: Control

takesInitiative

takesInitiative: boolean

Methods

Abstract render

  • Render the dialog act.

    This is the one-size-fits-all direct rendering of a dialog act. This is often appropriate for custom acts that are not used by a shared control.

    Framework behavior:

    • Shared controls cannot rely on a one-size-fits-all rendering and so they provide their own appropriate defaults and props that allow the developer to override the defaults.

    Parameters

    Returns void

toString

  • toString(): string
  • Produces a string representation of the SystemAct.

    The associated Control.id is included but the complete details of the associate Control are omitted for brevity.

    Returns string