(detail: string, options?: CallbackPageOptions)
| 33 | } |
| 34 | |
| 35 | export function error(detail: string, options?: CallbackPageOptions) { |
| 36 | const provider = options?.provider |
| 37 | return renderDocument({ |
| 38 | title: "Authorization failed", |
| 39 | body: renderCard({ |
| 40 | status: "error", |
| 41 | headline: "Authorization failed", |
| 42 | message: provider |
| 43 | ? `OpenCode couldn't finish connecting to ${escapeHtml(provider)}.` |
| 44 | : "OpenCode couldn't complete authorization.", |
| 45 | detail, |
| 46 | footnote: "Close this window and try again from OpenCode.", |
| 47 | }), |
| 48 | }) |
| 49 | } |
| 50 | |
| 51 | export interface BootstrapOptions { |
| 52 | /** Same-origin path the in-browser script POSTs the parsed callback to. */ |
no test coverage detected