Skip to content

detect implicit selections#176

Merged
rajbos merged 1 commit intomainfrom
more-detections
Feb 3, 2026
Merged

detect implicit selections#176
rajbos merged 1 commit intomainfrom
more-detections

Conversation

@rajbos
Copy link
Owner

@rajbos rajbos commented Feb 2, 2026

This pull request adds tracking and visualization for "implicit selection" context references—cases where text is selected in the editor and passively provides context to Copilot. The change updates both the backend tracking logic and the usage stats webview to include this new metric, ensuring it is counted, merged, and displayed consistently alongside other context reference types.

Context reference tracking and logic updates:

  • Added implicitSelection to the ContextReferenceUsage type/interface in both src/extension.ts and src/webview/usage/main.ts, ensuring all context reference objects now include this metric. [1] [2]
  • Updated logic to detect and increment implicitSelection when selections are present in input state events, both at session start and during updates.
  • Modified context reference initialization, merging, and cache versioning to support implicitSelection, ensuring accurate aggregation and cache invalidation. [1] [2] [3] [4] [5] [6] [7]

Usage statistics visualization:

  • Updated the usage stats webview to display the "Implicit Selection" metric with a tooltip explanation, and included it in total context reference calculations. [1] [2] [3]

@rajbos rajbos merged commit 0efdff7 into main Feb 3, 2026
11 of 28 checks passed
@rajbos rajbos deleted the more-detections branch February 3, 2026 08:38
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

Comments