elicitation-callback.ts
typescript
sha256:c04414e7e3b812ff02f351d9792c79837b7841133a864f98fcaeff53a2a4afad
feat(KD-6b): MuseHub vault UI per frozen §KD-6a
Human
minor
⚠ breaking
13 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
1 commit
sha256:c04414e7e3b812ff02f351d9792c79837b7841133a864f98fcaeff53a2a4afad
feat(KD-6b): MuseHub vault UI per frozen §KD-6a
Human
minor
⚠
13 days ago