Skip to content

Commit b78374e

Browse files
committed
directly hit enter to select
1 parent 003a140 commit b78374e

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

eval_protocol/cli_commands/upload.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -347,28 +347,22 @@ def _prompt_select_interactive(tests: list[DiscoveredTest]) -> list[DiscoveredTe
347347
choices = []
348348
for idx, test in enumerate(tests, 1):
349349
choice_text = _format_test_choice(test, idx)
350-
choices.append({"name": choice_text, "value": idx - 1, "checked": False})
350+
choices.append({"name": choice_text, "value": idx - 1})
351351

352352
print("\n")
353-
print("💡 Tip: Use ↑/↓ arrows to navigate, SPACE to select/deselect, ENTER when done")
354-
print(" You can select multiple tests!\n")
355-
selected_indices = questionary.checkbox(
356-
"Select evaluation tests to upload:",
353+
print("💡 Tip: Use ↑/↓ arrows to navigate, press ENTER to select\n")
354+
selected_index = questionary.select(
355+
"Select evaluation test to upload:",
357356
choices=choices,
358357
style=custom_style,
359358
).ask()
360359

361-
if selected_indices is None: # User pressed Ctrl+C
360+
if selected_index is None: # User pressed Ctrl+C
362361
print("\nUpload cancelled.")
363362
return []
364363

365-
if not selected_indices:
366-
print("\n⚠️ No tests were selected.")
367-
print(" Remember: Use SPACE bar to select tests, then press ENTER to confirm.")
368-
return []
369-
370-
print(f"\n✓ Selected {len(selected_indices)} test(s)")
371-
return [tests[i] for i in selected_indices]
364+
print(f"\n✓ Selected: {_format_test_choice(tests[selected_index], selected_index + 1)}")
365+
return [tests[selected_index]]
372366

373367
except ImportError:
374368
# Fallback to simpler implementation

0 commit comments

Comments
 (0)