-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Description
Describe the bug
It seems cd is a special case in that you have to approve it every time. This is probably fine, but the issue is that copilot CLI frequently wants to cd into the current directory before running other commands. So even if those commands are already approved, the fact that the cd is there means we still have to approve it.
Here is an example:
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Check desktop apps files: │
│ │
│ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ cd /current/directory && for file in sub/dir/fileA sub/dir/fileB │ │
│ │ sub/dir/fileC; do echo "=== $file ==="; grep -n "NEEDLE" "$file" 2>/dev/null | head -3; │ │
│ │ done │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ Do you want to run this command? │
│ │
│ ❯ 1. Yes │
│ 2. No, and tell Copilot what to do differently (Esc) │
│ │
│ Confirm with number keys or ↑↓ keys and Enter, Cancel with Esc │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
And especially note that the approval is one-time.
This happens constantly with many commands so I don't think it has anything to do with the for loop.
Affected version
0.0.334
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels