Skip to content

Fluent Dialog #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 11, 2025
Merged

Fluent Dialog #1

merged 11 commits into from
Mar 11, 2025

Conversation

adriand-ghb
Copy link
Owner

Description

Initial implementation for fluent dialogs.

Similar with a durable function, a FluentDialog uses event sourcing to enable arbitrarily complex user interactions in a seemingly uninterrupted execution flow.
Behind the scenes, the yield operator in the dialog flow function yields control of the execution thread back to a dialog flow dispatcher. The dispatcher then commits any new actions that the dialog flow function scheduled (such as starting a child dialog, receiving an activity or making an async call) to storage. The transparent commit action updates the execution history of the dialog flow by appending all new events into the dialog state, much like an append-only log.
Once the history is updated, the dialog ends its turn and, when it is later resumed, the dispatcher re-executes the entire function from the start to rebuild the local state.
During the replay, if the code tries to begin a child dialog (or do any async work), the dispatcher consults the execution history, replays that result and the function code continues to run.
The replay continues until the function code is finished or until it yields a new suspension task.

Specific Changes

Added FluentDialog, related interfaces and their implementation classes.

Testing

Unit tests included

@adriand-ghb adriand-ghb self-assigned this Mar 11, 2025
@adriand-ghb adriand-ghb merged commit ec7ff2d into main Mar 11, 2025
@adriand-ghb adriand-ghb deleted the adriand/dialog-functional branch March 12, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants