Fix spinner bugs: use vector and fix line deletion#29
Open
pbaille wants to merge 5 commits intosteveyegge:mainfrom
Open
Fix spinner bugs: use vector and fix line deletion#29pbaille wants to merge 5 commits intosteveyegge:mainfrom
pbaille wants to merge 5 commits intosteveyegge:mainfrom
Conversation
Two bugs in efrit-spinner.el: 1. `efrit-spinner-frames` was defined as a list but `aref` on line 51 requires a vector. Changed to vector type. 2. `efrit-spinner-stop` used hardcoded length to delete the "Thinking..." line, but Unicode spinner chars are multi-byte causing "Args out of range" errors. Now uses forward-line to find actual line end. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
efrit-executor--handle-error was passing a raw error string to callbacks, but efrit-do-async--api-call expects a hash-table response. This caused efrit-response-error to return nil (strings aren't hash-tables), making the error fall through as a "valid" response with nil content/stop_reason. Now creates a proper error response hash-table with "error" field containing type and message, so the standard efrit-response-error accessor works. Fixes: ef-959 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
|
Do you need to modify the beads database? I don't think the changes there are in sync with the code changes in the PR. |
Collaborator
|
also #27 has the same fixes so I think it's better to merge that one for the spinner and line deletion |
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.
Summary
efrit-spinner-framesto use a vector instead of a list (required byaref)efrit-spinner-stopto properly delete the "Thinking..." line using line-based deletion instead of hardcoded character countProblem
Two bugs in
efrit-spinner.elprevented the chat from working:arefon line 51 requires an array/vector, butefrit-spinner-frameswas defined as a list, causingWrong type argument: arrayperrorThe spinner stop function used
(length "System: Thinking X\n")(19 chars) to delete the line, but Unicode spinner characters (⠋⠙⠹ etc.) are multi-byte, causingArgs out of rangebuffer errorsTest plan
make compilepasses🤖 Generated with Claude Code