SuggestedActionSubmitActivity for suggestedAction/submit invoke#591
Conversation
There was a problem hiding this comment.
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/submit→suggested-action.submitinvoke alias and router selection test. - Introduce API model/types for suggested-action submit invoke activities and responses.
- Add a runnable
examples/suggested-actionsample demonstrating authoringAction.Submitchips 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.
| @@ -0,0 +1,33 @@ | |||
| import { MessageActivity, SuggestedActions } from '@microsoft/teams.api'; | |||
There was a problem hiding this comment.
example/Sample folder name should be unified across SDKs
corinagum
left a comment
There was a problem hiding this comment.
Looks like this branch may need a rebase/fresh install :)
| | 'call' | ||
| | 'invoke'; | ||
| | 'invoke' | ||
| | 'Action.Submit'; |
There was a problem hiding this comment.
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';
Adds support for suggestedActions/submit invoke activity - dispatched by the platform when a user clicks an Action.Submit suggested-action click.
ISuggestedActionSubmitInvokeActivityinterface andsuggested-action.submitroute alias.Action.Submitvalue in CardActionType for constructing outbound suggested-action chips.@experimentaluntil the platform feature stabilizes.