()
| 6700 | // Add the tag to the model(s) |
| 6701 | if (sourceContainer) { |
| 6702 | // Add the tag to the model using our helper function |
| 6703 | await addTagToModel(tagName, sourceContainer); |
| 6704 | console.log(`Added tag "${tagName}" to ${sourceContainer}`); |
| 6705 | } |
| 6706 | |
| 6707 | // Close the dialog |
| 6708 | tagDialog.close(); |
| 6709 | } |
| 6710 | } catch (error) { |
| 6711 | console.error('Error adding tag:', error); |
| 6712 | await window.electron.showMessage('Error', 'Failed to add tag: ' + error.message); |
| 6713 | } |
| 6714 | } |
| 6715 | }); |
| 6716 | |
| 6717 | // Handle the tag dialog cancel button |
| 6718 | document.getElementById('cancel-tag-button')?.addEventListener('click', () => { |
| 6719 | const tagDialog = document.getElementById('new-tag-dialog'); |
| 6720 | tagDialog.close(); |
| 6721 | }); |
| 6722 | |
| 6723 | // Add open in browser button event listeners |
| 6724 | document.getElementById('open-source-button')?.addEventListener('click', async () => { |
| 6725 | const sourceInput = document.getElementById('model-source'); |
nothing calls this directly
no test coverage detected