chore: remove debug logging and fix closure bug in test hooks

This commit is contained in:
2026-05-07 15:02:00 -04:00
parent 7d12806ce6
commit d4b4312dd2
2 changed files with 9 additions and 6 deletions
+7 -4
View File
@@ -907,8 +907,9 @@ class AppController:
if self.test_hooks_enabled and not getattr(self, "ui_manual_approve", False):
if "dialog_container" in task:
class AutoStepDialog:
def wait(self): return True, task.get("payload", "")
task["dialog_container"][0] = AutoStepDialog()
def __init__(self, t): self.t = t
def wait(self): return True, self.t.get("payload", "")
task["dialog_container"][0] = AutoStepDialog(task)
continue
dlg = MMAApprovalDialog(str(task.get("ticket_id") or ""), str(task.get("payload") or ""))
self._pending_mma_approvals.append(task)
@@ -928,8 +929,10 @@ class AppController:
if self.test_hooks_enabled and not getattr(self, "ui_manual_approve", False):
if "dialog_container" in task:
class AutoSpawnDialog:
def wait(self): return {'approved': True, 'abort': False, 'prompt': task.get("prompt"), 'context_md': task.get("context_md")}
task["dialog_container"][0] = AutoSpawnDialog()
def __init__(self, t): self.t = t
def wait(self):
return {'approved': True, 'abort': False, 'prompt': self.t.get("prompt"), 'context_md': self.t.get("context_md")}
task["dialog_container"][0] = AutoSpawnDialog(task)
continue
spawn_dlg = MMASpawnApprovalDialog(
str(task.get("ticket_id") or ""),
+2 -2
View File
@@ -51,9 +51,9 @@ def main() -> None:
if 'You are assigned to Ticket' in prompt:
# Extract ticket ID
import re
match = re.search(r'Ticket (ticket-[A-B]-1)', prompt)
match = re.search(r'Ticket (ticket-[A-Ba-b]-1)', prompt, re.IGNORECASE)
tid = match.group(1) if match else "unknown"
print(json.dumps({
"type": "message",
"role": "assistant",