1// 𧪠Test function to manually trigger fancy UI with known good data 2async function testFancyUIWithImages() { 3 console.log('𧪠[TEST] Loading test data and triggering fancy UI...'); 4 5 try { 6 // Load test data 7 const response = await fetch('./test-images.json'); 8 const testData = await response.json(); 9 10 console.log('𧪠[TEST] Loaded test data:', testData); 11 12 // Find chat container 13 const chatContainer = document.getElementById('chatContainer') || document.querySelector('.chat-container') || document.body; 14 15 // Clear any existing fancy UI 16 const existingFancyUI = document.querySelector('.fancy-ui-preview'); 17 if (existingFancyUI) { 18 existingFancyUI.remove(); 19 } 20 21 // Prepare data in the expected format 22 const fancyUIData = { 23 wikipediaImages: testData.wikipediaImages, 24 infoboxes: testData.infoboxes, 25 wikipediaData: testData.infoboxes, 26 realtime_facts: [], 27 factsByEntity: {} 28 }; 29 30 console.log('𧪠[TEST] Calling createFancyUIPreview with data:', fancyUIData); 31 32 // Call the fancy UI function 33 if (typeof window.createFancyUIPreview === 'function') { 34 window.createFancyUIPreview(fancyUIData, chatContainer); 35 console.log('𧪠[TEST] â createFancyUIPreview called successfully'); 36 } else { 37 console.error('𧪠[TEST] â createFancyUIPreview function not found'); 38 } 39 40 } catch (error) { 41 console.error('𧪠[TEST] â Error testing fancy UI:', error); 42 } 43} 44 45// 𧪠Manual test function - call testFancyUIWithImages() in console to test 46// Auto-trigger removed to prevent interference with real functionality 47console.log('𧪠[TEST] Test script loaded. Call testFancyUIWithImages() to manually test fancy UI with images.'); 48 49// 𧪠Expose test function globally for manual triggering 50window.testFancyUIWithImages = testFancyUIWithImages;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.