diff --git a/src/app/chat/(desktop)/features/ChatInput/index.tsx b/src/app/chat/(desktop)/features/ChatInput/index.tsx index 681cdb4427998..e40386e501127 100644 --- a/src/app/chat/(desktop)/features/ChatInput/index.tsx +++ b/src/app/chat/(desktop)/features/ChatInput/index.tsx @@ -3,14 +3,14 @@ import { Maximize2, Minimize2 } from 'lucide-react'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import ActionBar from '@/app/chat/features/ChatInput/ActionBar'; -import SaveTopic from '@/app/chat/features/ChatInput/Topic'; -import { useChatInput } from '@/app/chat/features/ChatInput/useChatInput'; import { CHAT_TEXTAREA_HEIGHT, CHAT_TEXTAREA_MAX_HEIGHT, HEADER_HEIGHT, } from '@/const/layoutTokens'; +import ActionBar from '@/features/ChatInput/ActionBar'; +import SaveTopic from '@/features/ChatInput/Topic'; +import { useChatInput } from '@/features/ChatInput/useChatInput'; import DragUpload from './DragUpload'; import { LocalFiles } from './LocalFiles'; diff --git a/src/app/chat/(desktop)/index.tsx b/src/app/chat/(desktop)/index.tsx index 635f400bc0f1a..00c2a61685928 100644 --- a/src/app/chat/(desktop)/index.tsx +++ b/src/app/chat/(desktop)/index.tsx @@ -5,8 +5,8 @@ import { FC, memo } from 'react'; import { Flexbox } from 'react-layout-kit'; import ResponsiveIndex from '@/components/ResponsiveIndex'; +import Conversation from '@/features/Conversation'; -import Conversation from '../features/Conversation'; import PageTitle from '../features/PageTitle'; import ChatHeader from './features/ChatHeader'; import ChatInput from './features/ChatInput'; diff --git a/src/app/chat/(mobile)/features/ChatInput/index.tsx b/src/app/chat/(mobile)/features/ChatInput/index.tsx index 2fe6eb0718ba7..a3488914d647b 100644 --- a/src/app/chat/(mobile)/features/ChatInput/index.tsx +++ b/src/app/chat/(mobile)/features/ChatInput/index.tsx @@ -3,10 +3,10 @@ import { useTheme } from 'antd-style'; import { memo } from 'react'; import { useTranslation } from 'react-i18next'; -import ActionBar from '@/app/chat/features/ChatInput/ActionBar'; -import STT from '@/app/chat/features/ChatInput/STT'; -import SaveTopic from '@/app/chat/features/ChatInput/Topic'; -import { useChatInput } from '@/app/chat/features/ChatInput/useChatInput'; +import ActionBar from '@/features/ChatInput/ActionBar'; +import STT from '@/features/ChatInput/STT'; +import SaveTopic from '@/features/ChatInput/Topic'; +import { useChatInput } from '@/features/ChatInput/useChatInput'; import Files from './Files'; diff --git a/src/app/chat/(mobile)/mobile/index.tsx b/src/app/chat/(mobile)/mobile/index.tsx index 3ec5c944e47f2..992749e69d9e5 100644 --- a/src/app/chat/(mobile)/mobile/index.tsx +++ b/src/app/chat/(mobile)/mobile/index.tsx @@ -4,9 +4,9 @@ import dynamic from 'next/dynamic'; import { memo } from 'react'; import { Flexbox } from 'react-layout-kit'; +import Conversation from '@/features/Conversation'; import { useSessionStore } from '@/store/session'; -import Conversation from '../../features/Conversation'; import ChatInput from '../features/ChatInput'; import Layout from './layout.mobile'; diff --git a/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx b/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx index 0935c1250b375..c578ff26482b5 100644 --- a/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx +++ b/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx @@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next'; import { Flexbox } from 'react-layout-kit'; import pkg from '@/../package.json'; -import ChatList from '@/app/chat/features/Conversation/ChatList'; +import ChatList from '@/features/Conversation/ChatList'; import { useSessionStore } from '@/store/session'; import { agentSelectors, sessionSelectors } from '@/store/session/selectors'; diff --git a/src/app/chat/features/ChatInput/ActionBar/Clear.tsx b/src/features/ChatInput/ActionBar/Clear.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/Clear.tsx rename to src/features/ChatInput/ActionBar/Clear.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx b/src/features/ChatInput/ActionBar/FileUpload.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx rename to src/features/ChatInput/ActionBar/FileUpload.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/History.tsx b/src/features/ChatInput/ActionBar/History.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/History.tsx rename to src/features/ChatInput/ActionBar/History.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/ModelSwitch.tsx b/src/features/ChatInput/ActionBar/ModelSwitch.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/ModelSwitch.tsx rename to src/features/ChatInput/ActionBar/ModelSwitch.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/Temperature.tsx b/src/features/ChatInput/ActionBar/Temperature.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/Temperature.tsx rename to src/features/ChatInput/ActionBar/Temperature.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/Token/TokenTag.tsx b/src/features/ChatInput/ActionBar/Token/TokenTag.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/Token/TokenTag.tsx rename to src/features/ChatInput/ActionBar/Token/TokenTag.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/Token/index.tsx b/src/features/ChatInput/ActionBar/Token/index.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/Token/index.tsx rename to src/features/ChatInput/ActionBar/Token/index.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/Tools/ToolItem.tsx b/src/features/ChatInput/ActionBar/Tools/ToolItem.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/Tools/ToolItem.tsx rename to src/features/ChatInput/ActionBar/Tools/ToolItem.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/Tools/index.tsx b/src/features/ChatInput/ActionBar/Tools/index.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/Tools/index.tsx rename to src/features/ChatInput/ActionBar/Tools/index.tsx diff --git a/src/app/chat/features/ChatInput/ActionBar/config.ts b/src/features/ChatInput/ActionBar/config.ts similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/config.ts rename to src/features/ChatInput/ActionBar/config.ts diff --git a/src/app/chat/features/ChatInput/ActionBar/index.tsx b/src/features/ChatInput/ActionBar/index.tsx similarity index 100% rename from src/app/chat/features/ChatInput/ActionBar/index.tsx rename to src/features/ChatInput/ActionBar/index.tsx diff --git a/src/app/chat/features/ChatInput/STT/index.tsx b/src/features/ChatInput/STT/index.tsx similarity index 100% rename from src/app/chat/features/ChatInput/STT/index.tsx rename to src/features/ChatInput/STT/index.tsx diff --git a/src/app/chat/features/ChatInput/Topic/index.tsx b/src/features/ChatInput/Topic/index.tsx similarity index 100% rename from src/app/chat/features/ChatInput/Topic/index.tsx rename to src/features/ChatInput/Topic/index.tsx diff --git a/src/app/chat/features/ChatInput/useChatInput.ts b/src/features/ChatInput/useChatInput.ts similarity index 100% rename from src/app/chat/features/ChatInput/useChatInput.ts rename to src/features/ChatInput/useChatInput.ts diff --git a/src/app/chat/features/ChatInput/useSend.ts b/src/features/ChatInput/useSend.ts similarity index 100% rename from src/app/chat/features/ChatInput/useSend.ts rename to src/features/ChatInput/useSend.ts diff --git a/src/app/chat/features/Conversation/ChatList/Actions/Assistant.tsx b/src/features/Conversation/ChatList/Actions/Assistant.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/Assistant.tsx rename to src/features/Conversation/ChatList/Actions/Assistant.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Actions/Error.tsx b/src/features/Conversation/ChatList/Actions/Error.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/Error.tsx rename to src/features/Conversation/ChatList/Actions/Error.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Actions/Fallback.tsx b/src/features/Conversation/ChatList/Actions/Fallback.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/Fallback.tsx rename to src/features/Conversation/ChatList/Actions/Fallback.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Actions/Function.tsx b/src/features/Conversation/ChatList/Actions/Function.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/Function.tsx rename to src/features/Conversation/ChatList/Actions/Function.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Actions/User.tsx b/src/features/Conversation/ChatList/Actions/User.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/User.tsx rename to src/features/Conversation/ChatList/Actions/User.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Actions/customAction.ts b/src/features/Conversation/ChatList/Actions/customAction.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/customAction.ts rename to src/features/Conversation/ChatList/Actions/customAction.ts diff --git a/src/app/chat/features/Conversation/ChatList/Actions/index.ts b/src/features/Conversation/ChatList/Actions/index.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Actions/index.ts rename to src/features/Conversation/ChatList/Actions/index.ts diff --git a/src/app/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx b/src/features/Conversation/ChatList/Error/ApiKeyForm.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx rename to src/features/Conversation/ChatList/Error/ApiKeyForm.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx b/src/features/Conversation/ChatList/Error/ErrorActionContainer.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx rename to src/features/Conversation/ChatList/Error/ErrorActionContainer.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx b/src/features/Conversation/ChatList/Error/InvalidAccess.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx rename to src/features/Conversation/ChatList/Error/InvalidAccess.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/OpenAPIKey.tsx b/src/features/Conversation/ChatList/Error/OpenAPIKey.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/OpenAPIKey.tsx rename to src/features/Conversation/ChatList/Error/OpenAPIKey.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx b/src/features/Conversation/ChatList/Error/OpenAiBizError.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx rename to src/features/Conversation/ChatList/Error/OpenAiBizError.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx b/src/features/Conversation/ChatList/Error/Plugin/PluginError.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx rename to src/features/Conversation/ChatList/Error/Plugin/PluginError.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx b/src/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx rename to src/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/index.tsx b/src/features/Conversation/ChatList/Error/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/index.tsx rename to src/features/Conversation/ChatList/Error/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Error/style.tsx b/src/features/Conversation/ChatList/Error/style.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Error/style.tsx rename to src/features/Conversation/ChatList/Error/style.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/Assistant.test.tsx b/src/features/Conversation/ChatList/Extras/Assistant.test.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/Assistant.test.tsx rename to src/features/Conversation/ChatList/Extras/Assistant.test.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/Assistant.tsx b/src/features/Conversation/ChatList/Extras/Assistant.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/Assistant.tsx rename to src/features/Conversation/ChatList/Extras/Assistant.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/ExtraContainer.tsx b/src/features/Conversation/ChatList/Extras/ExtraContainer.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/ExtraContainer.tsx rename to src/features/Conversation/ChatList/Extras/ExtraContainer.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/TTS/FilePlayer.tsx b/src/features/Conversation/ChatList/Extras/TTS/FilePlayer.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/TTS/FilePlayer.tsx rename to src/features/Conversation/ChatList/Extras/TTS/FilePlayer.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/TTS/InitPlayer.tsx b/src/features/Conversation/ChatList/Extras/TTS/InitPlayer.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/TTS/InitPlayer.tsx rename to src/features/Conversation/ChatList/Extras/TTS/InitPlayer.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/TTS/Player.tsx b/src/features/Conversation/ChatList/Extras/TTS/Player.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/TTS/Player.tsx rename to src/features/Conversation/ChatList/Extras/TTS/Player.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/TTS/index.tsx b/src/features/Conversation/ChatList/Extras/TTS/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/TTS/index.tsx rename to src/features/Conversation/ChatList/Extras/TTS/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/Translate.tsx b/src/features/Conversation/ChatList/Extras/Translate.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/Translate.tsx rename to src/features/Conversation/ChatList/Extras/Translate.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/User.tsx b/src/features/Conversation/ChatList/Extras/User.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/User.tsx rename to src/features/Conversation/ChatList/Extras/User.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Extras/index.ts b/src/features/Conversation/ChatList/Extras/index.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/index.ts rename to src/features/Conversation/ChatList/Extras/index.ts diff --git a/src/app/chat/features/Conversation/ChatList/Extras/type.ts b/src/features/Conversation/ChatList/Extras/type.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Extras/type.ts rename to src/features/Conversation/ChatList/Extras/type.ts diff --git a/src/app/chat/features/Conversation/ChatList/Loading.tsx b/src/features/Conversation/ChatList/Loading.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Loading.tsx rename to src/features/Conversation/ChatList/Loading.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Messages/Assistant.tsx b/src/features/Conversation/ChatList/Messages/Assistant.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Messages/Assistant.tsx rename to src/features/Conversation/ChatList/Messages/Assistant.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Messages/Default.tsx b/src/features/Conversation/ChatList/Messages/Default.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Messages/Default.tsx rename to src/features/Conversation/ChatList/Messages/Default.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Messages/Function.tsx b/src/features/Conversation/ChatList/Messages/Function.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Messages/Function.tsx rename to src/features/Conversation/ChatList/Messages/Function.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Messages/User.tsx b/src/features/Conversation/ChatList/Messages/User.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Messages/User.tsx rename to src/features/Conversation/ChatList/Messages/User.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Messages/index.ts b/src/features/Conversation/ChatList/Messages/index.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Messages/index.ts rename to src/features/Conversation/ChatList/Messages/index.ts diff --git a/src/app/chat/features/Conversation/ChatList/OTPInput.tsx b/src/features/Conversation/ChatList/OTPInput.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/OTPInput.tsx rename to src/features/Conversation/ChatList/OTPInput.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/PluginResultJSON.tsx b/src/features/Conversation/ChatList/Plugins/Inspector/PluginResultJSON.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Inspector/PluginResultJSON.tsx rename to src/features/Conversation/ChatList/Plugins/Inspector/PluginResultJSON.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/Settings.tsx b/src/features/Conversation/ChatList/Plugins/Inspector/Settings.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Inspector/Settings.tsx rename to src/features/Conversation/ChatList/Plugins/Inspector/Settings.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/index.tsx b/src/features/Conversation/ChatList/Plugins/Inspector/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Inspector/index.tsx rename to src/features/Conversation/ChatList/Plugins/Inspector/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/style.ts b/src/features/Conversation/ChatList/Plugins/Inspector/style.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Inspector/style.ts rename to src/features/Conversation/ChatList/Plugins/Inspector/style.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/IFrameRender/index.tsx b/src/features/Conversation/ChatList/Plugins/Render/DefaultType/IFrameRender/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/IFrameRender/index.tsx rename to src/features/Conversation/ChatList/Plugins/Render/DefaultType/IFrameRender/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/index.tsx b/src/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/index.tsx rename to src/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/utils.ts b/src/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/utils.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/utils.ts rename to src/features/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/utils.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx b/src/features/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx rename to src/features/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx b/src/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx rename to src/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/index.tsx b/src/features/Conversation/ChatList/Plugins/Render/StandaloneType/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/index.tsx rename to src/features/Conversation/ChatList/Plugins/Render/StandaloneType/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/index.tsx b/src/features/Conversation/ChatList/Plugins/Render/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/index.tsx rename to src/features/Conversation/ChatList/Plugins/Render/index.tsx diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.test.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.test.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.test.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.test.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.test.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.test.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.test.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.test.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.test.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.test.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.test.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.test.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginState.test.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/pluginState.test.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginState.test.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/pluginState.test.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginState.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/pluginState.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginState.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/pluginState.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/postMessage.test.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/postMessage.test.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/postMessage.test.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/postMessage.test.ts diff --git a/src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/postMessage.ts b/src/features/Conversation/ChatList/Plugins/Render/utils/postMessage.ts similarity index 100% rename from src/app/chat/features/Conversation/ChatList/Plugins/Render/utils/postMessage.ts rename to src/features/Conversation/ChatList/Plugins/Render/utils/postMessage.ts diff --git a/src/app/chat/features/Conversation/ChatList/SkeletonList.tsx b/src/features/Conversation/ChatList/SkeletonList.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/SkeletonList.tsx rename to src/features/Conversation/ChatList/SkeletonList.tsx diff --git a/src/app/chat/features/Conversation/ChatList/index.tsx b/src/features/Conversation/ChatList/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ChatList/index.tsx rename to src/features/Conversation/ChatList/index.tsx diff --git a/src/app/chat/features/Conversation/ScrollAnchor/index.tsx b/src/features/Conversation/ScrollAnchor/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/ScrollAnchor/index.tsx rename to src/features/Conversation/ScrollAnchor/index.tsx diff --git a/src/app/chat/features/Conversation/ScrollAnchor/useAtBottom.ts b/src/features/Conversation/ScrollAnchor/useAtBottom.ts similarity index 100% rename from src/app/chat/features/Conversation/ScrollAnchor/useAtBottom.ts rename to src/features/Conversation/ScrollAnchor/useAtBottom.ts diff --git a/src/app/chat/features/Conversation/index.tsx b/src/features/Conversation/index.tsx similarity index 100% rename from src/app/chat/features/Conversation/index.tsx rename to src/features/Conversation/index.tsx diff --git a/src/app/chat/features/Conversation/useInitConversation.ts b/src/features/Conversation/useInitConversation.ts similarity index 100% rename from src/app/chat/features/Conversation/useInitConversation.ts rename to src/features/Conversation/useInitConversation.ts diff --git a/src/services/plugin.ts b/src/services/plugin.ts index 05cd3a1ac60c8..95cd308d6b874 100644 --- a/src/services/plugin.ts +++ b/src/services/plugin.ts @@ -3,8 +3,6 @@ import { LobeChatPluginsMarketIndex, pluginManifestSchema, } from '@lobehub/chat-plugin-sdk'; -import { OpenAPIConvertor } from '@lobehub/chat-plugin-sdk/openapi'; -import YAML from 'yaml'; import { getPluginIndexJSON } from '@/const/url'; import { PluginModel } from '@/database/models/plugin'; @@ -40,6 +38,8 @@ class PluginService { if (contentType === 'application/json') { data = await res.json(); } else { + const { default: YAML } = await import('yaml'); + const yaml = await res.text(); data = YAML.parse(yaml); } @@ -94,6 +94,8 @@ class PluginService { const openapiJson = await this._fetchJSON(parser.data.openapi, useProxy); try { + const { OpenAPIConvertor } = await import('@lobehub/chat-plugin-sdk/openapi'); + const convertor = new OpenAPIConvertor(openapiJson); const openAPIs = await convertor.convertOpenAPIToPluginSchema(); data.api = [...data.api, ...openAPIs];