Skip to content

CGIFM/amazonq-auto-accept

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Q Auto Accept

Amazon Q Auto Accept

⚡ Auto-accept Amazon Q agent tool execution in VS Code — no more clicking Run manually.

Release License Stars


⚠️ IMPORTANT: Toggle Shortcut

🔴 You MUST know this shortcut:

Ctrl + Shift + Q

(Cmd + Shift + Q on Mac)

When auto-accept is ON, you CANNOT type in the Amazon Q chat input box. The extension polls commands that steal focus from the chat panel.

Always press Ctrl+Shift+Q to toggle OFF before typing in the Q chat.


🤔 What Does It Do?

When Amazon Q Developer runs in agent mode, it asks for confirmation before:

  • 🔧 Running shell commands → the Run button
  • 📝 Editing your files → the Accept button
  • 📁 Reading files outside workspace → the Allow button

This extension automatically clicks all of them for you. Hands-free agentic coding. 🚀

⚠️ Windows only: The Allow button auto-click uses Windows UI Automation (PowerShell). It does not work on macOS or Linux.


⚙️ How It Works

Amazon Q suggests a command
        ↓
   ┌─────────┐
   │   Run   │  ← Extension auto-clicks this ✅
   └─────────┘
        ↓
   Command executes automatically

The extension polls aws.amazonq.runCmdExecution and aws.amazonq.inline.acceptEdit at a configurable interval. For the Allow button (read-only tools outside workspace), it uses Windows UI Automation via PowerShell to find and click the button directly in the VS Code webview. A concurrency lock (isRunning) ensures only one approval is in-flight at a time, preventing duplicate triggers.


📦 Installation

From VSIX (recommended)

  1. Download the .vsix file from Releases
  2. Drag and drop into VS Code Extensions panel
  3. Reload VS Code — done! ✅

From Source

git clone https://github.com/CGIFM/amazonq-auto-accept.git
cd amazonq-auto-accept
npm install
npm run package

Then: Extensions···Install from VSIX… → select the .vsix file.


🎮 Usage

Action Shortcut Description
🔄 Toggle on/off Ctrl+Shift+Q ⚠️ Turn OFF before typing in Q chat!
▶️ Run once Ctrl+Shift+R Manual trigger

Status bar indicator (bottom-right):

Status Meaning
✅ Q-AutoRun v1.0.1 Auto-accept is ON
❌ Q-AutoRun v1.0.1 Auto-accept is OFF

💡 Tip: Click the status bar item to toggle on/off.


🔧 Configuration

Setting Default Description
amazonqAutoAccept.enabled true Enable/disable auto-run
amazonqAutoAccept.delayMs 800 Polling interval in ms (200–5000)
amazonqAutoAccept.showStatusBar true Show status bar indicator

📋 Requirements


🛡️ Security Notice

⚠️ This extension automatically approves Amazon Q agent tool executions. Shell commands and file edits suggested by Amazon Q will run without manual confirmation.

Recommendations:

  • 🔍 Review the Amazon Q chat context before enabling
  • 🔒 Press Ctrl+Shift+Q to disable when working with sensitive environments
  • ⏱️ Set a longer polling interval for critical workloads

📄 License

MIT — free and open source.


Made with ❤️ for the Amazon Q community

About

⚡ VS Code extension that auto-accepts Amazon Q agent tool executions — hands-free agentic coding workflow.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors