diff --git a/src/codegen/cli/commands/create/main.py b/src/codegen/cli/commands/create/main.py index 6a95bdb59..6185f63ca 100644 --- a/src/codegen/cli/commands/create/main.py +++ b/src/codegen/cli/commands/create/main.py @@ -93,6 +93,7 @@ def create_command(session: CodegenSession, name: str, path: Path, description: with create_spinner("Generating function (using LLM, this will take ~10s)") as status: response = RestAPI(session.token).create(name=name, query=description) code = convert_to_cli(response.code, session.language, name) + prompt_path.parent.mkdir(parents=True, exist_ok=True) prompt_path.write_text(response.context) else: # Use default implementation