fix:The console UI directly throws an error when user input is empty (#438)

This commit is contained in:
xiaofeng 2025-07-17 18:15:13 +08:00 committed by GitHub
parent c0ad5e67ca
commit 237d6422c7
1 changed files with 5 additions and 1 deletions

View File

@ -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(