mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2025-09-15 04:17:22 +00:00
Refactor Autopilot Mode to Use Global Variable
This commit is contained in:
parent
efc6bad638
commit
051b501fa7
@ -252,17 +252,15 @@ function Disable-AutopilotMode {
|
|||||||
param([object]$Config)
|
param([object]$Config)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Config.Autopilot.Enabled = $false
|
$script:AutopilotEnabled = $false
|
||||||
Write-Host "🤖 Autopilot mode disabled" -ForegroundColor Yellow
|
Write-Host "🤖 Autopilot mode disabled" -ForegroundColor Yellow
|
||||||
return $true
|
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Error "Failed to disable autopilot mode: $_"
|
Write-Error "Failed to disable autopilot mode: $_"
|
||||||
return $false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main command processing
|
# Command processing function
|
||||||
function Process-Command {
|
function Process-Command {
|
||||||
param(
|
param(
|
||||||
[string]$Command,
|
[string]$Command,
|
||||||
|
Loading…
Reference in New Issue
Block a user