Merge pull request #167 from Pythagora-io/feature/auto-confirm-breakdown

Auto confirm breakdown by default, unless arg provided
This commit is contained in:
LeonOstrez
2025-05-28 12:18:40 +01:00
committed by GitHub
5 changed files with 14 additions and 0 deletions

View File

@@ -56,6 +56,9 @@ class ChatWithBreakdownMixin:
}
)
if self.state_manager.auto_confirm_breakdown:
break
chat = await self.ask_question(
MIX_BREAKDOWN_CHAT_PROMPT,
buttons={"yes": "Yes, looks good!"},

View File

@@ -200,6 +200,13 @@ def parse_arguments() -> Namespace:
parser.add_argument("--email", help="User's email address", required=False)
parser.add_argument("--extension-version", help="Version of the VSCode extension", required=False)
parser.add_argument("--use-git", help="Use Git for version control", action="store_true", required=False)
parser.add_argument(
"--no-auto-confirm-breakdown",
help="Disable auto confirm when LLM requests user input",
action="store_false",
dest="auto_confirm_breakdown",
required=False,
)
parser.add_argument("--access-token", help="Access token", required=False)
return parser.parse_args()

View File

@@ -253,6 +253,8 @@ async def async_main(
sm = StateManager(db, ui)
if args.access_token:
sm.update_access_token(args.access_token)
if not args.auto_confirm_breakdown:
sm.auto_confirm_breakdown = False
ui_started = await ui.start()
if not ui_started:
return False

View File

@@ -53,6 +53,7 @@ class StateManager:
self.blockDb = False
self.git_available = False
self.git_used = False
self.auto_confirm_breakdown = True
self.options = {}
self.access_token = None
self.async_tasks = None

View File

@@ -58,6 +58,7 @@ def test_parse_arguments(mock_ArgumentParser):
"--extension-version",
"--use-git",
"--access-token",
"--no-auto-confirm-breakdown",
}
parser.parse_args.assert_called_once_with()