From cb10437c3fc74dc4fe0572b1b1aba0772b83c8ef Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 12 Nov 2024 16:38:15 -0500 Subject: [PATCH] cli: Add default to interactive flow in new command (#2398) --- libs/cli/langgraph_cli/templates.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/cli/langgraph_cli/templates.py b/libs/cli/langgraph_cli/templates.py index 20d6efe8d..6cdacb331 100644 --- a/libs/cli/langgraph_cli/templates.py +++ b/libs/cli/langgraph_cli/templates.py @@ -64,9 +64,12 @@ def _choose_template() -> str: click.secho(template_name, fg="cyan", nl=False) click.secho(f" - {template_info['description']}", fg="white") - # Get the template choice from user - template_choice: int = click.prompt( - "Enter the number of your template choice", type=int + # Get the template choice from the user, defaulting to the first template if blank + template_choice: Optional[int] = click.prompt( + "Enter the number of your template choice (default is 1)", + type=int, + default=1, + show_default=False, ) template_keys = list(TEMPLATES.keys())