(formTree, options)
| 23 | type JsonSchema = Record<string, unknown>; |
| 24 | |
| 25 | const registerWebMcpForm: RegisterWebMcpForm = (formTree, options) => { |
| 26 | const injector = inject(Injector); |
| 27 | |
| 28 | // we want to defer the registration until the context is fully initialized, |
| 29 | // This is especially useful if the form model is a derivation of a required input |
| 30 | return new Promise<void>((resolve, reject) => { |
| 31 | effect(() => { |
| 32 | untracked(() => { |
| 33 | initWebMcpForm(formTree, options, injector).then(resolve, reject); |
| 34 | }); |
| 35 | }); |
| 36 | }); |
| 37 | }; |
| 38 | |
| 39 | const FORM_OUTPUT_SCHEMA = { |
| 40 | type: 'object', |
no test coverage detected