Skip to content

Porting Dialogs system from BotFramework#372

Closed
rodrigobr-msft wants to merge 33 commits into
mainfrom
users/robrandao/dialogs
Closed

Porting Dialogs system from BotFramework#372
rodrigobr-msft wants to merge 33 commits into
mainfrom
users/robrandao/dialogs

Conversation

@rodrigobr-msft
Copy link
Copy Markdown
Contributor

@rodrigobr-msft rodrigobr-msft commented Apr 16, 2026

PR Description

Port BotFramework Dialogs Package and Sample Restructuring

** Dialogs Package**

  • Ported BotFramework dialogs system to Microsoft Agents SDK
  • Includes dialog memory management, state persistence, and navigation utilities

** Additional Changes**

  • Test Sample Restructuring: Reorganized existing authentication samples (fic/, mi/, bizchat-sso/) for better discoverability
  • Testing Framework: Added ActivityHandlerScenario to the testing package for scenario-based test validation

Primary focus is porting the dialogs system with supporting changes to improve developer experience and testing infrastructure.

Copilot AI review requested due to automatic review settings April 16, 2026 22:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports the BotFramework Dialogs system into the Microsoft Agents SDK Python repo by introducing a new microsoft-agents-hosting-dialogs package (dialogs, prompts, choices, memory scopes) plus a dialogs sample app and extensive test coverage to validate core dialog behaviors.

Changes:

  • Added a new microsoft-agents-hosting-dialogs library implementing dialogs (Waterfall/DialogSet/DialogContext), prompts, choice recognition, and memory scopes/path resolvers.
  • Added a dialogs sample (test_samples/dialogs) showing a multi-step UserProfileDialog running on aiohttp.
  • Added a broad set of unit/integration-style tests for dialogs, prompts, and choices; updated a few core/activity types for compatibility.

Reviewed changes

Copilot reviewed 136 out of 142 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tests/hosting_dialogs/test_waterfall_step_context.py Tests WaterfallStepContext behavior (next(), properties).
tests/hosting_dialogs/test_waterfall_dialog.py Validates WaterfallDialog argument handling + non-message continuation.
tests/hosting_dialogs/test_text_prompt.py End-to-end TextPrompt flows (validator/retry).
tests/hosting_dialogs/test_skill_dialog.py Placeholder/skip for skill dialog tests not supported yet.
tests/hosting_dialogs/test_replace_dialog.py Tests replace_dialog behavior across component dialogs/waterfalls.
tests/hosting_dialogs/test_prompt_validator_context.py Minimal PromptValidatorContext test scaffolding.
tests/hosting_dialogs/test_prompt_culture_models.py Tests locale normalization + supported cultures.
tests/hosting_dialogs/test_object_path.py Tests ObjectPath assign/get/set/remove path utilities.
tests/hosting_dialogs/test_dialog_set.py Tests DialogSet construction + telemetry propagation.
tests/hosting_dialogs/test_dialog_extensions.py Tests DialogExtensions run + reprompt event handling.
tests/hosting_dialogs/test_dialog_context.py Tests DialogContext validation + basic stack operations.
tests/hosting_dialogs/test_dialog.py Tests Dialog base class default behaviors.
tests/hosting_dialogs/test_date_time_prompt.py End-to-end DateTimePrompt scenario using recognizers.
tests/hosting_dialogs/memory/scopes/test_settings.py Test config object for settings scope tests.
tests/hosting_dialogs/memory/scopes/init.py Package init for memory scope tests.
tests/hosting_dialogs/memory/init.py Package init for memory tests.
tests/hosting_dialogs/choices/test_choice_tokenizer.py Tests default tokenizer token boundaries + normalization.
tests/hosting_dialogs/choices/test_choice_recognizers.py Tests choice/value recognition behaviors.
tests/hosting_dialogs/choices/test_choice_factory_options.py Tests ChoiceFactoryOptions round-trips.
tests/hosting_dialogs/choices/test_choice_factory.py Tests ChoiceFactory rendering (inline/list/suggested/hero).
tests/hosting_dialogs/choices/test_choice.py Tests Choice model properties.
tests/hosting_dialogs/choices/test_channel.py Tests channel capability helpers.
tests/hosting_dialogs/choices/init.py Package init for choices tests.
tests/hosting_dialogs/init.py Package init for dialogs tests.
test_samples/dialogs/src/user_profile_dialog.py Sample ComponentDialog implementing a profile wizard flow.
test_samples/dialogs/src/user_profile.py Sample state model for the dialog.
test_samples/dialogs/src/main.py aiohttp entrypoint wiring adapter/state/dialog agent.
test_samples/dialogs/src/dialog_helper.py Helper to run a dialog from a bot turn.
test_samples/dialogs/src/agent.py Sample ActivityHandler-based agent hosting dialogs.
test_samples/dialogs/src/init.py Package init for sample.
test_samples/dialogs/requirements.txt Sample dependencies list.
test_samples/dialogs/env.TEMPLATE Sample env template for auth/logging.
libraries/microsoft-agents-hosting-dialogs/setup.py Packaging/install requirements for hosting-dialogs.
libraries/microsoft-agents-hosting-dialogs/readme.md Package README + quickstart.
libraries/microsoft-agents-hosting-dialogs/pyproject.toml Project metadata for hosting-dialogs package.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/waterfall_step_context.py Implements WaterfallStepContext over DialogContext.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/waterfall_dialog.py Implements WaterfallDialog execution + telemetry.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/skills/skill_dialog_options.py Options model for SkillDialog configuration.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/skills/begin_skill_dialog_options.py Helper model for begin-skill options extraction.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/skills/init.py Skills exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/text_prompt.py Implements TextPrompt prompt/recognize.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/prompt_validator_context.py Implements PromptValidatorContext (incl. attempt_count).
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/prompt_validator.py Prompt validator type/module placeholder.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/prompt_recognizer_result.py Recognizer result model for prompts.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/prompt_options.py PromptOptions container for prompt configuration.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/prompt_culture_models.py Locale/culture models + normalization helper.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/prompt.py Core Prompt base class (prompting/validation/choices).
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/oauth_prompt_settings.py OAuthPrompt settings container.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/number_prompt.py Implements NumberPrompt via recognizers + babel parsing.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/datetime_resolution.py DateTime resolution model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/datetime_prompt.py Implements DateTimePrompt via recognizers-date-time.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/confirm_prompt.py Implements ConfirmPrompt with locale-aware yes/no.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/choice_prompt.py Implements ChoicePrompt with recognition + rendering.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/attachment_prompt.py Implements AttachmentPrompt.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/activity_prompt.py Implements ActivityPrompt for non-message waits.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/init.py Prompts exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/persisted_state_keys.py PersistedStateKeys container.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/persisted_state.py PersistedState container.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/dialog_turn_status.py DialogTurnStatus enum.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/dialog_turn_result.py DialogTurnResult model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/dialog_reason.py DialogReason enum.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/dialog_instance.py DialogInstance model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/dialog_events.py DialogEvents constants.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/dialog_event.py DialogEvent model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/models/init.py Models exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/user_memory_scope.py User memory scope binding to UserState.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/turn_memory_scope.py Turn scope + case-insensitive dict.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/this_memory_scope.py “this” memory scope for active dialog state.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/settings_memory_scope.py Read-only settings scope.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/memory_scope.py Base MemoryScope abstraction.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/dialog_memory_scope.py Dialog scope binding behavior for container/parent.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/dialog_context_memory_scope.py Dialog context scope snapshot (stack/active/parent).
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/dialog_class_memory_scope.py Dialog class scope returns deepcopy of active/parent dialog.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/conversation_memory_scope.py Conversation memory scope binding to ConversationState.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/class_memory_scope.py Class scope binding for dialog-bound properties.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/bot_state_memory_scope.py BotStateMemoryScope for AgentState/CachedAgentState.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/init.py Memory scopes exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scope_path.py Scope path constants.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/percent_path_resolver.py “%” alias path resolver.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/hash_path_resolver.py “#” alias path resolver.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/dollar_path_resolver.py “$” alias path resolver.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/at_path_resolver.py “@” entity alias path resolver.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/at_at_path_resolver.py “@@” entity alias path resolver.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/alias_path_resolver.py Base alias path resolver.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolvers/init.py Path resolvers exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/path_resolver_base.py PathResolverBase abstraction.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/dialog_state_manager_configuration.py DialogStateManager configuration model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/dialog_path.py DialogPath constants + helper.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/component_path_resolvers_base.py Component path resolver registration base.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/component_memory_scopes_base.py Component memory scopes registration base.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/init.py Memory exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_state.py DialogState model for dialog stack.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_set.py DialogSet container + telemetry propagation + create_context.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_manager_result.py DialogManagerResult model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_manager.py DialogManager orchestration + expire_after logic.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_extensions.py Dialog run loop + skill EoC/reprompt handling.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_container.py Abstract base for container dialogs.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_component_registration.py Registers default memory scopes + path resolvers.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog.py Dialog base type + event bubbling hooks.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/tokenizer.py Default tokenizer implementation.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/token.py Token model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/sorted_value.py SortedValue model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/model_result.py ModelResult model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/list_style.py ListStyle enum.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/found_value.py FoundValue model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/found_choice.py FoundChoice model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/find_values_options.py FindValuesOptions model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/find_choices_options.py FindChoicesOptions model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/choice_factory_options.py ChoiceFactoryOptions model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/choice.py Choice model.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/models/init.py Choice models exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/choice_recognizer.py ChoiceRecognizers implementation (name/ordinal/number).
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/channel.py Channel capability helpers for rendering choices/actions.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/choices/init.py Choices exports.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/_user_token_access.py Internal helper for OAuth token operations via adapter.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/_telemetry_client.py Telemetry client interface + null implementation.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/_component_registration.py ComponentRegistration registry for scopes/resolvers.
libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/init.py Package exports for dialogs library.
libraries/microsoft-agents-hosting-dialogs/LICENSE License for the new package.
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/state/agent_state.py Ensures default factories persist into cached state.
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/message_factory.py Expands typing to allow None for text/speak/input_hint.
libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/connector/user_token_base.py Improves typing for optional token params.
libraries/microsoft-agents-activity/microsoft_agents/activity/suggested_actions.py Adds default_factory for to field (empty list by default).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libraries/microsoft-agents-hosting-dialogs/setup.py
Comment thread test_samples/compat/dialogs/multi_turn/src/agent.py
Copilot AI review requested due to automatic review settings April 16, 2026 22:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 147 out of 155 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/hosting_dialogs/choices/test_choice_tokenizer.py Outdated
Comment thread test_samples/compat/dialogs/multi_turn/src/main.py
Comment thread dev/testing/python-sdk-tests/.infra.json Outdated
Copilot AI review requested due to automatic review settings April 17, 2026 18:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 166 out of 208 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test_samples/compat/dialogs/complex_dialog/src/main.py
Copilot AI review requested due to automatic review settings April 17, 2026 19:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 168 out of 210 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 17, 2026 20:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 169 out of 211 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/hosting_dialogs/test_prompt_validator_context.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 174 out of 215 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 20, 2026 18:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 174 out of 215 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (8)

libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/confirm_prompt.py:1

  • ConfirmPrompt should return a boolean result, but recognize_boolean() typically yields a string value (e.g., 'true'/'false') in resolution['value']. Returning a non-empty string will evaluate truthy and can break downstream code like if step.result:. Convert the recognized value to a real bool (e.g., map strings to True/False, or handle already-boolean values) before assigning result.value.
    libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/prompts/confirm_prompt.py:1
  • This exception is raised from on_recognize() but the message says ConfirmPrompt.on_prompt(). Update the message to reference ConfirmPrompt.on_recognize() so errors are easier to diagnose.
    libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/memory/scopes/dialog_memory_scope.py:1
  • Using parent_state or dc_state will incorrectly fall back to dc_state when parent_state is a valid but falsy value (e.g., an empty dict). This changes binding semantics for container dialogs. Prefer an explicit None check (return parent_state when it is not None, otherwise return dc_state).
    libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_set.py:1
  • The constructor uses inspect.currentframe() and only deletes frame, but keeps current_frame alive. Frame objects can participate in reference cycles; to avoid leaking references, also delete current_frame in the finally block (along with frame).
    libraries/microsoft-agents-hosting-dialogs/microsoft_agents/hosting/dialogs/dialog_extensions.py:1
  • This sends a full memory snapshot trace on every turn unconditionally. Depending on channel behavior, trace activities (and their payloads) may be logged or surfaced, which can leak PII/state and adds operational noise (larger payloads per turn). Consider gating this behind an explicit debug flag/config, limiting it to emulator/dev channels, or using a dedicated trace helper that is known to be suppressed outside dev tooling.
    libraries/microsoft-agents-hosting-dialogs/setup.py:1
  • If VERSION.txt is missing and PackageVersion isn't set, this falls back to 0.0.0 and will emit an invalid dependency pin (microsoft-agents-hosting-core==0.0.0). Instead of silently defaulting, consider failing the build with a clear error when the version cannot be determined, or avoid exact-version pinning in this fallback path.
    test_samples/activity_handler/dialogs/custom_dialogs/src/root_dialog.py:1
  • Correct 'show sizes' to 'shoe sizes' in the comment.
    test_samples/activity_handler/dialogs/multi_turn/src/agent.py:1
  • Correct 'ocurred' to 'occurred' in the comment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 21, 2026 20:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 168 out of 209 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libraries/microsoft-agents-hosting-dialogs/readme.md
