mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Run eslint when the project is running to standardize everyone's code #9377 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -5,7 +5,7 @@ import {
|
||||
PasswordIcon,
|
||||
ProfileIcon,
|
||||
TeamIcon,
|
||||
} from '@/assets/icon/Icon';
|
||||
} from '@/assets/icon/next-icon';
|
||||
import { IconFont } from '@/components/icon-font';
|
||||
import { LLMFactory } from '@/constants/llm';
|
||||
import { UserSettingRouteKey } from '@/constants/setting';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { translationTable } from '@/locales/config';
|
||||
import TranslationTable from './TranslationTable';
|
||||
import TranslationTable from './translation-table';
|
||||
|
||||
function UserSettingLocale() {
|
||||
return (
|
||||
|
||||
@ -46,7 +46,7 @@ const AzureOpenAIModal = ({
|
||||
{ value: 'image2text', label: 'image2text' },
|
||||
],
|
||||
};
|
||||
const getOptions = (factory: string) => {
|
||||
const getOptions = () => {
|
||||
return optionsMap.Default;
|
||||
};
|
||||
const handleKeyDown = async (e: React.KeyboardEvent) => {
|
||||
@ -132,7 +132,7 @@ const AzureOpenAIModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
@ -121,7 +121,7 @@ const BedrockModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
@ -103,7 +103,7 @@ const FishAudioModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
@ -110,7 +110,7 @@ const GoogleModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
@ -114,7 +114,6 @@ export const useSubmitOllama = () => {
|
||||
const [initialValues, setInitialValues] = useState<
|
||||
Partial<IAddLlmRequestBody> | undefined
|
||||
>();
|
||||
const [originalModelName, setOriginalModelName] = useState<string>('');
|
||||
const { addLlm, loading } = useAddLlm();
|
||||
const {
|
||||
visible: llmAddingVisible,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { IModalProps } from '@/interfaces/common';
|
||||
import { IAddLlmRequestBody } from '@/interfaces/request/llm';
|
||||
import { Form, Input, Modal, Select } from 'antd';
|
||||
import { Form, Input, Modal } from 'antd';
|
||||
import omit from 'lodash/omit';
|
||||
|
||||
type FieldType = IAddLlmRequestBody & {
|
||||
@ -10,8 +10,6 @@ type FieldType = IAddLlmRequestBody & {
|
||||
hunyuan_sk: string;
|
||||
};
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const HunyuanModal = ({
|
||||
visible,
|
||||
hideModal,
|
||||
|
||||
@ -34,7 +34,6 @@ import { CircleHelp } from 'lucide-react';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import SettingTitle from '../components/setting-title';
|
||||
import { isLocalLlmFactory } from '../utils';
|
||||
import TencentCloudModal from './Tencent-modal';
|
||||
import ApiKeyModal from './api-key-modal';
|
||||
import AzureOpenAIModal from './azure-openai-modal';
|
||||
import BedrockModal from './bedrock-modal';
|
||||
@ -58,6 +57,7 @@ import {
|
||||
} from './hooks';
|
||||
import HunyuanModal from './hunyuan-modal';
|
||||
import styles from './index.less';
|
||||
import TencentCloudModal from './next-tencent-modal';
|
||||
import OllamaModal from './ollama-modal';
|
||||
import SparkModal from './spark-modal';
|
||||
import SystemModelSettingModal from './system-model-setting-modal';
|
||||
|
||||
@ -140,7 +140,7 @@ const SparkModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
@ -113,7 +113,7 @@ const VolcEngineModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
@ -108,7 +108,7 @@ const YiyanModal = ({
|
||||
type: 'number',
|
||||
message: t('maxTokensInvalidMessage'),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
({}) => ({
|
||||
validator(_, value) {
|
||||
if (value < 0) {
|
||||
return Promise.reject(new Error(t('maxTokensMinMessage')));
|
||||
|
||||
Reference in New Issue
Block a user