From a7f9646a68cca8325665671aba400185aa3dc0fc Mon Sep 17 00:00:00 2001 From: LeonOstrez Date: Tue, 3 Jun 2025 07:56:20 +0200 Subject: [PATCH] nitpicking --- core/agents/spec_writer.py | 6 +++--- core/cli/helpers.py | 4 ++-- core/cli/main.py | 4 ++-- tests/cli/test_cli.py | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/agents/spec_writer.py b/core/agents/spec_writer.py index c582b625..2320fd3a 100644 --- a/core/agents/spec_writer.py +++ b/core/agents/spec_writer.py @@ -67,9 +67,9 @@ class SpecWriter(BaseAgent): await self.ui.clear_main_logs() - # Check if initialPrompt is provided in command line arguments - if self.args and hasattr(self.args, "initialPrompt") and self.args.initialPrompt: - description = self.args.initialPrompt.strip() + # Check if initial_prompt is provided in command line arguments + if self.args and self.args.initial_prompt: + description = self.args.initial_prompt.strip() await self.ui.send_back_logs( [ { diff --git a/core/cli/helpers.py b/core/cli/helpers.py index 5d77f744..1ec4aa91 100644 --- a/core/cli/helpers.py +++ b/core/cli/helpers.py @@ -198,7 +198,7 @@ def parse_arguments() -> Namespace: --extension-version: Version of the VSCode extension, if used --use-git: Use Git for version control --access-token: Access token - --initialPrompt: Initial prompt to automatically start a new project with 'node' stack + --initial-prompt: Initial prompt to automatically start a new project with 'node' stack :return: Parsed arguments object. """ version = get_version() @@ -269,7 +269,7 @@ def parse_arguments() -> Namespace: help="Port for the IPC server (default: 8222)", ) parser.add_argument( - "--initialPrompt", + "--initial-prompt", help="Initial prompt to automatically start a new project with 'node' stack", required=False, ) diff --git a/core/cli/main.py b/core/cli/main.py index afe20dd3..1475d720 100644 --- a/core/cli/main.py +++ b/core/cli/main.py @@ -123,8 +123,8 @@ async def start_new_project(sm: StateManager, ui: UIBase, args: Namespace = None :return: True if the project was created successfully, False otherwise. """ - # Check if initialPrompt is provided, if so, automatically select "node" - if args and hasattr(args, "initialPrompt") and args.initialPrompt: + # Check if initial_prompt is provided, if so, automatically select "node" + if args and args.initial_prompt: stack_button = "node" await ui.send_back_logs( diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index dfaedec6..38452c5a 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -63,6 +63,7 @@ def test_parse_arguments(mock_ArgumentParser): "--use-git", "--access-token", "--no-auto-confirm-breakdown", + "--initial-prompt", } parser.parse_args.assert_called_once_with()