| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc.mjs | ||
| bun.lockb | ||
| index.html | ||
| package.json | ||
| postcss.config.js | ||
| tailwind.config.js | ||
| vercel.json | ||
| vite.config.js |
• Unify the Select option structure as `{ key, label, value }`; add missing `key` to prevent duplicated rendering by Semi-UI.
• Trim and deduplicate the `models` array via `Set` inside `handleInputChange`, ensuring state always contains unique values.
• In the options-merging `useEffect`, use a `Map` keyed by `value` (after `trim`) to guarantee a unique `optionList` when combining backend data with currently selected models.
• Apply the same structure and de-duplication when:
– Fetching models from `/api/channel/models`
– Adding custom models (`addCustomModels`)
– Fetching upstream model lists (`fetchUpstreamModelList`)
• Replace obsolete `text` field with `label` in custom option objects for consistency.
No backend changes are required; the fix is entirely front-end.
Closes #1292
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| public | Loading commit data... | |
| src | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .prettierrc.mjs | Loading commit data... | |
| bun.lockb | Loading commit data... | |
| index.html | Loading commit data... | |
| package.json | Loading commit data... | |
| postcss.config.js | Loading commit data... | |
| tailwind.config.js | Loading commit data... | |
| vercel.json | Loading commit data... | |
| vite.config.js | Loading commit data... |