fix(conductor): Apply review suggestions for track 'tiered_context_scoping_hitl_approval'

This commit is contained in:
2026-02-27 23:04:01 -05:00
parent 4b450e01b8
commit 82f73e7267
2 changed files with 5 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
import ai_client
import json
import asyncio
import threading
import time
from typing import List, Optional, Tuple
from dataclasses import asdict
import events
@@ -146,9 +148,6 @@ def confirm_execution(payload: str, event_queue: events.AsyncEventQueue, ticket_
"""
Pushes an approval request to the GUI and waits for response.
"""
import threading
import time
import asyncio
# We use a list container so the GUI can inject the actual Dialog object back to us
# since the dialog is created in the GUI thread.
dialog_container = [None]
@@ -187,9 +186,6 @@ def confirm_spawn(role: str, prompt: str, context_md: str, event_queue: events.A
Pushes a spawn approval request to the GUI and waits for response.
Returns (approved, modified_prompt, modified_context)
"""
import threading
import time
import asyncio
dialog_container = [None]
@@ -238,6 +234,8 @@ def confirm_spawn(role: str, prompt: str, context_md: str, event_queue: events.A
return approved, modified_prompt, modified_context
return False, prompt, context_md
def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files: List[str] = None, event_queue: events.AsyncEventQueue = None, engine: Optional['ConductorEngine'] = None, md_content: str = ""):
"""
Simulates the lifecycle of a single agent working on a ticket.