Skip to content

logging compaction telemetry#324773

Draft
aiday-mar wants to merge 2 commits into
mainfrom
private-cephalopod
Draft

logging compaction telemetry#324773
aiday-mar wants to merge 2 commits into
mainfrom
private-cephalopod

Conversation

@aiday-mar

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 7, 2026 15:06
@aiday-mar aiday-mar self-assigned this Jul 7, 2026
@aiday-mar aiday-mar requested review from dbaeumer and removed request for Copilot July 7, 2026 15:06
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@anthonykim1

Matched files:

  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.ts
  • src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts

Copilot AI review requested due to automatic review settings July 7, 2026 15:09

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 adds lightweight telemetry to the terminal chat tool to mark when a run-in-terminal command is one that Copilot CLI would compact the output of. A new logCompactionHint method is added to RunInTerminalToolTelemetry, backed by a compactionHintKeywords list, and it is invoked from RunInTerminalTool on each invocation. It fits into the existing terminal tool telemetry (toolUse.runInTerminal.*) used for feature-insight analysis.

Changes:

  • Add logCompactionHint(command) that checks the command against a keyword list and emits the toolUse.runInTerminal.compactionDone event.
  • Introduce the compactionHintKeywords constant array.
  • Call logCompactionHint(args.command) from RunInTerminalTool.invoke.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.ts Adds the logCompactionHint method, telemetry event definition, and the compactionHintKeywords list.
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Invokes logCompactionHint with the command during tool invocation.

Key review notes:

  • Substring matching (.includes()) against the whole command line with short/generic keywords (go, nx, uv, node, git, apt, pip, make) will over-count via false positives.
  • Several hyphenated category-style entries (and maven vs mvn) can never match a real command line, and some entries are redundant under substring matching.

Comment on lines +238 to +269
const compactionHintKeywords: readonly string[] = [
'apt',
'npm',
'npm-pack',
'yarn-berry',
'pnpm',
'composer',
'poetry',
'pip',
'uv',
'maven',
'dotnet',
'python-build',
'go',
'unittest',
'js-test',
'cargo',
'node',
'pytest',
'git',
'git-clean',
'nx',
'python-build-ext',
'django-test',
'golangci-lint',
'clang-format-linter',
'gradle',
'cmake',
'make',
'shell-grep',
'python-script',
];
@aiday-mar aiday-mar marked this pull request as draft July 7, 2026 15:12
@aiday-mar aiday-mar removed the request for review from dbaeumer July 7, 2026 15:12
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