DialogContextMemoryScope class

A memory scope that provides access to the dialog context. This scope includes information about the active dialog, its parent, and the dialog stack.

Extends

Constructors

DialogContextMemoryScope()

Initializes a new instance of the DialogContextMemoryScope class.

Inherited Properties

includeInSnapshot

Indicates whether this scope is included in memory snapshots.

name

Name used to address this memory scope.

Methods

getMemory(DialogContext)

Gets the backing memory for this scope.

Inherited Methods

delete(DialogContext)

Deletes the backing memory for a scope.

load(DialogContext)

Loads a scopes backing memory at the start of a turn.

saveChanges(DialogContext)

Saves a scopes backing memory at the end of a turn.

setMemory(DialogContext, object)

Changes the backing object for the memory scope.

Constructor Details

DialogContextMemoryScope()

Initializes a new instance of the DialogContextMemoryScope class.

new DialogContextMemoryScope()

Inherited Property Details

includeInSnapshot

Indicates whether this scope is included in memory snapshots.

includeInSnapshot: boolean

Property Value

boolean

Inherited From MemoryScope.includeInSnapshot

name

Name used to address this memory scope.

name: string

Property Value

string

Inherited From MemoryScope.name

Method Details

getMemory(DialogContext)

Gets the backing memory for this scope.

function getMemory(dialogContext: DialogContext): Record<"stack" | "activeDialog" | "parent", unknown>

Parameters

dialogContext
DialogContext

The DialogContext object for this turn.

Returns

Record<"stack" | "activeDialog" | "parent", unknown>

An object containing the dialog stack, active dialog ID, and parent dialog ID.

Inherited Method Details

delete(DialogContext)

Deletes the backing memory for a scope.

function delete(_dialogContext: DialogContext): Promise<void>

Parameters

_dialogContext
DialogContext

Current dialog context.

Returns

Promise<void>

Inherited From MemoryScope.delete

load(DialogContext)

Loads a scopes backing memory at the start of a turn.

function load(_dialogContext: DialogContext): Promise<void>

Parameters

_dialogContext
DialogContext

Current dialog context.

Returns

Promise<void>

Inherited From MemoryScope.load

saveChanges(DialogContext)

Saves a scopes backing memory at the end of a turn.

function saveChanges(_dialogContext: DialogContext): Promise<void>

Parameters

_dialogContext
DialogContext

Current dialog context.

Returns

Promise<void>

Inherited From MemoryScope.saveChanges

setMemory(DialogContext, object)

Changes the backing object for the memory scope.

function setMemory(_dialogContext: DialogContext, _memory: object)

Parameters

_dialogContext
DialogContext

Current dialog context

_memory

object

memory to assign

Inherited From MemoryScope.setMemory