   }

        return html`
          <button onclick=${userTemplateReset}>Reset all to default</button>
        `
      };

      useEffect(() => {
        // autosave template on every change
        userTemplateAutosave()
      }, [session.value, params.value])

      const GrammarControl = () => (
        html`
          <div>
            <label for="template">Grammar</label>
            <textarea id="grammar" name="grammar" placeholder="Use gbnf or JSON Schema+convert" value="${params.va