Conversation
|
Thanks for the PR, assigning first to @lramos15 to get his thoughts cc @roblourens |
|
LGTM |
|
@kevin-m-kent looks like tests are failing - can you take a look? |
|
@isidorn if I'm reading these test cases correctly, it looks like they might be setup with the wrong expectation? It's expecting 1:1 and it outputs 1:12 now. The actual input is "hello world!", which is 12 characters, so I think the test case needs to be updated. I will push to the PR to do that. |
|
I pushed the change above. Let's see if it fixes the unit tests now (this makes the expectation to be 1:12 instead of 1:1) |
bc2aa46 to
0688ed8
Compare
0688ed8 to
b0a7815
Compare
|
@isidorn / @roblourens / @lramos15 I think we should be good now but please take a look. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a telemetry bug where the promptTypes measurement was incorrectly capturing the array length of message content parts instead of the total character count of the text content.
Changes:
- Fixed
promptTypestelemetry to usegetTextPart()helper for accurate character counting - Updated test snapshots to reflect the corrected telemetry values (from
1:1to1:12for "hello world!")
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/extension/prompt/node/chatParticipantTelemetry.ts | Added getTextPart import and updated both PanelChatTelemetry and InlineChatTelemetry to use getTextPart(msg.content).length for accurate character counting |
| src/extension/prompt/node/test/snapshots/defaultIntentRequestHandler.spec.ts.snap | Updated test snapshots to reflect corrected promptTypes values showing character count (12) instead of array length (1) |
|
Validated, the data looks good. Example: |
It appears that our Measures.prompttypes is capturing the array length rather than the total character length for each prompt object. It should capture characters. This PR intends to fix that.