onChange(item.id);
}}
>
-
+
{item.label}
))}
diff --git a/projects/app/src/components/common/MyRadio/index.tsx b/projects/app/src/components/common/MyRadio/index.tsx
index 4cb4ce1e706..5aa45669061 100644
--- a/projects/app/src/components/common/MyRadio/index.tsx
+++ b/projects/app/src/components/common/MyRadio/index.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { Box, Flex, useTheme, Grid, type GridProps, theme, Image } from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useTranslation } from 'next-i18next';
// @ts-ignore
diff --git a/projects/app/src/components/common/ParentPaths/index.tsx b/projects/app/src/components/common/ParentPaths/index.tsx
index b9d0a9f34b7..561ce270a81 100644
--- a/projects/app/src/components/common/ParentPaths/index.tsx
+++ b/projects/app/src/components/common/ParentPaths/index.tsx
@@ -1,4 +1,4 @@
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { Box, Flex } from '@chakra-ui/react';
import { ParentTreePathItemType } from '@fastgpt/global/common/parentFolder/type';
import React, { useMemo } from 'react';
diff --git a/projects/app/src/components/common/Textarea/PromptTextarea/index.tsx b/projects/app/src/components/common/Textarea/PromptTextarea/index.tsx
index 1f071040368..54d63b1d597 100644
--- a/projects/app/src/components/common/Textarea/PromptTextarea/index.tsx
+++ b/projects/app/src/components/common/Textarea/PromptTextarea/index.tsx
@@ -11,7 +11,7 @@ import {
} from '@chakra-ui/react';
import MyTooltip from '@/components/MyTooltip';
import { useTranslation } from 'next-i18next';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyModal from '@/components/MyModal';
type Props = TextareaProps & {
@@ -88,7 +88,7 @@ const Editor = React.memo(function Editor({
onClick={onOpenModal}
>
-
+
)}
diff --git a/projects/app/src/components/core/chat/Divider/index.tsx b/projects/app/src/components/core/chat/Divider/index.tsx
index 96e5e427052..39d4b77188e 100644
--- a/projects/app/src/components/core/chat/Divider/index.tsx
+++ b/projects/app/src/components/core/chat/Divider/index.tsx
@@ -1,8 +1,9 @@
import { Box, Flex } from '@chakra-ui/react';
import React from 'react';
-import MyIcon, { type IconName } from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
+import type { IconNameType } from '@fastgpt/web/components/common/Icon/type.d';
-const ChatBoxDivider = ({ icon, text }: { icon: IconName; text: string }) => {
+const ChatBoxDivider = ({ icon, text }: { icon: IconNameType; text: string }) => {
return (
diff --git a/projects/app/src/components/core/dataset/QuoteItem.tsx b/projects/app/src/components/core/dataset/QuoteItem.tsx
index 7360175a898..1bbafc48b25 100644
--- a/projects/app/src/components/core/dataset/QuoteItem.tsx
+++ b/projects/app/src/components/core/dataset/QuoteItem.tsx
@@ -6,7 +6,7 @@ import {
} from '@/pages/dataset/detail/components/InputDataModal';
import type { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type.d';
import NextLink from 'next/link';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useTranslation } from 'next-i18next';
import MyTooltip from '@/components/MyTooltip';
import { useSystemStore } from '@/web/common/system/useSystemStore';
diff --git a/projects/app/src/components/core/module/DatasetParamsModal.tsx b/projects/app/src/components/core/module/DatasetParamsModal.tsx
index 1819ab36cb1..8e74c406d50 100644
--- a/projects/app/src/components/core/module/DatasetParamsModal.tsx
+++ b/projects/app/src/components/core/module/DatasetParamsModal.tsx
@@ -22,7 +22,7 @@ import { reRankModelList } from '@/web/common/system/staticData';
import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
import { DatasetSearchModeMap } from '@fastgpt/global/core/dataset/constant';
import MyRadio from '@/components/common/MyRadio';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
type DatasetParamsProps = {
searchMode: `${DatasetSearchModeEnum}`;
diff --git a/projects/app/src/components/core/module/DatasetSelectModal.tsx b/projects/app/src/components/core/module/DatasetSelectModal.tsx
index 27bac08edf0..eea9c843938 100644
--- a/projects/app/src/components/core/module/DatasetSelectModal.tsx
+++ b/projects/app/src/components/core/module/DatasetSelectModal.tsx
@@ -14,7 +14,7 @@ import Avatar from '@/components/Avatar';
import type { SelectedDatasetType } from '@fastgpt/global/core/module/api.d';
import { useToast } from '@/web/common/hooks/useToast';
import MyTooltip from '@/components/MyTooltip';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constant';
import { useTranslation } from 'next-i18next';
import { useDatasetStore } from '@/web/core/dataset/store/dataset';
diff --git a/projects/app/src/components/core/module/Flow/ChatTest.tsx b/projects/app/src/components/core/module/Flow/ChatTest.tsx
index 1feafe77bf7..4d162b56bd8 100644
--- a/projects/app/src/components/core/module/Flow/ChatTest.tsx
+++ b/projects/app/src/components/core/module/Flow/ChatTest.tsx
@@ -9,7 +9,7 @@ import React, {
ForwardedRef
} from 'react';
import { Box, Flex, IconButton } from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { streamFetch } from '@/web/common/api/fetch';
import MyTooltip from '@/components/MyTooltip';
import { useUserStore } from '@/web/support/user/useUserStore';
@@ -105,7 +105,7 @@ const ChatTest = (
}
+ icon={}
variant={'whiteDanger'}
borderRadius={'md'}
aria-label={'delete'}
diff --git a/projects/app/src/components/core/module/Flow/components/modules/ButtonEdge.tsx b/projects/app/src/components/core/module/Flow/components/modules/ButtonEdge.tsx
index e0c4eb6a7d0..f211ed7b632 100644
--- a/projects/app/src/components/core/module/Flow/components/modules/ButtonEdge.tsx
+++ b/projects/app/src/components/core/module/Flow/components/modules/ButtonEdge.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import { BezierEdge, getBezierPath, EdgeLabelRenderer, EdgeProps } from 'reactflow';
import { onDelConnect } from '../../FlowProvider';
import { Flex } from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
const ButtonEdge = (props: EdgeProps) => {
const {
diff --git a/projects/app/src/components/core/module/Flow/components/modules/QGSwitch.tsx b/projects/app/src/components/core/module/Flow/components/modules/QGSwitch.tsx
index 2d4c88e7e28..83ff7c61ea5 100644
--- a/projects/app/src/components/core/module/Flow/components/modules/QGSwitch.tsx
+++ b/projects/app/src/components/core/module/Flow/components/modules/QGSwitch.tsx
@@ -1,4 +1,4 @@
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@/components/MyTooltip';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
import { Box, Flex, Switch, type SwitchProps } from '@chakra-ui/react';
diff --git a/projects/app/src/components/core/module/Flow/components/modules/TTSSelect.tsx b/projects/app/src/components/core/module/Flow/components/modules/TTSSelect.tsx
index 5d06c63d861..4866b194f51 100644
--- a/projects/app/src/components/core/module/Flow/components/modules/TTSSelect.tsx
+++ b/projects/app/src/components/core/module/Flow/components/modules/TTSSelect.tsx
@@ -1,4 +1,4 @@
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@/components/MyTooltip';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
import { Box, Button, Flex, ModalBody, useDisclosure, Image } from '@chakra-ui/react';
diff --git a/projects/app/src/components/core/module/Flow/components/modules/VariableEdit.tsx b/projects/app/src/components/core/module/Flow/components/modules/VariableEdit.tsx
index 36afc32560d..d88afd9b2e4 100644
--- a/projects/app/src/components/core/module/Flow/components/modules/VariableEdit.tsx
+++ b/projects/app/src/components/core/module/Flow/components/modules/VariableEdit.tsx
@@ -27,7 +27,7 @@ import {
import { QuestionOutlineIcon, SmallAddIcon } from '@chakra-ui/icons';
import { VariableInputEnum } from '@fastgpt/global/core/module/constants';
import type { VariableItemType } from '@fastgpt/global/core/module/type.d';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useForm } from 'react-hook-form';
import { useFieldArray } from 'react-hook-form';
import { customAlphabet } from 'nanoid';
@@ -93,10 +93,10 @@ const VariableEdit = ({
const BoxBtnStyles: BoxProps = {
cursor: 'pointer',
px: 3,
- py: '2px',
+ py: 1,
borderRadius: 'md',
_hover: {
- bg: 'myGray.200'
+ bg: 'myGray.150'
}
};
@@ -119,12 +119,14 @@ const VariableEdit = ({
{
resetEdit({ variable: addVariable() });
onOpenEdit();
}}
>
- + {t('common.Add New')}
+
+ {t('common.Add New')}
{formatVariables.length > 0 && (
@@ -152,7 +154,7 @@ const VariableEdit = ({
{
diff --git a/projects/app/src/components/core/module/Flow/components/nodes/NodeCQNode.tsx b/projects/app/src/components/core/module/Flow/components/nodes/NodeCQNode.tsx
index e4ff185e8d1..310756159ce 100644
--- a/projects/app/src/components/core/module/Flow/components/nodes/NodeCQNode.tsx
+++ b/projects/app/src/components/core/module/Flow/components/nodes/NodeCQNode.tsx
@@ -9,7 +9,7 @@ import RenderInput from '../render/RenderInput';
import type { ClassifyQuestionAgentItemType } from '@fastgpt/global/core/module/type.d';
import { customAlphabet } from 'nanoid';
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 4);
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { FlowNodeOutputTypeEnum } from '@fastgpt/global/core/module/node/constant';
import { ModuleIOValueTypeEnum, ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
import { useTranslation } from 'next-i18next';
diff --git a/projects/app/src/components/core/module/Flow/components/nodes/NodeExtract/index.tsx b/projects/app/src/components/core/module/Flow/components/nodes/NodeExtract/index.tsx
index 9e3247eab14..ee628e39443 100644
--- a/projects/app/src/components/core/module/Flow/components/nodes/NodeExtract/index.tsx
+++ b/projects/app/src/components/core/module/Flow/components/nodes/NodeExtract/index.tsx
@@ -10,7 +10,7 @@ import RenderInput from '../../render/RenderInput';
import Divider from '../../modules/Divider';
import type { ContextExtractAgentItemType } from '@fastgpt/global/core/module/type';
import RenderOutput from '../../render/RenderOutput';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import ExtractFieldModal, { defaultField } from './ExtractFieldModal';
import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
import { FlowNodeOutputTypeEnum } from '@fastgpt/global/core/module/node/constant';
@@ -70,7 +70,7 @@ const NodeExtract = React.memo(function NodeExtract({ data }: { data: FlowModule
{
diff --git a/projects/app/src/components/core/module/Flow/components/nodes/NodePluginInput.tsx b/projects/app/src/components/core/module/Flow/components/nodes/NodePluginInput.tsx
index 85e105198d6..42d0b17b4fe 100644
--- a/projects/app/src/components/core/module/Flow/components/nodes/NodePluginInput.tsx
+++ b/projects/app/src/components/core/module/Flow/components/nodes/NodePluginInput.tsx
@@ -11,7 +11,7 @@ import {
FlowNodeOutputTypeEnum
} from '@fastgpt/global/core/module/node/constant';
import Container from '../modules/Container';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@/components/MyTooltip';
import SourceHandle from '../render/SourceHandle';
import type {
@@ -65,7 +65,7 @@ const NodePluginInput = React.memo(function NodePluginInput({
mb={7}
>
)}
-
+
开场白
diff --git a/projects/app/src/components/core/module/Flow/components/nodes/abandon/NodeVariable.tsx b/projects/app/src/components/core/module/Flow/components/nodes/abandon/NodeVariable.tsx
index a2e14bb9a61..d16d1fff85d 100644
--- a/projects/app/src/components/core/module/Flow/components/nodes/abandon/NodeVariable.tsx
+++ b/projects/app/src/components/core/module/Flow/components/nodes/abandon/NodeVariable.tsx
@@ -8,7 +8,7 @@ import { FlowModuleItemType } from '@fastgpt/global/core/module/type.d';
import Container from '../../modules/Container';
import { VariableInputEnum, ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
import type { VariableItemType } from '@fastgpt/global/core/module/type.d';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { customAlphabet } from 'nanoid';
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 6);
import VariableEditModal, { addVariable } from '../../modules/VariableEdit';
diff --git a/projects/app/src/components/core/module/Flow/components/render/NodeCard.tsx b/projects/app/src/components/core/module/Flow/components/render/NodeCard.tsx
index 09fbc5e8a9b..d3d6e0bffbd 100644
--- a/projects/app/src/components/core/module/Flow/components/render/NodeCard.tsx
+++ b/projects/app/src/components/core/module/Flow/components/render/NodeCard.tsx
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react';
import { Box, Flex, useTheme, Menu, MenuButton, MenuList, MenuItem } from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import Avatar from '@/components/Avatar';
import type { FlowModuleItemType } from '@fastgpt/global/core/module/type.d';
import MyTooltip from '@/components/MyTooltip';
@@ -116,7 +116,7 @@ const NodeCard = (props: Props) => {
},
{
- icon: 'back',
+ icon: 'common/backLight',
label: t('common.Back'),
onClick: () => {}
}
diff --git a/projects/app/src/components/core/module/Flow/components/render/RenderInput/Label.tsx b/projects/app/src/components/core/module/Flow/components/render/RenderInput/Label.tsx
index 4d0819669b7..a54c43674a7 100644
--- a/projects/app/src/components/core/module/Flow/components/render/RenderInput/Label.tsx
+++ b/projects/app/src/components/core/module/Flow/components/render/RenderInput/Label.tsx
@@ -7,7 +7,7 @@ import { Box, Flex } from '@chakra-ui/react';
import MyTooltip from '@/components/MyTooltip';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
import TargetHandle from '../TargetHandle';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import dynamic from 'next/dynamic';
@@ -68,7 +68,7 @@ const InputLabel = ({ moduleId, inputKey, mode, ...item }: Props) => {
{edit && (
<>
{
@@ -27,7 +27,7 @@ const AiSettingRender = ({ inputs = [], moduleId }: RenderInputProps) => {
<>
}
+ leftIcon={}
onClick={onOpenAIChatSetting}
>
{t('app.AI Settings')}
diff --git a/projects/app/src/components/core/module/Flow/components/render/RenderInput/templates/SelectDatasetParams.tsx b/projects/app/src/components/core/module/Flow/components/render/RenderInput/templates/SelectDatasetParams.tsx
index 07769b1cea9..38fc9c1388f 100644
--- a/projects/app/src/components/core/module/Flow/components/render/RenderInput/templates/SelectDatasetParams.tsx
+++ b/projects/app/src/components/core/module/Flow/components/render/RenderInput/templates/SelectDatasetParams.tsx
@@ -7,7 +7,7 @@ import { DatasetSearchModeEnum } from '@fastgpt/global/core/dataset/constant';
import { FlowNodeTypeEnum } from '@fastgpt/global/core/module/node/constant';
import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
import { chatModelList } from '@/web/common/system/staticData';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import DatasetParamsModal from '@/components/core/module/DatasetParamsModal';
const SelectDatasetParam = ({ inputs = [], moduleId }: RenderInputProps) => {
@@ -63,7 +63,7 @@ const SelectDatasetParam = ({ inputs = [], moduleId }: RenderInputProps) => {
<>
}
+ leftIcon={}
onClick={onOpen}
>
{t('core.dataset.search.Params Setting')}
diff --git a/projects/app/src/components/core/module/Flow/components/render/RenderOutput/Label.tsx b/projects/app/src/components/core/module/Flow/components/render/RenderOutput/Label.tsx
index e784d371fdd..4f22da78644 100644
--- a/projects/app/src/components/core/module/Flow/components/render/RenderOutput/Label.tsx
+++ b/projects/app/src/components/core/module/Flow/components/render/RenderOutput/Label.tsx
@@ -2,7 +2,7 @@ import { EditNodeFieldType, FlowNodeOutputItemType } from '@fastgpt/global/core/
import React, { useState } from 'react';
import { useTranslation } from 'next-i18next';
import { Box, Flex } from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { onChangeNode } from '../../../FlowProvider';
import MyTooltip from '@/components/MyTooltip';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
@@ -37,7 +37,7 @@ const OutputLabel = ({
{edit && (
<>
{
const theme = useTheme();
diff --git a/projects/app/src/pages/account/components/PayRecordTable.tsx b/projects/app/src/pages/account/components/PayRecordTable.tsx
index d4e29754d92..70e5743bc87 100644
--- a/projects/app/src/pages/account/components/PayRecordTable.tsx
+++ b/projects/app/src/pages/account/components/PayRecordTable.tsx
@@ -18,7 +18,7 @@ import { useQuery } from '@tanstack/react-query';
import { formatStorePrice2Read } from '@fastgpt/global/support/wallet/bill/tools';
import { useToast } from '@/web/common/hooks/useToast';
import { useLoading } from '@/web/common/hooks/useLoading';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
const PayRecordTable = () => {
const { Loading, setIsLoading } = useLoading();
diff --git a/projects/app/src/pages/account/components/Promotion.tsx b/projects/app/src/pages/account/components/Promotion.tsx
index c6386d093db..e1e22fb40c7 100644
--- a/projects/app/src/pages/account/components/Promotion.tsx
+++ b/projects/app/src/pages/account/components/Promotion.tsx
@@ -25,7 +25,7 @@ import { QuestionOutlineIcon } from '@chakra-ui/icons';
import { useCopyData } from '@/web/common/hooks/useCopyData';
import { usePagination } from '@/web/common/hooks/usePagination';
import type { PromotionRecordType } from '@/global/support/api/userRes.d';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import dayjs from 'dayjs';
const Promotion = () => {
diff --git a/projects/app/src/pages/account/index.tsx b/projects/app/src/pages/account/index.tsx
index 1d929108ab8..f37e11b7b7c 100644
--- a/projects/app/src/pages/account/index.tsx
+++ b/projects/app/src/pages/account/index.tsx
@@ -38,14 +38,14 @@ const Account = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
const tabList = [
{
- icon: 'meLight',
+ icon: 'support/user/userLight',
label: t('user.Personal Information'),
id: TabEnum.info
},
...(feConfigs?.isPlus
? [
{
- icon: 'billRecordLight',
+ icon: 'support/bill/billRecordLight',
label: t('user.Usage Record'),
id: TabEnum.bill
}
@@ -81,7 +81,7 @@ const Account = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
...(userInfo?.team.canWrite
? [
{
- icon: 'apikey',
+ icon: 'support/outlink/apikeyLight',
label: t('user.apikey.key'),
id: TabEnum.apikey
}
@@ -90,7 +90,7 @@ const Account = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
...(feConfigs.isPlus
? [
{
- icon: 'informLight',
+ icon: 'support/user/informLight',
label: t('user.Notice'),
id: TabEnum.inform
}
diff --git a/projects/app/src/pages/app/detail/components/FlowEdit/Header.tsx b/projects/app/src/pages/app/detail/components/FlowEdit/Header.tsx
index 48ade72705c..3b797d97a3d 100644
--- a/projects/app/src/pages/app/detail/components/FlowEdit/Header.tsx
+++ b/projects/app/src/pages/app/detail/components/FlowEdit/Header.tsx
@@ -9,7 +9,7 @@ import { useCopyData } from '@/web/common/hooks/useCopyData';
import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
import dynamic from 'next/dynamic';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@/components/MyTooltip';
import ChatTest, { type ChatTestComponentRef } from '@/components/core/module/Flow/ChatTest';
import { getFlowStore } from '@/components/core/module/Flow/FlowProvider';
@@ -101,7 +101,7 @@ const RenderHeaderContainer = React.memo(function RenderHeaderContainer({
}
+ icon={}
borderColor={'myGray.300'}
variant={'whiteBase'}
aria-label={''}
@@ -122,7 +122,7 @@ const RenderHeaderContainer = React.memo(function RenderHeaderContainer({
}
+ icon={}
variant={'whitePrimary'}
aria-label={'save'}
onClick={onOpenImport}
@@ -157,7 +157,7 @@ const RenderHeaderContainer = React.memo(function RenderHeaderContainer({
}
+ icon={}
size={'smSquare'}
aria-label={'save'}
variant={'whitePrimary'}
diff --git a/projects/app/src/pages/app/detail/components/Logs.tsx b/projects/app/src/pages/app/detail/components/Logs.tsx
index bd2c78e5c79..674190b9680 100644
--- a/projects/app/src/pages/app/detail/components/Logs.tsx
+++ b/projects/app/src/pages/app/detail/components/Logs.tsx
@@ -13,7 +13,7 @@ import {
useDisclosure,
ModalBody
} from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useTranslation } from 'next-i18next';
import { usePagination } from '@/web/common/hooks/usePagination';
import { getAppChatLogs } from '@/web/core/app/api';
@@ -315,7 +315,7 @@ const DetailLogsModal = ({
_hover={{ bg: 'myGray.100' }}
onClick={onClose}
>
-
+
diff --git a/projects/app/src/pages/app/detail/components/OutLink/SelectUsingWayModal.tsx b/projects/app/src/pages/app/detail/components/OutLink/SelectUsingWayModal.tsx
index de8be2e4717..9a2f49ad207 100644
--- a/projects/app/src/pages/app/detail/components/OutLink/SelectUsingWayModal.tsx
+++ b/projects/app/src/pages/app/detail/components/OutLink/SelectUsingWayModal.tsx
@@ -5,7 +5,7 @@ import { useTranslation } from 'next-i18next';
import { Box, Flex, FlexProps, Grid, Image, ModalBody, Switch, useTheme } from '@chakra-ui/react';
import MyRadio from '@/components/common/MyRadio';
import { useForm } from 'react-hook-form';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useCopyData } from '@/web/common/hooks/useCopyData';
import { useSelectFile } from '@/web/common/file/hooks/useSelectFile';
import { fileToBase64 } from '@/web/common/file/utils';
diff --git a/projects/app/src/pages/app/detail/components/OutLink/Share.tsx b/projects/app/src/pages/app/detail/components/OutLink/Share.tsx
index fd694f7e392..3b938e79b35 100644
--- a/projects/app/src/pages/app/detail/components/OutLink/Share.tsx
+++ b/projects/app/src/pages/app/detail/components/OutLink/Share.tsx
@@ -21,7 +21,7 @@ import {
Link
} from '@chakra-ui/react';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useLoading } from '@/web/common/hooks/useLoading';
import { useQuery } from '@tanstack/react-query';
import {
@@ -282,7 +282,7 @@ function EditLinkModal({
return (
diff --git a/projects/app/src/pages/app/detail/components/OutLink/index.tsx b/projects/app/src/pages/app/detail/components/OutLink/index.tsx
index 4e286c1dc2c..0cb91179f47 100644
--- a/projects/app/src/pages/app/detail/components/OutLink/index.tsx
+++ b/projects/app/src/pages/app/detail/components/OutLink/index.tsx
@@ -24,13 +24,13 @@ const OutLink = ({ appId }: { appId: string }) => {
iconSize={'20px'}
list={[
{
- icon: 'support/outlink/shareLight',
+ icon: '/imgs/modal/shareFill.svg',
title: '免登录窗口',
desc: '分享链接给其他用户,无需登录即可直接进行使用',
value: OutLinkTypeEnum.share
},
{
- icon: 'apikeyFill',
+ icon: 'support/outlink/apikeyFill',
title: 'API 访问',
desc: '通过 API 接入到已有系统中,或企微、飞书等',
value: OutLinkTypeEnum.apikey
diff --git a/projects/app/src/pages/app/detail/components/SimpleEdit/AppCard.tsx b/projects/app/src/pages/app/detail/components/SimpleEdit/AppCard.tsx
new file mode 100644
index 00000000000..55611de9c92
--- /dev/null
+++ b/projects/app/src/pages/app/detail/components/SimpleEdit/AppCard.tsx
@@ -0,0 +1,148 @@
+import React, { useState } from 'react';
+import { Box, Flex, Button, IconButton } from '@chakra-ui/react';
+import { useRequest } from '@/web/common/hooks/useRequest';
+import { useConfirm } from '@/web/common/hooks/useConfirm';
+import { useRouter } from 'next/router';
+import { useToast } from '@/web/common/hooks/useToast';
+import { AppSchema } from '@fastgpt/global/core/app/type.d';
+import { delModelById } from '@/web/core/app/api';
+import { useTranslation } from 'next-i18next';
+import { useAppStore } from '@/web/core/app/store/useAppStore';
+import PermissionIconText from '@/components/support/permission/IconText';
+import dynamic from 'next/dynamic';
+import Avatar from '@/components/Avatar';
+import MyIcon from '@fastgpt/web/components/common/Icon';
+const InfoModal = dynamic(() => import('../InfoModal'));
+
+const AppCard = ({ appId }: { appId: string }) => {
+ const router = useRouter();
+ const { t } = useTranslation();
+ const { toast } = useToast();
+ const { appDetail } = useAppStore();
+ const [settingAppInfo, setSettingAppInfo] = useState();
+
+ const { openConfirm: openConfirmDel, ConfirmModal: ConfirmDelModal } = useConfirm({
+ content: t('app.Confirm Del App Tip')
+ });
+
+ /* 点击删除 */
+ const { mutate: handleDelModel, isLoading } = useRequest({
+ mutationFn: async () => {
+ if (!appDetail) return null;
+ await delModelById(appDetail._id);
+ return 'success';
+ },
+ onSuccess(res) {
+ if (!res) return;
+ toast({
+ title: t('common.Delete Success'),
+ status: 'success'
+ });
+ router.replace(`/app/list`);
+ },
+ errorToast: t('common.Delete Failed')
+ });
+
+ return (
+ <>
+
+
+
+
+
+
+ AppId:{' '}
+
+ {appId}
+
+
+
+ {/* basic info */}
+
+
+
+
+ {appDetail.name}
+
+ {appDetail.isOwner && (
+ }
+ variant={'whiteDanger'}
+ borderRadius={'md'}
+ aria-label={'delete'}
+ isLoading={isLoading}
+ onClick={openConfirmDel(handleDelModel)}
+ />
+ )}
+
+
+ {appDetail.intro || '快来给应用一个介绍~'}
+
+
+ }
+ onClick={() => router.push(`/chat?appId=${appId}`)}
+ >
+ 对话
+
+ }
+ onClick={() => {
+ router.replace({
+ query: {
+ appId,
+ currentTab: 'outLink'
+ }
+ });
+ }}
+ >
+ 外接
+
+ {appDetail.isOwner && (
+ }
+ onClick={() => setSettingAppInfo(appDetail)}
+ >
+ 设置
+
+ )}
+
+
+
+
+
+ {settingAppInfo && (
+ setSettingAppInfo(undefined)} />
+ )}
+ >
+ );
+};
+
+export default React.memo(AppCard);
diff --git a/projects/app/src/pages/app/detail/components/SimpleEdit/CfrEditModal.tsx b/projects/app/src/pages/app/detail/components/SimpleEdit/CfrEditModal.tsx
new file mode 100644
index 00000000000..ff62e02342a
--- /dev/null
+++ b/projects/app/src/pages/app/detail/components/SimpleEdit/CfrEditModal.tsx
@@ -0,0 +1,61 @@
+import React, { useMemo, useState } from 'react';
+
+import MyModal from '@/components/MyModal';
+import { useTranslation } from 'next-i18next';
+import { Button, ModalBody, ModalFooter } from '@chakra-ui/react';
+import PromptTextarea from '@/components/common/Textarea/PromptTextarea';
+import MyTooltip from '@/components/MyTooltip';
+import { QuestionOutlineIcon } from '@chakra-ui/icons';
+
+const CfrEditModal = ({
+ defaultValue = '',
+ onClose,
+ onFinish
+}: {
+ defaultValue?: string;
+ onClose: () => void;
+ onFinish: (value: string) => void;
+}) => {
+ const { t } = useTranslation();
+ const [value, setValue] = useState(defaultValue);
+
+ return (
+
+
+ {t('core.app.edit.cfr background prompt')}
+
+
+
+ {
+ setValue(e.target.value || '');
+ }}
+ />
+
+
+
+
+
+ );
+};
+
+export default React.memo(CfrEditModal);
diff --git a/projects/app/src/pages/app/detail/components/SimpleEdit/ChatTest.tsx b/projects/app/src/pages/app/detail/components/SimpleEdit/ChatTest.tsx
new file mode 100644
index 00000000000..5e49bcd156c
--- /dev/null
+++ b/projects/app/src/pages/app/detail/components/SimpleEdit/ChatTest.tsx
@@ -0,0 +1,133 @@
+import { useAppStore } from '@/web/core/app/store/useAppStore';
+import { useUserStore } from '@/web/support/user/useUserStore';
+import { Box, Flex, IconButton } from '@chakra-ui/react';
+import { useTranslation } from 'next-i18next';
+import React, { useCallback, useEffect, useRef, useState } from 'react';
+import ChatBox, { type ComponentRef, type StartChatFnProps } from '@/components/ChatBox';
+import { ModuleItemType } from '@fastgpt/global/core/module/type';
+import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
+import { streamFetch } from '@/web/common/api/fetch';
+import MyTooltip from '@/components/MyTooltip';
+import MyIcon from '@fastgpt/web/components/common/Icon';
+import { getGuideModule } from '@fastgpt/global/core/module/utils';
+import { checkChatSupportSelectFileByModules } from '@/web/core/chat/utils';
+import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
+
+const ChatTest = ({ appId }: { appId: string }) => {
+ const { t } = useTranslation();
+ const { userInfo } = useUserStore();
+ const { appDetail } = useAppStore();
+ const ChatBoxRef = useRef(null);
+ const [modules, setModules] = useState([]);
+
+ const startChat = useCallback(
+ async ({ chatList, controller, generatingMessage, variables }: StartChatFnProps) => {
+ let historyMaxLen = 0;
+
+ modules.forEach((module) => {
+ module.inputs.forEach((input) => {
+ if (
+ (input.key === ModuleInputKeyEnum.history ||
+ input.key === ModuleInputKeyEnum.historyMaxAmount) &&
+ typeof input.value === 'number'
+ ) {
+ historyMaxLen = Math.max(historyMaxLen, input.value);
+ }
+ });
+ });
+ const history = chatList.slice(-historyMaxLen - 2, -2);
+
+ // 流请求,获取数据
+ const { responseText, responseData } = await streamFetch({
+ url: '/api/core/chat/chatTest',
+ data: {
+ history,
+ prompt: chatList[chatList.length - 2].value,
+ modules,
+ variables,
+ appId,
+ appName: `调试-${appDetail.name}`
+ },
+ onMessage: generatingMessage,
+ abortSignal: controller
+ });
+
+ return { responseText, responseData };
+ },
+ [modules, appId, appDetail.name]
+ );
+
+ const resetChatBox = useCallback(() => {
+ ChatBoxRef.current?.resetHistory([]);
+ ChatBoxRef.current?.resetVariables();
+ }, []);
+
+ useEffect(() => {
+ resetChatBox();
+ setModules(appDetail.modules);
+ }, [appDetail, resetChatBox]);
+
+ return (
+
+
+
+ {t('app.Chat Debug')}
+
+
+ }
+ variant={'whiteDanger'}
+ borderRadius={'md'}
+ aria-label={'delete'}
+ onClick={(e) => {
+ e.stopPropagation();
+ resetChatBox();
+ }}
+ />
+
+
+
+ {}}
+ />
+
+ {appDetail.type !== AppTypeEnum.simple && (
+
+ {t('app.Advance App TestTip')}
+
+ )}
+
+ );
+};
+
+export default React.memo(ChatTest);
diff --git a/projects/app/src/pages/app/detail/components/SimpleEdit/EditForm.tsx b/projects/app/src/pages/app/detail/components/SimpleEdit/EditForm.tsx
new file mode 100644
index 00000000000..cf4eadbe6eb
--- /dev/null
+++ b/projects/app/src/pages/app/detail/components/SimpleEdit/EditForm.tsx
@@ -0,0 +1,546 @@
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import {
+ Box,
+ Flex,
+ Grid,
+ BoxProps,
+ useTheme,
+ useDisclosure,
+ Button,
+ Image
+} from '@chakra-ui/react';
+import { useQuery } from '@tanstack/react-query';
+import { QuestionOutlineIcon, SmallAddIcon } from '@chakra-ui/icons';
+import { useForm, useFieldArray } from 'react-hook-form';
+import { useSystemStore } from '@/web/common/system/useSystemStore';
+import { appModules2Form, getDefaultAppForm } from '@fastgpt/global/core/app/utils';
+import type { AppSimpleEditFormType } from '@fastgpt/global/core/app/type.d';
+import { chatModelList, simpleModeTemplates } from '@/web/common/system/staticData';
+import { chatNodeSystemPromptTip, welcomeTextTip } from '@fastgpt/global/core/module/template/tip';
+import { useRequest } from '@/web/common/hooks/useRequest';
+import { useConfirm } from '@/web/common/hooks/useConfirm';
+import { useRouter } from 'next/router';
+import { useTranslation } from 'next-i18next';
+import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
+import { useDatasetStore } from '@/web/core/dataset/store/dataset';
+import { useAppStore } from '@/web/core/app/store/useAppStore';
+
+import { postForm2Modules } from '@/web/core/app/utils';
+
+import dynamic from 'next/dynamic';
+import MySelect from '@/components/Select';
+import MyTooltip from '@/components/MyTooltip';
+import Avatar from '@/components/Avatar';
+import MyIcon from '@fastgpt/web/components/common/Icon';
+import { SimpleModeTemplate_FastGPT_Universal } from '@/global/core/app/constants';
+import VariableEdit from '@/components/core/module/Flow/components/modules/VariableEdit';
+import PromptTextarea from '@/components/common/Textarea/PromptTextarea/index';
+import { DatasetSearchModeMap } from '@fastgpt/global/core/dataset/constant';
+import SelectAiModel from '@/components/Select/SelectAiModel';
+
+const DatasetSelectModal = dynamic(() => import('@/components/core/module/DatasetSelectModal'));
+const DatasetParamsModal = dynamic(() => import('@/components/core/module/DatasetParamsModal'));
+const AIChatSettingsModal = dynamic(() => import('@/components/core/module/AIChatSettingsModal'));
+const TTSSelect = dynamic(
+ () => import('@/components/core/module/Flow/components/modules/TTSSelect')
+);
+const QGSwitch = dynamic(() => import('@/components/core/module/Flow/components/modules/QGSwitch'));
+const CfrEditModal = dynamic(() => import('./CfrEditModal'));
+
+const EditForm = ({
+ divRef,
+ isSticky
+}: {
+ divRef: React.RefObject;
+ isSticky: boolean;
+}) => {
+ const theme = useTheme();
+ const router = useRouter();
+ const { t } = useTranslation();
+ const { appDetail, updateAppDetail } = useAppStore();
+ const { loadAllDatasets, allDatasets } = useDatasetStore();
+ const { isPc } = useSystemStore();
+ const [refresh, setRefresh] = useState(false);
+
+ const { register, setValue, getValues, reset, handleSubmit, control } =
+ useForm({
+ defaultValues: getDefaultAppForm()
+ });
+
+ const { fields: datasets, replace: replaceKbList } = useFieldArray({
+ control,
+ name: 'dataset.datasets'
+ });
+
+ const {
+ isOpen: isOpenAIChatSetting,
+ onOpen: onOpenAIChatSetting,
+ onClose: onCloseAIChatSetting
+ } = useDisclosure();
+ const {
+ isOpen: isOpenDatasetSelect,
+ onOpen: onOpenKbSelect,
+ onClose: onCloseKbSelect
+ } = useDisclosure();
+ const {
+ isOpen: isOpenDatasetParams,
+ onOpen: onOpenDatasetParams,
+ onClose: onCloseDatasetParams
+ } = useDisclosure();
+ const {
+ isOpen: isOpenCfrModal,
+ onOpen: onOpenCfrModal,
+ onClose: onCloseCfrModal
+ } = useDisclosure();
+
+ const { openConfirm: openConfirmSave, ConfirmModal: ConfirmSaveModal } = useConfirm({
+ content: t('core.app.edit.Confirm Save App Tip')
+ });
+
+ const chatModelSelectList = useMemo(() => {
+ return chatModelList.map((item) => ({
+ value: item.model,
+ label: item.name
+ }));
+ }, [refresh]);
+
+ const selectDatasets = useMemo(
+ () => allDatasets.filter((item) => datasets.find((dataset) => dataset.datasetId === item._id)),
+ [allDatasets, datasets]
+ );
+
+ const selectSimpleTemplate = useMemo(
+ () =>
+ simpleModeTemplates?.find((item) => item.id === getValues('templateId')) ||
+ SimpleModeTemplate_FastGPT_Universal,
+ [getValues, refresh]
+ );
+
+ const tokenLimit = useMemo(() => {
+ return (
+ chatModelList.find((item) => item.model === getValues('aiSettings.model'))?.quoteMaxToken ||
+ 3000
+ );
+ }, [getValues, refresh]);
+
+ const datasetSearchMode = useMemo(() => {
+ const mode = getValues('dataset.searchMode');
+ if (!mode) return '';
+ return t(DatasetSearchModeMap[mode]?.title);
+ }, [getValues, t, refresh]);
+
+ const { mutate: onSubmitSave, isLoading: isSaving } = useRequest({
+ mutationFn: async (data: AppSimpleEditFormType) => {
+ const modules = await postForm2Modules(data, data.templateId);
+
+ await updateAppDetail(appDetail._id, {
+ modules,
+ type: AppTypeEnum.simple,
+ simpleTemplateId: data.templateId,
+ permission: undefined
+ });
+ },
+ successToast: t('common.Save Success'),
+ errorToast: t('common.Save Failed')
+ });
+
+ const appModule2Form = useCallback(() => {
+ const formVal = appModules2Form({
+ templateId: appDetail.simpleTemplateId,
+ modules: appDetail.modules
+ });
+
+ reset(formVal);
+ setTimeout(() => {
+ setRefresh((state) => !state);
+ }, 100);
+ }, [appDetail.modules, appDetail.simpleTemplateId, reset]);
+
+ useEffect(() => {
+ appModule2Form();
+ }, [appModule2Form]);
+ useQuery(['loadAllDatasets'], loadAllDatasets);
+
+ const BoxStyles: BoxProps = {
+ px: 5,
+ py: '16px',
+ borderBottomWidth: '1px',
+ borderBottomColor: 'borderColor.low'
+ };
+ const BoxBtnStyles: BoxProps = {
+ cursor: 'pointer',
+ px: 3,
+ py: 1,
+ borderRadius: 'md',
+ _hover: {
+ bg: 'myGray.150'
+ }
+ };
+ const LabelStyles: BoxProps = {
+ w: ['60px', '100px'],
+ flexShrink: 0,
+ fontSize: ['sm', 'md']
+ };
+
+ return (
+
+ {/* title */}
+
+
+
+ {t('core.app.App params config')}
+
+
+
+
+
+
+
+
+
+
+ {/* simple mode select */}
+
+
+
+ {t('core.app.simple.mode template select')}
+
+ ({
+ alias: item.name,
+ label: item.desc,
+ value: item.id
+ })) || []
+ }
+ value={getValues('templateId')}
+ onchange={(val) => {
+ setValue('templateId', val);
+ setRefresh(!refresh);
+ }}
+ />
+
+
+ {/* ai */}
+ {selectSimpleTemplate?.systemForm?.aiSettings && (
+
+
+
+
+ {t('app.AI Settings')}
+
+ {(selectSimpleTemplate.systemForm.aiSettings.maxToken ||
+ selectSimpleTemplate.systemForm.aiSettings.temperature ||
+ selectSimpleTemplate.systemForm.aiSettings.quoteTemplate ||
+ selectSimpleTemplate.systemForm.aiSettings.quotePrompt) && (
+
+
+ {t('app.Open AI Advanced Settings')}
+
+ )}
+
+ {selectSimpleTemplate.systemForm.aiSettings?.model && (
+
+ {t('core.ai.Model')}
+
+ {
+ setValue('aiSettings.model', val);
+ const maxToken =
+ chatModelList.find((item) => item.model === getValues('aiSettings.model'))
+ ?.maxResponse || 4000;
+ const token = maxToken / 2;
+ setValue('aiSettings.maxToken', token);
+ setRefresh(!refresh);
+ }}
+ />
+
+
+ )}
+
+ {selectSimpleTemplate.systemForm.aiSettings?.systemPrompt && (
+
+
+ {t('core.ai.Prompt')}
+
+
+
+
+ {
+ setValue('aiSettings.systemPrompt', e.target.value || '');
+ }}
+ />
+
+ )}
+
+ )}
+
+ {/* dataset */}
+ {selectSimpleTemplate?.systemForm?.dataset && (
+
+
+
+
+ {t('core.dataset.Choose Dataset')}
+
+ {selectSimpleTemplate.systemForm.dataset.datasets && (
+
+
+ {t('common.Choose')}
+
+ )}
+ {(selectSimpleTemplate.systemForm.dataset.limit ||
+ selectSimpleTemplate.systemForm.dataset.searchMode ||
+ selectSimpleTemplate.systemForm.dataset.searchEmptyText ||
+ selectSimpleTemplate.systemForm.dataset.similarity) && (
+
+
+ {t('common.Params')}
+
+ )}
+
+ {getValues('dataset.datasets').length > 0 && (
+
+ {t('core.dataset.search.search mode')}: {datasetSearchMode}
+ {', '}
+ {t('core.dataset.search.Min Similarity')}: {getValues('dataset.similarity')}
+ {', '}
+ {t('core.dataset.search.Max Tokens')}: {getValues('dataset.limit')}
+ {getValues('dataset.searchEmptyText') === ''
+ ? ''
+ : t('core.dataset.Set Empty Result Tip')}
+
+ )}
+
+ {selectDatasets.map((item) => (
+
+
+ router.push({
+ pathname: '/dataset/detail',
+ query: {
+ datasetId: item._id
+ }
+ })
+ }
+ >
+
+
+ {item.name}
+
+
+
+ ))}
+
+
+ )}
+
+ {/* cfr */}
+ {selectSimpleTemplate?.systemForm?.cfr && getValues('dataset.datasets').length > 0 && (
+
+
+ {t('core.module.template.cfr')}
+
+
+
+
+
+ {getValues('cfr.background') === 'none' ? t('common.Not open') : t('common.Opened')}
+
+
+ )}
+
+ {/* variable */}
+ {selectSimpleTemplate?.systemForm?.userGuide?.variables && (
+
+ {
+ setValue('userGuide.variables', e);
+ setRefresh(!refresh);
+ }}
+ />
+
+ )}
+
+ {/* welcome */}
+ {selectSimpleTemplate?.systemForm?.userGuide?.welcomeText && (
+
+
+
+ {t('core.app.Welcome Text')}
+
+
+
+
+ {
+ setValue('userGuide.welcomeText', e.target.value || '');
+ }}
+ />
+
+ )}
+
+ {/* tts */}
+ {selectSimpleTemplate?.systemForm?.userGuide?.tts && (
+
+ {
+ setValue('userGuide.tts', e);
+ setRefresh((state) => !state);
+ }}
+ />
+
+ )}
+
+ {/* question guide */}
+ {selectSimpleTemplate?.systemForm?.userGuide?.questionGuide && (
+
+ {
+ const value = e.target.checked;
+ setValue('userGuide.questionGuide', value);
+ setRefresh((state) => !state);
+ }}
+ />
+
+ )}
+
+
+
+
+ {isOpenAIChatSetting && (
+ {
+ setValue('aiSettings', e);
+ onCloseAIChatSetting();
+ }}
+ defaultData={getValues('aiSettings')}
+ simpleModeTemplate={selectSimpleTemplate}
+ />
+ )}
+ {isOpenDatasetSelect && (
+ ({
+ datasetId: item._id,
+ vectorModel: item.vectorModel
+ }))}
+ onClose={onCloseKbSelect}
+ onChange={replaceKbList}
+ />
+ )}
+ {isOpenDatasetParams && (
+ {
+ setValue('dataset', {
+ ...getValues('dataset'),
+ ...e
+ });
+
+ setRefresh((state) => !state);
+ }}
+ />
+ )}
+ {isOpenCfrModal && (
+ {
+ setValue('cfr.background', e);
+ }}
+ />
+ )}
+
+ );
+};
+
+export default React.memo(EditForm);
diff --git a/projects/app/src/pages/app/detail/components/SimpleEdit/index.tsx b/projects/app/src/pages/app/detail/components/SimpleEdit/index.tsx
index d4d60ccebde..3ae2bdc319f 100644
--- a/projects/app/src/pages/app/detail/components/SimpleEdit/index.tsx
+++ b/projects/app/src/pages/app/detail/components/SimpleEdit/index.tsx
@@ -1,813 +1,36 @@
-import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
-import {
- Box,
- Flex,
- Grid,
- BoxProps,
- Textarea,
- useTheme,
- useDisclosure,
- Button,
- IconButton,
- Image
-} from '@chakra-ui/react';
-import { useUserStore } from '@/web/support/user/useUserStore';
-import { useQuery } from '@tanstack/react-query';
-import { QuestionOutlineIcon, SmallAddIcon } from '@chakra-ui/icons';
-import { useForm, useFieldArray } from 'react-hook-form';
+import React from 'react';
+import { Box, Grid } from '@chakra-ui/react';
import { useSystemStore } from '@/web/common/system/useSystemStore';
-import { appModules2Form, getDefaultAppForm } from '@fastgpt/global/core/app/utils';
-import type { AppSimpleEditFormType } from '@fastgpt/global/core/app/type.d';
-import { chatModelList, simpleModeTemplates } from '@/web/common/system/staticData';
-import { chatNodeSystemPromptTip, welcomeTextTip } from '@fastgpt/global/core/module/template/tip';
-import type { ModuleItemType } from '@fastgpt/global/core/module/type';
-import { useRequest } from '@/web/common/hooks/useRequest';
-import { useConfirm } from '@/web/common/hooks/useConfirm';
-import { streamFetch } from '@/web/common/api/fetch';
-import { useRouter } from 'next/router';
-import { useToast } from '@/web/common/hooks/useToast';
-import { AppSchema } from '@fastgpt/global/core/app/type.d';
-import { delModelById } from '@/web/core/app/api';
-import { useTranslation } from 'next-i18next';
-import { getGuideModule } from '@fastgpt/global/core/module/utils';
-import { AppTypeEnum } from '@fastgpt/global/core/app/constants';
-import { useDatasetStore } from '@/web/core/dataset/store/dataset';
-import { useAppStore } from '@/web/core/app/store/useAppStore';
-import PermissionIconText from '@/components/support/permission/IconText';
-
-import { checkChatSupportSelectFileByModules } from '@/web/core/chat/utils';
import { useSticky } from '@/web/common/hooks/useSticky';
-import { postForm2Modules } from '@/web/core/app/utils';
-
-import dynamic from 'next/dynamic';
-import MySelect from '@/components/Select';
-import MyTooltip from '@/components/MyTooltip';
-import Avatar from '@/components/Avatar';
-import MyIcon from '@/components/Icon';
-import ChatBox, { type ComponentRef, type StartChatFnProps } from '@/components/ChatBox';
-import { SimpleModeTemplate_FastGPT_Universal } from '@/global/core/app/constants';
-import VariableEdit from '@/components/core/module/Flow/components/modules/VariableEdit';
-import { ModuleInputKeyEnum } from '@fastgpt/global/core/module/constants';
-import PromptTextarea from '@/components/common/Textarea/PromptTextarea/index';
-import { DatasetSearchModeMap } from '@fastgpt/global/core/dataset/constant';
-import SelectAiModel from '@/components/Select/SelectAiModel';
-const InfoModal = dynamic(() => import('../InfoModal'));
-const DatasetSelectModal = dynamic(() => import('@/components/core/module/DatasetSelectModal'));
-const DatasetParamsModal = dynamic(() => import('@/components/core/module/DatasetParamsModal'));
-const AIChatSettingsModal = dynamic(() => import('@/components/core/module/AIChatSettingsModal'));
-const TTSSelect = dynamic(
- () => import('@/components/core/module/Flow/components/modules/TTSSelect')
-);
-const QGSwitch = dynamic(() => import('@/components/core/module/Flow/components/modules/QGSwitch'));
+import ChatTest from './ChatTest';
+import AppCard from './AppCard';
+import EditForm from './EditForm';
-function ConfigForm({
- divRef,
- isSticky
-}: {
- divRef: React.RefObject;
- isSticky: boolean;
-}) {
- const theme = useTheme();
- const router = useRouter();
- const { t } = useTranslation();
- const { appDetail, updateAppDetail } = useAppStore();
- const { loadAllDatasets, allDatasets } = useDatasetStore();
+const SimpleEdit = ({ appId }: { appId: string }) => {
const { isPc } = useSystemStore();
- const [refresh, setRefresh] = useState(false);
-
- const { register, setValue, getValues, reset, handleSubmit, control } =
- useForm({
- defaultValues: getDefaultAppForm()
- });
-
- const { fields: datasets, replace: replaceKbList } = useFieldArray({
- control,
- name: 'dataset.datasets'
- });
-
- const {
- isOpen: isOpenAIChatSetting,
- onOpen: onOpenAIChatSetting,
- onClose: onCloseAIChatSetting
- } = useDisclosure();
- const {
- isOpen: isOpenDatasetSelect,
- onOpen: onOpenKbSelect,
- onClose: onCloseKbSelect
- } = useDisclosure();
- const {
- isOpen: isOpenDatasetParams,
- onOpen: onOpenKbParams,
- onClose: onCloseKbParams
- } = useDisclosure();
-
- const { openConfirm: openConfirmSave, ConfirmModal: ConfirmSaveModal } = useConfirm({
- content: t('core.app.edit.Confirm Save App Tip')
- });
-
- const chatModelSelectList = useMemo(() => {
- return chatModelList.map((item) => ({
- value: item.model,
- label: item.name
- }));
- }, [refresh]);
-
- const selectDatasets = useMemo(
- () => allDatasets.filter((item) => datasets.find((dataset) => dataset.datasetId === item._id)),
- [allDatasets, datasets]
- );
-
- const selectSimpleTemplate = useMemo(
- () =>
- simpleModeTemplates?.find((item) => item.id === getValues('templateId')) ||
- SimpleModeTemplate_FastGPT_Universal,
- [getValues, refresh]
- );
-
- const tokenLimit = useMemo(() => {
- return (
- chatModelList.find((item) => item.model === getValues('aiSettings.model'))?.quoteMaxToken ||
- 3000
- );
- }, [getValues, refresh]);
-
- const datasetSearchMode = useMemo(() => {
- const mode = getValues('dataset.searchMode');
- if (!mode) return '';
- return t(DatasetSearchModeMap[mode]?.title);
- }, [getValues, t, refresh]);
-
- const { mutate: onSubmitSave, isLoading: isSaving } = useRequest({
- mutationFn: async (data: AppSimpleEditFormType) => {
- const modules = await postForm2Modules(data, data.templateId);
-
- await updateAppDetail(appDetail._id, {
- modules,
- type: AppTypeEnum.simple,
- simpleTemplateId: data.templateId,
- permission: undefined
- });
- },
- successToast: t('common.Save Success'),
- errorToast: t('common.Save Failed')
- });
-
- const appModule2Form = useCallback(() => {
- const formVal = appModules2Form({
- templateId: appDetail.simpleTemplateId,
- modules: appDetail.modules
- });
-
- reset(formVal);
- setTimeout(() => {
- setRefresh((state) => !state);
- }, 100);
- }, [appDetail.modules, appDetail.simpleTemplateId, reset]);
-
- useEffect(() => {
- appModule2Form();
- }, [appModule2Form]);
- useQuery(['loadAllDatasets'], loadAllDatasets);
-
- const BoxStyles: BoxProps = {
- bg: 'myWhite.200',
- px: 4,
- py: 3,
- borderRadius: 'lg',
- border: theme.borders.base
- };
- const BoxBtnStyles: BoxProps = {
- cursor: 'pointer',
- px: 3,
- py: '2px',
- borderRadius: 'md',
- _hover: {
- bg: 'myGray.200'
- }
- };
- const LabelStyles: BoxProps = {
- w: ['60px', '100px'],
- flexShrink: 0,
- fontSize: ['sm', 'md']
- };
-
- return (
-
- {/* title */}
-
-
- {t('core.app.App params config')}
-
-
-
-
-
-
-
-
- {/* simple mode select */}
-
-
-
- {t('core.app.simple.mode template select')}
-
- ({
- alias: item.name,
- label: item.desc,
- value: item.id
- })) || []
- }
- value={getValues('templateId')}
- onchange={(val) => {
- setValue('templateId', val);
- setRefresh(!refresh);
- }}
- />
-
-
- {/* ai */}
- {selectSimpleTemplate?.systemForm?.aiSettings && (
-
-
-
-
- {t('app.AI Settings')}
-
- {(selectSimpleTemplate.systemForm.aiSettings.maxToken ||
- selectSimpleTemplate.systemForm.aiSettings.temperature ||
- selectSimpleTemplate.systemForm.aiSettings.quoteTemplate ||
- selectSimpleTemplate.systemForm.aiSettings.quotePrompt) && (
-
-
- {t('app.Open AI Advanced Settings')}
-
- )}
-
- {selectSimpleTemplate.systemForm.aiSettings?.model && (
-
- {t('core.ai.Model')}
-
- {
- setValue('aiSettings.model', val);
- const maxToken =
- chatModelList.find((item) => item.model === getValues('aiSettings.model'))
- ?.maxResponse || 4000;
- const token = maxToken / 2;
- setValue('aiSettings.maxToken', token);
- setRefresh(!refresh);
- }}
- />
-
-
- )}
-
- {selectSimpleTemplate.systemForm.aiSettings?.systemPrompt && (
-
-
- {t('core.ai.Prompt')}
-
-
-
-
- {
- setValue('aiSettings.systemPrompt', e.target.value || '');
- }}
- />
-
- )}
-
- )}
-
- {/* dataset */}
- {selectSimpleTemplate?.systemForm?.dataset && (
-
-
-
-
- {t('core.dataset.Choose Dataset')}
-
- {selectSimpleTemplate.systemForm.dataset.datasets && (
-
-
- {t('common.Choose')}
-
- )}
- {(selectSimpleTemplate.systemForm.dataset.limit ||
- selectSimpleTemplate.systemForm.dataset.searchMode ||
- selectSimpleTemplate.systemForm.dataset.searchEmptyText ||
- selectSimpleTemplate.systemForm.dataset.similarity) && (
-
-
- {t('common.Params')}
-
- )}
-
- {getValues('dataset.datasets').length > 0 && (
-
- {t('core.dataset.search.search mode')}: {datasetSearchMode}
- {', '}
- {t('core.dataset.search.Min Similarity')}: {getValues('dataset.similarity')}
- {', '}
- {t('core.dataset.search.Max Tokens')}: {getValues('dataset.limit')}
- {getValues('dataset.searchEmptyText') === ''
- ? ''
- : t('core.dataset.Set Empty Result Tip')}
-
- )}
-
- {selectDatasets.map((item) => (
-
-
- router.push({
- pathname: '/dataset/detail',
- query: {
- datasetId: item._id
- }
- })
- }
- >
-
-
- {item.name}
-
-
-
- ))}
-
-
- {selectSimpleTemplate?.systemForm?.cfr && getValues('dataset.datasets').length > 0 && (
-
-
- {t('core.app.edit.cfr background prompt')}
-
-
-
-
- {
- setValue('cfr.background', e.target.value || '');
- }}
- />
-
- )}
-
- )}
-
- {/* variable */}
- {selectSimpleTemplate?.systemForm?.userGuide?.variables && (
-
- {
- setValue('userGuide.variables', e);
- setRefresh(!refresh);
- }}
- />
-
- )}
-
- {/* welcome */}
- {selectSimpleTemplate?.systemForm?.userGuide?.welcomeText && (
-
-
-
- {t('core.app.Welcome Text')}
-
-
-
-
- {
- setValue('userGuide.welcomeText', e.target.value || '');
- }}
- />
-
- )}
-
- {/* tts */}
- {selectSimpleTemplate?.systemForm?.userGuide?.tts && (
-
- {
- setValue('userGuide.tts', e);
- setRefresh((state) => !state);
- }}
- />
-
- )}
-
- {/* question guide */}
- {selectSimpleTemplate?.systemForm?.userGuide?.questionGuide && (
-
- {
- const value = e.target.checked;
- setValue('userGuide.questionGuide', value);
- setRefresh((state) => !state);
- }}
- />
-
- )}
-
-
-
- {isOpenAIChatSetting && (
- {
- setValue('aiSettings', e);
- onCloseAIChatSetting();
- }}
- defaultData={getValues('aiSettings')}
- simpleModeTemplate={selectSimpleTemplate}
- />
- )}
- {isOpenDatasetSelect && (
- ({
- datasetId: item._id,
- vectorModel: item.vectorModel
- }))}
- onClose={onCloseKbSelect}
- onChange={replaceKbList}
- />
- )}
- {isOpenDatasetParams && (
- {
- setValue('dataset', {
- ...getValues('dataset'),
- ...e
- });
-
- setRefresh((state) => !state);
- }}
- />
- )}
-
- );
-}
-
-function Settings({ appId }: { appId: string }) {
- const theme = useTheme();
- const router = useRouter();
- const { t } = useTranslation();
- const { toast } = useToast();
const { parentRef, divRef, isSticky } = useSticky();
- const { appDetail } = useAppStore();
- const [settingAppInfo, setSettingAppInfo] = useState();
-
- const { openConfirm: openConfirmDel, ConfirmModal: ConfirmDelModal } = useConfirm({
- content: t('app.Confirm Del App Tip')
- });
-
- /* 点击删除 */
- const { mutate: handleDelModel, isLoading } = useRequest({
- mutationFn: async () => {
- if (!appDetail) return null;
- await delModelById(appDetail._id);
- return 'success';
- },
- onSuccess(res) {
- if (!res) return;
- toast({
- title: t('common.Delete Success'),
- status: 'success'
- });
- router.replace(`/app/list`);
- },
- errorToast: t('common.Delete Failed')
- });
return (
-
-
-
-
-
-
-
- AppId:{' '}
-
- {appId}
-
-
-
- {/* basic info */}
-
-
-
-
- {appDetail.name}
-
- {appDetail.isOwner && (
- }
- variant={'whiteDanger'}
- borderRadius={'md'}
- aria-label={'delete'}
- isLoading={isLoading}
- onClick={openConfirmDel(handleDelModel)}
- />
- )}
-
-
- {appDetail.intro || '快来给应用一个介绍~'}
-
-
- }
- onClick={() => router.push(`/chat?appId=${appId}`)}
- >
- 对话
-
- }
- onClick={() => {
- router.replace({
- query: {
- appId,
- currentTab: 'outLink'
- }
- });
- }}
- >
- 外接
-
- {appDetail.isOwner && (
- }
- onClick={() => setSettingAppInfo(appDetail)}
- >
- 设置
-
- )}
-
-
-
- {/* config form */}
-
-
-
- {settingAppInfo && (
- setSettingAppInfo(undefined)} />
- )}
-
- );
-}
-
-function ChatTest({ appId }: { appId: string }) {
- const { t } = useTranslation();
- const { userInfo } = useUserStore();
- const { appDetail } = useAppStore();
- const ChatBoxRef = useRef(null);
- const [modules, setModules] = useState([]);
-
- const startChat = useCallback(
- async ({ chatList, controller, generatingMessage, variables }: StartChatFnProps) => {
- let historyMaxLen = 0;
-
- modules.forEach((module) => {
- module.inputs.forEach((input) => {
- if (
- (input.key === ModuleInputKeyEnum.history ||
- input.key === ModuleInputKeyEnum.historyMaxAmount) &&
- typeof input.value === 'number'
- ) {
- historyMaxLen = Math.max(historyMaxLen, input.value);
- }
- });
- });
- const history = chatList.slice(-historyMaxLen - 2, -2);
-
- // 流请求,获取数据
- const { responseText, responseData } = await streamFetch({
- url: '/api/core/chat/chatTest',
- data: {
- history,
- prompt: chatList[chatList.length - 2].value,
- modules,
- variables,
- appId,
- appName: `调试-${appDetail.name}`
- },
- onMessage: generatingMessage,
- abortSignal: controller
- });
-
- return { responseText, responseData };
- },
- [modules, appId, appDetail.name]
- );
-
- const resetChatBox = useCallback(() => {
- ChatBoxRef.current?.resetHistory([]);
- ChatBoxRef.current?.resetVariables();
- }, []);
-
- useEffect(() => {
- resetChatBox();
- setModules(appDetail.modules);
- }, [appDetail, resetChatBox]);
+
+
+
- return (
-
-
-
- {t('app.Chat Debug')}
+
+
-
- }
- variant={'whiteDanger'}
- borderRadius={'md'}
- aria-label={'delete'}
- onClick={(e) => {
- e.stopPropagation();
- resetChatBox();
- }}
- />
-
-
-
- {}}
- />
- {appDetail.type !== AppTypeEnum.simple && (
-
- {t('app.Advance App TestTip')}
-
- )}
-
- );
-}
-
-const SimpleEdit = ({ appId }: { appId: string }) => {
- const { isPc } = useSystemStore();
- return (
-
-
{isPc && }
);
};
-export default SimpleEdit;
+export default React.memo(SimpleEdit);
diff --git a/projects/app/src/pages/app/detail/index.tsx b/projects/app/src/pages/app/detail/index.tsx
index 7d9989416aa..03991d2f8f4 100644
--- a/projects/app/src/pages/app/detail/index.tsx
+++ b/projects/app/src/pages/app/detail/index.tsx
@@ -9,7 +9,7 @@ import { feConfigs } from '@/web/common/system/staticData';
import Tabs from '@/components/Tabs';
import SideTabs from '@/components/SideTabs';
import Avatar from '@/components/Avatar';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import PageContainer from '@/components/PageContainer';
import Loading from '@/components/Loading';
import SimpleEdit from './components/SimpleEdit';
@@ -52,13 +52,13 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
const tabList = useMemo(
() => [
- { label: '简易配置', id: TabEnum.simpleEdit, icon: 'overviewLight' },
+ { label: '简易配置', id: TabEnum.simpleEdit, icon: 'common/overviewLight' },
...(feConfigs?.hide_app_flow
? []
- : [{ label: '高级编排', id: TabEnum.adEdit, icon: 'settingLight' }]),
- { label: '外部使用', id: TabEnum.outLink, icon: 'shareLight' },
+ : [{ label: '高级编排', id: TabEnum.adEdit, icon: 'common/settingLight' }]),
+ { label: '外部使用', id: TabEnum.outLink, icon: 'support/outlink/shareLight' },
{ label: '对话日志', id: TabEnum.logs, icon: 'core/app/logsLight' },
- { label: '立即对话', id: TabEnum.startChat, icon: 'chat' }
+ { label: '立即对话', id: TabEnum.startChat, icon: 'core/chat/chatLight' }
],
[]
);
@@ -139,7 +139,7 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
>
}
+ icon={}
bg={'white'}
boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'}
size={'smSquare'}
diff --git a/projects/app/src/pages/app/list/index.tsx b/projects/app/src/pages/app/list/index.tsx
index ee9ca67e68f..b7094cae3c3 100644
--- a/projects/app/src/pages/app/list/index.tsx
+++ b/projects/app/src/pages/app/list/index.tsx
@@ -19,7 +19,7 @@ import { useConfirm } from '@/web/common/hooks/useConfirm';
import { serviceSideProps } from '@/web/common/utils/i18n';
import { useTranslation } from 'next-i18next';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import PageContainer from '@/components/PageContainer';
import Avatar from '@/components/Avatar';
import MyTooltip from '@/components/MyTooltip';
@@ -164,7 +164,7 @@ const MyApps = () => {
variant={'whitePrimary'}
icon={
-
+
}
aria-label={'chat'}
diff --git a/projects/app/src/pages/appStore/components/list.tsx b/projects/app/src/pages/appStore/components/list.tsx
index 42e01c0f041..e4361eaffc3 100644
--- a/projects/app/src/pages/appStore/components/list.tsx
+++ b/projects/app/src/pages/appStore/components/list.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import { Box, Flex, Button, Card } from '@chakra-ui/react';
import type { ShareAppItem } from '@/types/app';
import { useRouter } from 'next/router';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import Avatar from '@/components/Avatar';
import MyTooltip from '@/components/MyTooltip';
diff --git a/projects/app/src/pages/chat/components/ChatHeader.tsx b/projects/app/src/pages/chat/components/ChatHeader.tsx
index 32002bb4ed9..b80cb3b2bd9 100644
--- a/projects/app/src/pages/chat/components/ChatHeader.tsx
+++ b/projects/app/src/pages/chat/components/ChatHeader.tsx
@@ -1,7 +1,7 @@
import React, { useMemo } from 'react';
import { Flex, useTheme, Box } from '@chakra-ui/react';
import { useSystemStore } from '@/web/common/system/useSystemStore';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import Tag from '@/components/Tag';
import Avatar from '@/components/Avatar';
import ToolMenu from './ToolMenu';
diff --git a/projects/app/src/pages/chat/components/ChatHistorySlider.tsx b/projects/app/src/pages/chat/components/ChatHistorySlider.tsx
index 231d172c215..767615220ea 100644
--- a/projects/app/src/pages/chat/components/ChatHistorySlider.tsx
+++ b/projects/app/src/pages/chat/components/ChatHistorySlider.tsx
@@ -15,7 +15,7 @@ import { useEditTitle } from '@/web/common/hooks/useEditTitle';
import { useRouter } from 'next/router';
import Avatar from '@/components/Avatar';
import MyTooltip from '@/components/MyTooltip';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useTranslation } from 'next-i18next';
import { useConfirm } from '@/web/common/hooks/useConfirm';
import Tabs from '@/components/Tabs';
@@ -156,7 +156,7 @@ const ChatHistorySlider = ({
h={'100%'}
color={'primary.600'}
borderRadius={'xl'}
- leftIcon={}
+ leftIcon={}
overflow={'hidden'}
onClick={() => onChangeChat()}
>
@@ -173,7 +173,7 @@ const ChatHistorySlider = ({
borderRadius={'50%'}
onClick={openConfirm(onClearHistory)}
>
-
+
)}
@@ -211,7 +211,10 @@ const ChatHistorySlider = ({
}
})}
>
-
+
{item.customTitle || item.title}
@@ -236,7 +239,7 @@ const ChatHistorySlider = ({
onSetHistoryTop({ chatId: item.id, top: !item.top });
}}
>
-
+
{item.top ? '取消置顶' : '置顶'}
)}
@@ -254,7 +257,7 @@ const ChatHistorySlider = ({
});
}}
>
-
+
{t('common.Custom Title')}
)}
@@ -326,7 +329,7 @@ const ChatHistorySlider = ({
>
}
+ icon={}
bg={'white'}
boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'}
size={'smSquare'}
diff --git a/projects/app/src/pages/chat/components/SliderApps.tsx b/projects/app/src/pages/chat/components/SliderApps.tsx
index de64417a8ca..5960a46f7f5 100644
--- a/projects/app/src/pages/chat/components/SliderApps.tsx
+++ b/projects/app/src/pages/chat/components/SliderApps.tsx
@@ -3,7 +3,7 @@ import { Flex, Box, IconButton } from '@chakra-ui/react';
import { useRouter } from 'next/router';
import { useQuery } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import Avatar from '@/components/Avatar';
import { useAppStore } from '@/web/core/app/store/useAppStore';
@@ -28,7 +28,7 @@ const SliderApps = ({ appId }: { appId: string }) => {
>
}
+ icon={}
bg={'white'}
boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'}
size={'smSquare'}
diff --git a/projects/app/src/pages/chat/components/ToolMenu.tsx b/projects/app/src/pages/chat/components/ToolMenu.tsx
index c5e27af499f..af4b91dc2e8 100644
--- a/projects/app/src/pages/chat/components/ToolMenu.tsx
+++ b/projects/app/src/pages/chat/components/ToolMenu.tsx
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
import { useChatBox } from '@/components/ChatBox';
import type { ChatItemType } from '@fastgpt/global/core/chat/type.d';
import { Menu, MenuButton, MenuList, MenuItem, Box } from '@chakra-ui/react';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useRouter } from 'next/router';
const ToolMenu = ({ history }: { history: ChatItemType[] }) => {
@@ -12,7 +12,7 @@ const ToolMenu = ({ history }: { history: ChatItemType[] }) => {
const menuList = useMemo(
() => [
{
- icon: 'chat',
+ icon: 'core/chat/chatLight',
label: '新对话',
onClick: () => {
router.replace({
@@ -24,16 +24,16 @@ const ToolMenu = ({ history }: { history: ChatItemType[] }) => {
}
},
{
- icon: 'apiLight',
+ icon: 'core/app/appApiLight',
label: 'HTML导出',
onClick: () => onExportChat({ type: 'html', history })
},
{
- icon: 'markdown',
+ icon: 'file/markdown',
label: 'Markdown导出',
onClick: () => onExportChat({ type: 'md', history })
},
- { icon: 'pdf', label: 'PDF导出', onClick: () => onExportChat({ type: 'pdf', history }) }
+ { icon: 'file/pdf', label: 'PDF导出', onClick: () => onExportChat({ type: 'pdf', history }) }
],
[history, onExportChat, router]
);
diff --git a/projects/app/src/pages/dataset/detail/components/CollectionCard.tsx b/projects/app/src/pages/dataset/detail/components/CollectionCard.tsx
index f021f791065..e2dce4bcefc 100644
--- a/projects/app/src/pages/dataset/detail/components/CollectionCard.tsx
+++ b/projects/app/src/pages/dataset/detail/components/CollectionCard.tsx
@@ -28,7 +28,7 @@ import { useQuery } from '@tanstack/react-query';
import { debounce } from 'lodash';
import { useConfirm } from '@/web/common/hooks/useConfirm';
import { useTranslation } from 'next-i18next';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyInput from '@/components/MyInput';
import dayjs from 'dayjs';
import { useRequest } from '@/web/common/hooks/useRequest';
@@ -386,7 +386,7 @@ const CollectionCard = () => {
color={'white'}
h={['28px', '35px']}
>
-
+
{t('dataset.collections.Create And Import')}
diff --git a/projects/app/src/pages/dataset/detail/components/DataCard.tsx b/projects/app/src/pages/dataset/detail/components/DataCard.tsx
index e126a9d74c7..9286c37573d 100644
--- a/projects/app/src/pages/dataset/detail/components/DataCard.tsx
+++ b/projects/app/src/pages/dataset/detail/components/DataCard.tsx
@@ -29,7 +29,7 @@ import { getErrText } from '@fastgpt/global/common/error/utils';
import { useConfirm } from '@/web/common/hooks/useConfirm';
import { useTranslation } from 'next-i18next';
import { useRouter } from 'next/router';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyInput from '@/components/MyInput';
import { useLoading } from '@/web/common/hooks/useLoading';
import InputDataModal, { RawSourceText, type InputDataType } from '../components/InputDataModal';
@@ -167,7 +167,7 @@ const DataCard = () => {
}
+ icon={}
variant={'whitePrimary'}
size={'smSquare'}
borderRadius={'50%'}
diff --git a/projects/app/src/pages/dataset/detail/components/Import/FileSelect.tsx b/projects/app/src/pages/dataset/detail/components/Import/FileSelect.tsx
index dbc1cde7f0e..f4917cda0c4 100644
--- a/projects/app/src/pages/dataset/detail/components/Import/FileSelect.tsx
+++ b/projects/app/src/pages/dataset/detail/components/Import/FileSelect.tsx
@@ -1,4 +1,4 @@
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useLoading } from '@/web/common/hooks/useLoading';
import { useSelectFile } from '@/web/common/file/hooks/useSelectFile';
import { useToast } from '@/web/common/hooks/useToast';
@@ -392,7 +392,7 @@ const FileSelect = ({
onDrop={handleDrop}
>
-
+
{isDragging ? (
t('file.Release the mouse to upload the file')
) : (
diff --git a/projects/app/src/pages/dataset/detail/components/Import/ImportModal.tsx b/projects/app/src/pages/dataset/detail/components/Import/ImportModal.tsx
index 6d91b69827b..1848e947b9a 100644
--- a/projects/app/src/pages/dataset/detail/components/Import/ImportModal.tsx
+++ b/projects/app/src/pages/dataset/detail/components/Import/ImportModal.tsx
@@ -98,19 +98,19 @@ const ImportData = ({
gridTemplateColumns={['repeat(1,1fr)', 'repeat(3,1fr)']}
list={[
{
- icon: 'indexImport',
+ icon: 'file/indexImport',
title: t('core.dataset.import.Chunk Split'),
desc: t('core.dataset.import.Chunk Split Tip'),
value: ImportTypeEnum.chunk
},
{
- icon: 'qaImport',
+ icon: 'file/qaImport',
title: t('core.dataset.import.QA Import'),
desc: t('core.dataset.import.QA Import Tip'),
value: ImportTypeEnum.qa
},
{
- icon: 'csvImport',
+ icon: 'file/csv',
title: t('core.dataset.import.CSV Import'),
desc: t('core.dataset.import.CSV Import Tip'),
value: ImportTypeEnum.csv
diff --git a/projects/app/src/pages/dataset/detail/components/Import/Provider.tsx b/projects/app/src/pages/dataset/detail/components/Import/Provider.tsx
index 2406ec11bb8..52625fd97dc 100644
--- a/projects/app/src/pages/dataset/detail/components/Import/Provider.tsx
+++ b/projects/app/src/pages/dataset/detail/components/Import/Provider.tsx
@@ -22,8 +22,8 @@ import {
} from '@fastgpt/global/core/dataset/constant';
import { Box, Flex, Image, useTheme } from '@chakra-ui/react';
import { CloseIcon } from '@chakra-ui/icons';
-import DeleteIcon, { hoverDeleteStyles } from '@/components/Icon/delete';
-import MyIcon from '@/components/Icon';
+import DeleteIcon, { hoverDeleteStyles } from '@fastgpt/web/components/common/Icon/delete';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { chunksUpload } from '@/web/core/dataset/utils';
import { postCreateTrainingBill } from '@/web/support/wallet/bill/api';
import { useTranslation } from 'next-i18next';
diff --git a/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx b/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx
index e5bdb6b621c..53856041450 100644
--- a/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx
+++ b/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx
@@ -9,7 +9,7 @@ import {
} from '@/web/core/dataset/api';
import { useToast } from '@/web/common/hooks/useToast';
import { getErrText } from '@fastgpt/global/common/error/utils';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyModal from '@/components/MyModal';
import MyTooltip from '@/components/MyTooltip';
import { QuestionOutlineIcon } from '@chakra-ui/icons';
@@ -26,7 +26,7 @@ import { DatasetDataIndexTypeEnum } from '@fastgpt/global/core/dataset/constant'
import { DatasetDataIndexItemType } from '@fastgpt/global/core/dataset/type';
import SideTabs from '@/components/SideTabs';
import { useLoading } from '@/web/common/hooks/useLoading';
-import DeleteIcon from '@/components/Icon/delete';
+import DeleteIcon from '@fastgpt/web/components/common/Icon/delete';
import { defaultCollectionDetail } from '@/constants/dataset';
import { getDocPath } from '@/web/common/system/doc';
@@ -83,7 +83,7 @@ const InputDataModal = ({
});
const tabList = [
- { label: t('dataset.data.edit.Content'), id: TabEnum.content, icon: 'overviewLight' },
+ { label: t('dataset.data.edit.Content'), id: TabEnum.content, icon: 'common/overviewLight' },
{
label: t('dataset.data.edit.Index', { amount: indexes.length }),
id: TabEnum.index,
diff --git a/projects/app/src/pages/dataset/detail/components/Test.tsx b/projects/app/src/pages/dataset/detail/components/Test.tsx
index ed3f4e031e7..09f753e48a1 100644
--- a/projects/app/src/pages/dataset/detail/components/Test.tsx
+++ b/projects/app/src/pages/dataset/detail/components/Test.tsx
@@ -18,7 +18,7 @@ import {
import { useDatasetStore } from '@/web/core/dataset/store/dataset';
import { useSearchTestStore, SearchTestStoreItemType } from '@/web/core/dataset/store/searchTest';
import { postSearchText } from '@/web/core/dataset/api';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useRequest } from '@/web/common/hooks/useRequest';
import { formatTimeToChatTime } from '@/utils/tools';
import { getErrText } from '@fastgpt/global/common/error/utils';
@@ -190,7 +190,7 @@ const Test = ({ datasetId }: { datasetId: string }) => {
// {
// label: (
//
- //
+ //
//
// {t('core.dataset.test.Batch test')}
//
@@ -244,7 +244,7 @@ const Test = ({ datasetId }: { datasetId: string }) => {
}}
onClick={onOpen}
>
-
+
{selectFile ? selectFile.name : t('core.dataset.test.Batch test Placeholder')}
diff --git a/projects/app/src/pages/dataset/detail/index.tsx b/projects/app/src/pages/dataset/detail/index.tsx
index f1e451f6b5e..ad7f7ca0254 100644
--- a/projects/app/src/pages/dataset/detail/index.tsx
+++ b/projects/app/src/pages/dataset/detail/index.tsx
@@ -7,7 +7,7 @@ import { getErrText } from '@fastgpt/global/common/error/utils';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import Tabs from '@/components/Tabs';
import dynamic from 'next/dynamic';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import SideTabs from '@/components/SideTabs';
import PageContainer from '@/components/PageContainer';
import Avatar from '@/components/Avatar';
@@ -54,10 +54,10 @@ const Detail = ({ datasetId, currentTab }: { datasetId: string; currentTab: `${T
const { userInfo } = useUserStore();
const tabList = [
- { label: t('core.dataset.Dataset'), id: TabEnum.collectionCard, icon: 'overviewLight' },
+ { label: t('core.dataset.Dataset'), id: TabEnum.collectionCard, icon: 'common/overviewLight' },
{ label: t('core.dataset.test.Search Test'), id: TabEnum.test, icon: 'kbTest' },
...(userInfo?.team.canWrite && datasetDetail.isOwner
- ? [{ label: t('common.Config'), id: TabEnum.info, icon: 'settingLight' }]
+ ? [{ label: t('common.Config'), id: TabEnum.info, icon: 'common/settingLight' }]
: [])
];
@@ -240,7 +240,7 @@ const Detail = ({ datasetId, currentTab }: { datasetId: string; currentTab: `${T
>
}
+ icon={}
bg={'white'}
boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'}
size={'smSquare'}
diff --git a/projects/app/src/pages/dataset/list/component/MoveModal.tsx b/projects/app/src/pages/dataset/list/component/MoveModal.tsx
index 381e11112e3..e96a19702ca 100644
--- a/projects/app/src/pages/dataset/list/component/MoveModal.tsx
+++ b/projects/app/src/pages/dataset/list/component/MoveModal.tsx
@@ -13,7 +13,7 @@ import {
import Avatar from '@/components/Avatar';
import MyTooltip from '@/components/MyTooltip';
import MyModal from '@/components/MyModal';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { DatasetTypeEnum } from '@fastgpt/global/core/dataset/constant';
import { useTranslation } from 'next-i18next';
import { useQuery } from '@tanstack/react-query';
diff --git a/projects/app/src/pages/dataset/list/index.tsx b/projects/app/src/pages/dataset/list/index.tsx
index b76c497695f..9482534dc27 100644
--- a/projects/app/src/pages/dataset/list/index.tsx
+++ b/projects/app/src/pages/dataset/list/index.tsx
@@ -25,7 +25,7 @@ import {
} from '@/web/core/dataset/api';
import { useTranslation } from 'next-i18next';
import Avatar from '@/components/Avatar';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { serviceSideProps } from '@/web/common/utils/i18n';
import dynamic from 'next/dynamic';
import {
diff --git a/projects/app/src/pages/login/components/LoginForm.tsx b/projects/app/src/pages/login/components/LoginForm.tsx
index 0714d87c95e..79f9dbba043 100644
--- a/projects/app/src/pages/login/components/LoginForm.tsx
+++ b/projects/app/src/pages/login/components/LoginForm.tsx
@@ -19,7 +19,7 @@ import type { ResLogin } from '@/global/support/api/userRes';
import { useToast } from '@/web/common/hooks/useToast';
import { feConfigs } from '@/web/common/system/staticData';
import { useSystemStore } from '@/web/common/system/useSystemStore';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { customAlphabet } from 'nanoid';
import { getDocPath } from '@/web/common/system/doc';
import Avatar from '@/components/Avatar';
@@ -86,7 +86,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
{
label: t('support.user.login.Github'),
provider: OAuthEnum.github,
- icon: 'gitFill',
+ icon: 'common/gitFill',
redirectUrl: `https://github.com/login/oauth/authorize?client_id=${feConfigs?.oauth?.github}&redirect_uri=${redirectUri}&state=${state.current}&scope=user:email%20read:user`
}
]
@@ -96,7 +96,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
{
label: t('support.user.login.Google'),
provider: OAuthEnum.google,
- icon: 'googleFill',
+ icon: 'common/googleFill',
redirectUrl: `https://accounts.google.com/o/oauth2/v2/auth?client_id=${feConfigs?.oauth?.google}&redirect_uri=${redirectUri}&state=${state.current}&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20openid&include_granted_scopes=true`
}
]
diff --git a/projects/app/src/pages/plugin/edit/Header.tsx b/projects/app/src/pages/plugin/edit/Header.tsx
index af73a51fac9..0d9b8fb0486 100644
--- a/projects/app/src/pages/plugin/edit/Header.tsx
+++ b/projects/app/src/pages/plugin/edit/Header.tsx
@@ -5,7 +5,7 @@ import { useRequest } from '@/web/common/hooks/useRequest';
import { useTranslation } from 'next-i18next';
import { useCopyData } from '@/web/common/hooks/useCopyData';
import dynamic from 'next/dynamic';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@/components/MyTooltip';
import { getFlowStore } from '@/components/core/module/Flow/FlowProvider';
import { filterExportModules, flowNode2Modules } from '@/components/core/module/utils';
@@ -123,7 +123,7 @@ const Header = ({ plugin, onClose }: Props) => {
}
+ icon={}
variant={'whiteBase'}
aria-label={''}
onClick={() => {
@@ -138,7 +138,7 @@ const Header = ({ plugin, onClose }: Props) => {
}
+ icon={}
variant={'whitePrimary'}
size={'smSquare'}
aria-label={'save'}
@@ -163,7 +163,7 @@ const Header = ({ plugin, onClose }: Props) => {
}
+ icon={}
size={'smSquare'}
aria-label={'save'}
variant={'whitePrimary'}
diff --git a/projects/app/src/pages/plugin/list/component/EditModal.tsx b/projects/app/src/pages/plugin/list/component/EditModal.tsx
index 4c593a537d5..60fc6af5396 100644
--- a/projects/app/src/pages/plugin/list/component/EditModal.tsx
+++ b/projects/app/src/pages/plugin/list/component/EditModal.tsx
@@ -14,7 +14,7 @@ import MyTooltip from '@/components/MyTooltip';
import MyModal from '@/components/MyModal';
import { useTranslation } from 'next-i18next';
import { useConfirm } from '@/web/common/hooks/useConfirm';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { CreateOnePluginParams } from '@fastgpt/global/core/plugin/controller';
import { customAlphabet } from 'nanoid';
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 12);
diff --git a/projects/app/src/pages/plugin/list/index.tsx b/projects/app/src/pages/plugin/list/index.tsx
index 12399d1bea8..63d5e2acce8 100644
--- a/projects/app/src/pages/plugin/list/index.tsx
+++ b/projects/app/src/pages/plugin/list/index.tsx
@@ -6,7 +6,7 @@ import { AddIcon } from '@chakra-ui/icons';
import { serviceSideProps } from '@/web/common/utils/i18n';
import { useTranslation } from 'next-i18next';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import PageContainer from '@/components/PageContainer';
import Avatar from '@/components/Avatar';
import EditModal, { defaultForm, FormType } from './component/EditModal';
diff --git a/projects/app/src/pages/tools/index.tsx b/projects/app/src/pages/tools/index.tsx
index f9b552001fc..12288c356bd 100644
--- a/projects/app/src/pages/tools/index.tsx
+++ b/projects/app/src/pages/tools/index.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import { Box, Flex } from '@chakra-ui/react';
import { ChevronRightIcon } from '@chakra-ui/icons';
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import { useRouter } from 'next/router';
import { feConfigs } from '@/web/common/system/staticData';
import { serviceSideProps } from '@/web/common/utils/i18n';
@@ -13,19 +13,10 @@ const Tools = () => {
const router = useRouter();
const list = [
{
- icon: 'dbLight',
+ icon: 'core/dataset/datasetLight',
label: '我的知识库',
link: '/dataset/list'
},
- ...(feConfigs?.show_appStore
- ? [
- {
- icon: 'appStoreLight',
- label: 'AI应用市场',
- link: '/appStore'
- }
- ]
- : []),
{
icon: 'common/navbar/pluginLight',
label: '自定义模块',
@@ -34,7 +25,7 @@ const Tools = () => {
...(feConfigs?.show_git
? [
{
- icon: 'git',
+ icon: 'common/gitLight',
label: 'GitHub 地址',
link: 'https://github.com/labring/FastGPT'
}
diff --git a/projects/app/src/service/moduleDispatch/tools/cfr.ts b/projects/app/src/service/moduleDispatch/tools/cfr.ts
index eecbc6c8a5a..341acf5d266 100644
--- a/projects/app/src/service/moduleDispatch/tools/cfr.ts
+++ b/projects/app/src/service/moduleDispatch/tools/cfr.ts
@@ -26,7 +26,9 @@ export const dispatchCFR = async ({
return Promise.reject('Question is empty');
}
- if (histories.length === 0 && !systemPrompt) {
+ // none
+ // first chat and no system prompt
+ if (systemPrompt === 'none' || (histories.length === 0 && !systemPrompt)) {
return {
[ModuleOutputKeyEnum.text]: userChatInput
};
diff --git a/projects/app/src/web/core/dataset/components/SelectCollections.tsx b/projects/app/src/web/core/dataset/components/SelectCollections.tsx
index 0bedf48da98..ca6d89854fa 100644
--- a/projects/app/src/web/core/dataset/components/SelectCollections.tsx
+++ b/projects/app/src/web/core/dataset/components/SelectCollections.tsx
@@ -1,4 +1,4 @@
-import MyIcon from '@/components/Icon';
+import MyIcon from '@fastgpt/web/components/common/Icon';
import MyModal from '@/components/MyModal';
import ParentPaths from '@/components/common/ParentPaths';
import { useLoading } from '@/web/common/hooks/useLoading';
diff --git a/scripts/icon/index.js b/scripts/icon/index.js
new file mode 100644
index 00000000000..5060ca074f3
--- /dev/null
+++ b/scripts/icon/index.js
@@ -0,0 +1,105 @@
+const path = require('path');
+const fs = require('fs');
+const express = require('express');
+
+function findSvgFiles(dir, relativePath = '') {
+ let svgFiles = [];
+ const items = fs.readdirSync(dir, { withFileTypes: true });
+
+ for (const item of items) {
+ const fullPath = path.resolve(dir, item.name);
+ const relativeItemPath = path.join(relativePath, item.name);
+
+ if (item.isDirectory()) {
+ const nestedSvgs = findSvgFiles(fullPath, relativeItemPath);
+ svgFiles = svgFiles.concat(nestedSvgs);
+ } else if (item.isFile() && item.name.endsWith('.svg')) {
+ svgFiles.push(relativeItemPath);
+ }
+ }
+
+ return svgFiles;
+}
+
+const svgDir = path.resolve(__dirname, '../../packages/web/components/common/Icon/icons');
+const svgPaths = findSvgFiles(svgDir);
+
+const app = express();
+
+app.use('/icons', express.static(svgDir));
+
+app.get('/', (req, res) => {
+ let iconHtml = ``;
+
+ svgPaths.forEach((filePath) => {
+ const name = filePath.split('.')[0];
+ iconHtml += `
+
+ ${name}
+ `;
+ });
+
+ const html = `
+SVG Icons
+
+
+
+ ${iconHtml}
+
+
+
+
+ `;
+
+ res.send(html);
+});
+
+const PORT = process.env.PORT || 3005;
+app.listen(PORT, () => {
+ console.log(`Preview icons server running at http://localhost:${PORT}`);
+});
diff --git a/scripts/icon/init.js b/scripts/icon/init.js
new file mode 100644
index 00000000000..f8ce237c3d9
--- /dev/null
+++ b/scripts/icon/init.js
@@ -0,0 +1,42 @@
+const path = require('path');
+const fs = require('fs');
+
+// 递归读取 packages/web/components/common/Icon/icons 下所有的 svg
+function findSvgFiles(dir, relativePath = '') {
+ let svgFiles = [];
+
+ const items = fs.readdirSync(dir, { withFileTypes: true });
+
+ for (const item of items) {
+ const fullPath = path.join(dir, item.name);
+ const relativeItemPath = path.join(relativePath, item.name);
+
+ if (item.isDirectory()) {
+ const nestedSvgs = findSvgFiles(fullPath, relativeItemPath);
+ svgFiles = svgFiles.concat(nestedSvgs);
+ } else if (item.isFile() && item.name.endsWith('.svg')) {
+ svgFiles.push(relativeItemPath);
+ }
+ }
+
+ return svgFiles;
+}
+
+const svgPaths = findSvgFiles(`${__dirname}/../../packages/web/components/common/Icon/icons`);
+
+let result = ``;
+
+svgPaths.forEach((path) => {
+ const name = path.split('.')[0];
+ result += ` '${name}': () => import('./icons/${path}'),\n`;
+});
+
+// 把 result 结果写入 '../../packages/web/components/common/Icon/constants'
+fs.writeFileSync(
+ `${__dirname}/../../packages/web/components/common/Icon/constants.ts`,
+ `// @ts-nocheck
+
+ export const iconPaths = {
+ ${result}
+ };`
+);
diff --git a/scripts/icon/package-lock.json b/scripts/icon/package-lock.json
new file mode 100644
index 00000000000..d41326eb239
--- /dev/null
+++ b/scripts/icon/package-lock.json
@@ -0,0 +1,613 @@
+{
+ "name": "icon",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "icon",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "express": "^4.18.2"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.1.tgz",
+ "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.11.0",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.5.tgz",
+ "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
+ "dependencies": {
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.1",
+ "set-function-length": "^1.1.1"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.1.tgz",
+ "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
+ "dependencies": {
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.18.2",
+ "resolved": "https://registry.npmmirror.com/express/-/express-4.18.2.tgz",
+ "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.1",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.5.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.11.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
+ "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
+ "dependencies": {
+ "function-bind": "^1.1.2",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.0"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz",
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "dependencies": {
+ "get-intrinsic": "^1.1.3"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
+ "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
+ "dependencies": {
+ "get-intrinsic": "^1.2.2"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.1.tgz",
+ "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.0.tgz",
+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.1.tgz",
+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ=="
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.11.0",
+ "resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz",
+ "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "dependencies": {
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "node_modules/send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmmirror.com/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
+ },
+ "node_modules/serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dependencies": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/set-function-length": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.1.1.tgz",
+ "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
+ "dependencies": {
+ "define-data-property": "^1.1.1",
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ }
+ }
+}
diff --git a/scripts/icon/package.json b/scripts/icon/package.json
new file mode 100644
index 00000000000..bc91adf3ecc
--- /dev/null
+++ b/scripts/icon/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "icon",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "express": "^4.18.2"
+ }
+}
| |