Skip to content

fix(utils): extract format_metrics_status_line to shared utilities#682

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/code-quality/extract-format-status-line
Open

fix(utils): extract format_metrics_status_line to shared utilities#682
github-actions[bot] wants to merge 1 commit into
mainfrom
fix/code-quality/extract-format-status-line

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

Extracts the _format_status_line function from acp_impl/events/utils.py to a shared location in openhands_cli/utils.py as format_metrics_status_line.

This makes the metrics formatting logic reusable across both ACP and TUI contexts, reducing code duplication and improving maintainability.

Changes

  • Added format_metrics_status_line function to openhands_cli/utils.py
  • Updated acp_impl/events/utils.py to import and use the shared function
  • Removed redundant imports (abbreviate_number, format_cost, TokenUsage)

Related Issue

Addresses findings from #681

Testing

  • Linting passes (make lint)
  • All 1308 tests pass (make test)

This PR was automatically generated by the Code Quality Report workflow.

Move the _format_status_line function from acp_impl/events/utils.py to
openhands_cli/utils.py as format_metrics_status_line, making it available
for reuse across both ACP and TUI contexts.

Addresses item from code quality report.

Closes #681

Co-authored-by: openhands <openhands@all-hands.dev>
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.

0 participants