Skip to content

Conversation

tingwai
Copy link
Collaborator

@tingwai tingwai commented Sep 11, 2025

Description

Previously compaction messages were not very clear and would disappear when its done compacting so I've

  • refactored the existing loading animation we have into a ActionStatus component so that when it is compacting there's an animation so users won't think its stuck
  • /compact slash command now also uses this new component
  • ESC key will interrupt compaction both when its automatic compaction or when /compact is called
  • uses new message queue to queue messages while compacting

For video demo purposes I've set my compaction threshold extremely low so every new message causes a compaction.

Screen.Recording.2025-09-11.at.10.35.44.AM.mov

@tingwai tingwai requested a review from a team as a code owner September 11, 2025 00:45
@tingwai tingwai requested review from RomneyDa and removed request for a team September 11, 2025 00:45
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 11, 2025
Copy link

AI Code Review

AI review failed due to service initialization issues. Please check the Continue API key and configuration.

No specific line comments generated.


💡 To request a new detailed review, comment @continue-detailed-review

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 11, 2025
@tingwai tingwai force-pushed the tingwai/con-3770-compaction-ui branch 2 times, most recently from a4ca79e to e2f3c44 Compare September 11, 2025 01:47
@tingwai tingwai changed the title feat: show Compacting history message as status message feat: improve compaction UI, show compaction message as status message Sep 11, 2025
@tingwai tingwai force-pushed the tingwai/con-3770-compaction-ui branch from e2f3c44 to d74fde6 Compare September 11, 2025 04:35
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Sep 11, 2025
@tingwai tingwai force-pushed the tingwai/con-3770-compaction-ui branch from d74fde6 to f951269 Compare September 11, 2025 04:38
@tingwai tingwai force-pushed the tingwai/con-3770-compaction-ui branch from f951269 to 54846d4 Compare September 11, 2025 04:38
Copy link
Collaborator Author

@tingwai tingwai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review now

);
expect(mockCallbacks.onSystemMessage).toHaveBeenCalledWith(
"Chat history auto-compacted successfully.",
"Chat history auto-compacted successfully.",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed checkmarks to be consistent with other system messages, we don't use check marks anywhere else

@@ -1,3 +1,5 @@
/* eslint-disable max-lines */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried refactoring useChat.ts to reduce line numbers but it got way too messy, would be better to tackle that another time / PR

@chezsmithy
Copy link
Contributor

Did something similar here: #7541

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice tests

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 11, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 11, 2025
@tingwai tingwai merged commit 2742056 into main Sep 11, 2025
69 of 71 checks passed
@tingwai tingwai deleted the tingwai/con-3770-compaction-ui branch September 11, 2025 20:44
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Sep 11, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 11, 2025
@github-actions github-actions bot added the tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys label Sep 11, 2025
@RomneyDa
Copy link
Collaborator

Did something similar here: #7541

nice, taking a look. just for clarity @tingwai did it for the CLI

@sestinj
Copy link
Contributor

sestinj commented Sep 11, 2025

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm This PR has been approved by a maintainer released size:XL This PR changes 500-999 lines, ignoring generated files. tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants