mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
test(autoroute): read the fuzzy selection through the public InquirerPy property
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
ca37f0f4ea
commit
bb612b889a
1 changed files with 3 additions and 4 deletions
|
|
@ -292,11 +292,10 @@ def _highlighted_choice(session: AppSession) -> Optional[str]:
|
|||
controls = [c for c in session.app.layout.find_all_controls() if isinstance(c, InquirerPyFuzzyControl)]
|
||||
if not controls:
|
||||
return None
|
||||
filtered_choices = controls[0]._filtered_choices
|
||||
index = controls[0].selected_choice_index
|
||||
if not 0 <= index < len(filtered_choices):
|
||||
try:
|
||||
return controls[0].selection["name"]
|
||||
except IndexError:
|
||||
return None
|
||||
return filtered_choices[index]["name"]
|
||||
|
||||
|
||||
async def _wait_until_highlighted(session: AppSession, name: str) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue