fix(tui): make action_show_agent_picker async#5685
Open
alidevh wants to merge 1 commit intoaden-hive:mainfrom
Open
fix(tui): make action_show_agent_picker async#5685alidevh wants to merge 1 commit intoaden-hive:mainfrom
alidevh wants to merge 1 commit intoaden-hive:mainfrom
Conversation
The chat-repl command handler unconditionally awaited app.action_show_agent_picker(). Previously the action was a plain method, causing a TypeError (“await NoneType”) and crashing the TUI whenever `/agents` was executed. This change declares the method as an async coroutine so the caller and callee agree. No behaviour change beyond fixing the crash. Manual smoke test: 1. start Ollama (or any LiteLLM provider) 2. launch `hive tui --model ollama/llama2` 3. type `/agents` – picker appears without error No unit tests exist for the TUI widgets; the issue can be reproduced and verified interactively. Closes aden-hive#5627.
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.
Description
Fix crash in TUI when
/agentsis invoked. TheAdenTUI.action_show_agent_pickermethod is now defined asasync defto match the awaited call in the chat REPL. This preventsTypeError: object NoneType cannot be used in 'await' expression.Type of Change
Related Issues
Fixes #5627
Changes Made
AdenTUI.action_show_agent_pickerasasync def.Testing
Describe the tests you ran to verify your changes:
Manual verification:
hive tui --model ollama/llama2or setHIVE_MODEL)./agents.Existing unit tests pass (no TUI tests currently exist for this flow).
Lint passes (
ruff check .).Checklist
Screenshots (if applicable)
N/A — no UI changes, only TUI behavior fix.