[PR #10576] feat(opencode): add /context usage dialog #13486

Open
opened 2026-02-16 18:18:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10576

State: open
Merged: No


Summary

  • Add a /context command that surfaces last-request token usage and limits in the session dialog.
  • Show cache hit breakdown and a fallback when limits are unavailable.

Verification

  • Open a session, type /context, confirm dialog opens and shows usage bars.
  • With no prior model request, confirm the “No model requests yet” message.
  • With a model missing limits, confirm the “Model limits unavailable…” message.

Screenshots

  • Autocomplete for /context (CLI command)
    CLI command
  • Context usage dialog (bars)
    Context Usage
  • Before: N/A (new command)

TUI-only UI change; happy to go through design review if needed.

Fixes #10575

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10576 **State:** open **Merged:** No --- ## Summary - Add a /context command that surfaces last-request token usage and limits in the session dialog. - Show cache hit breakdown and a fallback when limits are unavailable. ## Verification - Open a session, type /context, confirm dialog opens and shows usage bars. - With no prior model request, confirm the “No model requests yet” message. - With a model missing limits, confirm the “Model limits unavailable…” message. ## Screenshots - Autocomplete for /context (CLI command) ![CLI command](https://github.com/user-attachments/assets/29e57d39-32e8-42f9-a742-d46109e3aed3) - Context usage dialog (bars) ![Context Usage](https://github.com/user-attachments/assets/8f452a02-474c-4708-bdf5-05ab375e3182) - Before: N/A (new command) TUI-only UI change; happy to go through design review if needed. Fixes #10575
yindo added the pull-request label 2026-02-16 18:18:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13486