MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / if

Function if

web/src/pages/Setting/Ratio/ModelRationNotSetEditor.js:254–257  ·  view source on GitHub ↗
(models.some((model) => model.name === values.name))

Source from the content-addressed store, hash-verified

252 const addModel = (values) => {
253 // 检查模型名称是否存在, 如果存在则拒绝添加
254 if (models.some((model) => model.name === values.name)) {
255 showError(t('模型名称已存在'));
256 return;
257 }
258 setModels((prev) => [
259 {
260 name: values.name,

Callers

nothing calls this directly

Calls 2

showErrorFunction · 0.90
tFunction · 0.70

Tested by

no test coverage detected