Skip to content
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

feat: [#6865] Provide two new invoke handlers, (message/fetchTask, message/submitAction) for Custom Feedback Loops #6871

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sw-joelmut
Copy link
Collaborator

Fixes #6865

Description

This PR introduces two new Teams handlers, submitAction and fetchTask, alongside with the respective feedback loop classes.

Specific Changes

  • Added submitAction and fetchTask handlers for teams.
  • Added new classes for strong-type the new handlers' data.
  • Added new class for TeamsChannelData to enable feedback loops.
  • Added unit tests for the new handlers.

Testing

The following image shows a teams sample working with the new submitAction handler, fetchTask couldn't be tested since it is only available in ring0.
img

@sw-joelmut sw-joelmut added the Automation: Parity with js The PR needs to be ported to JS label Nov 25, 2024
@sw-joelmut sw-joelmut requested a review from a team as a code owner November 25, 2024 14:16
@tracyboehrer
Copy link
Member

@jk-msft, @sw-joelmut , Can some text be included in the TeamsActivityHandler OnTeamsMessageFetchTaskAsync and OnTeamsMessageSubmitActionAsync response are?

@sw-joelmut
Copy link
Collaborator Author

@jk-msft, @sw-joelmut , Can some text be included in the TeamsActivityHandler OnTeamsMessageFetchTaskAsync and OnTeamsMessageSubmitActionAsync response are?

Thanks for the feedback, we added the "returns" documentation and improved the summary for the FetchTask, adding code examples for Adaptive Cards and website URL (extracted from the issue information) so the customer knows what should be returned.
image

The SubmitAction didn't require any update, since it doesn't require any value to be returned by a customer (it returns void).

@sw-joelmut
Copy link
Collaborator Author

Hi @tracyboehrer, this PR and a few others are failing with an error related to the private nuget feed. Let us know if there's anything we can do to help getting these merged.

@@ -994,6 +1001,69 @@ protected virtual Task OnTeamsMessageSoftDeleteAsync(ITurnContext<IMessageDelete
return Task.CompletedTask;
}

/// <summary>
/// Invoked when a feedback loop activity is received.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be more accurate to say "Invoked when a user submits a default or custom feedback loop form".

/// <returns>A task that represents the work queued to execute.</returns>
protected virtual Task OnTeamsMessageSubmitActionAsync(ITurnContext<IInvokeActivity> turnContext, FeedbackResponse feedback, CancellationToken cancellationToken)
{
throw new InvokeResponseException(HttpStatusCode.NotImplemented);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it expected to throw an error here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation: Parity with js The PR needs to be ported to JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide two new invoke handlers, (message/fetchTask, message/submitAction) for Custom Feedback Loops
3 participants