@@ -339,7 +339,7 @@ const html = `<!DOCTYPE html>
339339 </button>
340340 <div class="yolo-mode-section">
341341 <input type="checkbox" id="yolo-mode" onchange="updateSettings(); updateYoloWarning();">
342- <label for="yolo-mode">Enable Yolo Mode (Skip All Permissions )</label>
342+ <label for="yolo-mode">Enable Yolo Mode (Auto-allow all permissions )</label>
343343 </div>
344344 </div>
345345 </div>
@@ -2786,6 +2786,18 @@ const html = `<!DOCTYPE html>
27862786 <div class="permission-header">
27872787 <span class="icon">🔐</span>
27882788 <span>Permission Required</span>
2789+ <div class="permission-menu">
2790+ <button class="permission-menu-btn" onclick="togglePermissionMenu('\${data.id}')" title="More options">⋮</button>
2791+ <div class="permission-menu-dropdown" id="permissionMenu-\${data.id}" style="display: none;">
2792+ <button class="permission-menu-item" onclick="enableYoloMode('\${data.id}')">
2793+ <span class="menu-icon">⚡</span>
2794+ <div class="menu-content">
2795+ <span class="menu-title">Enable YOLO Mode</span>
2796+ <span class="menu-subtitle">Auto-allow all permissions</span>
2797+ </div>
2798+ </button>
2799+ </div>
2800+ </div>
27892801 </div>
27902802 <div class="permission-content">
27912803 <p>Allow <strong>\${toolName}</strong> to execute the tool call above?</p>
@@ -2837,6 +2849,44 @@ const html = `<!DOCTYPE html>
28372849 }
28382850 }
28392851
2852+ function togglePermissionMenu(permissionId) {
2853+ const menu = document.getElementById(\`permissionMenu-\${permissionId}\`);
2854+ const isVisible = menu.style.display !== 'none';
2855+
2856+ // Close all other permission menus
2857+ document.querySelectorAll('.permission-menu-dropdown').forEach(dropdown => {
2858+ dropdown.style.display = 'none';
2859+ });
2860+
2861+ // Toggle this menu
2862+ menu.style.display = isVisible ? 'none' : 'block';
2863+ }
2864+
2865+ function enableYoloMode(permissionId) {
2866+ // Hide the menu
2867+ document.getElementById(\`permissionMenu-\${permissionId}\`).style.display = 'none';
2868+
2869+ // Send message to enable YOLO mode
2870+ vscode.postMessage({
2871+ type: 'enableYoloMode'
2872+ });
2873+
2874+ // Auto-approve this permission
2875+ respondToPermission(permissionId, true);
2876+
2877+ // Show notification
2878+ addMessage('⚡ YOLO Mode enabled! All future permissions will be automatically allowed.', 'system');
2879+ }
2880+
2881+ // Close permission menus when clicking outside
2882+ document.addEventListener('click', function(event) {
2883+ if (!event.target.closest('.permission-menu')) {
2884+ document.querySelectorAll('.permission-menu-dropdown').forEach(dropdown => {
2885+ dropdown.style.display = 'none';
2886+ });
2887+ }
2888+ });
2889+
28402890 // Session management functions
28412891 function newSession() {
28422892 vscode.postMessage({
0 commit comments