From a4a2fbb08ff1540546da4559ba061984d597a11a Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 13 Mar 2024 01:13:36 +0800 Subject: [PATCH] rename rate limit --- .../dialog/ChatflowConfigurationDialog.jsx | 4 ++-- .../extended/RateLimit.jsx} | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) rename packages/ui/src/{views/chatflows/Configuration.jsx => ui-component/extended/RateLimit.jsx} (96%) diff --git a/packages/ui/src/ui-component/dialog/ChatflowConfigurationDialog.jsx b/packages/ui/src/ui-component/dialog/ChatflowConfigurationDialog.jsx index 67fd62bfb..5fde038ab 100644 --- a/packages/ui/src/ui-component/dialog/ChatflowConfigurationDialog.jsx +++ b/packages/ui/src/ui-component/dialog/ChatflowConfigurationDialog.jsx @@ -3,7 +3,7 @@ import { useState } from 'react' import { createPortal } from 'react-dom' import { Box, Dialog, DialogContent, DialogTitle, Tabs, Tab } from '@mui/material' import SpeechToText from '@/ui-component/extended/SpeechToText' -import Configuration from '@/views/chatflows/Configuration' +import RateLimit from '@/ui-component/extended/RateLimit' import AllowedDomains from '@/ui-component/extended/AllowedDomains' import ChatFeedback from '@/ui-component/extended/ChatFeedback' import AnalyseFlow from '@/ui-component/extended/AnalyseFlow' @@ -99,7 +99,7 @@ const ChatflowConfigurationDialog = ({ show, dialogProps, onCancel }) => { {CHATFLOW_CONFIGURATION_TABS.map((item, index) => ( - {item.id === 'rateLimiting' && } + {item.id === 'rateLimiting' && } {item.id === 'conversationStarters' ? : null} {item.id === 'speechToText' ? : null} {item.id === 'chatFeedback' ? : null} diff --git a/packages/ui/src/views/chatflows/Configuration.jsx b/packages/ui/src/ui-component/extended/RateLimit.jsx similarity index 96% rename from packages/ui/src/views/chatflows/Configuration.jsx rename to packages/ui/src/ui-component/extended/RateLimit.jsx index 13f7b3881..5fc88cae2 100644 --- a/packages/ui/src/views/chatflows/Configuration.jsx +++ b/packages/ui/src/ui-component/extended/RateLimit.jsx @@ -18,7 +18,7 @@ import chatflowsApi from '@/api/chatflows' import useNotifier from '@/utils/useNotifier' import { TooltipWithParser } from '@/ui-component/tooltip/TooltipWithParser' -const Configuration = () => { +const RateLimit = () => { const dispatch = useDispatch() const chatflow = useSelector((state) => state.canvas.chatflow) const chatflowid = chatflow.id @@ -59,7 +59,7 @@ const Configuration = () => { }) if (saveResp.data) { enqueueSnackbar({ - message: 'API Configuration Saved', + message: 'Rate Limit Configuration Saved', options: { key: new Date().getTime() + Math.random(), variant: 'success', @@ -78,7 +78,7 @@ const Configuration = () => { ? error.response.data || `${error.response.status}: ${error.response.statusText}` : error.message enqueueSnackbar({ - message: `Failed to save API Configuration: ${errorData}`, + message: `Failed to save Rate Limit Configuration: ${errorData}`, options: { key: new Date().getTime() + Math.random(), variant: 'error', @@ -151,8 +151,8 @@ const Configuration = () => { ) } -Configuration.propTypes = { +RateLimit.propTypes = { isSessionMemory: PropTypes.bool } -export default Configuration +export default RateLimit