Skip to content

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

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#37029
SakshamKapoor2911 wants to merge 3 commits into
anomalyco:devfrom
SakshamKapoor2911:tui-enhancements

Conversation

@SakshamKapoor2911

@SakshamKapoor2911SakshamKapoor2911 commented Jul 15, 2026

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 passes with no new errors (only pre-existing errors in llm/schema/plugin packages)
  • All changes scoped to packages/tui/ — no server/protocol/SDK changes needed
  • 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

github-actionsBot commented Jul 15, 2026

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.
  • No "Type of change" checkbox is checked. Please select at least one.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

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 my search, I found related PRs that address the same issues being fixed by PR #37029:

Related PRs:

  1. PR feat(tui): add tokens per second to response footer #12721 - "feat(tui): add tokens per second to response footer"

  2. PR fix(tui): expand pasted text placeholders literally #33700 - "fix(tui): expand pasted text placeholders literally"

  3. PR feat(tui): show estimated live token throughput in footer #30164 - "feat(tui): show estimated live token throughput in footer"

These PRs appear to be addressing the same or overlapping features that are being consolidated in PR #37029. You may want to check if these are closed/merged or if PR #37029 supersedes them.

@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