feat(cli): add animated progress bar to /compress command#26973
feat(cli): add animated progress bar to /compress command#26973rushikeshsakharleofficial wants to merge 15 commits into
Conversation
Add asymptotic filling progress bar to CompressionMessage that animates toward 90% while compression is pending, then snaps to 100% on completion.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user experience of the /compress command by adding a visual progress indicator. By utilizing the existing ProgressBar component and a new effect hook, the UI now provides a clearer sense of progress during long-running compression tasks without introducing new dependencies. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a progress bar to the CompressionMessage component in the CLI UI. It utilizes React's useState and useEffect hooks to simulate an incremental progress animation while compression is pending, which completes once the process finishes. The component's layout was also updated to a column-based structure to display the progress bar and percentage below the status message. I have no feedback to provide as there were no review comments.
Three bugs prevented rate limit from appearing in /stats: 1. slashCommandProcessor dropped all quota fields when converting STATS message 2. HistoryItemDisplay never passed quotaStats/currentModel/creditBalance to StatsDisplay 3. StatsDisplay accepted quotaStats prop but never rendered it Add Rate Limit row to Interaction Summary section showing remaining/limit and reset time.
- Show ↑input ↓output token counts in footer during chat - Track lastOutputTokenCount in uiTelemetry per API response - Tool execution uses ● indicator and Name(description) format - Replace bordered output box with ⎿ connector layout - Show Waiting… text while tool executing with no output yet
…ssing Add StreamingState.Processing set before agent.send() so the spinner appears during the 0.5-3s pre-request window (hook execution, compression check, masking scan) instead of leaving the UI blank.
Adds length-based cache to ToolOutputMaskingService.mask(). On every turn where no new tool outputs were added, the O(n) backward history scan is skipped entirely. Cache invalidated on compression and history replacement.
code-outline-graph update completes in <2s normally. 30s was causing up to 30s blocking delay after every write/edit tool call in agentic tasks.
Replace last-request prompt/output counts with session cumulative totals. Input arrow now shows total tokens sent across all requests; output arrow shows total candidate tokens received. Context % remains context-window based.
Summary
/compress(a.k.a./summarize,/compact) command UIProgressBarcomponent; no new dependenciesChanges
packages/cli/src/ui/components/messages/CompressionMessage.tsxuseState,useEffectfrom React and existingProgressBarcomponentuseEffectthat drives a simulated progress value (150ms interval, easing toward 90%)isPendingflips tofalse, progress snaps to 100%Test plan
/compressin an active session and observe bar filling during compression