personal memory agent
at main 48 lines 1.1 kB view raw
1// Dev App Background Service 2// Scratch playground for testing submenu features 3 4AppServices.register('dev', { 5 initialize() { 6 // Test submenu with various item types 7 AppServices.submenus.set('dev', [ 8 { 9 id: 'workspace', 10 label: 'Workspace', 11 icon: '🏠', 12 href: '/app/dev' 13 }, 14 { 15 id: 'notifications', 16 label: 'Test Notifications', 17 icon: '🔔', 18 href: '/app/dev#notifications', 19 badge: 3 20 }, 21 { 22 id: 'websocket', 23 label: 'WebSocket Events', 24 icon: '📡', 25 href: '/app/dev#websocket' 26 }, 27 { 28 id: 'facet-test', 29 label: 'With Facet', 30 icon: '🎯', 31 href: '/app/dev#facet', 32 facet: 'work' 33 } 34 ]); 35 36 // Demo: Update badge dynamically every 5 seconds 37 let badgeCount = 3; 38 setInterval(() => { 39 badgeCount = (badgeCount % 10) + 1; 40 AppServices.submenus.upsert('dev', { 41 id: 'notifications', 42 badge: badgeCount 43 }); 44 }, 5000); 45 46 console.log('[Dev] Background service initialized with test submenu'); 47 } 48});