Skip to content

Use JSON serialization for message arrays in telemetry tags#19

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-15
Closed

Use JSON serialization for message arrays in telemetry tags#19
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-15

Conversation

Copy link
Contributor

Copilot AI commented Nov 5, 2025

Comma-separated concatenation of messages causes parsing ambiguity when individual messages contain commas.

Changes

  • Replace ",".join(messages) with json.dumps(messages) in record_input_messages() and record_output_messages()
  • Add import json to invoke_agent_scope.py

Example

# Before: ambiguous when messages contain commas
messages = ["Hello, world", "Test, message"]
tag_value = ",".join(messages)  # "Hello, world,Test, message" - cannot parse back correctly

# After: unambiguous serialization
tag_value = json.dumps(messages)  # '["Hello, world", "Test, message"]'

This makes telemetry data parseable using standard JSON instead of custom string splitting logic.


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

…sages

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on missing methods and attributes implementation Use JSON serialization for message arrays in telemetry tags Nov 5, 2025
Copilot AI requested a review from nikhilNava November 5, 2025 11:49
Base automatically changed from nikhilc/addMissingFeatures to main November 5, 2025 14:49
@nikhilNava nikhilNava closed this Nov 6, 2025
@nikhilNava nikhilNava deleted the copilot/sub-pr-15 branch November 6, 2025 12:53
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