diff --git a/next.config.mjs b/next.config.mjs index 969d6369ac7b..eb60930e00f0 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -12,7 +12,7 @@ const withPWA = nextPWA({ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, - pageExtensions: ['page.tsx', 'api.ts'], + pageExtensions: ['tsx', 'api.ts'], transpilePackages: ['@lobehub/ui'], webpack(config) { config.experiments = { diff --git a/package.json b/package.json index f3245ed5eb04..eea1e86fc38e 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,6 @@ "@types/react": "^18", "@types/react-dom": "^18", "@types/systemjs": "^6.13.2", - "@types/testing-library__jest-dom": "^6", "@types/uuid": "^9", "@umijs/lint": "^4", "@vitest/coverage-v8": "latest", diff --git a/src/pages/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx b/src/app/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx rename to src/app/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx b/src/app/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx rename to src/app/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx b/src/app/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx rename to src/app/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx b/src/app/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx rename to src/app/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx b/src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx rename to src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx b/src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx rename to src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/index.tsx b/src/app/chat/features/Conversation/ChatList/Error/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/index.tsx rename to src/app/chat/features/Conversation/ChatList/Error/index.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Error/style.tsx b/src/app/chat/features/Conversation/ChatList/Error/style.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Error/style.tsx rename to src/app/chat/features/Conversation/ChatList/Error/style.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/MessageExtra.tsx b/src/app/chat/features/Conversation/ChatList/MessageExtra.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/MessageExtra.tsx rename to src/app/chat/features/Conversation/ChatList/MessageExtra.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/OTPInput.tsx b/src/app/chat/features/Conversation/ChatList/OTPInput.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/OTPInput.tsx rename to src/app/chat/features/Conversation/ChatList/OTPInput.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/FunctionCall.tsx b/src/app/chat/features/Conversation/ChatList/Plugins/FunctionCall.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/FunctionCall.tsx rename to src/app/chat/features/Conversation/ChatList/Plugins/FunctionCall.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/IFrameRender/hooks.ts b/src/app/chat/features/Conversation/ChatList/Plugins/IFrameRender/hooks.ts similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/IFrameRender/hooks.ts rename to src/app/chat/features/Conversation/ChatList/Plugins/IFrameRender/hooks.ts diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/IFrameRender/index.tsx b/src/app/chat/features/Conversation/ChatList/Plugins/IFrameRender/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/IFrameRender/index.tsx rename to src/app/chat/features/Conversation/ChatList/Plugins/IFrameRender/index.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/IFrameRender/utils.ts b/src/app/chat/features/Conversation/ChatList/Plugins/IFrameRender/utils.ts similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/IFrameRender/utils.ts rename to src/app/chat/features/Conversation/ChatList/Plugins/IFrameRender/utils.ts diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/PluginMessage.tsx b/src/app/chat/features/Conversation/ChatList/Plugins/PluginMessage.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/PluginMessage.tsx rename to src/app/chat/features/Conversation/ChatList/Plugins/PluginMessage.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/PluginResultRender.tsx b/src/app/chat/features/Conversation/ChatList/Plugins/PluginResultRender.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/PluginResultRender.tsx rename to src/app/chat/features/Conversation/ChatList/Plugins/PluginResultRender.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/SystemJsRender/index.tsx b/src/app/chat/features/Conversation/ChatList/Plugins/SystemJsRender/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/SystemJsRender/index.tsx rename to src/app/chat/features/Conversation/ChatList/Plugins/SystemJsRender/index.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/SystemJsRender/utils.ts b/src/app/chat/features/Conversation/ChatList/Plugins/SystemJsRender/utils.ts similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/SystemJsRender/utils.ts rename to src/app/chat/features/Conversation/ChatList/Plugins/SystemJsRender/utils.ts diff --git a/src/pages/chat/features/Conversation/ChatList/Plugins/style.ts b/src/app/chat/features/Conversation/ChatList/Plugins/style.ts similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/Plugins/style.ts rename to src/app/chat/features/Conversation/ChatList/Plugins/style.ts diff --git a/src/pages/chat/features/Conversation/ChatList/SkeletonList.tsx b/src/app/chat/features/Conversation/ChatList/SkeletonList.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/SkeletonList.tsx rename to src/app/chat/features/Conversation/ChatList/SkeletonList.tsx diff --git a/src/pages/chat/features/Conversation/ChatList/index.tsx b/src/app/chat/features/Conversation/ChatList/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ChatList/index.tsx rename to src/app/chat/features/Conversation/ChatList/index.tsx diff --git a/src/pages/chat/features/Conversation/Input/ActionBar/ActionLeft.tsx b/src/app/chat/features/Conversation/Input/ActionBar/ActionLeft.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/ActionBar/ActionLeft.tsx rename to src/app/chat/features/Conversation/Input/ActionBar/ActionLeft.tsx diff --git a/src/pages/chat/features/Conversation/Input/ActionBar/ActionRight.tsx b/src/app/chat/features/Conversation/Input/ActionBar/ActionRight.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/ActionBar/ActionRight.tsx rename to src/app/chat/features/Conversation/Input/ActionBar/ActionRight.tsx diff --git a/src/pages/chat/features/Conversation/Input/ActionBar/Token.tsx b/src/app/chat/features/Conversation/Input/ActionBar/Token.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/ActionBar/Token.tsx rename to src/app/chat/features/Conversation/Input/ActionBar/Token.tsx diff --git a/src/pages/chat/features/Conversation/Input/Desktop.tsx b/src/app/chat/features/Conversation/Input/Desktop.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/Desktop.tsx rename to src/app/chat/features/Conversation/Input/Desktop.tsx diff --git a/src/pages/chat/features/Conversation/Input/Footer/SaveTopic.tsx b/src/app/chat/features/Conversation/Input/Footer/SaveTopic.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/Footer/SaveTopic.tsx rename to src/app/chat/features/Conversation/Input/Footer/SaveTopic.tsx diff --git a/src/pages/chat/features/Conversation/Input/Footer/index.tsx b/src/app/chat/features/Conversation/Input/Footer/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/Footer/index.tsx rename to src/app/chat/features/Conversation/Input/Footer/index.tsx diff --git a/src/pages/chat/features/Conversation/Input/Mobile.tsx b/src/app/chat/features/Conversation/Input/Mobile.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/Mobile.tsx rename to src/app/chat/features/Conversation/Input/Mobile.tsx diff --git a/src/pages/chat/features/Conversation/Input/index.tsx b/src/app/chat/features/Conversation/Input/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/Input/index.tsx rename to src/app/chat/features/Conversation/Input/index.tsx diff --git a/src/pages/chat/features/Conversation/ScrollAnchor/index.tsx b/src/app/chat/features/Conversation/ScrollAnchor/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/ScrollAnchor/index.tsx rename to src/app/chat/features/Conversation/ScrollAnchor/index.tsx diff --git a/src/pages/chat/features/Conversation/ScrollAnchor/useAtBottom.ts b/src/app/chat/features/Conversation/ScrollAnchor/useAtBottom.ts similarity index 100% rename from src/pages/chat/features/Conversation/ScrollAnchor/useAtBottom.ts rename to src/app/chat/features/Conversation/ScrollAnchor/useAtBottom.ts diff --git a/src/pages/chat/features/Conversation/index.tsx b/src/app/chat/features/Conversation/index.tsx similarity index 100% rename from src/pages/chat/features/Conversation/index.tsx rename to src/app/chat/features/Conversation/index.tsx diff --git a/src/pages/chat/features/Header/Desktop.tsx b/src/app/chat/features/Header/Desktop.tsx similarity index 100% rename from src/pages/chat/features/Header/Desktop.tsx rename to src/app/chat/features/Header/Desktop.tsx diff --git a/src/pages/chat/features/Header/Mobile.tsx b/src/app/chat/features/Header/Mobile.tsx similarity index 100% rename from src/pages/chat/features/Header/Mobile.tsx rename to src/app/chat/features/Header/Mobile.tsx diff --git a/src/pages/chat/features/Header/PluginTag/PluginStatus.tsx b/src/app/chat/features/Header/PluginTag/PluginStatus.tsx similarity index 100% rename from src/pages/chat/features/Header/PluginTag/PluginStatus.tsx rename to src/app/chat/features/Header/PluginTag/PluginStatus.tsx diff --git a/src/pages/chat/features/Header/PluginTag/index.tsx b/src/app/chat/features/Header/PluginTag/index.tsx similarity index 100% rename from src/pages/chat/features/Header/PluginTag/index.tsx rename to src/app/chat/features/Header/PluginTag/index.tsx diff --git a/src/pages/chat/features/Header/ShareButton/index.tsx b/src/app/chat/features/Header/ShareButton/index.tsx similarity index 100% rename from src/pages/chat/features/Header/ShareButton/index.tsx rename to src/app/chat/features/Header/ShareButton/index.tsx diff --git a/src/pages/chat/features/Header/index.tsx b/src/app/chat/features/Header/index.tsx similarity index 100% rename from src/pages/chat/features/Header/index.tsx rename to src/app/chat/features/Header/index.tsx diff --git a/src/pages/chat/features/SessionList/CollapseGroup/index.tsx b/src/app/chat/features/SessionList/CollapseGroup/index.tsx similarity index 100% rename from src/pages/chat/features/SessionList/CollapseGroup/index.tsx rename to src/app/chat/features/SessionList/CollapseGroup/index.tsx diff --git a/src/pages/chat/features/SessionList/Desktop.tsx b/src/app/chat/features/SessionList/Desktop.tsx similarity index 100% rename from src/pages/chat/features/SessionList/Desktop.tsx rename to src/app/chat/features/SessionList/Desktop.tsx diff --git a/src/pages/chat/features/SessionList/Header/Desktop.tsx b/src/app/chat/features/SessionList/Header/Desktop.tsx similarity index 100% rename from src/pages/chat/features/SessionList/Header/Desktop.tsx rename to src/app/chat/features/SessionList/Header/Desktop.tsx diff --git a/src/pages/chat/features/SessionList/Header/Mobile.tsx b/src/app/chat/features/SessionList/Header/Mobile.tsx similarity index 100% rename from src/pages/chat/features/SessionList/Header/Mobile.tsx rename to src/app/chat/features/SessionList/Header/Mobile.tsx diff --git a/src/pages/chat/features/SessionList/Header/index.tsx b/src/app/chat/features/SessionList/Header/index.tsx similarity index 100% rename from src/pages/chat/features/SessionList/Header/index.tsx rename to src/app/chat/features/SessionList/Header/index.tsx diff --git a/src/pages/chat/features/SessionList/Inbox/index.tsx b/src/app/chat/features/SessionList/Inbox/index.tsx similarity index 100% rename from src/pages/chat/features/SessionList/Inbox/index.tsx rename to src/app/chat/features/SessionList/Inbox/index.tsx diff --git a/src/pages/chat/features/SessionList/List/AddButton.tsx b/src/app/chat/features/SessionList/List/AddButton.tsx similarity index 100% rename from src/pages/chat/features/SessionList/List/AddButton.tsx rename to src/app/chat/features/SessionList/List/AddButton.tsx diff --git a/src/pages/chat/features/SessionList/List/Item/Actions.tsx b/src/app/chat/features/SessionList/List/Item/Actions.tsx similarity index 100% rename from src/pages/chat/features/SessionList/List/Item/Actions.tsx rename to src/app/chat/features/SessionList/List/Item/Actions.tsx diff --git a/src/pages/chat/features/SessionList/List/Item/index.tsx b/src/app/chat/features/SessionList/List/Item/index.tsx similarity index 100% rename from src/pages/chat/features/SessionList/List/Item/index.tsx rename to src/app/chat/features/SessionList/List/Item/index.tsx diff --git a/src/pages/chat/features/SessionList/List/SkeletonList.tsx b/src/app/chat/features/SessionList/List/SkeletonList.tsx similarity index 100% rename from src/pages/chat/features/SessionList/List/SkeletonList.tsx rename to src/app/chat/features/SessionList/List/SkeletonList.tsx diff --git a/src/pages/chat/features/SessionList/List/index.tsx b/src/app/chat/features/SessionList/List/index.tsx similarity index 100% rename from src/pages/chat/features/SessionList/List/index.tsx rename to src/app/chat/features/SessionList/List/index.tsx diff --git a/src/pages/chat/features/SessionList/Mobile.tsx b/src/app/chat/features/SessionList/Mobile.tsx similarity index 100% rename from src/pages/chat/features/SessionList/Mobile.tsx rename to src/app/chat/features/SessionList/Mobile.tsx diff --git a/src/pages/chat/features/SessionList/index.tsx b/src/app/chat/features/SessionList/index.tsx similarity index 100% rename from src/pages/chat/features/SessionList/index.tsx rename to src/app/chat/features/SessionList/index.tsx diff --git a/src/pages/chat/features/SessionSearchBar/index.tsx b/src/app/chat/features/SessionSearchBar/index.tsx similarity index 100% rename from src/pages/chat/features/SessionSearchBar/index.tsx rename to src/app/chat/features/SessionSearchBar/index.tsx diff --git a/src/pages/chat/features/Sidebar/Desktop.tsx b/src/app/chat/features/Sidebar/Desktop.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Desktop.tsx rename to src/app/chat/features/Sidebar/Desktop.tsx diff --git a/src/pages/chat/features/Sidebar/Mobile.tsx b/src/app/chat/features/Sidebar/Mobile.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Mobile.tsx rename to src/app/chat/features/Sidebar/Mobile.tsx diff --git a/src/pages/chat/features/Sidebar/SystemRole/Header.tsx b/src/app/chat/features/Sidebar/SystemRole/Header.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/SystemRole/Header.tsx rename to src/app/chat/features/Sidebar/SystemRole/Header.tsx diff --git a/src/pages/chat/features/Sidebar/SystemRole/index.tsx b/src/app/chat/features/Sidebar/SystemRole/index.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/SystemRole/index.tsx rename to src/app/chat/features/Sidebar/SystemRole/index.tsx diff --git a/src/pages/chat/features/Sidebar/SystemRole/style.ts b/src/app/chat/features/Sidebar/SystemRole/style.ts similarity index 100% rename from src/pages/chat/features/Sidebar/SystemRole/style.ts rename to src/app/chat/features/Sidebar/SystemRole/style.ts diff --git a/src/pages/chat/features/Sidebar/Topic/DefaultContent.tsx b/src/app/chat/features/Sidebar/Topic/DefaultContent.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Topic/DefaultContent.tsx rename to src/app/chat/features/Sidebar/Topic/DefaultContent.tsx diff --git a/src/pages/chat/features/Sidebar/Topic/SkeletonList.tsx b/src/app/chat/features/Sidebar/Topic/SkeletonList.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Topic/SkeletonList.tsx rename to src/app/chat/features/Sidebar/Topic/SkeletonList.tsx diff --git a/src/pages/chat/features/Sidebar/Topic/TopicContent.tsx b/src/app/chat/features/Sidebar/Topic/TopicContent.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Topic/TopicContent.tsx rename to src/app/chat/features/Sidebar/Topic/TopicContent.tsx diff --git a/src/pages/chat/features/Sidebar/Topic/TopicItem.tsx b/src/app/chat/features/Sidebar/Topic/TopicItem.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Topic/TopicItem.tsx rename to src/app/chat/features/Sidebar/Topic/TopicItem.tsx diff --git a/src/pages/chat/features/Sidebar/Topic/index.tsx b/src/app/chat/features/Sidebar/Topic/index.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/Topic/index.tsx rename to src/app/chat/features/Sidebar/Topic/index.tsx diff --git a/src/pages/chat/features/Sidebar/TopicSearchBar/index.tsx b/src/app/chat/features/Sidebar/TopicSearchBar/index.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/TopicSearchBar/index.tsx rename to src/app/chat/features/Sidebar/TopicSearchBar/index.tsx diff --git a/src/pages/chat/features/Sidebar/index.tsx b/src/app/chat/features/Sidebar/index.tsx similarity index 100% rename from src/pages/chat/features/Sidebar/index.tsx rename to src/app/chat/features/Sidebar/index.tsx diff --git a/src/pages/chat/index.tsx b/src/app/chat/index.tsx similarity index 97% rename from src/pages/chat/index.tsx rename to src/app/chat/index.tsx index 14be013f86ee..b0007da6793b 100644 --- a/src/pages/chat/index.tsx +++ b/src/app/chat/index.tsx @@ -13,8 +13,8 @@ import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle'; import Conversation from './features/Conversation'; import Header from './features/Header'; import SideBar from './features/Sidebar'; -import DesktopLayout from './layout'; import MobileLayout from './layout.mobile'; +import DesktopLayout from './layout.pc'; const Chat = memo(() => { const { mobile } = useResponsive(); diff --git a/src/pages/chat/layout.mobile.tsx b/src/app/chat/layout.mobile.tsx similarity index 100% rename from src/pages/chat/layout.mobile.tsx rename to src/app/chat/layout.mobile.tsx diff --git a/src/pages/chat/layout.tsx b/src/app/chat/layout.pc.tsx similarity index 100% rename from src/pages/chat/layout.tsx rename to src/app/chat/layout.pc.tsx diff --git a/src/pages/chat/mobile/index.tsx b/src/app/chat/mobile/index.tsx similarity index 95% rename from src/pages/chat/mobile/index.tsx rename to src/app/chat/mobile/index.tsx index 7cb0e7b1d181..e2569d84bff7 100644 --- a/src/pages/chat/mobile/index.tsx +++ b/src/app/chat/mobile/index.tsx @@ -5,12 +5,12 @@ import { memo } from 'react'; import { Flexbox } from 'react-layout-kit'; import AppMobileLayout from '@/layout/AppMobileLayout'; -import Header from '@/pages/chat/features/Header'; import { useSessionStore } from '@/store/session'; import { agentSelectors } from '@/store/session/selectors'; import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle'; import Conversation from '../features/Conversation'; +import Header from '../features/Header'; import SideBar from '../features/Sidebar'; const Chat = memo(() => { diff --git a/src/app/chat/mobile/page.page.tsx b/src/app/chat/mobile/page.page.tsx deleted file mode 100644 index 4e4a73175278..000000000000 --- a/src/app/chat/mobile/page.page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import Page from '@/pages/chat/mobile'; - -const Index = () => { - return ; -}; - -export default Index; diff --git a/src/app/chat/page.page.tsx b/src/app/chat/mobile/page.tsx similarity index 67% rename from src/app/chat/page.page.tsx rename to src/app/chat/mobile/page.tsx index 031e8e3b6535..7d7a98c07ba7 100644 --- a/src/app/chat/page.page.tsx +++ b/src/app/chat/mobile/page.tsx @@ -1,4 +1,4 @@ -import Page from '@/pages/chat'; +import Page from './index'; const Index = () => { return ; diff --git a/src/app/page.page.tsx b/src/app/chat/page.tsx similarity index 67% rename from src/app/page.page.tsx rename to src/app/chat/page.tsx index 10950f8100f2..7d7a98c07ba7 100644 --- a/src/app/page.page.tsx +++ b/src/app/chat/page.tsx @@ -1,4 +1,4 @@ -import Page from '@/pages/home'; +import Page from './index'; const Index = () => { return ; diff --git a/src/pages/chat/setting/features/Header/Desktop.tsx b/src/app/chat/settings/features/Header/Desktop.tsx similarity index 100% rename from src/pages/chat/setting/features/Header/Desktop.tsx rename to src/app/chat/settings/features/Header/Desktop.tsx diff --git a/src/pages/chat/setting/features/Header/Mobile.tsx b/src/app/chat/settings/features/Header/Mobile.tsx similarity index 100% rename from src/pages/chat/setting/features/Header/Mobile.tsx rename to src/app/chat/settings/features/Header/Mobile.tsx diff --git a/src/pages/chat/setting/features/Header/index.tsx b/src/app/chat/settings/features/Header/index.tsx similarity index 100% rename from src/pages/chat/setting/features/Header/index.tsx rename to src/app/chat/settings/features/Header/index.tsx diff --git a/src/pages/chat/setting/index.tsx b/src/app/chat/settings/index.tsx similarity index 97% rename from src/pages/chat/setting/index.tsx rename to src/app/chat/settings/index.tsx index f38d11ee3cc8..acf076b0b44e 100644 --- a/src/pages/chat/setting/index.tsx +++ b/src/app/chat/settings/index.tsx @@ -11,8 +11,8 @@ import { useSessionStore } from '@/store/session'; import { agentSelectors } from '@/store/session/selectors'; import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle'; -import DesktopLayout from './layout'; import MobileLayout from './layout.mobile'; +import DesktopLayout from './layout.pc'; const EditPage = memo(() => { const { mobile } = useResponsive(); diff --git a/src/pages/chat/setting/layout.mobile.tsx b/src/app/chat/settings/layout.mobile.tsx similarity index 100% rename from src/pages/chat/setting/layout.mobile.tsx rename to src/app/chat/settings/layout.mobile.tsx diff --git a/src/pages/chat/setting/layout.tsx b/src/app/chat/settings/layout.pc.tsx similarity index 93% rename from src/pages/chat/setting/layout.tsx rename to src/app/chat/settings/layout.pc.tsx index 21c19d838310..75ed52516008 100644 --- a/src/pages/chat/setting/layout.tsx +++ b/src/app/chat/settings/layout.pc.tsx @@ -4,7 +4,7 @@ import { Flexbox } from 'react-layout-kit'; import SafeSpacing from '@/components/SafeSpacing'; import { HEADER_HEIGHT } from '@/const/layoutTokens'; -import ChatLayout from '../layout'; +import ChatLayout from '../layout.pc'; import Header from './features/Header'; const DesktopLayout = memo(({ children }) => { diff --git a/src/app/chat/settings/page.page.tsx b/src/app/chat/settings/page.page.tsx deleted file mode 100644 index 12119a1db987..000000000000 --- a/src/app/chat/settings/page.page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import Page from '@/pages/chat/setting'; - -const Index = () => { - return ; -}; - -export default Index; diff --git a/src/app/market/page.page.tsx b/src/app/chat/settings/page.tsx similarity index 66% rename from src/app/market/page.page.tsx rename to src/app/chat/settings/page.tsx index 4922ba629cf6..7d7a98c07ba7 100644 --- a/src/app/market/page.page.tsx +++ b/src/app/chat/settings/page.tsx @@ -1,4 +1,4 @@ -import Page from '@/pages/market'; +import Page from './index'; const Index = () => { return ; diff --git a/src/pages/home/Loading.tsx b/src/app/home/Loading.tsx similarity index 100% rename from src/pages/home/Loading.tsx rename to src/app/home/Loading.tsx diff --git a/src/pages/home/index.tsx b/src/app/home/index.tsx similarity index 93% rename from src/pages/home/index.tsx rename to src/app/home/index.tsx index 9405e07c9539..100cde1f4905 100644 --- a/src/pages/home/index.tsx +++ b/src/app/home/index.tsx @@ -2,7 +2,6 @@ import { memo } from 'react'; -import Loading from '@/pages/home/Loading'; import { useEffectAfterSessionHydrated, useSessionHydrated, @@ -11,6 +10,7 @@ import { import { sessionSelectors } from '@/store/session/selectors'; import Welcome from '../welcome'; +import Loading from './Loading'; const Home = memo(() => { const hydrated = useSessionHydrated(); diff --git a/src/app/layout.page.tsx b/src/app/layout.tsx similarity index 100% rename from src/app/layout.page.tsx rename to src/app/layout.tsx diff --git a/src/pages/market/features/AgentCard/AgentCardBanner.tsx b/src/app/market/features/AgentCard/AgentCardBanner.tsx similarity index 100% rename from src/pages/market/features/AgentCard/AgentCardBanner.tsx rename to src/app/market/features/AgentCard/AgentCardBanner.tsx diff --git a/src/pages/market/features/AgentCard/AgentCardItem.tsx b/src/app/market/features/AgentCard/AgentCardItem.tsx similarity index 100% rename from src/pages/market/features/AgentCard/AgentCardItem.tsx rename to src/app/market/features/AgentCard/AgentCardItem.tsx diff --git a/src/pages/market/features/AgentCard/Loading.tsx b/src/app/market/features/AgentCard/Loading.tsx similarity index 100% rename from src/pages/market/features/AgentCard/Loading.tsx rename to src/app/market/features/AgentCard/Loading.tsx diff --git a/src/pages/market/features/AgentCard/index.tsx b/src/app/market/features/AgentCard/index.tsx similarity index 100% rename from src/pages/market/features/AgentCard/index.tsx rename to src/app/market/features/AgentCard/index.tsx diff --git a/src/pages/market/features/AgentCard/style.ts b/src/app/market/features/AgentCard/style.ts similarity index 100% rename from src/pages/market/features/AgentCard/style.ts rename to src/app/market/features/AgentCard/style.ts diff --git a/src/pages/market/features/AgentSearchBar/index.tsx b/src/app/market/features/AgentSearchBar/index.tsx similarity index 100% rename from src/pages/market/features/AgentSearchBar/index.tsx rename to src/app/market/features/AgentSearchBar/index.tsx diff --git a/src/pages/market/features/Header/Desktop.tsx b/src/app/market/features/Header/Desktop.tsx similarity index 100% rename from src/pages/market/features/Header/Desktop.tsx rename to src/app/market/features/Header/Desktop.tsx diff --git a/src/pages/market/features/Header/Mobile.tsx b/src/app/market/features/Header/Mobile.tsx similarity index 100% rename from src/pages/market/features/Header/Mobile.tsx rename to src/app/market/features/Header/Mobile.tsx diff --git a/src/pages/market/features/Header/index.tsx b/src/app/market/features/Header/index.tsx similarity index 100% rename from src/pages/market/features/Header/index.tsx rename to src/app/market/features/Header/index.tsx diff --git a/src/pages/market/features/SideBar/AgentInfo/Comment.tsx b/src/app/market/features/SideBar/AgentInfo/Comment.tsx similarity index 100% rename from src/pages/market/features/SideBar/AgentInfo/Comment.tsx rename to src/app/market/features/SideBar/AgentInfo/Comment.tsx diff --git a/src/pages/market/features/SideBar/AgentInfo/Header.tsx b/src/app/market/features/SideBar/AgentInfo/Header.tsx similarity index 100% rename from src/pages/market/features/SideBar/AgentInfo/Header.tsx rename to src/app/market/features/SideBar/AgentInfo/Header.tsx diff --git a/src/pages/market/features/SideBar/AgentInfo/Loading.tsx b/src/app/market/features/SideBar/AgentInfo/Loading.tsx similarity index 100% rename from src/pages/market/features/SideBar/AgentInfo/Loading.tsx rename to src/app/market/features/SideBar/AgentInfo/Loading.tsx diff --git a/src/pages/market/features/SideBar/AgentInfo/TokenTag.tsx b/src/app/market/features/SideBar/AgentInfo/TokenTag.tsx similarity index 100% rename from src/pages/market/features/SideBar/AgentInfo/TokenTag.tsx rename to src/app/market/features/SideBar/AgentInfo/TokenTag.tsx diff --git a/src/pages/market/features/SideBar/AgentInfo/index.tsx b/src/app/market/features/SideBar/AgentInfo/index.tsx similarity index 96% rename from src/pages/market/features/SideBar/AgentInfo/index.tsx rename to src/app/market/features/SideBar/AgentInfo/index.tsx index f16cf0d44f5d..c0e3013914e0 100644 --- a/src/pages/market/features/SideBar/AgentInfo/index.tsx +++ b/src/app/market/features/SideBar/AgentInfo/index.tsx @@ -3,13 +3,13 @@ import { memo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Flexbox } from 'react-layout-kit'; -import TokenTag from '@/pages/market/features/SideBar/AgentInfo/TokenTag'; import { useMarketStore } from '@/store/market'; import AgentCardBanner from '../../AgentCard/AgentCardBanner'; import Comment from './Comment'; import Header from './Header'; import Loading from './Loading'; +import TokenTag from './TokenTag'; import { useStyles } from './style'; enum InfoTabs { diff --git a/src/pages/market/features/SideBar/AgentInfo/style.ts b/src/app/market/features/SideBar/AgentInfo/style.ts similarity index 100% rename from src/pages/market/features/SideBar/AgentInfo/style.ts rename to src/app/market/features/SideBar/AgentInfo/style.ts diff --git a/src/pages/market/features/SideBar/Desktop.tsx b/src/app/market/features/SideBar/Desktop.tsx similarity index 100% rename from src/pages/market/features/SideBar/Desktop.tsx rename to src/app/market/features/SideBar/Desktop.tsx diff --git a/src/pages/market/features/SideBar/Mobile.tsx b/src/app/market/features/SideBar/Mobile.tsx similarity index 100% rename from src/pages/market/features/SideBar/Mobile.tsx rename to src/app/market/features/SideBar/Mobile.tsx diff --git a/src/pages/market/features/SideBar/index.tsx b/src/app/market/features/SideBar/index.tsx similarity index 100% rename from src/pages/market/features/SideBar/index.tsx rename to src/app/market/features/SideBar/index.tsx diff --git a/src/pages/market/features/TagList/index.tsx b/src/app/market/features/TagList/index.tsx similarity index 100% rename from src/pages/market/features/TagList/index.tsx rename to src/app/market/features/TagList/index.tsx diff --git a/src/pages/market/index.tsx b/src/app/market/index.tsx similarity index 96% rename from src/pages/market/index.tsx rename to src/app/market/index.tsx index 28861940524b..9fad7dafa459 100644 --- a/src/pages/market/index.tsx +++ b/src/app/market/index.tsx @@ -10,8 +10,8 @@ import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle'; import AgentCard from './features/AgentCard'; import AgentSearchBar from './features/AgentSearchBar'; -import DesktopLayout from './layout'; import MobileLayout from './layout.mobile'; +import DesktopLayout from './layout.pc'; const Market = memo(() => { const { t } = useTranslation('common'); diff --git a/src/pages/market/layout.mobile.tsx b/src/app/market/layout.mobile.tsx similarity index 91% rename from src/pages/market/layout.mobile.tsx rename to src/app/market/layout.mobile.tsx index 02ceddcce92a..2d3e52adc16b 100644 --- a/src/pages/market/layout.mobile.tsx +++ b/src/app/market/layout.mobile.tsx @@ -2,10 +2,10 @@ import { ReactNode, memo } from 'react'; import { Flexbox } from 'react-layout-kit'; import AppMobileLayout from '@/layout/AppMobileLayout'; -import SideBar from '@/pages/market/features/SideBar'; import { useSwitchSideBarOnInit } from '@/store/global'; import Header from './features/Header'; +import SideBar from './features/SideBar'; const MarketLayout = memo<{ children: ReactNode }>(({ children }) => { useSwitchSideBarOnInit('market'); diff --git a/src/pages/market/layout.tsx b/src/app/market/layout.pc.tsx similarity index 100% rename from src/pages/market/layout.tsx rename to src/app/market/layout.pc.tsx diff --git a/src/app/welcome/page.page.tsx b/src/app/market/page.tsx similarity index 65% rename from src/app/welcome/page.page.tsx rename to src/app/market/page.tsx index fbba61e0e3f9..7d7a98c07ba7 100644 --- a/src/app/welcome/page.page.tsx +++ b/src/app/market/page.tsx @@ -1,4 +1,4 @@ -import Page from '@/pages/welcome'; +import Page from './index'; const Index = () => { return ; diff --git a/src/app/page.tsx b/src/app/page.tsx new file mode 100644 index 000000000000..12f8d75600bb --- /dev/null +++ b/src/app/page.tsx @@ -0,0 +1,7 @@ +import Page from './home'; + +const Index = () => { + return ; +}; + +export default Index; diff --git a/src/pages/settings/features/Banner/index.tsx b/src/app/settings/features/Banner/index.tsx similarity index 100% rename from src/pages/settings/features/Banner/index.tsx rename to src/app/settings/features/Banner/index.tsx diff --git a/src/pages/settings/features/Header/Desktop.tsx b/src/app/settings/features/Header/Desktop.tsx similarity index 100% rename from src/pages/settings/features/Header/Desktop.tsx rename to src/app/settings/features/Header/Desktop.tsx diff --git a/src/pages/settings/features/Header/Mobile.tsx b/src/app/settings/features/Header/Mobile.tsx similarity index 100% rename from src/pages/settings/features/Header/Mobile.tsx rename to src/app/settings/features/Header/Mobile.tsx diff --git a/src/pages/settings/features/Header/index.tsx b/src/app/settings/features/Header/index.tsx similarity index 100% rename from src/pages/settings/features/Header/index.tsx rename to src/app/settings/features/Header/index.tsx diff --git a/src/pages/settings/features/Settings/Agent.tsx b/src/app/settings/features/Settings/Agent.tsx similarity index 100% rename from src/pages/settings/features/Settings/Agent.tsx rename to src/app/settings/features/Settings/Agent.tsx diff --git a/src/pages/settings/features/Settings/Common.tsx b/src/app/settings/features/Settings/Common.tsx similarity index 100% rename from src/pages/settings/features/Settings/Common.tsx rename to src/app/settings/features/Settings/Common.tsx diff --git a/src/pages/settings/features/Settings/LLM/Checker.tsx b/src/app/settings/features/Settings/LLM/Checker.tsx similarity index 100% rename from src/pages/settings/features/Settings/LLM/Checker.tsx rename to src/app/settings/features/Settings/LLM/Checker.tsx diff --git a/src/pages/settings/features/Settings/LLM/ModelList.tsx b/src/app/settings/features/Settings/LLM/ModelList.tsx similarity index 100% rename from src/pages/settings/features/Settings/LLM/ModelList.tsx rename to src/app/settings/features/Settings/LLM/ModelList.tsx diff --git a/src/pages/settings/features/Settings/LLM/getModelList.ts b/src/app/settings/features/Settings/LLM/getModelList.ts similarity index 100% rename from src/pages/settings/features/Settings/LLM/getModelList.ts rename to src/app/settings/features/Settings/LLM/getModelList.ts diff --git a/src/pages/settings/features/Settings/LLM/index.tsx b/src/app/settings/features/Settings/LLM/index.tsx similarity index 100% rename from src/pages/settings/features/Settings/LLM/index.tsx rename to src/app/settings/features/Settings/LLM/index.tsx diff --git a/src/pages/settings/features/Settings/index.tsx b/src/app/settings/features/Settings/index.tsx similarity index 100% rename from src/pages/settings/features/Settings/index.tsx rename to src/app/settings/features/Settings/index.tsx diff --git a/src/pages/settings/features/ThemeSwatches/ThemeSwatchesNeutral.tsx b/src/app/settings/features/ThemeSwatches/ThemeSwatchesNeutral.tsx similarity index 100% rename from src/pages/settings/features/ThemeSwatches/ThemeSwatchesNeutral.tsx rename to src/app/settings/features/ThemeSwatches/ThemeSwatchesNeutral.tsx diff --git a/src/pages/settings/features/ThemeSwatches/ThemeSwatchesPrimary.tsx b/src/app/settings/features/ThemeSwatches/ThemeSwatchesPrimary.tsx similarity index 100% rename from src/pages/settings/features/ThemeSwatches/ThemeSwatchesPrimary.tsx rename to src/app/settings/features/ThemeSwatches/ThemeSwatchesPrimary.tsx diff --git a/src/pages/settings/features/ThemeSwatches/index.ts b/src/app/settings/features/ThemeSwatches/index.ts similarity index 100% rename from src/pages/settings/features/ThemeSwatches/index.ts rename to src/app/settings/features/ThemeSwatches/index.ts diff --git a/src/pages/settings/index.tsx b/src/app/settings/index.tsx similarity index 95% rename from src/pages/settings/index.tsx rename to src/app/settings/index.tsx index c1189b496b6a..721dd247330c 100644 --- a/src/pages/settings/index.tsx +++ b/src/app/settings/index.tsx @@ -9,8 +9,8 @@ import { useSwitchSideBarOnInit } from '@/store/global'; import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle'; import Settings from './features/Settings'; -import DesktopLayout from './layout'; import MobileLayout from './layout.mobile'; +import DesktopLayout from './layout.pc'; const Setting = memo(() => { const { mobile } = useResponsive(); diff --git a/src/pages/settings/layout.mobile.tsx b/src/app/settings/layout.mobile.tsx similarity index 100% rename from src/pages/settings/layout.mobile.tsx rename to src/app/settings/layout.mobile.tsx diff --git a/src/pages/settings/layout.tsx b/src/app/settings/layout.pc.tsx similarity index 100% rename from src/pages/settings/layout.tsx rename to src/app/settings/layout.pc.tsx diff --git a/src/app/settings/page.page.tsx b/src/app/settings/page.page.tsx deleted file mode 100644 index 80a480fe65f3..000000000000 --- a/src/app/settings/page.page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import Page from '@/pages/settings'; - -const Index = () => { - return ; -}; - -export default Index; diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx new file mode 100644 index 000000000000..7d7a98c07ba7 --- /dev/null +++ b/src/app/settings/page.tsx @@ -0,0 +1,7 @@ +import Page from './index'; + +const Index = () => { + return ; +}; + +export default Index; diff --git a/src/pages/welcome/features/Banner/AgentCard.tsx b/src/app/welcome/features/Banner/AgentCard.tsx similarity index 100% rename from src/pages/welcome/features/Banner/AgentCard.tsx rename to src/app/welcome/features/Banner/AgentCard.tsx diff --git a/src/pages/welcome/features/Banner/AgentTemplate.tsx b/src/app/welcome/features/Banner/AgentTemplate.tsx similarity index 100% rename from src/pages/welcome/features/Banner/AgentTemplate.tsx rename to src/app/welcome/features/Banner/AgentTemplate.tsx diff --git a/src/pages/welcome/features/Banner/Hero.tsx b/src/app/welcome/features/Banner/Hero.tsx similarity index 100% rename from src/pages/welcome/features/Banner/Hero.tsx rename to src/app/welcome/features/Banner/Hero.tsx diff --git a/src/pages/welcome/features/Banner/index.tsx b/src/app/welcome/features/Banner/index.tsx similarity index 100% rename from src/pages/welcome/features/Banner/index.tsx rename to src/app/welcome/features/Banner/index.tsx diff --git a/src/pages/welcome/features/Banner/style.ts b/src/app/welcome/features/Banner/style.ts similarity index 100% rename from src/pages/welcome/features/Banner/style.ts rename to src/app/welcome/features/Banner/style.ts diff --git a/src/pages/welcome/features/Footer/index.tsx b/src/app/welcome/features/Footer/index.tsx similarity index 100% rename from src/pages/welcome/features/Footer/index.tsx rename to src/app/welcome/features/Footer/index.tsx diff --git a/src/pages/welcome/index.tsx b/src/app/welcome/index.tsx similarity index 95% rename from src/pages/welcome/index.tsx rename to src/app/welcome/index.tsx index fb3fd3537a00..7caf378d6511 100644 --- a/src/pages/welcome/index.tsx +++ b/src/app/welcome/index.tsx @@ -9,8 +9,8 @@ import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle'; import Banner from './features/Banner'; import Footer from './features/Footer'; -import Layout from './layout'; import Mobile from './layout.mobile'; +import Layout from './layout.pc'; const Welcome = memo(() => { const { mobile } = useResponsive(); diff --git a/src/pages/welcome/layout.mobile.tsx b/src/app/welcome/layout.mobile.tsx similarity index 100% rename from src/pages/welcome/layout.mobile.tsx rename to src/app/welcome/layout.mobile.tsx diff --git a/src/pages/welcome/layout.tsx b/src/app/welcome/layout.pc.tsx similarity index 100% rename from src/pages/welcome/layout.tsx rename to src/app/welcome/layout.pc.tsx diff --git a/src/app/welcome/page.tsx b/src/app/welcome/page.tsx new file mode 100644 index 000000000000..7d7a98c07ba7 --- /dev/null +++ b/src/app/welcome/page.tsx @@ -0,0 +1,7 @@ +import Page from './index'; + +const Index = () => { + return ; +}; + +export default Index;