gabriel / musehub public
elicitation-callback.ts typescript
21 lines 544 B
Raw
sha256:1dd27e6d5c24550177b01b0a171e8375c07cf046b549e7683364706b6522d3bc docs(#139): mark all 11 checklist items resolved, document … Sonnet 5 12 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:1dd27e6d5c24550177b01b0a171e8375c07cf046b549e7683364706b6522d3bc docs(#139): mark all 11 checklist items resolved, document … Sonnet 5 12 days ago
sha256:649011bedd713e22f7dca4c4be94bdefbf3b10950d9fc80235928d0b0b823be8 docs: track issue #139 (two-column app-shell refactor) plan… Sonnet 5 12 days ago