fix: chat history title generation updated#721
Merged
Avijit-Microsoft merged 2 commits intodevfrom Feb 20, 2026
Merged
Conversation
Contributor
|
🎉 This PR is included in version 2.2.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 introduces AI-powered, concise conversation title generation for chat conversations. The backend now generates a short title (up to four words) for each new conversation using an Azure OpenAI agent, and the frontend displays these generated titles in the chat history and UI. The implementation ensures that custom titles always take precedence, and fallback logic is provided if AI title generation fails.
The most important changes are:
Backend: Title Generation and Persistence
TitleService(title_service.py) that generates a 4-word or less title for conversations using Azure OpenAI, with fallback to the first four words of the message if AI is unavailable.app.py) to generate and store a conversation title for new conversations, passing the generated title through the API responses. [1] [2] [3] [4] [5] [6]Frontend: Title Handling and Display
conversationTitlestate toApp.tsx, updated it when a new title is generated or a conversation is loaded, and passed it to theChatHistorycomponent. [1] [2] [3] [4] [5] [6]ChatHistoryto accept and display the current conversation title, using it for the current session summary instead of a message substring. [1] [2] [3]Does this introduce a breaking change?
Golden Path Validation
Deployment Validation