Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ucode/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,10 @@ def usage(warehouse_id: str | None = None) -> int:
if budget_lines:
console.print("\n".join([heading("Usage Budget"), "", *budget_lines]))
else:
print_note("Budget spend and threshold are unavailable.")
print_note(
"Budget spend and threshold are unavailable. "
"Please configure a coding agent budget policy first."
)

if not prompt_yes_no_default(
"Show token usage and estimated cost details? This queries a SQL warehouse.",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@ def fake_render_box_table(headers, table_rows, max_widths=None):
assert "Claude Code · Last 7 Days" in headings
assert all("Gemini" not in heading for heading in headings)
assert notes == [
"Budget spend and threshold are unavailable.",
"Budget spend and threshold are unavailable. "
"Please configure a coding agent budget policy first.",
"Using SQL warehouse `wh` (RUNNING).",
f"No usage for Claude Code in the last {USAGE_BREAKDOWN_DAYS} days.",
]
Expand Down
Loading