-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
Description
Describe the bug
I'm on Windows. Using PowerShell 7.5.3.
I run this command:
copilot --allow-all-tools -p (Get-Content '$PSScriptRoot\Prompt.txt' -Raw)"When LLM write a PowerShell script and run it, such as:
$html = Get-Content anthropic_article.html -Raw; $html -replace '<[^>]+>','' -replace '\s+', '' | Select-String -Pattern 'Effective context engineering.*?(?=Share this article)' | ForEach-Object { $_.Matches.Value } | Out-String | Select-Object -First 3000It will fail like this screenshot:
I already provided --allow-all-tools flag. It should work, right?
Affected version
0.0.332 Commit: ace227c
Steps to reproduce the behavior
echo 123 > a.txt
copilot --allow-all-tools -p @'
Run the following PowerShell command and summary $html's content.
$html = Get-Content a.txt -Raw; $html -replace '<[^>]+>','' -replace '\s+', '' | Select-String -Pattern 'Effective context engineering.*?(?=Share this article)' | ForEach-Object { $_.Matches.Value } | Out-String | Select-Object -First 3000
'@
Expected behavior
I expect any powershell script should be able to run.
Additional context
- There is no meaningful logs for my issue.
- Operating system: Windows 10
- CPU architecture: x86_64
- Terminal emulator: Windows Terminal
- Shell: pwsh (PowerShell 7.5.3)
Du-Brandon, A017850-Jasper, JackyPam and mangogan-git