Cache Explorer: agent filter, per-chunk breakdown, stable rail selection#320469
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the Chat “Cache Explorer” (Agent Debug Logs) UI to make multi-agent sessions easier to understand and navigate, and to surface more detailed prompt-signature allocation information.
Changes:
- Adds an agent filter dropdown to the left rail to focus turns by agent (defaulting to
panel/editAgentwhen present). - Adds a collapsible per-chunk signature breakdown table (previous vs current chars and % of current).
- Makes rail selection stable (in-place selection updates + Up/Down navigation) to prevent focus loss and scroll jumps.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/chatDebugCacheExplorerView.test.ts | Adds unit tests for new helper logic (agent selection + chunk alignment). |
| src/vs/workbench/contrib/chat/browser/chatDebug/media/chatDebug.css | Styles for the rail toolbar filter UI and the chunk breakdown table. |
| src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.ts | Implements agent filtering, chunk breakdown rendering, and in-place rail selection updates. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 1
58b775a to
ba361ad
Compare
Contributor
|
This PR will be automatically cherry-picked to |
b5b0a47 to
b39e86e
Compare
dmitrivMS
approved these changes
Jun 8, 2026
- Agent filter dropdown in the rail (defaults to panel/editAgent) - Collapsible per-chunk breakdown table for the prompt signature - Clicking/arrowing rail turns updates selection in place instead of rebuilding the rail, fixing focus loss and scroll jump; adds Up/Down nav
Agent-filter selection was stored as the turn's optional id, so turns without an id skipped the restore path and could still jump to an unrelated turn. Store the turn object instead and match in two passes: precise id/reference identity first, then a composite fallback for id-less turns so an earlier look-alike can't win over the exact turn.
- Rail rows use role=button, so swap aria-selected -> aria-current (kept in sync in selectTurn and on initial render). - Agent filter trigger: aria-haspopup=menu instead of generic true. - Mark decorative chevrons (filter + chunk-breakdown toggle) and the chunk role swatch aria-hidden. - Chunk breakdown gets table semantics: role table/row/columnheader/cell on header, data, and totals rows. - moveSelection: drop the per-keypress sort; railRowsByIndex Map iteration already yields rows in visual order.
023e317 to
fea3d3b
Compare
dmitrivMS
approved these changes
Jun 8, 2026
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.
Three improvements to the Cache Explorer (Agent Debug Logs):
panel/editAgent, other agents toggleable.Fixes #320137.