[PR #5619] feat(tui): add context preview dialog #11495

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

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

State: closed
Merged: No


Summary

  • Add context preview dialog accessible via command palette
  • Shows breakdown of context being sent to LLM before submission
  • Displays system prompt, instruction files, environment context, and conversation history with token estimates

Motivation

Users currently see total token count but cannot inspect what comprises the context. This makes it difficult to:

  • Identify unnecessary context consumption
  • Understand why token counts are high
  • Optimize context before sending

Changes

  • dialog-context.tsx: New dialog component showing context breakdown by type
  • app.tsx: Register "Preview context" command in command palette

Usage

  1. Open command palette
  2. Select "Preview context"
  3. View breakdown of context items with token estimates
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5619 **State:** closed **Merged:** No --- ## Summary - Add context preview dialog accessible via command palette - Shows breakdown of context being sent to LLM before submission - Displays system prompt, instruction files, environment context, and conversation history with token estimates ## Motivation Users currently see total token count but cannot inspect what comprises the context. This makes it difficult to: - Identify unnecessary context consumption - Understand why token counts are high - Optimize context before sending ## Changes - `dialog-context.tsx`: New dialog component showing context breakdown by type - `app.tsx`: Register "Preview context" command in command palette ## Usage 1. Open command palette 2. Select "Preview context" 3. View breakdown of context items with token estimates
yindo added the pull-request label 2026-02-16 18:16:20 -05:00
yindo closed this issue 2026-02-16 18:16: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#11495