DialogManager class

Class which runs the dialog system.

Extends

Constructors

DialogManager(Dialog<{}>, string)

Creates an instance of the DialogManager class.

Properties

conversationState

Conversation-scoped state used to persist the dialog stack.

dialogs

Dialogs available to the manager, including the root dialog and registered containers.

expireAfter

Inactivity period in milliseconds after which conversation state is cleared.

initialTurnState

Values that will be copied to the TurnContext.turnState at the beginning of each turn.

rootDialog

Gets the root Dialog ID.

stateConfiguration

Optional configuration applied when managing dialog state.

userState

Optional user-scoped state available to dialogs.

Methods

configure(Partial<DialogManagerConfiguration>)

Set configuration settings.

onTurn(TurnContext)

Runs dialog system in the context of a TurnContext.

Inherited Methods

getConverter(string)

Gets the converter for the selector configuration. *

Constructor Details

DialogManager(Dialog<{}>, string)

Creates an instance of the DialogManager class.

new DialogManager(rootDialog?: Dialog<{}>, dialogStateProperty?: string)

Parameters

rootDialog

Dialog<{}>

Optional, root Dialog to use.

dialogStateProperty

string

Optional, alternate name for the dialogState property. (Default is "DialogStateProperty")

Property Details

conversationState

Conversation-scoped state used to persist the dialog stack.

conversationState: ConversationState

Property Value

dialogs

Dialogs available to the manager, including the root dialog and registered containers.

dialogs: DialogSet

Property Value

expireAfter

Inactivity period in milliseconds after which conversation state is cleared.

expireAfter?: number

Property Value

number

initialTurnState

Values that will be copied to the TurnContext.turnState at the beginning of each turn.

TurnContextStateCollection initialTurnState

Property Value

The turn state collection.

rootDialog

Gets the root Dialog ID.

Dialog rootDialog

Property Value

The root Dialog ID.

stateConfiguration

Optional configuration applied when managing dialog state.

stateConfiguration?: DialogStateManagerConfiguration

Property Value

userState

Optional user-scoped state available to dialogs.

userState?: UserState

Property Value

Method Details

configure(Partial<DialogManagerConfiguration>)

Set configuration settings.

function configure(config: Partial<DialogManagerConfiguration>): this

Parameters

config

Partial<DialogManagerConfiguration>

Configuration settings to apply.

Returns

this

The cofigured DialogManager context.

onTurn(TurnContext)

Runs dialog system in the context of a TurnContext.

function onTurn(context: TurnContext): Promise<DialogManagerResult>

Parameters

context
TurnContext

TurnContext for the current turn of conversation with the user.

Returns

Result of running the logic against the activity.

Inherited Method Details

getConverter(string)

Gets the converter for the selector configuration. *

function getConverter(_property: string): Converter<unknown, unknown> | ConverterFactory

Parameters

_property

string

The key of the conditional selector configuration. *

Returns

Converter<unknown, unknown> | ConverterFactory

The converter for the selector configuration.

Inherited From Configurable.getConverter