Skip to content

feat(wire): provide token usage and message id in StatusUpdate message#490

Merged
stdrc merged 2 commits intomainfrom
rc/more-info-in-status-update
Dec 17, 2025
Merged

feat(wire): provide token usage and message id in StatusUpdate message#490
stdrc merged 2 commits intomainfrom
rc/more-info-in-status-update

Conversation

@stdrc
Copy link
Copy Markdown
Contributor

@stdrc stdrc commented Dec 17, 2025

Related Issue

Resolve #(issue_number)

Description

Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
Copilot AI review requested due to automatic review settings December 17, 2025 06:01
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

This PR enhances the StatusUpdate wire message by adding two new fields: token_usage and message_id. This allows the wire protocol to communicate token usage statistics and message identifiers from the LLM step results to downstream consumers.

Key Changes:

  • Added token_usage and message_id fields to the StatusUpdate message class
  • Made context_usage field have an explicit default value of None for consistency
  • Updated the main usage site in kimisoul.py to populate these new fields from step results
  • Simplified StatusUpdate instantiation in replay.py by using the default constructor

Reviewed changes

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

Show a summary per file
File Description
src/kimi_cli/wire/message.py Added token_usage and message_id fields to StatusUpdate class with None defaults; added import for TokenUsage type
src/kimi_cli/soul/kimisoul.py Modified to create StatusUpdate with token usage and message ID from step results, then conditionally add context usage
tests/test_wire_message.py Updated test snapshot to include the new fields in serialized output
src/kimi_cli/ui/shell/replay.py Simplified StatusUpdate() instantiation using default constructor instead of explicit context_usage=None
CHANGELOG.md Added entry documenting the new fields in the Unreleased section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stdrc stdrc merged commit c13cf98 into main Dec 17, 2025
5 checks passed
@stdrc stdrc deleted the rc/more-info-in-status-update branch December 17, 2025 06:07
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