gabriel / musehub public
elicitation-callback.ts typescript
21 lines 544 B
Raw
sha256:20b27796ed512236119feef48b4577a8fd9ded05a15267dd4e6da23604ad1f1a docs: update Suggested Ownership Split table to reflect ful… Sonnet 5 28 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 3 commits
sha256:20b27796ed512236119feef48b4577a8fd9ded05a15267dd4e6da23604ad1f1a docs: update Suggested Ownership Split table to reflect ful… Sonnet 5 28 days ago
sha256:8ea2f75226d5834770ccaddbaa6efda1cc337446fd481bb385de8bec4555ae79 docs: Section 9 CI pipeline — confirm job queue is idempote… Sonnet 5 28 days ago
sha256:80e1a60a39562f6e616aaafbb27487f03abbec7d8ffc6164302b7a0c0bfc63ee docs: check off Section 0 items verified in inventory doc, … Sonnet 5 28 days ago