-
Notifications
You must be signed in to change notification settings - Fork 358
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(chat): generate custom chat titles on first message automatically #7063
Conversation
Automatically generate and display custom chat titles based on the first message in a conversation to improve chat history readability and navigation. **Problem (why)** Chat history currently shows the last message as the title, which may not be the best representation of the conversation's topic. **Implementation (what)** - Add `setCustomChatTitle` method to generate concise titles using a fast chat model - Update ChatBuilder to store and expose custom chat titles - Display custom chat titles in the History tab UI - Use fast chat model from model preferences for title generation - Fix model preference sync to use correct fastChat model for edit operations **Test plan** - Start a new chat conversation - Submit first question - Verify a custom title is generated for the question - Check the history tab shows the custom title instead of the last message - Verify titles are persisted between sessions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the direction but I am concerned you're flipping the edits model to the fast model to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for not changing the edits model.
model: fastModel, | ||
maxTokensToSample: 100, | ||
}, | ||
const prompt = ps`You are Cody, an AI coding assistant from Sourcegraph. Your task is to generate a concise title (<10 words without quotation) for <codyUserInput>${inputText}</codyUserInput>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gut feel we should say "about 10 words" instead of "<10 words" so we don't get titles apologizing for not begin able to do the task. But I claim this without hard evidence... just bitter experience.
CLOSE https://linear.app/sourcegraph/issue/SRCH-829 https://linear.app/sourcegraph/issue/CODY-4966
Automatically generate and display custom chat titles based on the first message in a conversation to improve chat history readability and navigation.
Loom: https://www.loom.com/share/ca36d5c26e024a15988ce8bd7751dd46?sid=6e0f88b1-4ff8-42c3-9c2c-ce5c91bffa71
Problem
Chat history currently shows the last message as the title, which may not be the best representation of the conversation's topic.
Implementation
setCustomChatTitle
method to generate concise titles using a fast chat modelRequires
ChatTitleAutoGeneration
feature flag.Test plan
Examples
In Chat History: