From c14c548e0c28b25d02aa42b731788546d691b093 Mon Sep 17 00:00:00 2001 From: xiaofeng <1330661071@qq.com> Date: Thu, 17 Jul 2025 18:15:13 +0800 Subject: [PATCH] fix:The console UI directly throws an error when user input is empty (#438) --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index aee1500..e23e137 100644 --- a/main.py +++ b/main.py @@ -140,7 +140,11 @@ if __name__ == "__main__": if args.query: user_query = " ".join(args.query) else: - user_query = input("Enter your query: ") + # Loop until user provides non-empty input + while True: + user_query = input("Enter your query: ") + if user_query is not None and user_query != "": + break # Run the agent workflow with the provided parameters ask(