gabriel / musehub public
elicitation-callback.ts typescript
21 lines 544 B
Raw
sha256:f65847c6a4ae29872f3ccbc2420f91a8948949b84a06320bdaf2ac281c89ff8a docs(F7b): governance sync — BUILT awaiting Gabriel; carry … Human patch 26 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:f65847c6a4ae29872f3ccbc2420f91a8948949b84a06320bdaf2ac281c89ff8a docs(F7b): governance sync — BUILT awaiting Gabriel; carry … Human patch 26 days ago
sha256:417c976b0b9320bb758749eb014d9087354fa3186e2abd2fc949e74a670237e7 merge(F7b B1): carry overseer provenance onto dev; resolve … Human minor 26 days ago