Skip to content

Log when shell type changes for ai clis#309688

Merged
anthonykim1 merged 4 commits intomainfrom
anthonykim1/aiCliTelemetry
Apr 14, 2026
Merged

Log when shell type changes for ai clis#309688
anthonykim1 merged 4 commits intomainfrom
anthonykim1/aiCliTelemetry

Conversation

@anthonykim1
Copy link
Copy Markdown
Contributor

Coming from: #290830
and #304528

@anthonykim1 anthonykim1 self-assigned this Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 00:38
@anthonykim1
Copy link
Copy Markdown
Contributor Author

/cc @meganrogge

@anthonykim1 anthonykim1 added this to the 1.117.0 milestone Apr 14, 2026
@anthonykim1 anthonykim1 marked this pull request as ready for review April 14, 2026 00:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds additional terminal telemetry to better understand runtime shell type detection, particularly for agentic CLIs whose identification can change after startup.

Changes:

  • Log a new telemetry event (terminal/shellTypeChanged) whenever a terminal instance’s detected shellType changes.
  • Prefer instance.shellType when emitting terminal/createInstance telemetry (fallback to getSanitizedShellType).
  • Extend the terminal telemetry shell type allowlist with AI CLI entries (claude/codex/copilot/gemini).
Show a summary per file
File Description
src/vs/workbench/contrib/terminal/browser/terminalTelemetry.ts Adds shell-type-changed telemetry and adjusts shell type value selection/allowlist for terminal telemetry events.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/terminal/browser/terminalTelemetry.ts:152

  • For the new terminal/shellTypeChanged event, the logged shellType is currently the raw TerminalShellType string. If this is intended to align with the existing terminal/createInstance shellType taxonomy in this file, it should be normalized/sanitized the same way (eg map gitbash -> git-bash) to avoid splitting telemetry across multiple spellings for the same shell.
		this._telemetryService.publicLog2<TerminalShellTypeChangedTelemetryData, TerminalShellTypeChangedTelemetryClassification>('terminal/shellTypeChanged', {
			shellType: new TelemetryTrustedValue(instance.shellType ?? 'unknown'),
			terminalSessionId: instance.sessionId,
  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread src/vs/workbench/contrib/terminal/browser/terminalTelemetry.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

Screenshot Changes

Base: e705c906 Current: de7f9cbb

Changed (4)

editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/NeedsInput/Light
Before After
before after
agentSessionsViewer/CloudProvider/Dark
Before After
before after
agentSessionsViewer/CloudProvider/Light
Before After
before after

@anthonykim1 anthonykim1 marked this pull request as draft April 14, 2026 00:52
@anthonykim1 anthonykim1 enabled auto-merge (squash) April 14, 2026 01:53
@anthonykim1 anthonykim1 merged commit 3db29aa into main Apr 14, 2026
26 checks passed
@anthonykim1 anthonykim1 deleted the anthonykim1/aiCliTelemetry branch April 14, 2026 02:40
@anthonykim1 anthonykim1 changed the title Log when shell type changese for ai clis Log when shell type changes for ai clis Apr 14, 2026
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.

3 participants