-
Notifications
You must be signed in to change notification settings - Fork 14
🤖 feat: implement soft-interrupts with block boundary detection #583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
fb4e0db to
41c5c32
Compare
12c5222 to
a608663
Compare
41c5c32 to
7cf2edd
Compare
8c7128c to
bb413be
Compare
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
11fb6fe to
385a16c
Compare
385a16c to
13c3dcb
Compare
13c3dcb to
bc153b6
Compare
Soft interrupts allow graceful stream cancellation at block boundaries (tool-result, reasoning-end, etc). First Escape triggers soft interrupt with orange UI feedback and waits for boundary; second Escape forces immediate abort.
Implementation
Frontend state tracking:
useStateinterruptStream({ soft: true })interruptStream({ soft: false })useEffectwatchingcanInterruptBackend behavior:
interruptStream(workspaceId, { soft?, abandonPartial? })soft: true: Sets internal flag, cancels at next block boundarysoft: false: Immediate abort viacancelStreamSafelyUI feedback:
Testing
Generated with
mux