Draft
Conversation
Displayed text and saved text during an interrupt now matches perfectly. Interrupting the AI is super fluid. You can do it at any point in its response. Last issue to fix is giving the user control immediately during an early interrupt (right now it still waits for input from AI).
A new polling method was added to handle early interrupts. Now early interrupts are handled as fast as regular ones.
Instead of explicitly approving or denying a tool call, users can press ESC to regain control of the conversation and type more content to the AI. This is good if you need to provide more context to the AI before a tool call is made, or if it is performing a bad tool call and you want to tell it so (like ending itself while trying to build cycod).
Right now, the chat-history is saved with an Assistant message that declares the function call was cancelled (`{"role":"assistant","content":"Function call cancelled by user - returning to conversation."}`), but this doesn't seem to carry the same "weight" (importance to the AI) as the actual function call returning this same information (like is done when the function is approved or denied). I'll be looking into this in the next commit.
Now cancelling the request outputs exactly like approve and deny, so it should be much clearer both to the AI and user what has happened.
Moved UserWantsControlException and function call decision enum inside ChatCommand for better encapsulation. Replaced CallDeniedMessage with CancelledFunctionResultMessage for clarity. Removed redundant cancellation tracking and streamlined function call completion logic.
e578c7f to
f72c254
Compare
Potential fix for TRX files. If className is null, dorny will be unable to parse. We need checks around that.
This reverts commit f0f28f8.
Refrains from polling for ESC (interrupts) while generating titles. This prevents the polling process from accidentally consuming valid input.
Previously there was a race condition between title generation and "waste time".
This reverts commit 7245aff.
Removed polling-based implementation that cost lots of CPU, in favor of an event-based system.
If FileLogger fails in subprocess, the warning message propagates back up to the title process, which uses that warning message as the title. This new logic catches this behavior and returns null. This should be improved upon in the future; improve subprocess logging to prevent contamination in the first place.
robch
added a commit
that referenced
this pull request
Dec 14, 2025
- Complete analysis of current inner AI loop problems - Detailed pipeline + hooks architecture design - Hook points for extensibility (PostUserInput, PreToolCall, etc.) - ChatContext object model for message manipulation - Performance & responsiveness analysis (maintains 10ms interrupt latency) - Migration strategy and implementation tasks - Addresses interrupt responsiveness concerns from PR #65
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.
Press double escape to interrupt the AI. Also, press escape at a function approval prompt to regain conversation control.
Known issues