Skip to content

Commit

Permalink
♻️ refactor: move hooks and component (#5551)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Jan 22, 2025
1 parent ebdd626 commit c5db091
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { memo } from 'react';
import { Flexbox } from 'react-layout-kit';

import ModelSwitchPanel from '@/features/ModelSwitchPanel';
import PluginTag from '@/features/PluginTag';
import { useModelSupportToolUse } from '@/hooks/useModelSupportToolUse';
import { useAgentStore } from '@/store/agent';
import { agentSelectors } from '@/store/agent/selectors';

import PluginTag from '../../../features/PluginTag';
import KnowledgeTag from './KnowledgeTag';

const TitleTags = memo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import { PropsWithChildren, memo } from 'react';
import { useTranslation } from 'react-i18next';

import { useFetchTopics } from '@/hooks/useFetchTopics';
import { useWorkspaceModal } from '@/hooks/useWorkspaceModal';
import { useGlobalStore } from '@/store/global';
import { systemStatusSelectors } from '@/store/global/selectors';

import { useWorkspaceModal } from '../../features/useWorkspaceModal';

const Topics = memo(({ children }: PropsWithChildren) => {
const [showAgentSettings, toggleConfig] = useGlobalStore((s) => [
systemStatusSelectors.mobileShowTopic(s),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import { memo } from 'react';
import { useTranslation } from 'react-i18next';

import { DESKTOP_HEADER_ICON_SIZE, MOBILE_HEADER_ICON_SIZE } from '@/const/layoutTokens';
import { useWorkspaceModal } from '@/hooks/useWorkspaceModal';
import { useChatStore } from '@/store/chat';

import { useWorkspaceModal } from '../useWorkspaceModal';

const ShareModal = dynamic(() => import('@/features/ShareModal'));

interface ShareButtonProps {
Expand Down
2 changes: 1 addition & 1 deletion src/features/ChatInput/ActionBar/Tools/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { PropsWithChildren, memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';

import { useWorkspaceModal } from '@/app/(main)/chat/(workspace)/features/useWorkspaceModal';
import PluginStore from '@/features/PluginStore';
import { useCheckPluginsIsInstalled } from '@/hooks/useCheckPluginsIsInstalled';
import { useFetchInstalledPlugins } from '@/hooks/useFetchInstalledPlugins';
import { useWorkspaceModal } from '@/hooks/useWorkspaceModal';
import { useAgentStore } from '@/store/agent';
import { agentSelectors } from '@/store/agent/selectors';
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/features/ShareModal/ShareImage/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';

import PluginTag from '@/app/(main)/chat/(workspace)/features/PluginTag';
import { ProductLogo } from '@/components/Branding';
import PluginTag from '@/features/PluginTag';
import { useAgentStore } from '@/store/agent';
import { agentSelectors } from '@/store/agent/selectors';
import { useSessionStore } from '@/store/session';
Expand Down
File renamed without changes.

0 comments on commit c5db091

Please sign in to comment.