From 064d7ba23537cf3bd95b2dd9197bbbf146097b98 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 23 Feb 2026 20:09:41 -0500 Subject: [PATCH] fix(conductor): Apply review suggestions for track 'live_ux_test_20260223' --- simulation/live_walkthrough.py | 5 +++-- simulation/user_agent.py | 13 ++++++++----- simulation/workflow_sim.py | 7 +++++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/simulation/live_walkthrough.py b/simulation/live_walkthrough.py index 1ef9717..0e90ff2 100644 --- a/simulation/live_walkthrough.py +++ b/simulation/live_walkthrough.py @@ -24,9 +24,10 @@ def main(): project_name = f"LiveTest_{int(time.time())}" # Use actual project dir for realism git_dir = os.path.abspath(".") + project_path = os.path.join(git_dir, "tests", f"{project_name}.toml") - print(f"\n[Action] Scaffolding Project: {project_name}") - sim.setup_new_project(project_name, git_dir) + print(f"\n[Action] Scaffolding Project: {project_name} at {project_path}") + sim.setup_new_project(project_name, git_dir, project_path) # Enable auto-add so results appear in history automatically client.set_value("auto_add_history", True) diff --git a/simulation/user_agent.py b/simulation/user_agent.py index 6c661e5..f67d9c5 100644 --- a/simulation/user_agent.py +++ b/simulation/user_agent.py @@ -31,11 +31,14 @@ class UserSimAgent: break # We need to set a custom system prompt for the User Simulator - ai_client.set_custom_system_prompt(self.system_prompt) - - # We'll use a blank md_content for now as the 'User' doesn't need to read its own files - # via the same mechanism, but we could provide it if needed. - response = ai_client.send(md_content="", user_message=last_ai_msg) + try: + ai_client.set_custom_system_prompt(self.system_prompt) + # We'll use a blank md_content for now as the 'User' doesn't need to read its own files + # via the same mechanism, but we could provide it if needed. + response = ai_client.send(md_content="", user_message=last_ai_msg) + finally: + ai_client.set_custom_system_prompt("") + return response def perform_action_with_delay(self, action_func, *args, **kwargs): diff --git a/simulation/workflow_sim.py b/simulation/workflow_sim.py index f2b3a2d..5a12945 100644 --- a/simulation/workflow_sim.py +++ b/simulation/workflow_sim.py @@ -8,9 +8,12 @@ class WorkflowSimulator: self.client = hook_client self.user_agent = UserSimAgent(hook_client) - def setup_new_project(self, name, git_dir): + def setup_new_project(self, name, git_dir, project_path=None): print(f"Setting up new project: {name}") - self.client.click("btn_project_new") + if project_path: + self.client.click("btn_project_new_automated", user_data=project_path) + else: + self.client.click("btn_project_new") time.sleep(1) self.client.set_value("project_git_dir", git_dir) self.client.click("btn_project_save")