Skip to content

SuggestedActionSubmitActivity for suggestedAction/submit invoke#591

Open
ShanmathiMayuramKrithivasan wants to merge 1 commit into
microsoft:mainfrom
ShanmathiMayuramKrithivasan:shmayura/suggested-actions
Open

SuggestedActionSubmitActivity for suggestedAction/submit invoke#591
ShanmathiMayuramKrithivasan wants to merge 1 commit into
microsoft:mainfrom
ShanmathiMayuramKrithivasan:shmayura/suggested-actions

Conversation

@ShanmathiMayuramKrithivasan
Copy link
Copy Markdown
Contributor

Adds support for suggestedActions/submit invoke activity - dispatched by the platform when a user clicks an Action.Submit suggested-action click.

  • New ISuggestedActionSubmitInvokeActivity interface and suggested-action.submit route alias.
  • New Action.Submit value in CardActionType for constructing outbound suggested-action chips.
  • Marked @experimental until the platform feature stabilizes.
  • New examples/suggested-actions sample app.

Copilot AI review requested due to automatic review settings May 22, 2026 13:25
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for the suggestedActions/submit invoke produced by Action.Submit suggested-action chips, including routing aliases, API typings, and an end-to-end example.

Changes:

  • Add suggestedActions/submitsuggested-action.submit invoke alias and router selection test.
  • Introduce API model/types for suggested-action submit invoke activities and responses.
  • Add a runnable examples/suggested-action sample demonstrating authoring Action.Submit chips and handling the invoke.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/apps/src/routes/invoke/index.ts Adds invoke alias for suggestedActions/submit routing.
packages/apps/src/router/router.spec.ts Adds a unit test verifying route selection for suggested-action submit invokes.
packages/api/src/models/invoke-response.ts Extends invoke response body map with suggestedActions/submit.
packages/api/src/models/card/card-action.ts Adds Action.Submit to the card action type union.
packages/api/src/activities/invoke/suggested-action-submit.ts Introduces a new invoke activity interface for suggested-action submits.
packages/api/src/activities/invoke/suggested-action-submit.spec.ts Adds tests validating the new activity wire shape.
packages/api/src/activities/invoke/index.ts Wires the new activity into the exported invoke activity union and exports.
examples/suggested-action/tsconfig.json Adds TS config for the new example.
examples/suggested-action/src/index.ts Demonstrates sending suggested-action chips and handling the resulting invoke.
examples/suggested-action/package.json Defines dependencies/scripts for the new example package.
examples/suggested-action/eslint.config.js Adds ESLint config for the new example.
examples/suggested-action/README.md Documents example behavior and how to run it.

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

Comment thread packages/api/src/activities/invoke/suggested-action-submit.ts
Comment thread packages/api/src/models/card/card-action.ts
Comment thread examples/suggested-action/package.json
Comment thread packages/api/src/activities/invoke/suggested-action-submit.spec.ts
@@ -0,0 +1,33 @@
import { MessageActivity, SuggestedActions } from '@microsoft/teams.api';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

example/Sample folder name should be unified across SDKs

Copy link
Copy Markdown
Collaborator

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

Looks like this branch may need a rebase/fresh install :)

| 'call'
| 'invoke';
| 'invoke'
| 'Action.Submit';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Worth a one-line comment here to disambiguate from the AdaptiveCard 'Action.Submit' already in packages/api/src/models/adaptive-card/adaptive-card-invoke-action.ts. The .NET PR documents the equivalent field — porting that:

/** Suggested-action chip. Clicking dispatches a `suggestedActions/submit` invoke
 *  instead of posting a chat-visible message. */
| 'Action.Submit';

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.

3 participants