Skip to content

Cache Explorer: agent filter, per-chunk breakdown, stable rail selection#320469

Merged
bhavyaus merged 3 commits into
mainfrom
bhavyaus/cache-explorer-agent-filter
Jun 8, 2026
Merged

Cache Explorer: agent filter, per-chunk breakdown, stable rail selection#320469
bhavyaus merged 3 commits into
mainfrom
bhavyaus/cache-explorer-agent-filter

Conversation

@bhavyaus

@bhavyaus bhavyaus commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Three improvements to the Cache Explorer (Agent Debug Logs):

  • Agent filter — rail dropdown to filter model turns by agent; defaults to panel/editAgent, other agents toggleable.
  • Chunk breakdown — collapsible table showing per-chunk char allocation (previous vs current, % of request) under the prompt signature.
  • Stable rail selection — clicking/arrowing turns updates the selection in place instead of rebuilding the rail, fixing focus loss and scroll jump; adds Up/Down navigation.

Fixes #320137.

Copilot AI review requested due to automatic review settings June 8, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/editAgent when 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

@bhavyaus bhavyaus force-pushed the bhavyaus/cache-explorer-agent-filter branch from 58b775a to ba361ad Compare June 8, 2026 18:55
@bhavyaus bhavyaus marked this pull request as ready for review June 8, 2026 19:27
@bhavyaus bhavyaus requested a review from Copilot June 8, 2026 19:34
@bhavyaus bhavyaus added this to the 1.124.0 milestone Jun 8, 2026
@bhavyaus bhavyaus added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Jun 8, 2026
@vs-code-engineering

Copy link
Copy Markdown
Contributor

This PR will be automatically cherry-picked to release/1.124 when merged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 8

Comment thread src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugCacheExplorerView.ts Outdated
@bhavyaus bhavyaus force-pushed the bhavyaus/cache-explorer-agent-filter branch from b5b0a47 to b39e86e Compare June 8, 2026 19:42
@bhavyaus bhavyaus removed the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Jun 8, 2026
@bhavyaus bhavyaus modified the milestones: 1.124.0, 1.125.0 Jun 8, 2026
bhavyaus added 3 commits June 8, 2026 15:17
- 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.
@bhavyaus bhavyaus enabled auto-merge (squash) June 8, 2026 22:17
@bhavyaus bhavyaus force-pushed the bhavyaus/cache-explorer-agent-filter branch from 023e317 to fea3d3b Compare June 8, 2026 22:17
@bhavyaus bhavyaus merged commit fb811e1 into main Jun 8, 2026
39 of 40 checks passed
@bhavyaus bhavyaus deleted the bhavyaus/cache-explorer-agent-filter branch June 8, 2026 23:23
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.

Make utility model usage more obvious in the agent debug logs

3 participants