Repository navigation
feat(chat): the context left, in the chat's status line - #71
Merged
Merged
Conversation
One-tap messages (continue, yes, no, commit and push, retry to start with), as collie's Quick dock has. A reply goes through the composer's own send path, so it is queued while the agent works and taken as the answer when a question card is open; a draft in the box is left alone. The list lives in each device's settings: quick replies are a phone thing (a PC has a keyboard), so nothing is stored on the server. Settings -> Quick replies edits it (up to 12, 200 characters each; blank rows are kept while being typed and never shown), and a button beside the paperclip hides or shows the row, remembered per device. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row takes a line above the message box on every pane; it now waits for the ⚡ button, and the choice is remembered per device as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Transcripts already record what each request filled:
- Codex: token_count events with last_token_usage and model_context_window
- Claude Code: assistant usage, input + cache creation + cache read,
subagent (sidechain) entries skipped
- omp/omo/gjc: message usage, input + cacheRead + cacheWrite
ConversationMetadata gains an optional `context { used, window }`. The
window is only what the transcript leaves no doubt about: Codex states it,
and a Claude request past 200k can only have run in the 1M window (kept
through a compaction). Otherwise the line shows the tokens used, never a
guessed percentage.
The composer shows `74% left` or `68k used`, red at 20% or less, with the
counts on hover. PaneTerminal's metadata dedupe compared only model and
effort, so it now compares the context too, or the number would never move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #70 (quick replies). Merge #70 first; this PR then shows only its own commit. It was rebased onto #70 because both add to the same CHANGELOG and translation lines.
What
The chat's status line shows how much context is left, kept as short as possible:
74% left68k of 258k tokens57% left435k of 1M tokens68k usedIt turns red at 20% left or less, when a compaction is near.
Where the numbers come from (
server/conversation-metadata.ts)event_msgtoken_count→info.last_token_usage.total_tokensagainstinfo.model_context_window.message.usage,input + cache_creation + cache_read. Sidechain (subagent) entries and synthetic messages are skipped.message.usage,input + cacheRead + cacheWrite.Checked against real transcripts on this PC: Claude 435k/1M, Codex 67.7k/258.4k, omo 167k/unknown.
Also fixed
PaneTerminal's metadata dedupe compared only model and effort, so a context change would never have reached the composer. It now compares the context too.Tests
bun run typecheck;bun test410/410;test:ui9/9.test:uirun on the unrebased branch stopped after 4 scenarios; the next three runs passed.formatTokensandcontextLeftPercent.74% 남음and15% 남음in red, English167k used): no overflow.Remote PCs
The numbers are computed on the server that reads the transcript. Remote panes show them once their bridge runs a bundle with this change (next
remote-vN). Until then the field is absent and nothing is shown.🤖 Generated with Claude Code