elicitation-callback.ts
typescript
sha256:0521dce9aca20da6ab4d9ebee6de75ab876bd82cddbc6bd4897d1ac6ecd11d3d
docs(musehub#129): freeze Phase 1 OG repo card design
Human
15 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:6ad6d62107bbd6940c52d63327966b8a65c6391f4a3da6cd9e7548ba4b38bc48
feat(musehub#129): OG repo preview cards — endpoint, cache,…
Human
minor
⚠
15 days ago