Skip to content

feat(tui): add response tokens/sec, paste expand command, and context usage dialog - #37052

Closed
SakshamKapoor2911 wants to merge 3 commits into
anomalyco:devfrom
SakshamKapoor2911:tui-enhancements
Closed

feat(tui): add response tokens/sec, paste expand command, and context usage dialog#37052
SakshamKapoor2911 wants to merge 3 commits into
anomalyco:devfrom
SakshamKapoor2911:tui-enhancements

Conversation

@SakshamKapoor2911

Copy link
Copy Markdown

Closes#6096, closes#8501, closes#6152

Type of change

  • New feature

What does this PR do?

Three TUI improvements:

  1. Tokens/sec in response footer — calculates total tokens across all categories divided by wall-clock duration, displayed after the duration in assistant message footers.

  2. Paste expand command — prompt.toggle_paste_expand expands all [Pasted ~X lines] placeholders inline using the existing expandTrackedPastedText helper. Available from command palette.

  3. Session context dialog — new dialog accessible via /context showing context window bar, token breakdown (input/output/reasoning/cache), cost, and per-message usage.

How did you verify your code works?

  • Typecheck in packages/tui passes with no new errors
  • All changes scoped to packages/tui/ — no server/protocol/SDK changes
  • Uses existing APIs: expandTrackedPastedText for paste expansion, sync store data for context dialog

Screenshots / recordings

UI changes — no screenshots yet, pending local verification.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actionsgithub-actionsBot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found one potentially related PR that overlaps with this PR's features:

Related PR:

However, the current PR (#37052) is the most recent and comprehensive implementation that combines three improvements. The older PR #12721 appears to address only one of the three features being added in the current PR.

Also found:

The current PR (#37052) appears to be the main implementation PR. You may want to check if PR #12721 was superseded or merged, and whether #33700 should be referenced alongside this new PR.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actionsgithub-actionsBot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant

@SakshamKapoor2911