mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00
feat: admin add custom plugin (#2582)
* feat: admin add custom plugin * refresh plugins * plugin input box ui * fix: run plugin varialbes error * perf: comment * fix: ts
This commit is contained in:
@@ -83,6 +83,7 @@ const RenderInput = () => {
|
||||
rounded={'md'}
|
||||
fontSize={'sm'}
|
||||
color={'myGray.600'}
|
||||
mb={4}
|
||||
>
|
||||
<Markdown source={chatConfig.instruction} />
|
||||
</Box>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { ModalBody, ModalFooter, Button } from '@chakra-ui/react';
|
||||
import MyModal from '@fastgpt/web/components/common/MyModal';
|
||||
import { SelectAppItemType } from '@fastgpt/global/core/workflow/template/system/runApp/type';
|
||||
import type { SelectAppItemType } from '@fastgpt/global/core/workflow/template/system/abandoned/runApp/type';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import SelectOneResource from '@/components/common/folder/SelectOneResource';
|
||||
import {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import type { RenderInputProps } from '../type';
|
||||
import { Box, Button, useDisclosure } from '@chakra-ui/react';
|
||||
import { SelectAppItemType } from '@fastgpt/global/core/workflow/template/system/runApp/type';
|
||||
import type { SelectAppItemType } from '@fastgpt/global/core/workflow/template/system/abandoned/runApp/type';
|
||||
import Avatar from '@fastgpt/web/components/common/Avatar';
|
||||
import SelectAppModal from '../../../../SelectAppModal';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
|
@@ -27,8 +27,10 @@ const refetchSystemPlugins = () => {
|
||||
const changeStream = MongoSystemPluginSchema.watch();
|
||||
|
||||
changeStream.on('change', async (change) => {
|
||||
try {
|
||||
getSystemPlugins(true);
|
||||
} catch (error) {}
|
||||
setTimeout(() => {
|
||||
try {
|
||||
getSystemPlugins(true);
|
||||
} catch (error) {}
|
||||
}, 5000);
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user