(folderPath)
| 650 | window.electron.send('puter-ai-chat-response', requestId, { error: errorMessage }); |
| 651 | } |
| 652 | }; |
| 653 | |
| 654 | // Minimal handlers for tag-preview so dialog opens when events arrive before late block (Docker/Server) |
| 655 | window._electronRealEventHandlers['start-single-tag-generation'] = function(filePath, modelData) { |
| 656 | var dialog = document.getElementById('tag-preview-dialog'); |
| 657 | if (dialog && !dialog.open) { |
| 658 | dialog.showModal(); |
| 659 | var container = document.getElementById('tag-preview-container'); |
| 660 | if (container) container.innerHTML = '<div style="padding: 20px; color: #fff;">Generating tags...</div>'; |
| 661 | } |
| 662 | }; |
| 663 | window._electronRealEventHandlers['start-batch-tag-generation'] = function(count, filePaths) { |
| 664 | var dialog = document.getElementById('tag-preview-dialog'); |
| 665 | if (dialog && !dialog.open) { |
| 666 | dialog.showModal(); |
no test coverage detected