π style: show interrupted hint when AI generation is stopped#13397
π style: show interrupted hint when AI generation is stopped#13397
Conversation
Display "Interrupted Β· What should I do instead?" text below the message when user stops AI generation, replacing the infinite dotting animation. Fixes LOBE-4462 Fixes LOBE-5726 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ONLY-yours - This involves conversation UI and chat operation state changes (interrupted hint for streaming). Please take a look. |
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## canary #13397 +/- ##
=======================================
Coverage 66.88% 66.88%
=======================================
Files 1905 1905
Lines 154323 154338 +15
Branches 18472 18475 +3
=======================================
+ Hits 103222 103236 +14
- Misses 50981 50982 +1
Partials 120 120
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5efc7cb46
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Allow users to edit queued messages by clicking the pencil icon, which removes the message from the queue and restores its content to the input editor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously isInterrupted used .some() to check if any cancelled AI runtime operation existed for a message. In stop-then-retry flows, the old cancelled op persisted alongside the new completed one, causing the interrupted hint to reappear after the retry finished. Now only the latest AI runtime operation is checked, so completed retries correctly clear the interrupted state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
For assistant groups, continuation runs attach cancelled operations to lastBlockId (contentId) rather than the group root. Check isInterrupted on both the group root and the active block so the interrupted hint is shown correctly for stopped group continuations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test for resolving aborted tools after cancellation now correctly expects 'cancelled' status, since completeOperation preserves the user's intentional cancellation rather than overwriting it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
β€οΈ Great PR @arvinxx β€οΈ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
β¦#13397) * β¨ feat: show interrupted hint when AI generation is stopped Display "Interrupted Β· What should I do instead?" text below the message when user stops AI generation, replacing the infinite dotting animation. Fixes LOBE-4462 Fixes LOBE-5726 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * β¨ feat: add edit button to queued messages tray Allow users to edit queued messages by clicking the pencil icon, which removes the message from the queue and restores its content to the input editor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * π chore: move record-electron-demo.sh to electron-testing skill Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * π fix: derive isInterrupted from latest runtime operation only Previously isInterrupted used .some() to check if any cancelled AI runtime operation existed for a message. In stop-then-retry flows, the old cancelled op persisted alongside the new completed one, causing the interrupted hint to reappear after the retry finished. Now only the latest AI runtime operation is checked, so completed retries correctly clear the interrupted state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * π fix: read group interruption from active block ID For assistant groups, continuation runs attach cancelled operations to lastBlockId (contentId) rather than the group root. Check isInterrupted on both the group root and the active block so the interrupted hint is shown correctly for stopped group continuations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * β test: update test to expect cancelled status after user stop The test for resolving aborted tools after cancellation now correctly expects 'cancelled' status, since completeOperation preserves the user's intentional cancellation rather than overwriting it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
isInterruptedstate toMessageOperationState, computed from cancelled AI runtime operationscompleteOperationto preservecancelledstatus instead of overwriting it withcompletedAssistantMessageandAssistantGroup(with tool use) message typesFixes LOBE-4462
Fixes LOBE-5726
Test plan
π€ Generated with Claude Code