chore: remove debug logging and fix closure bug in test hooks
This commit is contained in:
@@ -907,8 +907,9 @@ class AppController:
|
|||||||
if self.test_hooks_enabled and not getattr(self, "ui_manual_approve", False):
|
if self.test_hooks_enabled and not getattr(self, "ui_manual_approve", False):
|
||||||
if "dialog_container" in task:
|
if "dialog_container" in task:
|
||||||
class AutoStepDialog:
|
class AutoStepDialog:
|
||||||
def wait(self): return True, task.get("payload", "")
|
def __init__(self, t): self.t = t
|
||||||
task["dialog_container"][0] = AutoStepDialog()
|
def wait(self): return True, self.t.get("payload", "")
|
||||||
|
task["dialog_container"][0] = AutoStepDialog(task)
|
||||||
continue
|
continue
|
||||||
dlg = MMAApprovalDialog(str(task.get("ticket_id") or ""), str(task.get("payload") or ""))
|
dlg = MMAApprovalDialog(str(task.get("ticket_id") or ""), str(task.get("payload") or ""))
|
||||||
self._pending_mma_approvals.append(task)
|
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 self.test_hooks_enabled and not getattr(self, "ui_manual_approve", False):
|
||||||
if "dialog_container" in task:
|
if "dialog_container" in task:
|
||||||
class AutoSpawnDialog:
|
class AutoSpawnDialog:
|
||||||
def wait(self): return {'approved': True, 'abort': False, 'prompt': task.get("prompt"), 'context_md': task.get("context_md")}
|
def __init__(self, t): self.t = t
|
||||||
task["dialog_container"][0] = AutoSpawnDialog()
|
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
|
continue
|
||||||
spawn_dlg = MMASpawnApprovalDialog(
|
spawn_dlg = MMASpawnApprovalDialog(
|
||||||
str(task.get("ticket_id") or ""),
|
str(task.get("ticket_id") or ""),
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ def main() -> None:
|
|||||||
if 'You are assigned to Ticket' in prompt:
|
if 'You are assigned to Ticket' in prompt:
|
||||||
# Extract ticket ID
|
# Extract ticket ID
|
||||||
import re
|
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"
|
tid = match.group(1) if match else "unknown"
|
||||||
|
|
||||||
print(json.dumps({
|
print(json.dumps({
|
||||||
"type": "message",
|
"type": "message",
|
||||||
"role": "assistant",
|
"role": "assistant",
|
||||||
|
|||||||
Reference in New Issue
Block a user