Skip to content

Conversation

@mawasile
Copy link

@mawasile mawasile commented Nov 6, 2025

This pull request introduces a new sample application, ContosoLiveChatApp, which provides a mock live chat service for demonstrating handover scenarios with Copilot Studio. The app includes a REST API for managing chat conversations, message storage, and integration with Copilot Studio via webhooks. Additionally, a conversation mapping service is added to the Copilot Studio sample to manage conversation IDs between systems.

The most important changes are:

ContosoLiveChatApp: Core Functionality

  • Added a new ASP.NET Core Web API project, ContosoLiveChatApp, targeting .NET 9.0, with nullable reference types and implicit usings enabled (ContosoLiveChatApp.csproj).
  • Implemented ChatController with endpoints to start/end conversations, send/receive messages, and retrieve message history, supporting integration with Copilot Studio via webhooks (ChatController.cs).
  • Created ChatStorageService for in-memory, thread-safe storage and retrieval of chat messages by conversation, including methods for conversation lifecycle management (ChatStorageService.cs).
  • Added WebhookService to send outgoing chat messages to Copilot Studio using a configurable webhook URL, with detailed error handling and logging (WebhookService.cs).
  • Defined the ChatMessage data model to represent chat messages, including sender, timestamp, and conversation association (ChatMessage.cs).

Configuration and Documentation

  • Added appsettings.json and updated Program.cs to configure logging, allowed hosts, and the outgoing webhook URL; registered required services and set up the HTTP pipeline (appsettings.json, Program.cs). [1] [2]
  • Provided a comprehensive README.md with setup instructions, API documentation, and architecture diagrams for the new app (README.md).

Copilot Studio Sample: Conversation Mapping

  • Introduced ConversationManager and ConversationMapping in the Copilot Studio sample to track and map conversation IDs between Copilot Studio and the live chat app, supporting upsert, retrieval, and removal of mappings (ConversationManager.cs).

Mateusz Wasilewski added 16 commits October 31, 2025 17:13
…ve error handling and UI feedback for failed messages
…d from Task to void; remove unused conversation manager field in CopilotStudioAgent
…sation handling; update ChatController and LiveChatService for new conversation flow; enhance frontend to display conversation ID and manage chat state.
…versationManager to support new mapping methods; modify CopilotStudioAgent and MsTeamsProactiveMessage to use ConversationMapping for proactive messaging.
…onfiguration; streamline API endpoints section and remove outdated features.
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.

1 participant