mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 01:16:01 +00:00
feat: update ESLint config with @typescript-eslint/consistent-type-imports (#4746)
* update: Add type * fix: update import statement for NextApiRequest type * fix: update imports to use type for LexicalEditor and EditorState * Refactor imports to use 'import type' for type-only imports across multiple files - Updated imports in various components and API files to use 'import type' for better clarity and to optimize TypeScript's type checking. - Ensured consistent usage of type imports in files related to chat, dataset, workflow, and user management. - Improved code readability and maintainability by distinguishing between value and type imports. * refactor: remove old ESLint configuration and add new rules - Deleted the old ESLint configuration file from the app project. - Added a new ESLint configuration file with updated rules and settings. - Changed imports to use type-only imports in various files for better clarity and performance. - Updated TypeScript configuration to remove unnecessary options. - Added an ESLint ignore file to exclude build and dependency directories from linting. * fix: update imports to use 'import type' for type-only imports in schema files
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals",
|
||||
"rules": {
|
||||
"react-hooks/rules-of-hooks": 0
|
||||
}
|
||||
}
|
@@ -80,6 +80,8 @@
|
||||
"@types/react-dom": "18.3.0",
|
||||
"@types/react-syntax-highlighter": "^15.5.6",
|
||||
"@types/request-ip": "^0.0.37",
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-config-next": "14.2.26",
|
||||
"typescript": "^5.1.3",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, BoxProps, Flex, Link, LinkProps } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps, Flex, Link, type LinkProps } from '@chakra-ui/react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useChatStore } from '@/web/core/chat/context/useChatStore';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Box, ImageProps, Skeleton } from '@chakra-ui/react';
|
||||
import { Box, type ImageProps, Skeleton } from '@chakra-ui/react';
|
||||
import MyPhotoView from '@fastgpt/web/components/common/Image/PhotoView';
|
||||
import { useBoolean } from 'ahooks';
|
||||
|
||||
|
@@ -13,7 +13,7 @@ import dynamic from 'next/dynamic';
|
||||
import { Box } from '@chakra-ui/react';
|
||||
import { CodeClassNameEnum, mdTextFormat } from './utils';
|
||||
import { useCreation } from 'ahooks';
|
||||
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import { type OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
|
||||
const CodeLight = dynamic(() => import('./codeBlock/CodeLight'), { ssr: false });
|
||||
const MermaidCodeBlock = dynamic(() => import('./img/MermaidCodeBlock'), { ssr: false });
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Skeleton, ImageProps } from '@chakra-ui/react';
|
||||
import { Skeleton, type ImageProps } from '@chakra-ui/react';
|
||||
import CustomImage from '@fastgpt/web/components/common/Image/MyImage';
|
||||
|
||||
export const MyImage = (props: ImageProps) => {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Flex, Input, InputProps } from '@chakra-ui/react';
|
||||
import { Flex, Input, type InputProps } from '@chakra-ui/react';
|
||||
|
||||
interface Props extends InputProps {
|
||||
leftIcon?: React.ReactNode;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { Box, Button, Flex, Grid, useTheme } from '@chakra-ui/react';
|
||||
import { PromptTemplateItem } from '@fastgpt/global/core/ai/type.d';
|
||||
import { type PromptTemplateItem } from '@fastgpt/global/core/ai/type.d';
|
||||
import { ModalBody, ModalFooter } from '@chakra-ui/react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
const PromptTemplate = ({
|
||||
|
@@ -2,7 +2,7 @@ import React, { useCallback, useMemo, useState } from 'react';
|
||||
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import MySelect, { SelectProps } from '@fastgpt/web/components/common/MySelect';
|
||||
import MySelect, { type SelectProps } from '@fastgpt/web/components/common/MySelect';
|
||||
import { HUGGING_FACE_ICON } from '@fastgpt/global/common/system/constants';
|
||||
import { Box, Flex, HStack } from '@chakra-ui/react';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { Box, BoxProps } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps } from '@chakra-ui/react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import { ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import { type ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Box, HStack, StackProps } from '@chakra-ui/react';
|
||||
import { Box, HStack, type StackProps } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -6,7 +6,7 @@ import {
|
||||
ModalBody,
|
||||
ModalFooter,
|
||||
Textarea,
|
||||
TextareaProps,
|
||||
type TextareaProps,
|
||||
useDisclosure
|
||||
} from '@chakra-ui/react';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useCallback, useRef, useState } from 'react';
|
||||
import {
|
||||
Box,
|
||||
BoxProps,
|
||||
type BoxProps,
|
||||
Flex,
|
||||
Input,
|
||||
Tag,
|
||||
|
@@ -3,9 +3,9 @@ import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { Box, Button, Flex, ModalBody, ModalFooter } from '@chakra-ui/react';
|
||||
import {
|
||||
GetResourceFolderListProps,
|
||||
GetResourceFolderListItemResponse,
|
||||
ParentIdType
|
||||
type GetResourceFolderListProps,
|
||||
type GetResourceFolderListItemResponse,
|
||||
type ParentIdType
|
||||
} from '@fastgpt/global/common/parentFolder/type';
|
||||
import { useMemoizedFn, useMount } from 'ahooks';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Box, BoxProps, Flex } from '@chakra-ui/react';
|
||||
import { ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import { Box, type BoxProps, Flex } from '@chakra-ui/react';
|
||||
import { type ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { Box, BoxProps, Flex } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps, Flex } from '@chakra-ui/react';
|
||||
import {
|
||||
GetResourceFolderListProps,
|
||||
GetResourceListItemResponse,
|
||||
ParentIdType
|
||||
type GetResourceFolderListProps,
|
||||
type GetResourceListItemResponse,
|
||||
type ParentIdType
|
||||
} from '@fastgpt/global/common/parentFolder/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import Loading from '@fastgpt/web/components/common/MyLoading';
|
||||
|
@@ -6,9 +6,9 @@ import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import MyDivider from '@fastgpt/web/components/common/MyDivider';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useConfirm } from '@fastgpt/web/hooks/useConfirm';
|
||||
import { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import { type PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import CollaboratorContextProvider, {
|
||||
MemberManagerInputPropsType
|
||||
type MemberManagerInputPropsType
|
||||
} from '../../support/permission/MemberManager/context';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import React, { useState, DragEvent, useCallback } from 'react';
|
||||
import React, { useState, type DragEvent, useCallback } from 'react';
|
||||
import type { BoxProps } from '@chakra-ui/react';
|
||||
import { useBoolean } from 'ahooks';
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import {
|
||||
Box,
|
||||
BoxProps,
|
||||
type BoxProps,
|
||||
Button,
|
||||
Flex,
|
||||
HStack,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
Thead,
|
||||
Tr,
|
||||
Table,
|
||||
FlexProps,
|
||||
type FlexProps,
|
||||
Input
|
||||
} from '@chakra-ui/react';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
@@ -26,7 +26,7 @@ import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import type { SettingAIDataType } from '@fastgpt/global/core/app/type.d';
|
||||
import { getDocPath } from '@/web/common/system/doc';
|
||||
import AIModelSelector from '@/components/Select/AIModelSelector';
|
||||
import { LLMModelItemType } from '@fastgpt/global/core/ai/model.d';
|
||||
import { type LLMModelItemType } from '@fastgpt/global/core/ai/model.d';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import { getWebLLMModel } from '@/web/common/system/utils';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -16,7 +16,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
ModelProviderList,
|
||||
ModelProviderIdType,
|
||||
type ModelProviderIdType,
|
||||
getModelProvider
|
||||
} from '@fastgpt/global/core/ai/provider';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
|
@@ -3,7 +3,7 @@ import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { LLMModelTypeEnum, llmModelTypeFilterMap } from '@fastgpt/global/core/ai/constants';
|
||||
import { Box, css, HStack, IconButton, useDisclosure } from '@chakra-ui/react';
|
||||
import type { SettingAIDataType } from '@fastgpt/global/core/app/type.d';
|
||||
import AISettingModal, { AIChatSettingsModalProps } from '@/components/core/ai/AISettingModal';
|
||||
import AISettingModal, { type AIChatSettingsModalProps } from '@/components/core/ai/AISettingModal';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Box, Button, Flex, ModalBody, Switch, Textarea, useDisclosure } from '@chakra-ui/react';
|
||||
import { defaultAutoExecuteConfig } from '@fastgpt/global/core/app/constants';
|
||||
import { AppAutoExecuteConfigType } from '@fastgpt/global/core/app/type';
|
||||
import { type AppAutoExecuteConfigType } from '@fastgpt/global/core/app/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -28,7 +28,7 @@ import MyTextarea from '@/components/common/Textarea/MyTextarea';
|
||||
import { defaultDatasetMaxTokens } from '@fastgpt/global/core/app/constants';
|
||||
import InputSlider from '@fastgpt/web/components/common/MySlider/InputSlider';
|
||||
import LeftRadio from '@fastgpt/web/components/common/Radio/LeftRadio';
|
||||
import { AppDatasetSearchParamsType } from '@fastgpt/global/core/app/type';
|
||||
import { type AppDatasetSearchParamsType } from '@fastgpt/global/core/app/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
||||
enum SearchSettingTabEnum {
|
||||
|
@@ -9,7 +9,7 @@ import {
|
||||
HStack,
|
||||
Switch,
|
||||
ModalFooter,
|
||||
BoxProps,
|
||||
type BoxProps,
|
||||
Checkbox
|
||||
} from '@chakra-ui/react';
|
||||
import React, { useMemo } from 'react';
|
||||
|
@@ -1,6 +1,14 @@
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { Box, Button, Flex, ModalBody, useDisclosure, Switch, BoxProps } from '@chakra-ui/react';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Flex,
|
||||
ModalBody,
|
||||
useDisclosure,
|
||||
Switch,
|
||||
type BoxProps
|
||||
} from '@chakra-ui/react';
|
||||
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -13,7 +13,7 @@ import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { AppScheduledTriggerConfigType } from '@fastgpt/global/core/app/type';
|
||||
import { type AppScheduledTriggerConfigType } from '@fastgpt/global/core/app/type';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import TimezoneSelect from '@fastgpt/web/components/common/MySelect/TimezoneSelect';
|
||||
import ScheduleTimeSelect, {
|
||||
|
@@ -20,7 +20,7 @@ import {
|
||||
} from '@fastgpt/global/core/workflow/constants';
|
||||
import type { VariableItemType } from '@fastgpt/global/core/app/type.d';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useForm, UseFormReset } from 'react-hook-form';
|
||||
import { useForm, type UseFormReset } from 'react-hook-form';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
@@ -33,8 +33,8 @@ import InputTypeConfig from '@/pageComponents/app/detail/WorkflowComponents/Flow
|
||||
import MyIconButton from '@fastgpt/web/components/common/Icon/button';
|
||||
import DndDrag, {
|
||||
Draggable,
|
||||
DraggableProvided,
|
||||
DraggableStateSnapshot
|
||||
type DraggableProvided,
|
||||
type DraggableStateSnapshot
|
||||
} from '@fastgpt/web/components/common/DndDrag';
|
||||
|
||||
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 6);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Box, Flex, TextareaProps } from '@chakra-ui/react';
|
||||
import { Box, Flex, type TextareaProps } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import ChatFunctionTip from './Tip';
|
||||
|
@@ -5,9 +5,9 @@ import { useTranslation } from 'next-i18next';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { ChatBoxInputFormType, ChatBoxInputType, SendPromptFnType } from '../type';
|
||||
import { type ChatBoxInputFormType, type ChatBoxInputType, type SendPromptFnType } from '../type';
|
||||
import { textareaMinH } from '../constants';
|
||||
import { useFieldArray, UseFormReturn } from 'react-hook-form';
|
||||
import { useFieldArray, type UseFormReturn } from 'react-hook-form';
|
||||
import { ChatBoxContext } from '../Provider';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
|
@@ -1,15 +1,15 @@
|
||||
import React, { useState, useMemo, useCallback } from 'react';
|
||||
import { useAudioPlay } from '@/web/common/utils/voice';
|
||||
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import { type OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import {
|
||||
AppFileSelectConfigType,
|
||||
AppQGConfigType,
|
||||
AppTTSConfigType,
|
||||
AppWhisperConfigType,
|
||||
ChatInputGuideConfigType,
|
||||
VariableItemType
|
||||
type AppFileSelectConfigType,
|
||||
type AppQGConfigType,
|
||||
type AppTTSConfigType,
|
||||
type AppWhisperConfigType,
|
||||
type ChatInputGuideConfigType,
|
||||
type VariableItemType
|
||||
} from '@fastgpt/global/core/app/type';
|
||||
import { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
|
||||
import { type ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
|
||||
import {
|
||||
defaultAppSelectFileConfig,
|
||||
defaultChatInputGuideConfig,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { useCopyData } from '@fastgpt/web/hooks/useCopyData';
|
||||
import { Flex, FlexProps, css, useTheme } from '@chakra-ui/react';
|
||||
import { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { Flex, type FlexProps, css, useTheme } from '@chakra-ui/react';
|
||||
import { type ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Box, BoxProps, Card, Flex } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps, Card, Flex } from '@chakra-ui/react';
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import ChatController, { type ChatControllerProps } from './ChatController';
|
||||
import ChatAvatar from './ChatAvatar';
|
||||
@@ -19,7 +19,10 @@ import { useCopyData } from '@fastgpt/web/hooks/useCopyData';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { AIChatItemValueItemType, ChatItemValueItemType } from '@fastgpt/global/core/chat/type';
|
||||
import {
|
||||
type AIChatItemValueItemType,
|
||||
type ChatItemValueItemType
|
||||
} from '@fastgpt/global/core/chat/type';
|
||||
import { CodeClassNameEnum } from '@/components/Markdown/utils';
|
||||
import { isEqual } from 'lodash';
|
||||
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
||||
|
@@ -3,7 +3,7 @@ import { ModalBody, Box } from '@chakra-ui/react';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import { ChatBoxContext } from '../Provider';
|
||||
import { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
|
||||
import { type ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
|
||||
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Box, Flex, Grid, Text } from '@chakra-ui/react';
|
||||
import MdImage from '@/components/Markdown/img/Image';
|
||||
import { UserInputFileItemType } from '@/components/core/chat/ChatContainer/ChatBox/type';
|
||||
import { type UserInputFileItemType } from '@/components/core/chat/ChatContainer/ChatBox/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
||||
import { clone } from 'lodash';
|
||||
|
@@ -9,7 +9,7 @@ import { getSourceNameIcon } from '@fastgpt/global/core/dataset/utils';
|
||||
import ChatBoxDivider from '@/components/core/chat/Divider';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useSystem } from '@fastgpt/web/hooks/useSystem';
|
||||
import { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { type ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { addStatisticalDataToHistoryItem } from '@/global/core/chat/utils';
|
||||
import { useSize } from 'ahooks';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
|
@@ -6,7 +6,7 @@ import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constants';
|
||||
import DatasetSelectModal, { useDatasetSelect } from '@/components/core/dataset/SelectModal';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { AdminFbkType } from '@fastgpt/global/core/chat/type.d';
|
||||
import { type AdminFbkType } from '@fastgpt/global/core/chat/type.d';
|
||||
import SelectCollections from '@/web/core/dataset/components/SelectCollections';
|
||||
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import { Controller, UseFormReturn } from 'react-hook-form';
|
||||
import { Controller, type UseFormReturn } from 'react-hook-form';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { Box, Button, Card, Flex, Switch, Textarea } from '@chakra-ui/react';
|
||||
import ChatAvatar from './ChatAvatar';
|
||||
@@ -10,10 +10,10 @@ import {
|
||||
} from '@fastgpt/global/core/workflow/constants';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { ChatBoxInputFormType } from '../type.d';
|
||||
import { type ChatBoxInputFormType } from '../type.d';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import { VariableItemType } from '@fastgpt/global/core/app/type';
|
||||
import { type VariableItemType } from '@fastgpt/global/core/app/type';
|
||||
import MyTextarea from '@/components/common/Textarea/MyTextarea';
|
||||
import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput';
|
||||
import { ChatItemContext } from '@/web/core/chat/context/chatItemContext';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { BoxProps } from '@chakra-ui/react';
|
||||
import { type BoxProps } from '@chakra-ui/react';
|
||||
|
||||
export const textareaMinH = '22px';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { ExportChatType } from '@/types/chat';
|
||||
import { ChatItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { type ExportChatType } from '@/types/chat';
|
||||
import { type ChatItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { useCallback } from 'react';
|
||||
import { htmlTemplate } from '@/web/core/chat/constants';
|
||||
import { fileDownload } from '@/web/common/file/utils';
|
||||
|
@@ -9,12 +9,12 @@ import { getFileIcon } from '@fastgpt/global/common/file/icon';
|
||||
import { formatFileSize } from '@fastgpt/global/common/file/tools';
|
||||
import { clone } from 'lodash';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
import { UseFieldArrayReturn } from 'react-hook-form';
|
||||
import { ChatBoxInputFormType, UserInputFileItemType } from '../type';
|
||||
import { AppFileSelectConfigType } from '@fastgpt/global/core/app/type';
|
||||
import { type UseFieldArrayReturn } from 'react-hook-form';
|
||||
import { type ChatBoxInputFormType, type UserInputFileItemType } from '../type';
|
||||
import { type AppFileSelectConfigType } from '@fastgpt/global/core/app/type';
|
||||
import { documentFileType } from '@fastgpt/global/common/file/constants';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import { type OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
|
||||
type UseFileUploadOptions = {
|
||||
fileSelectConfig: AppFileSelectConfigType;
|
||||
|
@@ -35,7 +35,7 @@ import type { ChatBoxInputType, ChatBoxInputFormType, SendPromptFnType } from '.
|
||||
import type { StartChatFnProps, generatingMessageProps } from '../type';
|
||||
import ChatInput from './Input/ChatInput';
|
||||
import ChatBoxDivider from '../../Divider';
|
||||
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import { type OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import { getNanoid } from '@fastgpt/global/common/string/tools';
|
||||
import {
|
||||
ChatItemValueTypeEnum,
|
||||
@@ -49,7 +49,7 @@ import {
|
||||
} from './utils';
|
||||
import { textareaMinH } from './constants';
|
||||
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
|
||||
import ChatProvider, { ChatBoxContext, ChatProviderProps } from './Provider';
|
||||
import ChatProvider, { ChatBoxContext, type ChatProviderProps } from './Provider';
|
||||
|
||||
import ChatItem from './components/ChatItem';
|
||||
|
||||
|
@@ -1,10 +1,7 @@
|
||||
import { ChatCompletionMessageParam } from '@fastgpt/global/core/ai/type';
|
||||
import { ChatFileTypeEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import {
|
||||
ChatItemValueItemType,
|
||||
ChatSiteItemType,
|
||||
ToolModuleResponseItemType
|
||||
} from '@fastgpt/global/core/chat/type';
|
||||
import type { ChatFileTypeEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import type { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { ChatItemValueItemType, ToolModuleResponseItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
|
||||
|
||||
export type UserInputFileItemType = {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
AIChatItemValueItemType,
|
||||
ChatItemValueItemType,
|
||||
ChatSiteItemType
|
||||
type AIChatItemValueItemType,
|
||||
type ChatItemValueItemType,
|
||||
type ChatSiteItemType
|
||||
} from '@fastgpt/global/core/chat/type';
|
||||
import { ChatBoxInputType, UserInputFileItemType } from './type';
|
||||
import { type ChatBoxInputType, type UserInputFileItemType } from './type';
|
||||
import { getFileIcon } from '@fastgpt/global/common/file/icon';
|
||||
import { ChatItemValueTypeEnum, ChatStatusEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import { extractDeepestInteractive } from '@fastgpt/global/core/workflow/runtime/utils';
|
||||
|
@@ -12,10 +12,10 @@ import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { useFileUpload } from '../../ChatBox/hooks/useFileUpload';
|
||||
import FilePreview from '../../components/FilePreview';
|
||||
import { UserChatItemValueItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { type UserChatItemValueItemType } from '@fastgpt/global/core/chat/type';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import { ChatBoxInputFormType } from '../../ChatBox/type';
|
||||
import { FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io';
|
||||
import { type ChatBoxInputFormType } from '../../ChatBox/type';
|
||||
import { type FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io';
|
||||
import { ChatItemContext } from '@/web/core/chat/context/chatItemContext';
|
||||
import { ChatRecordContext } from '@/web/core/chat/context/chatRecordContext';
|
||||
import { FlowNodeInputTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Box, Button, Flex, Switch, Textarea, useDisclosure } from '@chakra-ui/react';
|
||||
import { WorkflowIOValueTypeEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { FlowNodeInputTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
import { FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io';
|
||||
import { type FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
|
@@ -1,22 +1,25 @@
|
||||
import React, { ReactNode, useCallback, useMemo, useRef } from 'react';
|
||||
import React, { type ReactNode, useCallback, useMemo, useRef } from 'react';
|
||||
import { createContext, useContextSelector } from 'use-context-selector';
|
||||
import { PluginRunBoxProps } from './type';
|
||||
import { AIChatItemValueItemType, RuntimeUserPromptType } from '@fastgpt/global/core/chat/type';
|
||||
import { FieldValues } from 'react-hook-form';
|
||||
import { type PluginRunBoxProps } from './type';
|
||||
import {
|
||||
type AIChatItemValueItemType,
|
||||
type RuntimeUserPromptType
|
||||
} from '@fastgpt/global/core/chat/type';
|
||||
import { type FieldValues } from 'react-hook-form';
|
||||
import { PluginRunBoxTabEnum } from './constants';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import { getNanoid } from '@fastgpt/global/common/string/tools';
|
||||
import { ChatItemValueTypeEnum, ChatRoleEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import { generatingMessageProps } from '../type';
|
||||
import { type generatingMessageProps } from '../type';
|
||||
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { ChatBoxInputFormType } from '../ChatBox/type';
|
||||
import { type ChatBoxInputFormType } from '../ChatBox/type';
|
||||
import { chats2GPTMessages } from '@fastgpt/global/core/chat/adapt';
|
||||
import { getPluginRunUserQuery } from '@fastgpt/global/core/workflow/utils';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { ChatItemContext } from '@/web/core/chat/context/chatItemContext';
|
||||
import { ChatRecordContext } from '@/web/core/chat/context/chatRecordContext';
|
||||
import { AppFileSelectConfigType } from '@fastgpt/global/core/app/type';
|
||||
import { type AppFileSelectConfigType } from '@fastgpt/global/core/app/type';
|
||||
import { defaultAppSelectFileConfig } from '@fastgpt/global/core/app/constants';
|
||||
import { mergeChatResponseData } from '@fastgpt/global/core/chat/utils';
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { PluginRunBoxTabEnum } from './constants';
|
||||
import { PluginRunBoxProps } from './type';
|
||||
import { type PluginRunBoxProps } from './type';
|
||||
import RenderInput from './components/RenderInput';
|
||||
import PluginRunContextProvider from './context';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { FlowNodeInputItemType } from '@fastgpt/global/core/workflow/type/io';
|
||||
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
||||
import { PluginRunBoxTabEnum } from './constants';
|
||||
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import type { PluginRunBoxTabEnum } from './constants';
|
||||
import type { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
|
||||
import React from 'react';
|
||||
import { onStartChatType } from '../type';
|
||||
import type { onStartChatType } from '../type';
|
||||
import { ChatBoxInputFormType } from '../ChatBox/type';
|
||||
|
||||
export type PluginRunBoxProps = {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FieldArrayWithId } from 'react-hook-form';
|
||||
import { ChatBoxInputFormType } from '../ChatBox/type';
|
||||
import { type FieldArrayWithId } from 'react-hook-form';
|
||||
import { type ChatBoxInputFormType } from '../ChatBox/type';
|
||||
import { Box, CircularProgress, Flex, HStack } from '@chakra-ui/react';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import { StreamResponseType } from '@/web/common/api/fetch';
|
||||
import { ChatCompletionMessageParam } from '@fastgpt/global/core/ai/type';
|
||||
import {
|
||||
import type { StreamResponseType } from '@/web/common/api/fetch';
|
||||
import type { ChatCompletionMessageParam } from '@fastgpt/global/core/ai/type';
|
||||
import type {
|
||||
ChatHistoryItemResType,
|
||||
ChatSiteItemType,
|
||||
ToolModuleResponseItemType
|
||||
} from '@fastgpt/global/core/chat/type';
|
||||
import { WorkflowInteractiveResponseType } from '@fastgpt/global/core/workflow/template/system/interactive/type';
|
||||
import { ChatSiteItemType } from '@fastgpt/global/core/chat/type';
|
||||
import type { WorkflowInteractiveResponseType } from '@fastgpt/global/core/workflow/template/system/interactive/type';
|
||||
|
||||
export type generatingMessageProps = {
|
||||
event: SseResponseEventEnum;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import { Box, Button, Flex, Textarea } from '@chakra-ui/react';
|
||||
import { Controller, useForm, UseFormHandleSubmit } from 'react-hook-form';
|
||||
import { Controller, useForm, type UseFormHandleSubmit } from 'react-hook-form';
|
||||
import Markdown from '@/components/Markdown';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
@@ -9,10 +9,10 @@ import MyTextarea from '@/components/common/Textarea/MyTextarea';
|
||||
import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput';
|
||||
import { FlowNodeInputTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
import {
|
||||
UserInputFormItemType,
|
||||
UserInputInteractive,
|
||||
UserSelectInteractive,
|
||||
UserSelectOptionItemType
|
||||
type UserInputFormItemType,
|
||||
type UserInputInteractive,
|
||||
type UserSelectInteractive,
|
||||
type UserSelectOptionItemType
|
||||
} from '@fastgpt/global/core/workflow/template/system/interactive/type';
|
||||
import MultipleSelect from '@fastgpt/web/components/common/MySelect/MultipleSelect';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Box, Flex, BoxProps, useDisclosure, HStack } from '@chakra-ui/react';
|
||||
import { Box, Flex, type BoxProps, useDisclosure, HStack } from '@chakra-ui/react';
|
||||
import type { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type.d';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { moduleTemplatesFlat } from '@fastgpt/global/core/workflow/template/constants';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Box, Flex, FlexProps } from '@chakra-ui/react';
|
||||
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constants';
|
||||
import { Box, Flex, type FlexProps } from '@chakra-ui/react';
|
||||
import type { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constants';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import React from 'react';
|
||||
import { DatasetTypeMap } from '@fastgpt/global/core/dataset/constants';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, BoxProps } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps } from '@chakra-ui/react';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { getCollectionSourceAndOpen } from '@/web/core/dataset/hooks/readCollectionSource';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { getDatasets, getDatasetPaths } from '@/web/core/dataset/api';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import React, { Dispatch, useMemo, useState } from 'react';
|
||||
import React, { type Dispatch, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { Box } from '@chakra-ui/react';
|
||||
import ParentPaths from '@/components/common/ParentPaths';
|
||||
|
@@ -10,7 +10,7 @@ import {
|
||||
Button,
|
||||
useDisclosure
|
||||
} from '@chakra-ui/react';
|
||||
import { TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { type TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import Icon from '@fastgpt/web/components/common/Icon';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
|
@@ -1,7 +1,9 @@
|
||||
import React from 'react';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import CollaboratorContextProvider, { MemberManagerInputPropsType } from '../MemberManager/context';
|
||||
import CollaboratorContextProvider, {
|
||||
type MemberManagerInputPropsType
|
||||
} from '../MemberManager/context';
|
||||
import { Box, Button, Flex, HStack, ModalBody, useDisclosure } from '@chakra-ui/react';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Box, BoxProps } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps } from '@chakra-ui/react';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
import React from 'react';
|
||||
import type { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { PermissionTypeMap } from '@fastgpt/global/support/permission/constant';
|
||||
import { Box, StackProps, HStack } from '@chakra-ui/react';
|
||||
import { Box, type StackProps, HStack } from '@chakra-ui/react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
||||
|
@@ -3,7 +3,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import { Box, Checkbox, HStack, VStack } from '@chakra-ui/react';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import PermissionTags from './PermissionTags';
|
||||
import { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import { type PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import OrgTags from '../../user/team/OrgTags';
|
||||
import Tag from '@fastgpt/web/components/common/Tag';
|
||||
|
@@ -10,11 +10,11 @@ import {
|
||||
DEFAULT_TEAM_AVATAR,
|
||||
DEFAULT_USER_AVATAR
|
||||
} from '@fastgpt/global/common/system/constants';
|
||||
import { UpdateClbPermissionProps } from '@fastgpt/global/support/permission/collaborator';
|
||||
import { MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { type UpdateClbPermissionProps } from '@fastgpt/global/support/permission/collaborator';
|
||||
import { type MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { DefaultGroupName } from '@fastgpt/global/support/user/team/group/constant';
|
||||
import { OrgListItemType } from '@fastgpt/global/support/user/team/org/type';
|
||||
import { TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { type OrgListItemType } from '@fastgpt/global/support/user/team/org/type';
|
||||
import { type TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import MyAvatar from '@fastgpt/web/components/common/Avatar';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import SearchInput from '@fastgpt/web/components/common/Input/SearchInput';
|
||||
@@ -22,7 +22,7 @@ import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { useScrollPagination } from '@fastgpt/web/hooks/useScrollPagination';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { ValueOf } from 'next/dist/shared/lib/constants';
|
||||
import { type ValueOf } from 'next/dist/shared/lib/constants';
|
||||
import { useMemo, useRef, useState } from 'react';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import { CollaboratorContext } from './context';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
ButtonProps,
|
||||
type ButtonProps,
|
||||
Flex,
|
||||
Menu,
|
||||
MenuList,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import { type PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import { Permission } from '@fastgpt/global/support/permission/controller';
|
||||
import { CollaboratorContext } from './context';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import { type PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
import Tag from '@fastgpt/web/components/common/Tag';
|
||||
import React from 'react';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Permission } from '@fastgpt/global/support/permission/controller';
|
||||
import { PermissionListType } from '@fastgpt/global/support/permission/type';
|
||||
import { type PermissionListType } from '@fastgpt/global/support/permission/type';
|
||||
import { PermissionList } from '@fastgpt/global/support/permission/constant';
|
||||
import MyTag from '@fastgpt/web/components/common/Tag/index';
|
||||
import { HStack } from '@chakra-ui/react';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Box, BoxProps } from '@chakra-ui/react';
|
||||
import { Box, type BoxProps } from '@chakra-ui/react';
|
||||
import { useConfirm } from '@fastgpt/web/hooks/useConfirm';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import React from 'react';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { UserInformSchema } from '@fastgpt/global/support/user/inform/type';
|
||||
import { type UserInformSchema } from '@fastgpt/global/support/user/inform/type';
|
||||
import React from 'react';
|
||||
import { Box, Flex } from '@chakra-ui/react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
|
@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { Box, Button, Flex, ModalBody, ModalFooter, useDisclosure } from '@chakra-ui/react';
|
||||
import { NotSufficientModalType, useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { type NotSufficientModalType, useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import ExtraPlan from '@/pageComponents/price/ExtraPlan';
|
||||
import StandardPlan from '@/pageComponents/price/Standard';
|
||||
import FillRowTabs from '@fastgpt/web/components/common/Tabs/FillRowTabs';
|
||||
|
@@ -15,7 +15,7 @@ import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import Markdown from '@/components/Markdown';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import { CreateBillResponse } from '@fastgpt/global/support/wallet/bill/api';
|
||||
import { type CreateBillResponse } from '@fastgpt/global/support/wallet/bill/api';
|
||||
|
||||
export type QRPayProps = CreateBillResponse & {
|
||||
tip?: string;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { StandardSubLevelEnum, SubModeEnum } from '@fastgpt/global/support/wallet/sub/constants';
|
||||
import type { StandardSubLevelEnum } from '@fastgpt/global/support/wallet/sub/constants';
|
||||
import { SubModeEnum } from '@fastgpt/global/support/wallet/sub/constants';
|
||||
import React, { useMemo } from 'react';
|
||||
import { standardSubLevelMap } from '@fastgpt/global/support/wallet/sub/constants';
|
||||
import { Box, Flex, Grid } from '@chakra-ui/react';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { ModelProviderIdType } from '@fastgpt/global/core/ai/provider';
|
||||
import { ChannelInfoType } from './type';
|
||||
import { type ModelProviderIdType } from '@fastgpt/global/core/ai/provider';
|
||||
import { type ChannelInfoType } from './type';
|
||||
import { i18nT } from '@fastgpt/web/i18n/utils';
|
||||
|
||||
export enum ChannelStatusEnum {
|
||||
|
2
projects/app/src/global/aiproxy/type.d.ts
vendored
2
projects/app/src/global/aiproxy/type.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { ChannelStatusEnum } from './constants';
|
||||
import type { ChannelStatusEnum } from './constants';
|
||||
|
||||
export type ChannelInfoType = {
|
||||
model_mapping: Record<string, any>;
|
||||
|
@@ -7,8 +7,8 @@ import type {
|
||||
} from '@fastgpt/global/core/ai/model.d';
|
||||
|
||||
import type { FastGPTFeConfigsType } from '@fastgpt/global/common/system/types/index.d';
|
||||
import { SubPlanType } from '@fastgpt/global/support/wallet/sub/type';
|
||||
import { SystemDefaultModelType, SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import type { SubPlanType } from '@fastgpt/global/support/wallet/sub/type';
|
||||
import type { SystemDefaultModelType, SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
|
||||
export type InitDateResponse = {
|
||||
bufferId?: string;
|
||||
|
4
projects/app/src/global/core/api/appReq.d.ts
vendored
4
projects/app/src/global/core/api/appReq.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import { ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import type { ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import { UsageSourceEnum } from '@fastgpt/global/support/wallet/usage/constants';
|
||||
import { PaginationProps } from '@fastgpt/web/common/fetch/type';
|
||||
import type { PaginationProps } from '@fastgpt/web/common/fetch/type';
|
||||
|
||||
export type GetAppChatLogsProps = {
|
||||
appId: string;
|
||||
|
@@ -9,7 +9,7 @@ import { UploadChunkItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type';
|
||||
import { PermissionTypeEnum } from '@fastgpt/global/support/permission/constant';
|
||||
import type { LLMModelItemType } from '@fastgpt/global/core/ai/model.d';
|
||||
import { PaginationProps } from '@fastgpt/web/common/fetch/type';
|
||||
import type { PaginationProps } from '@fastgpt/web/common/fetch/type';
|
||||
|
||||
/* ===== dataset ===== */
|
||||
|
||||
|
6
projects/app/src/global/core/app/api.d.ts
vendored
6
projects/app/src/global/core/app/api.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import { AppSchema } from '@fastgpt/global/core/app/type';
|
||||
import type { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import type { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import type { AppSchema } from '@fastgpt/global/core/app/type';
|
||||
|
||||
export type AppUpdateParams = {
|
||||
parentId?: ParentIdType;
|
||||
|
9
projects/app/src/global/core/chat/api.d.ts
vendored
9
projects/app/src/global/core/chat/api.d.ts
vendored
@@ -1,10 +1,11 @@
|
||||
import type { AppChatConfigType, AppTTSConfigType } from '@fastgpt/global/core/app/type.d';
|
||||
import { AdminFbkType, ChatItemType } from '@fastgpt/global/core/chat/type';
|
||||
import type { AdminFbkType } from '@fastgpt/global/core/chat/type';
|
||||
import { ChatItemType } from '@fastgpt/global/core/chat/type';
|
||||
import type { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat.d';
|
||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import type { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import { RequestPaging } from '@/types';
|
||||
import { GetChatTypeEnum } from '@/global/core/chat/constants';
|
||||
import { ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import type { GetChatTypeEnum } from '@/global/core/chat/constants';
|
||||
import type { ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
|
||||
export type GetChatSpeechProps = OutLinkChatAuthProps & {
|
||||
appId: string;
|
||||
ttsConfig: AppTTSConfigType;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
|
||||
import { InitChatResponse } from './api';
|
||||
import { type InitChatResponse } from './api';
|
||||
|
||||
export const defaultChatData: InitChatResponse = {
|
||||
chatId: '',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { ChatRoleEnum } from '@fastgpt/global/core/chat/constants';
|
||||
import { ChatHistoryItemResType, ChatItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import { type ChatHistoryItemResType, type ChatItemType } from '@fastgpt/global/core/chat/type';
|
||||
import { type SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
|
||||
|
||||
export const isLLMNode = (item: ChatHistoryItemResType) =>
|
||||
|
22
projects/app/src/global/core/dataset/api.d.ts
vendored
22
projects/app/src/global/core/dataset/api.d.ts
vendored
@@ -1,20 +1,24 @@
|
||||
import {
|
||||
import type {
|
||||
PushDatasetDataChunkProps,
|
||||
PushDatasetDataResponse
|
||||
} from '@fastgpt/global/core/dataset/api';
|
||||
import { APIFileServer, FeishuServer, YuqueServer } from '@fastgpt/global/core/dataset/apiDataset';
|
||||
import {
|
||||
import type {
|
||||
APIFileServer,
|
||||
FeishuServer,
|
||||
YuqueServer
|
||||
} from '@fastgpt/global/core/dataset/apiDataset';
|
||||
import type {
|
||||
DatasetSearchModeEnum,
|
||||
DatasetTypeEnum
|
||||
} from '@fastgpt/global/core/dataset/constants';
|
||||
import {
|
||||
DatasetSourceReadTypeEnum,
|
||||
DatasetTypeEnum,
|
||||
ImportDataSourceEnum,
|
||||
TrainingModeEnum
|
||||
} from '@fastgpt/global/core/dataset/constants';
|
||||
import {
|
||||
DatasetDataIndexItemType,
|
||||
SearchDataResponseItemType
|
||||
} from '@fastgpt/global/core/dataset/type';
|
||||
import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import type { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import { DatasetDataIndexItemType } from '@fastgpt/global/core/dataset/type';
|
||||
import type { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants';
|
||||
import { PermissionValueType } from '@fastgpt/global/support/permission/type';
|
||||
|
||||
/* ================= dataset ===================== */
|
||||
|
@@ -1,10 +1,7 @@
|
||||
import { ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
|
||||
import {
|
||||
DatasetCollectionSchemaType,
|
||||
DatasetDataSchemaType,
|
||||
DatasetTagType
|
||||
} from '@fastgpt/global/core/dataset/type.d';
|
||||
import { DatasetPermission } from '@fastgpt/global/support/permission/dataset/controller';
|
||||
import type { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type.d';
|
||||
import { DatasetDataSchemaType, DatasetTagType } from '@fastgpt/global/core/dataset/type.d';
|
||||
import type { DatasetPermission } from '@fastgpt/global/support/permission/dataset/controller';
|
||||
|
||||
/* ================= dataset ===================== */
|
||||
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { AppSchema } from '@fastgpt/global/core/app/type';
|
||||
import { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
|
||||
import { RuntimeNodeItemType } from '@fastgpt/global/core/workflow/runtime/type';
|
||||
import { WorkflowInteractiveResponseType } from '@fastgpt/global/core/workflow/template/system/interactive/type';
|
||||
import type { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
|
||||
import type { RuntimeNodeItemType } from '@fastgpt/global/core/workflow/runtime/type';
|
||||
import type { WorkflowInteractiveResponseType } from '@fastgpt/global/core/workflow/template/system/interactive/type';
|
||||
import { StoreNodeItemType } from '@fastgpt/global/core/workflow/type';
|
||||
import { RuntimeEdgeItemType, StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
||||
import type { RuntimeEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
||||
import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
|
||||
|
||||
export type PostWorkflowDebugProps = {
|
||||
nodes: RuntimeNodeItemType[];
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Box, ButtonProps } from '@chakra-ui/react';
|
||||
import { Box, type ButtonProps } from '@chakra-ui/react';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { getTeamList, putSwitchTeam } from '@/web/support/user/team/api';
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
getInvoiceBillsList,
|
||||
invoiceBillDataType,
|
||||
type invoiceBillDataType,
|
||||
submitInvoice
|
||||
} from '@/web/support/wallet/bill/invoice/api';
|
||||
import {
|
||||
@@ -28,7 +28,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import { useCallback, useState } from 'react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import Divider from '@/pageComponents/app/detail/WorkflowComponents/Flow/components/Divider';
|
||||
import { TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
|
||||
import { type TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
|
||||
import { InvoiceHeaderSingleForm } from './InvoiceHeaderForm';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import { getTeamInvoiceHeader } from '@/web/support/user/team/api';
|
||||
|
@@ -19,9 +19,9 @@ import { formatStorePrice2Read } from '@fastgpt/global/support/wallet/usage/tool
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import type { BillTypeEnum } from '@fastgpt/global/support/wallet/bill/constants';
|
||||
import {
|
||||
BillStatusEnum,
|
||||
BillTypeEnum,
|
||||
billPayWayMap,
|
||||
billStatusMap,
|
||||
billTypeMap
|
||||
|
@@ -1,11 +1,20 @@
|
||||
import Divider from '@/pageComponents/app/detail/WorkflowComponents/Flow/components/Divider';
|
||||
import { getTeamInvoiceHeader, updateTeamInvoiceHeader } from '@/web/support/user/team/api';
|
||||
import { Box, Button, Flex, HStack, Input, InputProps, Radio, RadioGroup } from '@chakra-ui/react';
|
||||
import { TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Flex,
|
||||
HStack,
|
||||
Input,
|
||||
type InputProps,
|
||||
Radio,
|
||||
RadioGroup
|
||||
} from '@chakra-ui/react';
|
||||
import { type TeamInvoiceHeaderType } from '@fastgpt/global/support/user/team/type';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { UseFormReturn, useForm } from 'react-hook-form';
|
||||
import { type UseFormReturn, useForm } from 'react-hook-form';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
|
||||
export const InvoiceHeaderSingleForm = ({
|
||||
|
@@ -17,7 +17,7 @@ import {
|
||||
Tr
|
||||
} from '@chakra-ui/react';
|
||||
import { usePagination } from '@fastgpt/web/hooks/usePagination';
|
||||
import { InvoiceSchemaType } from '@fastgpt/global/support/wallet/bill/type';
|
||||
import { type InvoiceSchemaType } from '@fastgpt/global/support/wallet/bill/type';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import dayjs from 'dayjs';
|
||||
import { formatStorePrice2Read } from '@fastgpt/global/support/wallet/usage/tools';
|
||||
|
@@ -14,13 +14,13 @@ import {
|
||||
Input,
|
||||
ModalFooter,
|
||||
Button,
|
||||
ButtonProps
|
||||
type ButtonProps
|
||||
} from '@chakra-ui/react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
ModelProviderList,
|
||||
ModelProviderIdType,
|
||||
type ModelProviderIdType,
|
||||
getModelProvider
|
||||
} from '@fastgpt/global/core/ai/provider';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
@@ -28,7 +28,7 @@ import { ModelTypeEnum } from '@fastgpt/global/core/ai/model';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { getSystemModelDefaultConfig, putSystemModel } from '@/web/core/ai/config';
|
||||
import { SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import { type SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput';
|
||||
import MyTextarea from '@/components/common/Textarea/MyTextarea';
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { aiproxyIdMap } from '@/global/aiproxy/constants';
|
||||
import { ChannelInfoType } from '@/global/aiproxy/type';
|
||||
import { type ChannelInfoType } from '@/global/aiproxy/type';
|
||||
import {
|
||||
Box,
|
||||
BoxProps,
|
||||
type BoxProps,
|
||||
Button,
|
||||
Flex,
|
||||
Input,
|
||||
MenuItemProps,
|
||||
type MenuItemProps,
|
||||
ModalBody,
|
||||
ModalFooter,
|
||||
useDisclosure,
|
||||
@@ -25,8 +25,8 @@ import React, { useCallback, useMemo, useRef, useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { AddModelButton } from '../AddModelBox';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import { ModelTypeEnum } from '@fastgpt/global/core/ai/model';
|
||||
import { type SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import type { ModelTypeEnum } from '@fastgpt/global/core/ai/model';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { getSystemModelList } from '@/web/core/ai/config';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
|
@@ -24,7 +24,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import MyIconButton from '@fastgpt/web/components/common/Icon/button';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { ChannelInfoType } from '@/global/aiproxy/type';
|
||||
import { type ChannelInfoType } from '@/global/aiproxy/type';
|
||||
import MyTag from '@fastgpt/web/components/common/Tag/index';
|
||||
import {
|
||||
aiproxyIdMap,
|
||||
|
@@ -16,10 +16,12 @@ import {
|
||||
ModalBody,
|
||||
Grid,
|
||||
GridItem,
|
||||
BoxProps
|
||||
type BoxProps
|
||||
} from '@chakra-ui/react';
|
||||
import { getModelProvider } from '@fastgpt/global/core/ai/provider';
|
||||
import DateRangePicker, { DateRangeType } from '@fastgpt/web/components/common/DateRangePicker';
|
||||
import DateRangePicker, {
|
||||
type DateRangeType
|
||||
} from '@fastgpt/web/components/common/DateRangePicker';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
@@ -33,7 +35,7 @@ import { formatTime2YMDHMS } from '@fastgpt/global/common/string/time';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
|
||||
import SearchInput from '@fastgpt/web/components/common/Input/SearchInput';
|
||||
import { ChannelLogUsageType } from '@/global/aiproxy/type';
|
||||
import { type ChannelLogUsageType } from '@/global/aiproxy/type';
|
||||
|
||||
type LogDetailType = {
|
||||
id: number;
|
||||
|
@@ -20,7 +20,7 @@ import { useTranslation } from 'next-i18next';
|
||||
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
ModelProviderList,
|
||||
ModelProviderIdType,
|
||||
type ModelProviderIdType,
|
||||
getModelProvider
|
||||
} from '@fastgpt/global/core/ai/provider';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
@@ -40,7 +40,7 @@ import {
|
||||
putUpdateDefaultModels
|
||||
} from '@/web/core/ai/config';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import { SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import { type SystemModelItemType } from '@fastgpt/service/core/ai/type';
|
||||
import { useConfirm } from '@fastgpt/web/hooks/useConfirm';
|
||||
import MyIconButton from '@fastgpt/web/components/common/Icon/button';
|
||||
import JsonEditor from '@fastgpt/web/components/common/Textarea/JsonEditor';
|
||||
|
@@ -17,7 +17,7 @@ import {
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import { postCreateTeam, putUpdateTeam } from '@/web/support/user/team/api';
|
||||
import { CreateTeamProps } from '@fastgpt/global/support/user/team/controller.d';
|
||||
import { type CreateTeamProps } from '@fastgpt/global/support/user/team/controller.d';
|
||||
import { DEFAULT_TEAM_AVATAR } from '@fastgpt/global/common/system/constants';
|
||||
import Icon from '@fastgpt/web/components/common/Icon';
|
||||
import dynamic from 'next/dynamic';
|
||||
|
@@ -9,7 +9,7 @@ import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { postCreateGroup, putUpdateGroup } from '@/web/support/user/team/group/api';
|
||||
import { DEFAULT_TEAM_AVATAR } from '@fastgpt/global/common/system/constants';
|
||||
import { MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { type MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
|
||||
export type GroupFormType = {
|
||||
avatar: string;
|
||||
|
@@ -8,15 +8,15 @@ import { useTranslation } from 'next-i18next';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { putUpdateGroup } from '@/web/support/user/team/group/api';
|
||||
import { GroupMemberRole } from '@fastgpt/global/support/permission/memberGroup/constant';
|
||||
import type { GroupMemberRole } from '@fastgpt/global/support/permission/memberGroup/constant';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import { DEFAULT_TEAM_AVATAR } from '@fastgpt/global/common/system/constants';
|
||||
import SearchInput from '@fastgpt/web/components/common/Input/SearchInput';
|
||||
import { MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { type MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { getTeamMembers } from '@/web/support/user/team/api';
|
||||
import { TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import { type TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { type PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import { useScrollPagination } from '@fastgpt/web/hooks/useScrollPagination';
|
||||
import _ from 'lodash';
|
||||
import MemberItemCard from '@/components/support/permission/MemberManager/MemberItemCard';
|
||||
|
@@ -10,7 +10,7 @@ import {
|
||||
useDisclosure,
|
||||
Checkbox
|
||||
} from '@chakra-ui/react';
|
||||
import { TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { type TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
@@ -18,11 +18,11 @@ import { useTranslation } from 'next-i18next';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { TeamContext } from '../context';
|
||||
import { useContextSelector } from 'use-context-selector';
|
||||
import { MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { type MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { GetSearchUserGroupOrg } from '@/web/support/user/api';
|
||||
import { Omit } from '@fastgpt/web/components/common/DndDrag';
|
||||
import { type Omit } from '@fastgpt/web/components/common/DndDrag';
|
||||
import { getTeamMembers } from '@/web/support/user/team/api';
|
||||
import { PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import { type PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import { useScrollPagination } from '@fastgpt/web/hooks/useScrollPagination';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
@@ -15,7 +15,7 @@ import {
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useConfirm } from '@fastgpt/web/hooks/useConfirm';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import MyMenu, { MenuItemType } from '@fastgpt/web/components/common/MyMenu';
|
||||
import MyMenu, { type MenuItemType } from '@fastgpt/web/components/common/MyMenu';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
@@ -26,7 +26,7 @@ import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { useState } from 'react';
|
||||
import IconButton from '../OrgManage/IconButton';
|
||||
import { MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
import { type MemberGroupListItemType } from '@fastgpt/global/support/permission/memberGroup/type';
|
||||
|
||||
const ChangeOwnerModal = dynamic(() => import('./GroupTransferOwnerModal'));
|
||||
const GroupInfoModal = dynamic(() => import('./GroupInfoModal'));
|
||||
|
@@ -12,8 +12,8 @@ import {
|
||||
HStack
|
||||
} from '@chakra-ui/react';
|
||||
import {
|
||||
InvitationLinkCreateType,
|
||||
InvitationLinkExpiresType
|
||||
type InvitationLinkCreateType,
|
||||
type InvitationLinkExpiresType
|
||||
} from '@fastgpt/service/support/user/team/invitationLink/type';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
|
@@ -42,11 +42,11 @@ import OrgTags from '@/components/support/user/team/OrgTags';
|
||||
import SearchInput from '@fastgpt/web/components/common/Input/SearchInput';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { downloadFetch } from '@/web/common/system/utils';
|
||||
import { TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { type TeamMemberItemType } from '@fastgpt/global/support/user/team/type';
|
||||
import { useToast } from '@fastgpt/web/hooks/useToast';
|
||||
import MyBox from '@fastgpt/web/components/common/MyBox';
|
||||
import { useScrollPagination } from '@fastgpt/web/hooks/useScrollPagination';
|
||||
import { PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import { type PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import _ from 'lodash';
|
||||
import MySelect from '@fastgpt/web/components/common/MySelect';
|
||||
import { useEditTitle } from '@/web/common/hooks/useEditTitle';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { IconProps } from '@chakra-ui/react';
|
||||
import { type IconProps } from '@chakra-ui/react';
|
||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||
import type { IconNameType } from '@fastgpt/web/components/common/Icon/type';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user