The PasswordInput for each endpoint API key (Chat / LLM, Embeddings, Voice / STT) used to show Mantine's built-in visibility toggle (the 'eye') plus a separate 'Clear' link below the field. The eye is useless here: the key field is a write-only buffer, the stored key never loads back (the server only returns hasApiKey), so clicking the eye reveals an empty buffer. Replace it with a Clear ActionIcon in the field's right section. Passing a custom rightSection suppresses the built-in eye (Mantine). The Clear action appears ONLY when a key is stored AND the buffer is empty (has*ApiKey && form.values.*ApiKey.length === 0); as soon as the user starts typing a new key, the rightSection falls back to undefined and the default eye returns - now it is useful (verify what was typed). After Clear, the handler sets has*ApiKey=false, so the rightSection flips back too. Self-consistent. The old Stack wrapper and Anchor 'Clear' link are gone; Anchor is removed from the @mantine/core import (no remaining usages). The Clear icon-only button carries type='button' (never submits) and an aria-label. The two-column 'Model | API key' layout and the write-only buffer/handler semantics are unchanged.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist