elicitation-callback.ts
typescript
sha256:e519738f2102d625d47828a17d113283cd744577b43551013cb668fd04f1c3fe
chore(mwp8/phase5): tick all RG checkboxes; close-out doc (…
Sonnet 4.6
18 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:e519738f2102d625d47828a17d113283cd744577b43551013cb668fd04f1c3fe
chore(mwp8/phase5): tick all RG checkboxes; close-out doc (…
Sonnet 4.6
18 days ago
sha256:0e5174da777684df43b2db71f282079030ef28bacffb93e19c29ee712b2a8bc4
test(mwp8/phase0): audit — repair+force-push leave stale ca…
Sonnet 4.6
20 days ago