From 8a02ddd868d2d15c9a3b60f9174202a2e15e716b Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:19:04 -0800 Subject: [PATCH] [CLI] Handle dependencies js up --watch --- libs/cli/langgraph_cli/config.py | 4 +++- libs/cli/pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/cli/langgraph_cli/config.py b/libs/cli/langgraph_cli/config.py index e7ba0e208..57d2ccadd 100644 --- a/libs/cli/langgraph_cli/config.py +++ b/libs/cli/langgraph_cli/config.py @@ -124,6 +124,7 @@ def validate_config(config: Config) -> Config: { "node_version": config.get("node_version"), "dockerfile_lines": config.get("dockerfile_lines", []), + "dependencies": config.get("dependencies", []), "graphs": config.get("graphs", {}), "env": config.get("env", {}), "store": config.get("store"), @@ -528,8 +529,9 @@ def config_to_compose( f"env_file: {config['env']}" if isinstance(config["env"], str) else "" ) if watch: + dependencies = config.get("dependencies") or ["."] watch_paths = [config_path.name] + [ - dep for dep in config["dependencies"] if dep.startswith(".") + dep for dep in dependencies if dep.startswith(".") ] watch_actions = "\n".join( f"""- path: {path} diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index ff5fc1a88..ad17f350a 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.1.63" +version = "0.1.64" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT"