chore: Add convesation Id for voice chat and normal chat from text input - #336
Open
NirajC3-Microsoft wants to merge 4 commits into
Open
chore: Add convesation Id for voice chat and normal chat from text input#336NirajC3-Microsoft wants to merge 4 commits into
NirajC3-Microsoft wants to merge 4 commits into
Conversation
NirajC3-Microsoft
requested a review
from Todd Herman (toherman-msft)
as a code owner
August 11, 2026 09:43
NirajC3-Microsoft
requested review from
Avijit-Microsoft,
Prajwal-Microsoft,
Roopan-Microsoft,
Vinay Sharma (Vinay-Microsoft),
gpickett and
malrose07
as code owners
August 11, 2026 09:43
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.
Purpose
This pull request implements shared Azure AI conversation tracking across both text and voice chat for chat-app and scenario-app backends. The main enhancement is the introduction of a session-based cache that maps session IDs to Azure AI conversation IDs, ensuring that each user session maintains a consistent conversation context whether interacting via text or voice. This enables better continuity and traceability in conversations, and prepares the system for more advanced features like conversation history and analytics.
The most important changes are:
Shared Conversation Cache
conversation_cacheusingTTLCachein bothchat-app/backend/app/config.pyandscenario-app/backend/app/config.pyto mapsession_idto Azure AIconversation_id, shared by both text and voice subsystems. [1] [2] [3] [4]Text Chat Integration
send_message_legacyin bothchat.pyrouters to retrieve or create an Azure AI conversation ID from the cache using thesession_id, and to pass this conversation ID to the agent for each request, ensuring conversation continuity. [1] [2] [3] [4] [5] [6] [7] [8]Voice Chat Integration
session_idfrom the websocket connection, use it for conversation tracking, and pass it through all relevant function calls, ensuring that voice interactions use the same conversation context as text. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Foundry Agent Utilities
call_foundry_agentinfoundry_agent_utils.pyto accept and use aconversation_id, retrieving or creating the corresponding Azure AI conversation as needed, and storing it in the shared cache. [1] [2] [3]Frontend Support
EnhancedChatPanel.tsx) to include the current chatsession_idas a query parameter when establishing the voice websocket connection, enabling the backend to associate the websocket with the correct conversation.These changes together ensure seamless, session-based conversation continuity across both text and voice channels in the application.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information