Repository navigation
feat(ai): auto-title conversations from the first message - #100
Merged
Merged
Conversation
Saved conversations in the drawer now show a meaningful title instead of "New conversation". The store titles a conversation from its first user message at creation time. Why client-side: the server's LLM auto-titling (summarizeConversation) only fires on its own chat-persist path, which the mobile client bypasses (it persists via the explicit /:id/messages endpoint). objectui uses the same first-message fallback for display. - lib/ai-conversations.ts: deriveConversationTitle() (collapse whitespace, truncate to 48 chars on a word boundary with an ellipsis) + renameConversation() (PATCH /conversations/:id) for future rename UI. - store: createConversation(deriveConversationTitle(firstMessage)). +4 tests (title derivation incl. truncation/empty, PATCH rename, store creates with the derived title). Suite 1259/1259, lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Saved conversations in the drawer now show a meaningful title (e.g. "How many orders?") instead of "New conversation". The store titles a conversation from its first user message at creation.
Why client-side
The server's LLM auto-titling (
summarizeConversation) only fires on its own chat-persist path, which the mobile client bypasses (it persists via the explicit/:id/messagesendpoint — verified: a conversation stayed untitled after aconversationIdchat). objectui uses the same first-message fallback for display, so this matches web behavior.lib/ai-conversations.ts—deriveConversationTitle()(collapse whitespace, truncate to 48 chars on a word boundary + ellipsis) andrenameConversation()(PATCH /conversations/:id) for a future rename UI.createConversation(deriveConversationTitle(firstMessage)).Tests
npm run lint0 errors;jest1259/1259 (153 suites).🤖 Generated with Claude Code