Prompt Preview Support#397
Merged
corinagum merged 17 commits intoMay 11, 2026
Merged
Conversation
Copilot started reviewing on behalf of
ShanmathiMayuramKrithivasan
April 21, 2026 12:54
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “prompt preview” support so bots can reference an original targeted message by attaching a targetedMessageInfo entity (with the original message ID) to outgoing activities, enabling Teams to render a collapsible prompt preview.
Changes:
- Introduces
TargetedMessageInfoEntityto the API models and exports it via the entity model surface. - Auto-attaches
TargetedMessageInfoEntity(message_id=<incoming.id>)inActivityContext.send()when handling an inbound targeted message (unless already provided by the developer). - Adds unit tests and extends the targeted-messages example to demonstrate reactive and proactive usage.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apps/src/microsoft_teams/apps/routing/activity_context.py | Auto-adds targetedMessageInfo entity during send for targeted inbound activities. |
| packages/apps/tests/test_activity_context.py | Adds tests validating auto-population, non-targeted behavior, and no-duplication. |
| packages/api/src/microsoft_teams/api/models/entity/targeted_message_info_entity.py | Defines the new entity model with type and message_id. |
| packages/api/src/microsoft_teams/api/models/entity/entity.py | Extends the Entity union to include TargetedMessageInfoEntity. |
| packages/api/src/microsoft_teams/api/models/entity/init.py | Exports TargetedMessageInfoEntity from the entity package. |
| packages/api/tests/unit/test_targeted_message_info_entity.py | Adds unit tests for default type, field behavior, and camelCase serialization. |
| examples/targeted-messages/src/main.py | Adds example commands demonstrating prompt preview usage (reactive/proactive). |
lilyydu
reviewed
Apr 21, 2026
Collaborator
|
also curious, what does the UI look like for this? |
corinagum
reviewed
Apr 21, 2026
corinagum
reviewed
Apr 21, 2026
corinagum
reviewed
Apr 21, 2026
corinagum
reviewed
Apr 24, 2026
corinagum
requested changes
Apr 24, 2026
Contributor
Author
corinagum
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Prompt preview allows a bot to reference the original targeted message in its reply, so Teams can render a collapsible preview of the user's prompt.
When a bot replies to a targeted message (reactive scenarios), the SDK now passes the original message's messageId via a targetedMessageInfo entity in the activity's entities array.
For proactive replies, developers can attach the entity themselves with the messageId of the targeted message.