()
| 22 | import { setLoading } from '../../Redux/actions.ts' |
| 23 | import ApiErrorResponse, { RecordType, ChildRefType, formDataType } from '../../constant/index.ts' |
| 24 | function ModelsPage() { |
| 25 | const { modelLists, loading } = useSelector((state: any) => state.model); |
| 26 | const dispatch = useDispatch() |
| 27 | const navigate = useNavigate() |
| 28 | const [propertyForm] = Form.useForm() |
| 29 | const [viewCodeData, setViewCodeData] = useState('') |
| 30 | const [viewCodeOpen, setViewCodeOpen] = useState(false) |
| 31 | const { tooltipEditTitle, tooltipPlaygroundTitle,tooltipMoreTitle } = tooltipTitle(); |
| 32 | const { modelsTableColumn } = CommonComponents(); |
| 33 | const { t } = useTranslation(); |
| 34 | const [form] = Form.useForm() |
| 35 | const [form1] = Form.useForm() |
| 36 | const [confirmloading, setConfirmLoading] = useState(false); |
| 37 | const childRef = useRef<ChildRefType | null>(null); |
| 38 | const [modelOne, setModelOne] = useState(false); |
| 39 | const [modelId, setModelId] = useState(''); |
| 40 | const [openDeleteModal, setOpenDeleteModal] = useState(false) |
| 41 | const [modelList, setModelList] = useState([]) |
| 42 | const [formData, setFormData] = useState<formDataType>({ |
| 43 | properties: {}, |
| 44 | required: [] |
| 45 | }) |
| 46 | const [resetButtonShow, setResetButtonShow] = useState(true) |
| 47 | const [record, setRecord] = useState<RecordType>({ |
| 48 | name: '', |
| 49 | model_id: '', |
| 50 | model_schema_id: '', |
| 51 | provider_id: '', |
| 52 | type: '', |
| 53 | properties: {}, |
| 54 | provider_model_id: '' |
| 55 | }); |
| 56 | const [limit, setLimit] = useState(20) |
| 57 | const [isVisible, setIsVisible] = useState(true); |
| 58 | const [formShow, setFormShow] = useState(false) |
| 59 | const [updatePrevButton, setUpdatePrevButton] = useState(false) |
| 60 | const [disabled, setDisabled] = useState(true); |
| 61 | const [drawerEditOpen, setDrawerEditOpen] = useState(false) |
| 62 | const [secondModalNameValue, setSecondModalNameValue] = useState('') |
| 63 | const [selectedSecondId, setSelectedSecondId] = useState('') |
| 64 | const [deleteValue, setDeleteValue] = useState(''); |
| 65 | const [providerId, setProviderId] = useState('') |
| 66 | const [hasMore, setHasMore] = useState(false) |
| 67 | const [type, setType] = useState('') |
| 68 | const [deleteLoading, setDeleteLoading] = useState(false) |
| 69 | const [properties, setProperties] = useState({}) |
| 70 | const [wildcardForm] = Form.useForm() |
| 71 | const [functionCall, setFunctionCall] = useState(false) |
| 72 | const [streaming, setStreaming] = useState(false) |
| 73 | const [modelType, setModelType] = useState('') |
| 74 | const [editLoading, setEditLoading] = useState(false) |
| 75 | const handleViewCode = () => { |
| 76 | setIsVisible(false) |
| 77 | setViewCodeOpen(true) |
| 78 | } |
| 79 | const content = ( |
| 80 | <div style={{ cursor: 'pointer' }}> |
| 81 | <p className={styles['popover-eidt']} onClick={handleViewCode}>View code</p> |
nothing calls this directly
no test coverage detected