Skip to content

Log aggressiveness level and user happiness score to telemetry#2897

Merged
benibenj merged 2 commits intomicrosoft:mainfrom
bstee615:ben/aggressiveness-telemetry
Jan 19, 2026
Merged

Log aggressiveness level and user happiness score to telemetry#2897
benibenj merged 2 commits intomicrosoft:mainfrom
bstee615:ben/aggressiveness-telemetry

Conversation

@bstee615
Copy link
Member

@bstee615 bstee615 commented Jan 15, 2026

Summary

This PR adds telemetry logging for the adaptive aggressiveness feature, enabling data collection to analyze and improve the user happiness score algorithm.

Changes

  • Log aggressiveness level and happiness score to telemetry - Records the computed happiness score and current aggressiveness level when inline edits are shown

Telemetry Properties Added

The following properties are now logged:

  • aggressivenessLevel: The current aggressiveness threshold being used
  • userHappinessScore: The calculated happiness score based on recent user actions (accepts, rejects, ignores)

Purpose

This data will help us validate that the adaptive aggressiveness algorithm correlates with desired settings.

@bstee615 bstee615 changed the title feat(telemetry): Log aggressiveness level and user happiness score to telemetry Log aggressiveness level and user happiness score to telemetry Jan 15, 2026
@bstee615 bstee615 force-pushed the ben/aggressiveness-telemetry branch from 9b7d379 to 32202ad Compare January 15, 2026 23:37
@bstee615 bstee615 marked this pull request as ready for review January 16, 2026 17:45
Copilot AI review requested due to automatic review settings January 16, 2026 17:45
Copy link
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

This PR adds telemetry logging for the adaptive aggressiveness feature used in the Xtab inline edits system. The changes enable data collection to analyze and validate the user happiness score algorithm by recording the aggressiveness level and happiness score when inline edits are shown.

Changes:

  • Modified getAggressivenessLevel() to return both the aggressiveness level and the user happiness score as an object to avoid race conditions in telemetry logging
  • Added telemetry builder methods (setXtabAggressivenessLevel and setXtabUserHappinessScore) to capture these values
  • Updated telemetry metadata with proper GDPR annotations for the new fields
  • Logged telemetry only when using the XtabAggressiveness prompting strategy

Reviewed changes

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

File Description
src/extension/inlineEdits/common/userInteractionMonitor.ts Changed getAggressivenessLevel() return type from AggressivenessLevel to an object containing both the level and optional happiness score
src/platform/inlineEdits/common/statelessNextEditProvider.ts Added new telemetry fields (xtabAggressivenessLevel, xtabUserHappinessScore) and corresponding setter methods in the telemetry builder
src/extension/xtab/node/xtabProvider.ts Updated to destructure the new return value from getAggressivenessLevel() and conditionally log telemetry when using XtabAggressiveness prompting strategy
src/extension/inlineEdits/node/nextEditProviderTelemetry.ts Added GDPR annotations for the new telemetry fields and included them in the telemetry event payload

@mjbvz mjbvz assigned benibenj and unassigned mjbvz Jan 16, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 19, 2026
@benibenj benibenj added this pull request to the merge queue Jan 19, 2026
Merged via the queue into microsoft:main with commit 377dfe9 Jan 19, 2026
14 of 15 checks passed
@bstee615 bstee615 deleted the ben/aggressiveness-telemetry branch January 20, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants