🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
refactor: skill list
rdmclin2a8582b0b37f9
diff --git a/src/app/[variants]/(main)/settings/skill/features/SkillList.tsx b/src/app/[variants]/(main)/settings/skill/features/SkillList.tsxindex c2bfa70d886..a5362848f2a 100644--- a/src/app/[variants]/(main)/settings/skill/features/SkillList.tsx+++ b/src/app/[variants]/(main)/settings/skill/features/SkillList.tsx@@ -18,7 +18,7 @@ import { BlocksIcon } from 'lucide-react';import { memo, useMemo } from 'react';import { useTranslation } from 'react-i18next';-import AddSkillButton from '@/features/SkillStore/AddSkillButton';+import AddSkillButton from '@/features/SkillStore/SkillList/AddSkillButton';import { useFetchInstalledPlugins } from '@/hooks/useFetchInstalledPlugins';import { serverConfigSelectors, useServerConfigStore } from '@/store/serverConfig';import { useToolStore } from '@/store/tool';diff --git a/src/app/[variants]/(main)/settings/skill/index.tsx b/src/app/[variants]/(main)/settings/skill/index.tsxindex 14ad807683d..d2279bc796d 100644--- a/src/app/[variants]/(main)/settings/skill/index.tsx+++ b/src/app/[variants]/(main)/settings/skill/index.tsx@@ -21,7 +21,7 @@ const Page = () => {<><SettingHeaderextra={- <Button icon={<Icon icon={Store} />} onClick={handleOpenStore}>+ <Button icon={<Icon icon={Store} />} onClick={handleOpenStore} size="large">{t('skillStore.button')}</Button>}diff --git a/src/features/SkillStore/SkillDetail/Header.tsx b/src/features/SkillStore/SkillDetail/Header.tsxindex 805a06bc1a4..9c350738e4c 100644--- a/src/features/SkillStore/SkillDetail/Header.tsx+++ b/src/features/SkillStore/SkillDetail/Header.tsx@@ -7,7 +7,7 @@ import { Loader2, SquareArrowOutUpRight } from 'lucide-react';import { memo, useEffect, useRef } from 'react';import { useTranslation } from 'react-i18next';-import { useSkillConnect } from '@/features/SkillStore/LobeHubList/useSkillConnect';+import { useSkillConnect } from '@/features/SkillStore/SkillList/LobeHub/useSkillConnect';import { useDetailContext } from './DetailContext';import { ICON_SIZE, styles } from './styles';diff --git a/src/features/SkillStore/AddSkillButton.tsx b/src/features/SkillStore/SkillList/AddSkillButton.tsxsimilarity index 100%rename from src/features/SkillStore/AddSkillButton.tsxrename to src/features/SkillStore/SkillList/AddSkillButton.tsxdiff --git a/src/features/SkillStore/CommunityList/Item.tsx b/src/features/SkillStore/SkillList/Community/Item.tsxsimilarity index 100%rename from src/features/SkillStore/CommunityList/Item.tsxrename to src/features/SkillStore/SkillList/Community/Item.tsxdiff --git a/src/features/SkillStore/CommunityList/index.tsx b/src/features/SkillStore/SkillList/Community/index.tsxsimilarity index 100%rename from src/features/SkillStore/CommunityList/index.tsxrename to src/features/SkillStore/SkillList/Community/index.tsxdiff --git a/src/features/SkillStore/CustomList/Item.tsx b/src/features/SkillStore/SkillList/Custom/Item.tsxsimilarity index 100%rename from src/features/SkillStore/CustomList/Item.tsxrename to src/features/SkillStore/SkillList/Custom/Item.tsxdiff --git a/src/features/SkillStore/CustomList/index.tsx b/src/features/SkillStore/SkillList/Custom/index.tsxsimilarity index 100%rename from src/features/SkillStore/CustomList/index.tsxrename to src/features/SkillStore/SkillList/Custom/index.tsxdiff --git a/src/features/SkillStore/Empty.tsx b/src/features/SkillStore/SkillList/Empty.tsxsimilarity index 100%rename from src/features/SkillStore/Empty.tsxrename to src/features/SkillStore/SkillList/Empty.tsxdiff --git a/src/features/SkillStore/Loading.tsx b/src/features/SkillStore/SkillList/Loading.tsxsimilarity index 100%rename from src/features/SkillStore/Loading.tsxrename to src/features/SkillStore/SkillList/Loading.tsxdiff --git a/src/features/SkillStore/LobeHubList/Item.tsx b/src/features/SkillStore/SkillList/LobeHub/Item.tsxsimilarity index 100%rename from src/features/SkillStore/LobeHubList/Item.tsxrename to src/features/SkillStore/SkillList/LobeHub/Item.tsxdiff --git a/src/features/SkillStore/LobeHubList/index.tsx b/src/features/SkillStore/SkillList/LobeHub/index.tsxsimilarity index 97%rename from src/features/SkillStore/LobeHubList/index.tsxrename to src/features/SkillStore/SkillList/LobeHub/index.tsxindex 3ccd4597c59..38b4b5e4fe6 100644--- a/src/features/SkillStore/LobeHubList/index.tsx+++ b/src/features/SkillStore/SkillList/LobeHub/index.tsx@@ -4,6 +4,10 @@ import { KLAVIS_SERVER_TYPES, LOBEHUB_SKILL_PROVIDERS } from '@lobechat/const';import isEqual from 'fast-deep-equal';import { memo, useCallback, useMemo } from 'react';+import {+ createKlavisSkillDetailModal,+ createLobehubSkillDetailModal,+} from '@/features/SkillStore/SkillDetail';import { serverConfigSelectors, useServerConfigStore } from '@/store/serverConfig';import { useToolStore } from '@/store/tool';import { klavisStoreSelectors, lobehubSkillStoreSelectors } from '@/store/tool/selectors';@@ -11,7 +15,6 @@ import { KlavisServerStatus } from '@/store/tool/slices/klavisStore';import { LobehubSkillStatus } from '@/store/tool/slices/lobehubSkillStore/types';import Empty from '../Empty';-import { createKlavisSkillDetailModal, createLobehubSkillDetailModal } from '../SkillDetail';import { gridStyles } from '../style';import Item from './Item';diff --git a/src/features/SkillStore/LobeHubList/useSkillConnect.ts b/src/features/SkillStore/SkillList/LobeHub/useSkillConnect.tssimilarity index 98%rename from src/features/SkillStore/LobeHubList/useSkillConnect.tsrename to src/features/SkillStore/SkillList/LobeHub/useSkillConnect.tsindex d891d9f932d..691b3db0427 100644--- a/src/features/SkillStore/LobeHubList/useSkillConnect.ts+++ b/src/features/SkillStore/SkillList/LobeHub/useSkillConnect.ts@@ -213,7 +213,15 @@ export const useSkillConnect = ({ identifier, serverName, type }: UseSkillConnec} finally {setIsConnecting(false);}- }, [userId, serverName, klavisServer, identifier, createKlavisServer, refreshKlavisServerTools, openOAuthWindow]);+ }, [+ userId,+ serverName,+ klavisServer,+ identifier,+ createKlavisServer,+ refreshKlavisServerTools,+ openOAuthWindow,+ ]);const handleConnect = type === 'lobehub' ? handleLobehubConnect : handleKlavisConnect;diff --git a/src/features/SkillStore/VirtuosoLoading.tsx b/src/features/SkillStore/SkillList/VirtuosoLoading.tsxsimilarity index 100%rename from src/features/SkillStore/VirtuosoLoading.tsxrename to src/features/SkillStore/SkillList/VirtuosoLoading.tsxdiff --git a/src/features/SkillStore/style.ts b/src/features/SkillStore/SkillList/style.tssimilarity index 100%rename from src/features/SkillStore/style.tsrename to src/features/SkillStore/SkillList/style.tsdiff --git a/src/features/SkillStore/SkillStoreContent.tsx b/src/features/SkillStore/SkillStoreContent.tsxindex c98536e7210..c33f87f8718 100644--- a/src/features/SkillStore/SkillStoreContent.tsx+++ b/src/features/SkillStore/SkillStoreContent.tsx@@ -5,11 +5,11 @@ import { type SegmentedOptions } from 'antd/es/segmented';import { useState } from 'react';import { useTranslation } from 'react-i18next';-import AddSkillButton from './AddSkillButton';-import CommunityList from './CommunityList';-import CustomList from './CustomList';-import LobeHubList from './LobeHubList';import Search from './Search';+import AddSkillButton from './SkillList/AddSkillButton';+import CommunityList from './SkillList/Community';+import CustomList from './SkillList/Custom';+import LobeHubList from './SkillList/LobeHub';export enum SkillStoreTab {Community = 'community',