feat(budget): add cost reporting to plan status and session show CLI output

Added BDD feature file and step implementations for cost reporting in CLI commands.
- Plan status now includes cost metadata in JSON output
- Session show includes estimated cost in JSON output
- Both commands display cost information in rich output format

ISSUES CLOSED: #5250
This commit is contained in:
2026-04-18 19:55:52 +00:00
committed by Forgejo
parent 5726c9e56a
commit 6d50fc7316
2 changed files with 107 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
Feature: Cost reporting in plan status and session show CLI output
As a user
I want to see cost information in the plan status and session show commands
So that I can track how much I've spent on plans and sessions
Scenario: Plan status JSON output includes cost field
Given a plan exists with cost metadata
When I run "agents plan status <plan_id> --format json"
Then the JSON output contains a "cost" field
And the cost field contains cost metadata
Scenario: Session show JSON output includes estimated cost
Given a session exists with token usage
When I run "agents session show <session_id> --format json"
Then the JSON output contains "estimated_cost" field
And the estimated_cost is properly formatted as currency
Scenario: Plan status rich output displays cost panel
Given a plan exists with cost metadata
When I run "agents plan status <plan_id>"
Then the output contains cost information
And the cost information is properly formatted
Scenario: Session show rich output displays cost information
Given a session exists with token usage
When I run "agents session show <session_id>"
Then the output contains cost information
And the cost information is properly formatted