Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions eval_protocol/cli_commands/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,28 +347,22 @@ def _prompt_select_interactive(tests: list[DiscoveredTest]) -> list[DiscoveredTe
choices = []
for idx, test in enumerate(tests, 1):
choice_text = _format_test_choice(test, idx)
choices.append({"name": choice_text, "value": idx - 1, "checked": False})
choices.append({"name": choice_text, "value": idx - 1})

print("\n")
print("💡 Tip: Use ↑/↓ arrows to navigate, SPACE to select/deselect, ENTER when done")
print(" You can select multiple tests!\n")
selected_indices = questionary.checkbox(
"Select evaluation tests to upload:",
print("💡 Tip: Use ↑/↓ arrows to navigate, press ENTER to select\n")
selected_index = questionary.select(
"Select evaluation test to upload:",
choices=choices,
style=custom_style,
).ask()

if selected_indices is None: # User pressed Ctrl+C
if selected_index is None: # User pressed Ctrl+C
print("\nUpload cancelled.")
return []

if not selected_indices:
print("\n⚠️ No tests were selected.")
print(" Remember: Use SPACE bar to select tests, then press ENTER to confirm.")
return []

print(f"\n✓ Selected {len(selected_indices)} test(s)")
return [tests[i] for i in selected_indices]
print(f"\n✓ Selected: {_format_test_choice(tests[selected_index], selected_index + 1)}")
return [tests[selected_index]]
Comment on lines +364 to +365

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore ability to select multiple tests interactively

The new questionary.select flow only ever returns a single index, so _prompt_select_interactive now always returns a list with one test (return [tests[selected_index]]). The CLI upstream (upload_command) and the fallback prompt continue to support selecting multiple tests in one run, which was previously possible with the checkbox UI. With this change a user who discovers several tests must rerun the upload command for each test, making the interactive path functionally inconsistent with the rest of the command. Consider switching back to a multi-select widget or otherwise preserving multi-selection support.

Useful? React with 👍 / 👎.


except ImportError:
# Fallback to simpler implementation
Expand Down
Loading