Skip to content

feat(ai): use Claude's own session titles in chat history - #3186

Merged
abose merged 4 commits into
mainfrom
ai
Sep 8, 2026
Merged

feat(ai): use Claude's own session titles in chat history#3186
abose merged 4 commits into
mainfrom
ai

Conversation

@abose

@abose abose commented Sep 8, 2026

Copy link
Copy Markdown
Member

The CLI writes an ai-title entry into every session transcript — a short summary of what the conversation is about — and the panel was throwing it away in favour of the first user message truncated at 80 chars. Read it back through the SDK's getSessionInfo() and hand it to the browser on aiComplete, plus a getSessionTitles peer call so the history list can upgrade entries recorded before this.

getSessionInfo() falls back to the raw first prompt when a session has no AI title, and ours is the enriched prompt (it opens with the editor context line), so only a title that beats that fallback is reported.

Also fixes two history panel bugs found alongside:

  • The dropdown is a sibling of .ai-chat-body-chat, not a child as the LESS comment claimed, so hiding that wrapper's children left an empty flex:1 box claiming half the panel and the list stopped halfway down. Hide the wrapper itself.
  • .ai-session-history-dropdown was in the issue#10150 scrollbar workaround's selector list, which sets background-color:inherit on hover. The dropdown has a tint of its own, so the whole list flashed lighter under the pointer.

The CLI writes an `ai-title` entry into every session transcript — a
short summary of what the conversation is about — and the panel was
throwing it away in favour of the first user message truncated at 80
chars. Read it back through the SDK's getSessionInfo() and hand it to
the browser on aiComplete, plus a getSessionTitles peer call so the
history list can upgrade entries recorded before this.

getSessionInfo() falls back to the raw first prompt when a session has
no AI title, and ours is the enriched prompt (it opens with the editor
context line), so only a title that beats that fallback is reported.

Also fixes two history panel bugs found alongside:

- The dropdown is a sibling of .ai-chat-body-chat, not a child as the
  LESS comment claimed, so hiding that wrapper's children left an empty
  flex:1 box claiming half the panel and the list stopped halfway down.
  Hide the wrapper itself.
- .ai-session-history-dropdown was in the issue#10150 scrollbar
  workaround's selector list, which sets background-color:inherit on
  hover. The dropdown has a tint of its own, so the whole list flashed
  lighter under the pointer.
Also renames .ai-history-item-preview to .ai-history-item-subtext: the
span holds Claude's session title now, not a preview of the chat.
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@abose
abose merged commit b0bd295 into main Sep 8, 2026
15 of 21 checks passed
@abose
abose deleted the ai branch September 8, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant