Update chat in editor titles after rename tool - #331509
Conversation
Fixes #331487 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates Agent Host chat editor and session-list titles after live rename actions.
Changes:
- Selects per-chat titles for multi-chat sessions.
- Preserves session titles for sole default chats.
- Adds live title synchronization and targeted tests.
Show a summary per file
| File | Description |
|---|---|
agentHostSessionHandler.ts |
Resolves and synchronizes editor titles. |
agentHostSessionListStore.ts |
Applies live title actions to session-list entries. |
agentHostChatContribution.test.ts |
Tests session-list and editor title updates. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionListStore.ts:352
- This title is only retained in the current
_entriesvalue. A default-chat rename in a multi-chat session updates the chat catalog but not the session title (agentService.ts:1175-1200), while a laterlistSessions()refresh rebuilds metadata fromliveSummary.title(agentService.ts:1276-1284). Consequently, an action received before the entry is cached—or any later cache invalidation such as a workspace change—restores the old session title. Please retain the effective default-chat title independently and reapply it during refresh, or expose that effective title fromlistSessions().
const cached = this._entries.get(key);
if (!cached || cached.summary.title === title) {
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Pull request was converted to draft
|
Will wait for the #331394 to merge first |
Thank you! |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Done |
|
Reworked the PR after #331394 merged and the issue still reproduced. Commit 37008ea moves the list-visible fix into Agent Host, removes the editor list action overlay, aligns tool/UI/ |
There was a problem hiding this comment.
Review details
Suppressed comments (1)
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts:1467
- Renaming an open chat still dispatches
SessionTitleChangedto the owning session URI below. Once a peer has caused the default chat title to be snapshotted, this changes only the session title, so the addressed editor tab keeps its old catalog title; renaming a peer editor also renames the owning session instead of that peer. Dispatch through the mapped chat channel when one is available so the new host-side chat/default routing is exercised.
chatTitle,
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
rename_chattool, client/UI editor renames, and/rename, while keeping peer-chat titles independentroot/sessionSummaryChangedrename_chatmodel description to match the default-chat/session and independent-peer behaviorTesting
npm run eslint --on the changed Agent Host and workbench filesnpm run typecheck-client/renamerouting, restored multi-chat catalogs, snapshot races, tool definitions, editor titles, and editor-window session-list behaviorFixes #331487