gabriel / musehub public
elicitation-callback.ts typescript
21 lines 544 B
Raw
sha256:1ccb8409daa5aabe577bd26d11b56ed12f3376d64011d0e75a247e81211a66ee docs(mwp4/phase5): tick Phase 5 checkboxes, close musehub#109 Sonnet 4.6 21 days ago
1 /**
2 * elicitation-callback.ts — Auto-close countdown for MCP elicitation callback page.
3 *
4 * Registered as: window.MusePages['elicitation-callback']
5 * No config needed from #page-data — reads the DOM directly.
6 */
7
8 export function initElicitationCallback(_data?: Record<string, unknown>): void {
9 const el = document.getElementById('countdown');
10 if (!el) return;
11
12 let n = 5;
13 const t = setInterval(() => {
14 n--;
15 el.textContent = String(n);
16 if (n <= 0) {
17 clearInterval(t);
18 window.close();
19 }
20 }, 1000);
21 }
File History 2 commits
sha256:1ccb8409daa5aabe577bd26d11b56ed12f3376d64011d0e75a247e81211a66ee docs(mwp4/phase5): tick Phase 5 checkboxes, close musehub#109 Sonnet 4.6 21 days ago
sha256:2c523da45351334b5c4dbefed4dc3dd553b3faa8737a4e6caf301e5dc82141be test(mwp4): Phase 0 RED reproduction tests for RC-4 ordering race Sonnet 4.6 21 days ago