From 6b6c54c2032e0c1d723eef1eaa3a1905441ed2e7 Mon Sep 17 00:00:00 2001 From: minorun365 Date: Thu, 1 Jan 2026 14:11:32 +0900 Subject: [PATCH] fix: remove default value prefill from prompt inputs prompt_toolkit's `default` parameter not only sets the fallback value when Enter is pressed, but also prefills the input field. This caused the input to show "Choice [1]: 1" instead of "Choice [1]: " which made it confusing to enter different values. Changed to use empty prompt with `or` fallback for cleaner UX. --- .../cli/runtime/_configure_impl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bedrock_agentcore_starter_toolkit/cli/runtime/_configure_impl.py b/src/bedrock_agentcore_starter_toolkit/cli/runtime/_configure_impl.py index 73e3fb41..716f72a4 100644 --- a/src/bedrock_agentcore_starter_toolkit/cli/runtime/_configure_impl.py +++ b/src/bedrock_agentcore_starter_toolkit/cli/runtime/_configure_impl.py @@ -325,7 +325,7 @@ def _prompt_for_runtime(): default_idx = str(runtime_options.index(default_runtime) + 1) while True: - choice = prompt(f"Choice [{default_idx}]: ", default=default_idx).strip() + choice = prompt(f"Choice [{default_idx}]: ").strip() or default_idx if choice in ["1", "2", "3", "4"]: return runtime_options[int(choice) - 1] console.print("[red]Invalid choice. Please enter 1-4.[/red]") @@ -444,7 +444,7 @@ def _check_direct_code_deploy_available(): runtime_type = None else: while True: - choice = prompt("Choice [1]: ", default="1").strip() + choice = prompt("Choice [1]: ").strip() or "1" if choice in ["1", "2"]: deployment_type = deployment_options[int(choice) - 1][1] break