Comment thread dev/hosting_dialogs/test_dialog_set.py
Comment thread dev/hosting_dialogs/choices/test_choice_factory_options.py
Copilot AI review requested due to automatic review settings April 22, 2026 17:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 191 out of 231 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test_samples/compat/dialogs/user_auth/src/logout_dialog.py
Comment thread dev/hosting_dialogs/memory/scopes/test_settings.py
Comment thread test_samples/compat/dialogs/oauth_prompt/src/create_profile_card.py
axelsrz
axelsrz previously approved these changes Apr 28, 2026
Copilot AI review requested due to automatic review settings April 28, 2026 22:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 189 out of 229 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (5)

test_samples/compat/teams_agent/app.py:17

  • These imports reference test_samples.activity_handler..., but there is no test_samples/activity_handler package in the repo (the code is under test_samples/compat/...). As-is, running the sample will fail with ModuleNotFoundError. Either update the imports to match the actual folder structure (e.g., relative imports within compat/teams_agent) or add the missing package/module path.
    test_samples/compat/teams_agent/teams_sso.py:11
  • This import points at test_samples.activity_handler..., but that package path doesn't exist in the repo (the module is in test_samples/compat/teams_agent/graph_client.py). Update the import to the correct location or add the missing package structure so this sample runs.
    test_samples/compat/teams_agent/teams_multi_feature.py:19
  • These imports reference test_samples.activity_handler..., but the referenced package path doesn't exist in the repo (the helpers live under test_samples/compat/teams_agent/helpers). Update to the correct import path (or add the missing package) to avoid runtime ModuleNotFoundError.
    test_samples/compat/agent_to_agent/agent_1/app.py:25
  • These imports reference test_samples.activity_handler..., but there is no test_samples/activity_handler package in the repo. This will raise ModuleNotFoundError when running the sample. Either revert to local/relative imports within test_samples/compat/agent_to_agent/agent_1 or add the missing package structure.
    test_samples/compat/agent_to_agent/agent_2/app.py:17
  • These imports reference test_samples.activity_handler..., but there is no test_samples/activity_handler package in the repo. This will raise ModuleNotFoundError when running the sample. Either revert to local/relative imports within test_samples/compat/agent_to_agent/agent_2 or add the missing package structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +41
if inner_dc.context.activity.type == ActivityTypes.message:
text = inner_dc.context.activity.text.lower()
if text == "logout":
user_token_client: UserTokenClient = inner_dc.context.turn_state.get(
UserTokenClient.__name__, None
)
await user_token_client.user_token.sign_out(
inner_dc.context.activity.from_property.id,
self.connection_name,
inner_dc.context.activity.channel_id,
)
await inner_dc.context.send_activity("You have been signed out.")
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

activity.text can be None for message activities; calling .lower() will raise. Also UserTokenClient can be missing from turn_state, so user_token_client.user_token can raise. Guard for None (e.g., default to "" for text; check user_token_client before calling sign_out and return a helpful message if not available).

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +49
# Save any state changes that might have ocurred during the turn.
await self.conversation_state.save(turn_context)
await self.user_state.save(turn_context)
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "ocurred" → "occurred".

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +39
from microsoft_agents.hosting.dialogs import (
WaterfallDialog,
WaterfallStepContext,
DialogSet,
DialogTurnStatus,
)
from microsoft_agents.hosting.dialogs.prompts import TextPrompt, PromptOptions
from microsoft_agents.hosting.core import ConversationState, MemoryStorage

Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Quick Start snippet calls MessageFactory.text(...) but doesn't import MessageFactory, so the example will fail if copied. Add the missing import (or adjust the snippet to be self-contained).

Copilot uses AI. Check for mistakes.
@rodrigobr-msft rodrigobr-msft deleted the users/robrandao/dialogs branch April 28, 2026 22:39
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.

Migrating Adaptive/Waterfall Dialogs from Bot Framework SDK to Agents SDK

3 participants