MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / displaySubModal

Function displaySubModal

hyperagent-ext/media/main.js:24–37  ·  view source on GitHub ↗
(modalId, headerText, contentId)

Source from the content-addressed store, hash-verified

22
23 // Function to fetch and display data in nested modals
24 function displaySubModal(modalId, headerText, contentId) {
25 const subModal = document.getElementById(modalId);
26 const subModalHeader = subModal.querySelector('.modal-header');
27 const subModalContent = subModal.querySelector('.modal-section-content');
28
29 // Set header text
30 subModalHeader.innerText = headerText;
31
32 // Fetch data from VSCode API or any other source
33 vscode.postMessage({ type: 'fetchData', value: contentId });
34
35 // Show the sub-modal
36 subModal.style.display = "block";
37 }
38
39 window.addEventListener('message', event => {
40 const message = event.data;

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected