fix(banner): show honcho tools as available when configured#3810
Merged
fix(banner): show honcho tools as available when configured#3810
Conversation
The honcho check_fn only checked runtime session state, which isn't set until the agent initializes. At banner time, honcho tools showed as red/disabled even when properly configured. Now checks configuration (enabled + api_key/base_url) as a fallback when the session context isn't active yet. Fast path (session active) unchanged; slow path (config check) only runs at banner time. Adds 4 tests covering: session active, configured but no session, not configured, and import failure graceful fallback. Closes #1843.
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
Fixes honcho tools showing as red/disabled in the startup banner even when properly configured.
Problem
The honcho
check_fnonly checked runtime session state (_session_manager is not None), which isn't injected untilAIAgent.__init__(). The banner renders before agent construction, so honcho tools always appeared unavailable at startup.Fix
Updated
_check_honcho_available()intools/honcho_tools.pyto check configuration as a fallback:HonchoClientConfig.from_global_config()and checkenabled + api_key/base_urlhoncho_integrationisn't installed, return FalseThis correctly reflects "will honcho work once the session starts?" rather than "is honcho running right now?"
Tests
4 new tests in
test_honcho_tools.py:Closes #1843 (took the intent, implemented differently — the original PR had a dict key bug and the delegate_tool change was stale).