elicitation-callback.ts
typescript
sha256:c73281cffffbc70487969720af074e54b34326d59ec6aff0827fa16512a4e512
docs(mwp-2): mark all acceptance criteria met; add closing …
Sonnet 4.6
81 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:c73281cffffbc70487969720af074e54b34326d59ec6aff0827fa16512a4e512
docs(mwp-2): mark all acceptance criteria met; add closing …
Sonnet 4.6
81 days ago
sha256:4dd2a937f66f8e36d9aa59bd1bf3cb880ca1d503fef67300a0cba3b482784081
test(mwp2): Phase 0 RED — reproduction tests for _walk_comm…
Sonnet 4.6
81 days ago