diff --git a/PowerShell_AI_Agent/scripts/main.ps1 b/PowerShell_AI_Agent/scripts/main.ps1 index 561e3c1..c8371f5 100644 --- a/PowerShell_AI_Agent/scripts/main.ps1 +++ b/PowerShell_AI_Agent/scripts/main.ps1 @@ -252,17 +252,15 @@ function Disable-AutopilotMode { param([object]$Config) try { - $Config.Autopilot.Enabled = $false + $script:AutopilotEnabled = $false Write-Host "🤖 Autopilot mode disabled" -ForegroundColor Yellow - return $true } catch { Write-Error "Failed to disable autopilot mode: $_" - return $false } } -# Main command processing +# Command processing function function Process-Command { param( [string]$Command,