feat(simulation): add discussion switching and truncation simulation logic

This commit is contained in:
2026-02-23 19:26:51 -05:00
parent fdb9b59d36
commit 5e1b965311
3 changed files with 48 additions and 5 deletions

View File

@@ -16,6 +16,30 @@ class WorkflowSimulator:
self.client.click("btn_project_save")
time.sleep(1)
def create_discussion(self, name):
print(f"Creating discussion: {name}")
self.client.set_value("disc_new_name_input", name)
self.client.click("btn_disc_create")
time.sleep(1)
def switch_discussion(self, name):
print(f"Switching to discussion: {name}")
self.client.select_list_item("disc_listbox", name)
time.sleep(1)
def load_prior_log(self):
print("Loading prior log")
self.client.click("btn_load_log")
# This usually opens a file dialog which we can't easily automate from here
# without more hooks, but we can verify the button click.
time.sleep(1)
def truncate_history(self, pairs):
print(f"Truncating history to {pairs} pairs")
self.client.set_value("disc_truncate_pairs", pairs)
self.client.click("btn_disc_truncate")
time.sleep(1)
def run_discussion_turn(self, user_message=None):
if user_message is None:
# Generate from AI history