fix(mma): Final refinement of delegation command and log tracking

This commit is contained in:
2026-02-26 08:38:10 -05:00
parent 1933fcfb40
commit a664dfbbec

View File

@@ -198,10 +198,10 @@ def execute_agent(role: str, prompt: str, docs: list[str]) -> str:
command_text += f"\n\nTASK: {prompt}\n\n" command_text += f"\n\nTASK: {prompt}\n\n"
# Use subprocess with input to pipe the prompt via stdin, avoiding WinError 206. # Use subprocess with input to pipe the prompt via stdin, avoiding WinError 206.
# We use -p '-' to read from stdin if supported, otherwise just a placeholder that stdin appends to. # We use -p 'mma_task' to ensure non-interactive (headless) mode and valid parsing.
ps_command = ( ps_command = (
f"if (Test-Path 'C:\\projects\\misc\\setup_gemini.ps1') {{ . 'C:\\projects\\misc\\setup_gemini.ps1' }}; " f"if (Test-Path 'C:\\projects\\misc\\setup_gemini.ps1') {{ . 'C:\\projects\\misc\\setup_gemini.ps1' }}; "
f"gemini -p '---' --output-format json --model {model}" f"gemini -p 'mma_task' --output-format json --model {model}"
) )
cmd = ['powershell.exe', '-NoProfile', '-Command', ps_command] cmd = ['powershell.exe', '-NoProfile', '-Command', ps_command]