Fix UI hangs, cancellation, history limits, and robustness issues#1
Open
ExTV wants to merge 1 commit into
Open
Fix UI hangs, cancellation, history limits, and robustness issues#1ExTV wants to merge 1 commit into
ExTV wants to merge 1 commit into
Conversation
- run_bash_tool: capture output via temp file instead of command substitution, so commands that leave background children no longer freeze the UI forever; add timeout -k hard-kill fallback - Keep the UI responsive during API calls and tool runs: curl and tool commands run as background jobs while events are drained, Send becomes a Stop button that cancels the run, and quit/collapse/drag/Copy/Speak keep working; cancelled tool calls still get tool replies so the conversation history stays valid - Build request bodies via stdin/files instead of --argjson/-d argv, which failed with 'Argument list too long' past the kernel's 128KiB per-argument limit; surface real curl errors instead of a generic 'Network error' - Trim conversation history between turns (keeping the system prompt and never orphaning tool results) so context and cost stay bounded - Handle the destroy event so the script exits when Android kills the overlay, and update screen bounds on config changes - Clamp dragging to the screen so the bubble can't be lost off-screen - Sanitize control characters (\r, ANSI escapes, the protocol's RS delimiter) out of transcript text and cap its length, fixing protocol corruption and progressively slower updates - Ensure assistant messages always carry content or tool_calls; validate API responses are JSON before parsing - Preserve '=' characters when parsing config values - Check for required tools at startup; warn if termux-api is missing - Default model: deepseek-chat (documented alias); still overridable - README: document Stop, model override, and name the GPL-3.0 license Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019oZVy7ndztR55RNhY8Hv99
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.
substitution, so commands that leave background children no longer
freeze the UI forever; add timeout -k hard-kill fallback
commands run as background jobs while events are drained, Send becomes
a Stop button that cancels the run, and quit/collapse/drag/Copy/Speak
keep working; cancelled tool calls still get tool replies so the
conversation history stays valid
which failed with 'Argument list too long' past the kernel's 128KiB
per-argument limit; surface real curl errors instead of a generic
'Network error'
never orphaning tool results) so context and cost stay bounded
overlay, and update screen bounds on config changes
delimiter) out of transcript text and cap its length, fixing protocol
corruption and progressively slower updates
API responses are JSON before parsing
Co-Authored-By: Claude Fable 5 noreply@anthropic.com