Skip to content

Track additional GitHub Copilot context commands (#terminalLastCommand, #clipboard, etc.)#188

Merged
rajbos merged 12 commits intomainfrom
copilot/add-context-refs-for-commands
Feb 8, 2026
Merged

Track additional GitHub Copilot context commands (#terminalLastCommand, #clipboard, etc.)#188
rajbos merged 12 commits intomainfrom
copilot/add-context-refs-for-commands

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Adds detection and counting for 6 context commands that were previously untracked: #terminalLastCommand, #terminalSelection, #clipboard, #changes, #outputPanel, #problemsPanel.

Changes

Core detection (src/extension.ts)

  • Extended ContextReferenceUsage interface with 6 new fields
  • Added regex patterns to analyzeContextReferences() for new context commands
  • Updated initialization and merge logic across 5 locations

UI display (src/webview/*/main.ts)

  • Usage dashboard: Added stat cards with icons and tooltips for each new command
  • Diagnostics panel: Updated totals and summary tooltips (abbreviated format: #termLC, #clip, etc.)
  • Log viewer: Added badges for new references in per-interaction views
  • Updated getTotalContextRefs() functions to include new fields in all three webviews

Type definitions

  • Synchronized ContextReferenceUsage type across all webview files to include new fields

Documentation

  • Updated TRACKABLE-DATA.md with complete context command reference list
  • Updated USAGE-ANALYSIS.md with usage patterns and optimization tips for new commands

All context references now consistently tracked across detection, aggregation, and display layers.

Original prompt

i want to detect all context # commands and show them as context refs in all locations. Examples are #terminalLastCommand and #terminalSelection . Find other examples in the docs, but only add context references to the list. make sure to count these in all places where we show them


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add context refs for command detection Track additional GitHub Copilot context commands (#terminalLastCommand, #clipboard, etc.) Feb 7, 2026
Copilot AI requested a review from rajbos February 7, 2026 23:24
@rajbos rajbos force-pushed the copilot/add-context-refs-for-commands branch from 0314942 to b676237 Compare February 8, 2026 21:28
@rajbos rajbos marked this pull request as ready for review February 8, 2026 21:28
@rajbos rajbos merged commit ba5637a into main Feb 8, 2026
16 checks passed
@rajbos rajbos deleted the copilot/add-context-refs-for-commands branch February 8, 2026 21:30
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.

2 participants

Comments