♻️ refactor: rename chat folder to agent (#11409)

* clean state

* rename folder structure

* improve

* update
This commit is contained in:
Arvin Xu
2026-01-11 14:41:13 +08:00
committed by GitHub
parent b3690cb762
commit 7cfb1a385a
120 changed files with 26 additions and 160 deletions

View File

@@ -6,7 +6,7 @@ import CronTopicList from './Topic/CronTopicList';
export enum ChatSidebarKey {
CronTopics = 'cronTopics',
Topic = 'topic'
Topic = 'topic',
}
const Body = memo(() => {

View File

@@ -2,7 +2,7 @@ import { Flexbox } from '@lobehub/ui';
import { type FC } from 'react';
import { Outlet } from 'react-router-dom';
import AgentIdSync from '@/app/[variants]/(main)/chat/_layout/AgentIdSync';
import AgentIdSync from '@/app/[variants]/(main)/agent/_layout/AgentIdSync';
import { isDesktop } from '@/const/version';
import ProtocolUrlHandler from '@/features/ProtocolUrlHandler';
import { useInitAgentConfig } from '@/hooks/useInitAgentConfig';

View File

@@ -1,7 +1,7 @@
'use client';
import { Block, Flexbox } from '@lobehub/ui';
import { createStaticStyles , responsive } from 'antd-style';
import { createStaticStyles, responsive } from 'antd-style';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';

View File

@@ -8,13 +8,12 @@ import PluginTag from '@/features/PluginTag';
import { useAgentEnableSearch } from '@/hooks/useAgentEnableSearch';
import { useModelSupportToolUse } from '@/hooks/useModelSupportToolUse';
import { useAgentStore } from '@/store/agent';
import { agentChatConfigSelectors, agentSelectors } from '@/store/agent/selectors';
import { agentSelectors } from '@/store/agent/selectors';
import { useSessionStore } from '@/store/session';
import { sessionSelectors } from '@/store/session/selectors';
import { useUserStore } from '@/store/user';
import { authSelectors } from '@/store/user/selectors';
import HistoryLimitTags from './HistoryLimitTags';
import KnowledgeTag from './KnowledgeTag';
import MemberCountTag from './MemberCountTag';
import SearchTags from './SearchTags';
@@ -29,7 +28,6 @@ const TitleTags = memo(() => {
const plugins = useAgentStore(agentSelectors.displayableAgentPlugins, isEqual);
const enabledKnowledge = useAgentStore(agentSelectors.currentEnabledKnowledge, isEqual);
const enableHistoryCount = useAgentStore(agentChatConfigSelectors.enableHistoryCount);
const showPlugin = useModelSupportToolUse(model, provider);
const isLogin = useUserStore(authSelectors.isLogin);
@@ -55,7 +53,6 @@ const TitleTags = memo(() => {
{isAgentEnableSearch && <SearchTags />}
{showPlugin && plugins?.length > 0 && <PluginTag plugins={plugins} />}
{hasKnowledge && <KnowledgeTag data={enabledKnowledge} />}
{enableHistoryCount && <HistoryLimitTags />}
</Flexbox>
);
});

View File

@@ -3,9 +3,7 @@ import { PortalContent } from '@/features/Portal/router';
import Body from '../features/Body';
const Layout = () => {
return (
<PortalContent renderBody={(body) => <Body>{body}</Body>} />
);
return <PortalContent renderBody={(body) => <Body>{body}</Body>} />;
};
export default Layout;

View File

@@ -1,9 +1,10 @@
import { Suspense, memo } from 'react';
import DesktopLayout from '@/app/[variants]/(main)/chat/features/Portal/_layout/Desktop';
import MobileLayout from '@/app/[variants]/(main)/chat/features/Portal/_layout/Mobile';
import Loading from '@/components/Loading/BrandTextLoading';
import DesktopLayout from '../_layout/Desktop';
import MobileLayout from '../_layout/Mobile';
interface PortalPanelProps {
mobile?: boolean;
}

View File

@@ -1,9 +1,10 @@
import { Suspense } from 'react';
import Portal from '@/app/[variants]/(main)/chat/features/Portal/features/Portal';
import PortalPanel from '@/app/[variants]/(main)/chat/features/Portal/features/PortalPanel';
import Loading from '@/components/Loading/BrandTextLoading';
import Portal from './features/Portal';
import PortalPanel from './features/PortalPanel';
const ChatPortal = () => {
return (
<Portal>

Some files were not shown because too many files have changed in this diff Show More