Type for conversation-scoped state
Type for user-scoped state
Type for conversation-scoped state
Type for user-scoped state
Sets the conversation-scoped state.
The new conversation state object
Gets whether the state has been loaded from storage
True if the state has been loaded, false otherwise
Gets a specific state scope by name.
The name of the scope to retrieve
The state entry for the scope, or undefined if not found
Gets a value from state by dot-notation path.
The type of the value to retrieve
The path to the value
The value at the specified path
Loads state from storage into memory.
The turn context
Optionalstorage: StorageOptional storage provider (if not provided, state will be in-memory only)
If true, forces a reload from storage even if state is already loaded
Promise that resolves to true if state was loaded, false if it was already loaded
ProtectedonProtectedComputes the storage keys for each scope based on the turn context.
The turn context
Promise that resolves to a dictionary of scope names to storage keys
Saves state changes to storage.
The turn context
Optionalstorage: StorageOptional storage provider (if not provided, state changes won't be persisted)
Promise that resolves when the save operation is complete
Base class defining a collection of turn state scopes.
Remarks
Developers can create a derived class that extends
TurnStateto add additional state scopes.Example