Repository navigation
fix(agent-admin): return session titles with a first-message fallback - #277
Merged
Merged
Conversation
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.
Description
GET /api/v2/ai/admin/agent/sessions,GET /api/v2/ai/admin/agent/sessions/{sessionId}) now return atitlefor each session: the latest conversation's title when it is named, otherwise the first user message on one line, truncated to 80 characters. This is the same fallback the user sessions list already uses.latestThreadTitle, which is usuallyDefault threador null, so almost every row showed "Untitled conversation".readUsefulThreadTitle,deriveTitleFromMessagePartsandloadFirstUserMessagePartsare now exported fromSessionReadServiceand reused, not copied.titleis added to theAgentAdminSessionSummaryOpenAPI schema as optional and nullable. The admin UI uses it in GoodRxOSS/lifecycle-ui#101.Verifying Changes
AdminService.test.tscovers the first-message title, a named conversation title winning over the first message, the page-only first-message load, and no extra query when the page is empty.jestforsrc/server/services/agent,openApiSpecand the admin routes (2181 tests),eslintandprettierpass.